mirror of https://github.com/pret/pokecrystal.git
recomment _AnimateTileset
This commit is contained in:
parent
cc2906b68f
commit
7d5e5b8182
20
main.asm
20
main.asm
|
@ -65390,42 +65390,42 @@ DoBadgeTypeBoosts: ; fbe24
|
||||||
SECTION "bank3F",ROMX,BANK[$3F]
|
SECTION "bank3F",ROMX,BANK[$3F]
|
||||||
|
|
||||||
_AnimateTileset: ; fc000
|
_AnimateTileset: ; fc000
|
||||||
; Iterate over a given pointer array of animation functions
|
; Iterate over a given pointer array of
|
||||||
; (one per frame).
|
; animation functions (one per frame).
|
||||||
|
|
||||||
; Typically in wra1, vra0
|
; Typically in wra1, vra0
|
||||||
|
|
||||||
; Beginning of animation pointer array
|
|
||||||
ld a, [TilesetAnim]
|
ld a, [TilesetAnim]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [TilesetAnim + 1]
|
ld a, [TilesetAnim + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
|
|
||||||
; Play this frame.
|
ld a, [hTileAnimFrame]
|
||||||
ld a, [hTileAnimFrame] ; frame count
|
|
||||||
ld l, a
|
ld l, a
|
||||||
inc a
|
inc a
|
||||||
ld [hTileAnimFrame], a
|
ld [hTileAnimFrame], a
|
||||||
|
|
||||||
; Each pointer has:
|
|
||||||
ld h, 0
|
ld h, 0
|
||||||
add hl, hl
|
add hl, hl
|
||||||
add hl, hl
|
add hl, hl
|
||||||
add hl, de
|
add hl, de
|
||||||
|
|
||||||
; 2-byte parameter (all functions take input de)
|
; 2-byte parameter
|
||||||
|
; All functions take input de.
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
|
|
||||||
; Function address
|
; Function address
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
|
|
||||||
jp [hl]
|
jp [hl]
|
||||||
; fc01b
|
; fc01b
|
||||||
|
|
||||||
|
|
||||||
Tileset00Anim: ; 0xfc01b
|
Tileset00Anim: ; 0xfc01b
|
||||||
Tileset02Anim: ; 0xfc01b
|
Tileset02Anim: ; 0xfc01b
|
||||||
Tileset03Anim: ; 0xfc01b
|
Tileset03Anim: ; 0xfc01b
|
||||||
|
|
Loading…
Reference in New Issue