Update 'src/state_gameplay.asm'

This commit is contained in:
villadelfia 2023-10-18 01:16:32 +00:00
parent d36ac9159b
commit d05febadac
1 changed files with 11 additions and 8 deletions

View File

@ -44,10 +44,17 @@ SwitchToGameplay::
call ClearOAM call ClearOAM
call SetNumberSpritePositions call SetNumberSpritePositions
; Initialize the RNG. ; Set up the palettes.
call StartNewGame 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 ScoreInit
call LevelInit call LevelInit
call FieldInit call FieldInit
@ -68,7 +75,7 @@ SwitchToGameplay::
ld [wStateEventHandler], a ld [wStateEventHandler], a
ld a, h ld a, h
ld [wStateEventHandler + 1], a ld [wStateEventHandler + 1], a
ld hl, GamePlayEventLoopVBlankHandler ld hl, BlitField
ld a, l ld a, l
ld [wStateVBlankHandler], a ld [wStateVBlankHandler], a
ld a, h ld a, h
@ -214,8 +221,4 @@ drawStaticInfo:
jp EventLoopPostHandler jp EventLoopPostHandler
GamePlayEventLoopVBlankHandler::
call BlitField
jp EventLoopPostVBlankHandler
ENDC ENDC