mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
ilex forest tree tile animations
This commit is contained in:
parent
399925fff5
commit
6dde0b274d
1
gfx/tilesets/forest-tree/1.2bpp
Normal file
1
gfx/tilesets/forest-tree/1.2bpp
Normal file
@ -0,0 +1 @@
|
||||
ŤW$Ź2ž0[LG`íň
|
2
gfx/tilesets/forest-tree/2.2bpp
Normal file
2
gfx/tilesets/forest-tree/2.2bpp
Normal file
@ -0,0 +1,2 @@
|
||||
ォU&ェ
|
||||
:セ(3$nq゚ー
|
BIN
gfx/tilesets/forest-tree/3.2bpp
Normal file
BIN
gfx/tilesets/forest-tree/3.2bpp
Normal file
Binary file not shown.
BIN
gfx/tilesets/forest-tree/4.2bpp
Normal file
BIN
gfx/tilesets/forest-tree/4.2bpp
Normal file
Binary file not shown.
172
main.asm
172
main.asm
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user