diff options
-rw-r--r-- | gfx/tilesets/forest-tree/1.2bpp | 1 | ||||
-rw-r--r-- | gfx/tilesets/forest-tree/2.2bpp | 2 | ||||
-rw-r--r-- | gfx/tilesets/forest-tree/3.2bpp | bin | 0 -> 16 bytes | |||
-rw-r--r-- | gfx/tilesets/forest-tree/4.2bpp | bin | 0 -> 16 bytes | |||
-rw-r--r-- | main.asm | 172 |
5 files changed, 174 insertions, 1 deletions
diff --git a/gfx/tilesets/forest-tree/1.2bpp b/gfx/tilesets/forest-tree/1.2bpp new file mode 100644 index 000000000..73414b5b6 --- /dev/null +++ b/gfx/tilesets/forest-tree/1.2bpp @@ -0,0 +1 @@ +«W$¬2¾0[LG`íò
\ No newline at end of file diff --git a/gfx/tilesets/forest-tree/2.2bpp b/gfx/tilesets/forest-tree/2.2bpp new file mode 100644 index 000000000..05a566248 --- /dev/null +++ b/gfx/tilesets/forest-tree/2.2bpp @@ -0,0 +1,2 @@ +«U&ª +:¾(3$nqß°
\ No newline at end of file diff --git a/gfx/tilesets/forest-tree/3.2bpp b/gfx/tilesets/forest-tree/3.2bpp Binary files differnew file mode 100644 index 000000000..f74e64652 --- /dev/null +++ b/gfx/tilesets/forest-tree/3.2bpp diff --git a/gfx/tilesets/forest-tree/4.2bpp b/gfx/tilesets/forest-tree/4.2bpp Binary files differnew file mode 100644 index 000000000..3a7284a13 --- /dev/null +++ b/gfx/tilesets/forest-tree/4.2bpp @@ -16700,7 +16700,177 @@ WaterTileFrames: ; fc41c INCBIN "baserom.gbc", $fc41c, $fc45c - $fc41c ; fc45c -INCBIN "baserom.gbc", $fc45c, $fc56d - $fc45c + +ForestTreeLeftAnimation: ; fc45c + ld hl, [sp+0] + ld b, h + ld c, l + +; Only during the Celebi event. + ld a, [$dbf3] + bit 2, a + jr nz, .asm_fc46c + ld hl, ForestTreeLeftFrames + jr .asm_fc47d + +.asm_fc46c + ld a, [TileAnimationTimer] + call GetForestTreeFrame + add a + add a + add a + add ForestTreeLeftFrames % $100 + ld l, a + ld a, 0 + adc ForestTreeLeftFrames / $100 + ld h, a + +.asm_fc47d + ld sp, hl + ld hl, $90c0 + jp WriteTile +; fc484 + + +ForestTreeLeftFrames: ; fc484 + INCBIN "gfx/tilesets/forest-tree/1.2bpp" + INCBIN "gfx/tilesets/forest-tree/2.2bpp" +; fc4a4 + +ForestTreeRightFrames: ; fc4a4 + INCBIN "gfx/tilesets/forest-tree/3.2bpp" + INCBIN "gfx/tilesets/forest-tree/4.2bpp" +; fc4c4 + + +ForestTreeRightAnimation: ; fc4c4 + ld hl, [sp+0] + ld b, h + ld c, l + +; Only during the Celebi event. + ld a, [$dbf3] + bit 2, a + jr nz, .asm_fc4d4 + ld hl, ForestTreeRightFrames + jr .asm_fc4eb + +.asm_fc4d4 + ld a, [TileAnimationTimer] + call GetForestTreeFrame + add a + add a + add a + add ForestTreeLeftFrames % $100 + ld l, a + ld a, 0 + adc ForestTreeLeftFrames / $100 + ld h, a + push bc + ld bc, ForestTreeRightFrames - ForestTreeLeftFrames + add hl, bc + pop bc + +.asm_fc4eb + ld sp, hl + ld hl, $90f0 + jp WriteTile +; fc4f2 + + +ForestTreeLeftAnimation2: ; fc4f2 + ld hl, [sp+0] + ld b, h + ld c, l + +; Only during the Celebi event. + ld a, [$dbf3] + bit 2, a + jr nz, .asm_fc502 + ld hl, ForestTreeLeftFrames + jr .asm_fc515 + +.asm_fc502 + ld a, [TileAnimationTimer] + call GetForestTreeFrame + xor 2 + add a + add a + add a + add ForestTreeLeftFrames % $100 + ld l, a + ld a, 0 + adc ForestTreeLeftFrames / $100 + ld h, a + +.asm_fc515 + ld sp, hl + ld hl, $90c0 + jp WriteTile +; fc51c + + +ForestTreeRightAnimation2: ; fc51c + ld hl, [sp+0] + ld b, h + ld c, l + +; Only during the Celebi event. + ld a, [$dbf3] + bit 2, a + jr nz, .asm_fc52c + ld hl, ForestTreeRightFrames + jr .asm_fc545 + +.asm_fc52c + ld a, [TileAnimationTimer] + call GetForestTreeFrame + xor 2 + add a + add a + add a + add ForestTreeLeftFrames % $100 + ld l, a + ld a, 0 + adc ForestTreeLeftFrames / $100 + ld h, a + push bc + ld bc, ForestTreeRightFrames - ForestTreeLeftFrames + add hl, bc + pop bc + +.asm_fc545 + ld sp, hl + ld hl, $90f0 + jp WriteTile +; fc54c + + +GetForestTreeFrame: ; fc54c +; Return 0 if a is even, or 2 if odd. + and a + jr z, .even + cp 1 + jr z, .odd + cp 2 + jr z, .even + cp 3 + jr z, .odd + cp 4 + jr z, .even + cp 5 + jr z, .odd + cp 6 + jr z, .even +.odd + ld a, 2 + scf + ret +.even + xor a + ret +; fc56d + AnimateFlowerTile: ; fc56d ; No parameters. |