A dungeon delver roguelike using Pathfinder 2nd edition rules
at gb 28 lines 492 B view raw
1INCLUDE "hardware.inc/hardware.inc" 2 3SECTION "VBlankVariables", WRAM0 4 5wVBlankCount:: db 6 7SECTION "VBlankFunctions", ROM0 8 9WaitForOneVBlank:: 10 ld a, 1 11 ld [wVBlankCount], a 12 13WaitForVBlankFunction:: 14 15WaitForVBlankFunction_Loop:: 16 ld a, [rLY] 17 cp 144 18 jp c, WaitForVBlankFunction_Loop 19 ld a, [wVBlankCount] 20 sub 1 21 ld [wVBlankCount], a 22 ret z 23 24WaitForKeyFunction_Loop2:: 25 ld a, [rLY] 26 cp 144 27 jp nc, WaitForKeyFunction_Loop2 28 jp WaitForVBlankFunction_Loop