Use halt more efficiently in 2DMenus, Board Menu, and text printing (#2) (#11)

This commit is contained in:
xCrystal 2024-04-04 12:21:02 +02:00
parent c115386f38
commit eb13b2bd77
4 changed files with 9 additions and 4 deletions

View File

@ -214,6 +214,7 @@ ApplyBoardMenuSpritePalette:
ret
GetBoardMenuSelection:
call DelayFrame
call JoyTextDelay
call GetMenuJoypad
bit A_BUTTON_F, a
@ -272,7 +273,7 @@ DEF DIE_MAX_NUMBER EQU 6
ld a, 1
ld [wDieRoll], a
call HDMATransferTilemapAndAttrmap_Menu ;
call CloseText ; closetext
call CloseText ; closetext
.rotate_die_loop
call IsSFXPlaying

View File

@ -218,6 +218,7 @@ endr
PromptPlayerToChooseBranchDirection:
; sample a dpad press or SELECT button
call DelayFrame
ld hl, wTempSpaceBranchStruct
call GetJoypad
ldh a, [hJoyPressed]

View File

@ -233,7 +233,7 @@ MenuJoypadLoop:
.loop
call Move2DMenuCursor
call .BGMap_OAM
call Do2DMenuJoypad
call Do2DMenuJoypad.loop
jr nc, .done
call _2DMenuInterpretJoypad
jr c, .done
@ -262,13 +262,14 @@ MenuJoypadLoop:
ret
Do2DMenuJoypad:
call DelayFrame
.loop
call UpdateTimeSensitivePals
call Menu_WasButtonPressed
ret c
ld a, [w2DMenuFlags1]
bit 7, a
jr z, .loop
jr z, Do2DMenuJoypad
and a
ret

View File

@ -70,7 +70,9 @@ PrintLetterDelay::
.wait
ldh a, [hTextDelayFrames]
and a
jr nz, .checkjoypad
jr z, .end
call DelayFrame
jr .checkjoypad
.end
pop af