From d05febadace9ffb2f925a7dd7fa2060dfedea54b Mon Sep 17 00:00:00 2001 From: villadelfia Date: Wed, 18 Oct 2023 01:16:32 +0000 Subject: [PATCH] Update 'src/state_gameplay.asm' --- src/state_gameplay.asm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/state_gameplay.asm b/src/state_gameplay.asm index dc3e3b4..81d97cf 100644 --- a/src/state_gameplay.asm +++ b/src/state_gameplay.asm @@ -44,10 +44,17 @@ SwitchToGameplay:: call ClearOAM call SetNumberSpritePositions - ; Initialize the RNG. - call StartNewGame + ; Set up the palettes. + ld a, PALETTE_REGULAR + set_bg_palette + set_obj0_palette + ld a, PALETTE_LIGHTER_1 + set_obj1_palette - ; Initialize the score and level. + ; Initialize the RNG. + call RNGInit + + ; Initialize the score, level and field. call ScoreInit call LevelInit call FieldInit @@ -68,7 +75,7 @@ SwitchToGameplay:: ld [wStateEventHandler], a ld a, h ld [wStateEventHandler + 1], a - ld hl, GamePlayEventLoopVBlankHandler + ld hl, BlitField ld a, l ld [wStateVBlankHandler], a ld a, h @@ -214,8 +221,4 @@ drawStaticInfo: jp EventLoopPostHandler -GamePlayEventLoopVBlankHandler:: - call BlitField - jp EventLoopPostVBlankHandler - ENDC