Level selection menu: implement landmark transitions not involving page change (#12)

This commit is contained in:
xCrystal
2023-08-23 12:50:22 +02:00
parent e866cdab48
commit d5dc7b38df
3 changed files with 178 additions and 17 deletions

View File

@@ -846,7 +846,7 @@ AnimSeq_Celebi:
ret
AnimSeq_LevelSelectionMenuWalkDown:
call LevelSelectionMenuHandleMovement
call LevelSelectionMenuHandleTransition
ret nc
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
@@ -854,7 +854,7 @@ AnimSeq_LevelSelectionMenuWalkDown:
ret
AnimSeq_LevelSelectionMenuWalkUp:
call LevelSelectionMenuHandleMovement
call LevelSelectionMenuHandleTransition
ret nc
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
@@ -862,7 +862,7 @@ AnimSeq_LevelSelectionMenuWalkUp:
ret
AnimSeq_LevelSelectionMenuWalkLeft:
call LevelSelectionMenuHandleMovement
call LevelSelectionMenuHandleTransition
ret nc
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -870,19 +870,20 @@ AnimSeq_LevelSelectionMenuWalkLeft:
ret
AnimSeq_LevelSelectionMenuWalkRight:
call LevelSelectionMenuHandleMovement
call LevelSelectionMenuHandleTransition
ret nc
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
inc [hl]
ret
LevelSelectionMenuHandleMovement:
LevelSelectionMenuHandleTransition:
; return carry if apply x/y displacement during this frame
ld a, [wLevelSelectionMenuStandingStill]
and a
ret nz ; nc
scf
ret ; c
farcall _LevelSelectionMenuHandleTransition
ret
AnimSeqs_AnonJumptable:
ld hl, sp+0