A dungeon delver roguelike using Pathfinder 2nd edition rules

Okay so dungeon generation apparently doesn't work, I'm gonna have to go back over my algorithm and see what's going on

+67 -5
gb/src/main/dungeon.asm gb/src/main/states/generate_dungeon/dungeon.asm
+12 -5
gb/src/main/main.asm
··· 72 72 73 73 ; Initiate the next state 74 74 ld a, [wGameState] 75 - cp 1 ; 1 = Gameplay 76 - ; call z, InitGameplayState 75 + cp 2 ; 2 = Gameplay 76 + ; call z, InitGameplay 77 + cp 1 ; 1 = Generate Dungeon 78 + call z, InitDungeonGeneration 77 79 ld a, [wGameState] 78 80 and a ; 0 = Menu 79 81 call z, InitTitleScreenState 80 82 81 83 ; Update the next state 82 84 ld a, [wGameState] 83 - cp 1 ; 1 = Gameplay 84 - ; jp z, UpdateGameplayState 85 - jp UpdateTitleScreenState 85 + cp 2 ; 2 = Gameplay 86 + jp z, Test 87 + cp 1 ; 1 = Generate Dungeon 88 + jp z, UpdateDungeonGeneration 89 + jp UpdateTitleScreenState 90 + 91 + Test:: 92 + jp Test
+53
gb/src/main/states/generate_dungeon/dungeon-state.asm
··· 1 + INCLUDE "hardware.inc/hardware.inc" 2 + INCLUDE "src/main/utils/macros/text-macros.inc" 3 + 4 + SECTION "DungeonGenerationState", ROM0 5 + 6 + PressGenerateText1:: db "press a to", 255 7 + PressGenerateText2:: db "generate dungeon", 255 8 + 9 + InitDungeonGeneration:: 10 + call BlackBackground 11 + ld de, $98e3 12 + ld hl, PressGenerateText1 13 + call DrawTextTilesLoop 14 + ld de, $9903 15 + ld hl, PressGenerateText2 16 + call DrawTextTilesLoop 17 + 18 + ld a, LCDCF_ON | LCDCF_BGON | LCDCF_OBJON 19 + ld [rLCDC], a 20 + ld a, 10 21 + ld [wVBlankCount], a 22 + call WaitForVBlankFunction 23 + ret 24 + 25 + BlackBackground:: 26 + ld hl, $9800 27 + ld bc, $400 28 + .Loop 29 + ld a, $37 30 + ld [hli], a 31 + dec bc 32 + ld a, b 33 + or c 34 + jp nz, .Loop 35 + ret 36 + 37 + UpdateDungeonGeneration:: 38 + ld a, PADF_A 39 + ld [mWaitKey], a 40 + 41 + call WaitForKeyFunction 42 + ld a, 2 43 + ld [wGameState], a 44 + ld hl, rDIV 45 + ld b, [hl] 46 + call srand 47 + ld b, 6 48 + ld c, 6 49 + ld d, 36 50 + ld e, 27 51 + call InitDungeon 52 + call GenerateDungeon 53 + jp NextGameState
+2
gb/src/main/states/title-screen/title-screen-state.asm
··· 39 39 call WaitForKeyFunction 40 40 ld a, 1 41 41 ld [wGameState], a 42 + ld hl, rDIV 43 + ld c, [hl] 42 44 jp NextGameState