diff options
author | Astatin <[email protected]> | 2025-04-08 14:15:40 +0200 |
---|---|---|
committer | Astatin <[email protected]> | 2025-04-08 14:15:40 +0200 |
commit | 51bdddd2ee8357950d785a60b887730368527277 (patch) | |
tree | a42d8b10221605c77240004795f227988b21a9c2 /modes/dungeongeneration.gbasm | |
parent | 85c478d0c2368c0a38fa3e6aa4d4e9070ea63fc3 (diff) |
Fix frame specific and sameboy specific bug with loading screens
Diffstat (limited to 'modes/dungeongeneration.gbasm')
-rw-r--r-- | modes/dungeongeneration.gbasm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/modes/dungeongeneration.gbasm b/modes/dungeongeneration.gbasm index 1588e81..c119338 100644 --- a/modes/dungeongeneration.gbasm +++ b/modes/dungeongeneration.gbasm @@ -7,7 +7,7 @@ LD ($mem_stat_jump_destination), A LD A, high(=Dungeon_generation_Out_Of_VBlank) LD ($mem_stat_jump_destination+1), A - .RESET_STAT_INTERRUPT + .RESET_INTERRUPTS LD A, $20 LD $reg_lcd_status, A LD A, $02 @@ -125,6 +125,8 @@ New_Dungeon: CALL =Load_Prepared_Map + CALL =VBlank_Wait + Dungeon_generation_VBlank: .ENABLE_MODE_2_INTERRUPT EI @@ -141,7 +143,9 @@ Dungeon_generation_VBlank: LD A, $f4 LD ($9d73), A + LD B, B CALL =Reload_Entities_Tile_Data + LD B, B ; Clear OAM LD HL, $fe00 LD BC, $00a0 @@ -164,14 +168,14 @@ Dungeon_generation_VBlank: CALL =Reset_Entities_Collision_Map - .SET_WINDOW_LCDC_E .ENABLE_VBLANK_INTERRUPTS - .RESET_STAT_INTERRUPT - LD A, $00 - LD $reg_interrupt_flags, A + .RESET_INTERRUPTS + LD A, $lcdc_mapbg_tilemap + LD $reg_lcd_controller, A EI Wait_for_Interrupt.loop: + LD A, $reg_lcd_status HALT JP =Wait_for_Interrupt.loop @@ -179,5 +183,6 @@ Dungeon_generation_Out_Of_VBlank: PUSH AF CALL =VBlank_Wait .ENABLE_MODE_2_INTERRUPT + .RESET_INTERRUPTS POP AF RETI |