From 41b5858e855c68e01bf388e54abd82661e846585 Mon Sep 17 00:00:00 2001 From: Astatin Date: Thu, 7 Aug 2025 16:53:50 +0200 Subject: Add heal sound effect + remove useless tile loads --- modes/dungeon.gbasm | 3 +++ modes/dungeongeneration.gbasm | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'modes') diff --git a/modes/dungeon.gbasm b/modes/dungeon.gbasm index e67847b..b747375 100644 --- a/modes/dungeon.gbasm +++ b/modes/dungeon.gbasm @@ -11,6 +11,9 @@ Update_Animation_Steps: BIT 3, A JR Z, =.update_mode + LD A, $mem_map_loading_flags + SET 0, A + LD $mem_map_loading_flags, A LD A, $mem_moving_animation_step INC A AND $0f diff --git a/modes/dungeongeneration.gbasm b/modes/dungeongeneration.gbasm index 1a0498f..dc6fd8a 100644 --- a/modes/dungeongeneration.gbasm +++ b/modes/dungeongeneration.gbasm @@ -225,6 +225,22 @@ Dungeon_generation_VBlank: CALL =Reset_Entities_Collision_Map + LD A, $mem_loop_frame_timer + ADD $3c + LD B, A + .wait_1s.loop: + HALT + LD A, $mem_loop_frame_timer + CP B + JR NZ, =.wait_1s.loop + + LD A, $mem_display_flag + RES 6, A + LD $mem_display_flag, A + LD A, $mem_map_loading_flags + RES 2, A + RES 0, A + LD $mem_map_loading_flags, A LD A, $mem_sound_flags CP $00 CALL Z, =Reset_Music_Channels @@ -248,6 +264,9 @@ Dungeon_generation_Out_Of_VBlank: PUSH HL LD A, $saved_rom_bank PUSH AF + LD A, $mem_loop_frame_timer + INC A + LD $mem_loop_frame_timer, A CALL =Play_Music CALL =VBlank_Wait .ENABLE_MODE_2_INTERRUPT -- cgit v1.2.3-70-g09d2