Level selection menu: sprite anim data (#12)

This commit is contained in:
xCrystal
2023-08-20 13:03:33 +02:00
parent fc2e757c57
commit 84d5bdb55d
8 changed files with 229 additions and 3 deletions

View File

@@ -620,7 +620,7 @@ _CGB_LevelSelectionMenu:
ld a, b
or c
jr nz, .loop
; apply pals and attrmap
; apply and commit pals and attrmap
call ApplyAttrmap
call ApplyPals
ld a, TRUE

View File

@@ -49,6 +49,10 @@ DoAnimFrame:
dw AnimSeq_IntroUnown
dw AnimSeq_IntroUnownF
dw AnimSeq_IntroSuicuneAway
dw AnimSeq_LevelSelectionMenuWalkDown
dw AnimSeq_LevelSelectionMenuWalkUp
dw AnimSeq_LevelSelectionMenuWalkLeft
dw AnimSeq_LevelSelectionMenuWalkRight
assert_table_length NUM_SPRITE_ANIM_SEQS
AnimSeq_Null:
@@ -841,6 +845,45 @@ AnimSeq_Celebi:
farcall UpdateCelebiPosition
ret
AnimSeq_LevelSelectionMenuWalkDown:
call LevelSelectionMenuHandleMovement
ret nc
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
inc [hl]
ret
AnimSeq_LevelSelectionMenuWalkUp:
call LevelSelectionMenuHandleMovement
ret nc
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
dec [hl]
ret
AnimSeq_LevelSelectionMenuWalkLeft:
call LevelSelectionMenuHandleMovement
ret nc
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
dec [hl]
ret
AnimSeq_LevelSelectionMenuWalkRight:
call LevelSelectionMenuHandleMovement
ret nc
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
inc [hl]
ret
LevelSelectionMenuHandleMovement:
ld a, [wLevelSelectionMenuStandingStill]
and a
ret nz ; nc
scf
ret ; c
AnimSeqs_AnonJumptable:
ld hl, sp+0
ld e, [hl]