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

@@ -22,11 +22,14 @@ LevelSelectionMenu::
ld [wLevelSelectionMenuCurrentLandmark], a
call LevelSelectionMenu_GetLandmarkPage
ld [wLevelSelectionMenuCurrentPage], a
ld a, TRUE
ld [wLevelSelectionMenuStandingStill], a
call LevelSelectionMenu_InitTilemap
ld b, CGB_LEVEL_SELECTION_MENU
call GetCGBLayout
call GetCGBLayout ; apply and commit attrmap (takes 4 frames) and pals
call SetPalettes
call LevelSelectionMenu_InitPlayerSprite
ld de, MUSIC_GAME_CORNER
call PlayMusic
@@ -64,7 +67,7 @@ LevelSelectionMenu_InitTilemap:
.loop
ld a, [de]
cp $ff ; tilemaps are $ff-terminated
jp z, WaitBGMap2 ; takes 8 frames to commit tilemap and attrmap
jp z, WaitBGMap ; commit tilemap (4 frames)
ld a, [de]
ld [hli], a
inc de
@@ -76,6 +79,9 @@ LevelSelectionMenu_InitTilemap:
dw LevelSelectionMenuPage3Tilemap
dw LevelSelectionMenuPage4Tilemap
LevelSelectionMenu_InitPlayerSprite:
ret
LevelSelectionMenu_GetLandmarkPage:
; Return page number (a) of landmark a.
push hl