A dungeon delver roguelike using Pathfinder 2nd edition rules
at gb 35 lines 538 B view raw
1SECTION "InputUtilsVariables", WRAM0 2 3mWaitKey:: db 4 5SECTION "InputUtils", ROM0 6 7WaitForKeyFunction:: 8 push bc 9 10WaitForKeyFunction_Loop: 11 ld a, [wCurKeys] 12 ld [wLastKeys], a 13 14 call Input 15 16 ld a, [mWaitKey] 17 ld b, a 18 ld a, [wCurKeys] 19 and b 20 jp z, WaitForKeyFunction_NotPressed 21 22 ld a, [wLastKeys] 23 and b 24 jp nz, WaitForKeyFunction_NotPressed 25 26 pop bc 27 ret 28 29WaitForKeyFunction_NotPressed: 30 ld a, 1 31 ld [wVBlankCount], a 32 33 call WaitForVBlankFunction 34 35 jp WaitForKeyFunction_Loop