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

@ -80,6 +80,14 @@ DEF NUM_SPRITEANIMDICT_ENTRIES EQU 10
const SPRITE_ANIM_INDEX_INTRO_UNOWN_F ; 2a
const SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY ; 2b
const SPRITE_ANIM_INDEX_CELEBI ; 2c
const SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_MALE_WALK_DOWN ; 2d
const SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_FEMALE_WALK_DOWN ; 2e
const SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_MALE_WALK_UP ; 2f
const SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_FEMALE_WALK_UP ; 30
const SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_MALE_WALK_LEFT ; 31
const SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_FEMALE_WALK_LEFT ; 32
const SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_MALE_WALK_RIGHT ; 33
const SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_FEMALE_WALK_RIGHT ; 34
DEF NUM_SPRITE_ANIM_INDEXES EQU const_value
; DoAnimFrame.Jumptable indexes (see engine/gfx/sprite_anims.asm)
@ -119,6 +127,10 @@ DEF NUM_SPRITE_ANIM_INDEXES EQU const_value
const SPRITE_ANIM_SEQ_INTRO_UNOWN ; 20
const SPRITE_ANIM_SEQ_INTRO_UNOWN_F ; 21
const SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY ; 22
const SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_DOWN ; 23
const SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_UP ; 24
const SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_LEFT ; 25
const SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_RIGHT ; 26
DEF NUM_SPRITE_ANIM_SEQS EQU const_value
; SpriteAnimFrameData indexes (see data/sprite_anims/framesets.asm)
@ -189,6 +201,14 @@ DEF NUM_SPRITE_ANIM_SEQS EQU const_value
const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F ; 3f
const SPRITE_ANIM_FRAMESET_CELEBI_LEFT ; 40
const SPRITE_ANIM_FRAMESET_CELEBI_RIGHT ; 41
const SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_MALE_WALK_DOWN ; 42
const SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_FEMALE_WALK_DOWN ; 43
const SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_MALE_WALK_UP ; 44
const SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_FEMALE_WALK_UP ; 45
const SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_MALE_WALK_LEFT ; 46
const SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_FEMALE_WALK_LEFT ; 47
const SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_MALE_WALK_RIGHT ; 48
const SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_FEMALE_WALK_RIGHT ; 49
DEF NUM_SPRITE_ANIM_FRAMESETS EQU const_value
; SpriteAnimOAMData indexes (see data/sprite_anims/oam.asm)
@ -333,4 +353,20 @@ DEF NUM_SPRITE_ANIM_FRAMESETS EQU const_value
const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_9 ; 89
const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_10 ; 8a
const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_11 ; 8b
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_DOWN_1 ; 8c
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_DOWN_2 ; 8d
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_DOWN_1 ; 8e
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_DOWN_2 ; 8f
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_UP_1 ; 90
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_UP_2 ; 91
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_UP_1 ; 92
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_UP_2 ; 93
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_LEFT_1 ; 94
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_LEFT_2 ; 95
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_LEFT_1 ; 96
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_LEFT_2 ; 97
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_RIGHT_1 ; 98
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_RIGHT_2 ; 99
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_RIGHT_1 ; 9a
const SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_RIGHT_2 ; 9b
DEF NUM_SPRITE_ANIM_OAMSETS EQU const_value

View File

@ -67,6 +67,14 @@ SpriteAnimFrameData:
dw .Frameset_IntroUnownF
dw .Frameset_CelebiLeft
dw .Frameset_CelebiRight
dw .Frameset_LevelSelectionMenuMaleWalkDown
dw .Frameset_LevelSelectionMenuFemaleWalkDown
dw .Frameset_LevelSelectionMenuMaleWalkUp
dw .Frameset_LevelSelectionMenuFemaleWalkUp
dw .Frameset_LevelSelectionMenuMaleWalkLeft
dw .Frameset_LevelSelectionMenuFemaleWalkLeft
dw .Frameset_LevelSelectionMenuMaleWalkRight
dw .Frameset_LevelSelectionMenuFemaleWalkRight
assert_table_length NUM_SPRITE_ANIM_FRAMESETS
.Frameset_00:
@ -497,3 +505,59 @@ SpriteAnimFrameData:
oamframe SPRITE_ANIM_OAMSET_CELEBI_1, 8, OAM_X_FLIP
oamframe SPRITE_ANIM_OAMSET_CELEBI_2, 8, OAM_X_FLIP
oamend
.Frameset_LevelSelectionMenuMaleWalkDown:
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_DOWN_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_DOWN_2, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_DOWN_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_DOWN_2, 6, OAM_X_FLIP
oamrestart
.Frameset_LevelSelectionMenuFemaleWalkDown:
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_DOWN_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_DOWN_2, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_DOWN_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_DOWN_2, 6, OAM_X_FLIP
oamrestart
.Frameset_LevelSelectionMenuMaleWalkUp:
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_UP_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_UP_2, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_UP_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_UP_2, 6, OAM_X_FLIP
oamrestart
.Frameset_LevelSelectionMenuFemaleWalkUp:
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_UP_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_UP_2, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_UP_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_UP_2, 6, OAM_X_FLIP
oamrestart
.Frameset_LevelSelectionMenuMaleWalkLeft:
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_LEFT_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_LEFT_2, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_LEFT_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_LEFT_2, 6
oamrestart
.Frameset_LevelSelectionMenuFemaleWalkLeft:
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_LEFT_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_LEFT_2, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_LEFT_1, 6
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_LEFT_2, 6
oamrestart
.Frameset_LevelSelectionMenuMaleWalkRight:
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_RIGHT_1, 6, OAM_X_FLIP
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_RIGHT_2, 6, OAM_X_FLIP
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_RIGHT_1, 6, OAM_X_FLIP
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_RIGHT_2, 6, OAM_X_FLIP
oamrestart
.Frameset_LevelSelectionMenuFemaleWalkRight:
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_RIGHT_1, 6, OAM_X_FLIP
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_RIGHT_2, 6, OAM_X_FLIP
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_RIGHT_1, 6, OAM_X_FLIP
oamframe SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_RIGHT_2, 6, OAM_X_FLIP
oamrestart

View File

@ -147,6 +147,23 @@ SpriteAnimOAMData:
spriteanimoam $08, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_9
spriteanimoam $04, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_10
spriteanimoam $00, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_11
spriteanimoam $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_DOWN_1
spriteanimoam $0c, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_DOWN_2
spriteanimoam $00, .OAMData_BlueWalk ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_DOWN_1
spriteanimoam $0c, .OAMData_BlueWalk ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_DOWN_2
spriteanimoam $04, .OAMData_RedWalkUp ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_UP_1
spriteanimoam $10, .OAMData_RedWalkUp ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_UP_2
spriteanimoam $04, .OAMData_BlueWalkUp ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_UP_1
spriteanimoam $10, .OAMData_BlueWalkUp ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_UP_2
spriteanimoam $08, .OAMData_RedWalkLeft ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_LEFT_1
spriteanimoam $14, .OAMData_RedWalkLeft ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_LEFT_2
spriteanimoam $08, .OAMData_BlueWalkLeft ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_LEFT_1
spriteanimoam $14, .OAMData_BlueWalkLeft ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_LEFT_2
spriteanimoam $08, .OAMData_RedWalkRight ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_RIGHT_1
spriteanimoam $14, .OAMData_RedWalkRight ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_MALE_RIGHT_2
spriteanimoam $08, .OAMData_BlueWalkRight ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_RIGHT_1
spriteanimoam $14, .OAMData_BlueWalkRight ; SPRITE_ANIM_OAMSET_LEVEL_SELECTION_MENU_FEMALE_RIGHT_2
assert_table_length NUM_SPRITE_ANIM_OAMSETS
.OAMData_1x1_Palette0:
@ -358,6 +375,27 @@ SpriteAnimOAMData:
dbsprite -1, 0, 0, 0, $02, PAL_OW_RED
dbsprite 0, 0, 0, 0, $03, PAL_OW_RED
.OAMData_RedWalkUp:
db 4
dsprite -1, 0, -1, 0, $00, PAL_OW_RED
dsprite -1, 0, 0, 0, $01, PAL_OW_RED
dsprite 0, 0, -1, 0, $02, PAL_OW_RED
dsprite 0, 0, 0, 0, $03, PAL_OW_RED
.OAMData_RedWalkLeft:
db 4
dsprite -1, 0, -1, 0, $00, PAL_OW_RED
dsprite -1, 0, 0, 0, $01, PAL_OW_RED
dsprite 0, 0, -1, 0, $02, PAL_OW_RED
dsprite 0, 0, 0, 0, $03, PAL_OW_RED
.OAMData_RedWalkRight:
db 4
dsprite -1, 0, -1, 0, $00, PAL_OW_RED
dsprite -1, 0, 0, 0, $01, PAL_OW_RED
dsprite 0, 0, -1, 0, $02, PAL_OW_RED
dsprite 0, 0, 0, 0, $03, PAL_OW_RED
.OAMData_MagnetTrainRed:
db 4
dbsprite -1, -1, 0, 0, $00, PAL_OW_RED | PRIORITY
@ -754,6 +792,27 @@ SpriteAnimOAMData:
dbsprite -1, 0, 0, 0, $02, PAL_OW_BLUE
dbsprite 0, 0, 0, 0, $03, PAL_OW_BLUE
.OAMData_BlueWalkUp:
db 4
dsprite -1, 0, -1, 0, $00, PAL_OW_BLUE
dsprite -1, 0, 0, 0, $01, PAL_OW_BLUE
dsprite 0, 0, -1, 0, $02, PAL_OW_BLUE
dsprite 0, 0, 0, 0, $03, PAL_OW_BLUE
.OAMData_BlueWalkLeft:
db 4
dsprite -1, 0, -1, 0, $00, PAL_OW_BLUE
dsprite -1, 0, 0, 0, $01, PAL_OW_BLUE
dsprite 0, 0, -1, 0, $02, PAL_OW_BLUE
dsprite 0, 0, 0, 0, $03, PAL_OW_BLUE
.OAMData_BlueWalkRight:
db 4
dsprite -1, 0, -1, 0, $00, PAL_OW_BLUE
dsprite -1, 0, 0, 0, $01, PAL_OW_BLUE
dsprite 0, 0, -1, 0, $02, PAL_OW_BLUE
dsprite 0, 0, 0, 0, $03, PAL_OW_BLUE
.OAMData_MagnetTrainBlue:
db 4
dbsprite -1, -1, 0, 0, $00, PAL_OW_BLUE | PRIORITY

View File

@ -92,4 +92,21 @@ SpriteAnimSeqData:
db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY, SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY, SPRITE_ANIM_DICT_DEFAULT
; SPRITE_ANIM_INDEX_CELEBI
db SPRITE_ANIM_FRAMESET_CELEBI_LEFT, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT
; SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_MALE_WALK_DOWN
db SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_MALE_WALK_DOWN, SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_DOWN, SPRITE_ANIM_DICT_DEFAULT
; SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_FEMALE_WALK_DOWN
db SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_FEMALE_WALK_DOWN, SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_DOWN, SPRITE_ANIM_DICT_DEFAULT
; SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_MALE_WALK_UP
db SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_MALE_WALK_UP, SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_UP, SPRITE_ANIM_DICT_DEFAULT
; SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_FEMALE_WALK_UP
db SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_FEMALE_WALK_UP, SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_UP, SPRITE_ANIM_DICT_DEFAULT
; SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_MALE_WALK_LEFT
db SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_MALE_WALK_LEFT, SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_LEFT, SPRITE_ANIM_DICT_DEFAULT
; SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_FEMALE_WALK_LEFT
db SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_FEMALE_WALK_LEFT, SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_LEFT, SPRITE_ANIM_DICT_DEFAULT
; SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_MALE_WALK_RIGHT
db SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_MALE_WALK_RIGHT, SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_RIGHT, SPRITE_ANIM_DICT_DEFAULT
; SPRITE_ANIM_INDEX_LEVEL_SELECTION_MENU_FEMALE_WALK_RIGHT
db SPRITE_ANIM_FRAMESET_LEVEL_SELECTION_MENU_FEMALE_WALK_RIGHT, SPRITE_ANIM_SEQ_LEVEL_SELECTION_MENU_WALK_RIGHT, SPRITE_ANIM_DICT_DEFAULT
assert_table_length NUM_SPRITE_ANIM_INDEXES

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]

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

View File

@ -1536,6 +1536,7 @@ SECTION UNION "Miscellaneous WRAM 1", WRAMX
; level selection menu
wLevelSelectionMenuCurrentPage:: db
wLevelSelectionMenuCurrentLandmark:: db
wLevelSelectionMenuStandingStill:: db
SECTION UNION "Miscellaneous WRAM 1", WRAMX