aboutsummaryrefslogtreecommitdiff
path: root/modes
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-08-06 21:00:27 +0200
committerAstatin <[email protected]>2025-08-06 21:00:27 +0200
commit8b7594415a4ca28b0193d24d59c3089f046a3be1 (patch)
treecc73c7f8b59ff5a30d9989bc99508de8b7241c08 /modes
parent4db56b6d877ee88a672f5361bbe372783086353d (diff)
Add click sound effect on menu open, dialogue next & menu arrow moves
Diffstat (limited to 'modes')
-rw-r--r--modes/dialoguemenu.gbasm1
-rw-r--r--modes/dungeon.gbasm3
-rw-r--r--modes/dungeongeneration.gbasm6
-rw-r--r--modes/loading.gbasm1
-rw-r--r--modes/titlescreen.gbasm40
5 files changed, 46 insertions, 5 deletions
diff --git a/modes/dialoguemenu.gbasm b/modes/dialoguemenu.gbasm
index 306ea50..126495b 100644
--- a/modes/dialoguemenu.gbasm
+++ b/modes/dialoguemenu.gbasm
@@ -49,6 +49,7 @@ Dialogue_VBLANK_Entrypoint:
LD $mem_loop_frame_timer, A
CALL =Play_Music
+ CALL =Play_Sound_Effect
.ENABLE_VBLANK_INTERRUPTS
RETI
diff --git a/modes/dungeon.gbasm b/modes/dungeon.gbasm
index 9062425..e67847b 100644
--- a/modes/dungeon.gbasm
+++ b/modes/dungeon.gbasm
@@ -170,8 +170,8 @@ Dungeon_VBLANK_Entrypoint:
CALL =Animation_Wait_Mode
CALL =Update_Blinking_Counter
- CALL =Update_Animation_Steps
CALL =Check_Open_Menu_button
+ CALL =Update_Animation_Steps
LD HL, $mem_entities_list
CALL =Center_viewport_around_entity
@@ -188,6 +188,7 @@ Dungeon_VBLANK_Entrypoint:
LD $mem_loop_frame_timer, A
CALL =Play_Music
+ CALL =Play_Sound_Effect
.ENABLE_VBLANK_INTERRUPTS
RETI
diff --git a/modes/dungeongeneration.gbasm b/modes/dungeongeneration.gbasm
index 11824de..b7affed 100644
--- a/modes/dungeongeneration.gbasm
+++ b/modes/dungeongeneration.gbasm
@@ -31,6 +31,9 @@
.END
New_Dungeon:
+ .LOAD_MUSIC =_music_Dungeon
+ CALL =Start_Music
+
LD A, $20
LD $mem_bunny_health, A
LD A, $30
@@ -222,6 +225,9 @@ Dungeon_generation_VBlank:
CALL =Reset_Entities_Collision_Map
+ CALL =Reset_Music_Channels
+ LD A, $01
+ LD $mem_sound_flags, A
DI
.DISABLE_MODE_2_INTERRUPT
CALL =Update_VBlank_Handler
diff --git a/modes/loading.gbasm b/modes/loading.gbasm
index 649d474..aad23bd 100644
--- a/modes/loading.gbasm
+++ b/modes/loading.gbasm
@@ -33,6 +33,7 @@ Loading_VBLANK_Entrypoint:
LD $mem_loop_frame_timer, A
CALL =Play_Music
+ CALL =Play_Sound_Effect
.ENABLE_VBLANK_INTERRUPTS
RETI
diff --git a/modes/titlescreen.gbasm b/modes/titlescreen.gbasm
index 22640b2..2a53f48 100644
--- a/modes/titlescreen.gbasm
+++ b/modes/titlescreen.gbasm
@@ -2,6 +2,11 @@ Title_Screen:
.ASSERT bank(.) bank(=Title_Screen_Sprite_Data)
.ASSERT bank(.) bank(=Title_Screen_Sprite_Data.end)
+ .LOAD_MUSIC =_music_TitleScreen
+ .CALL_SAVE_BANK =Start_Music
+ LD A, $01
+ LD $mem_sound_flags, A
+
LD HL, $9010
LD DE, ptr(=Title_Screen_Sprite_Data)
LD BC, $07f0
@@ -55,19 +60,19 @@ Title_Screen:
LD A, $lcdc_mapbg_tilemap
LD $reg_lcd_controller, A
- LD A, $80
+ LD A, $00
.blink:
.blink.loop1:
CALL =Check_Frame_stuff
INC A
- CP $20
+ CP $48
JR NZ =.blink.loop1
CALL =.blink.draw_text
LD A, $00
.blink.loop2:
CALL =Check_Frame_stuff
INC A
- CP $20
+ CP $48
JR NZ =.blink.loop2
CALL =.blink.undraw_text
LD A, $00
@@ -94,9 +99,16 @@ Title_Screen:
RET
Check_Frame_stuff:
+ PUSH AF
+ PUSH BC
+ PUSH DE
+ PUSH HL
CALL =RNG_Step
CALL =Pad_Button_Check
- PUSH AF
+ .CALL_SAVE_BANK =Play_Music
+ POP HL
+ POP DE
+ POP BC
LD A, $mem_button_action
BIT 3, A
JR NZ, =Title_Screen_Start_Pressed
@@ -107,6 +119,26 @@ Check_Frame_stuff:
Title_Screen_Start_Pressed:
LD A, $00
+ LD $mem_sound_flags, A
+ CALL =Reset_Music_Channels
+
+ ; Magic sound effect stuff
+ LD A, $8f
+ LD ($26), A
+ LD A, $ee
+ LD ($25), A
+ LD A, $ff
+ LD ($24), A
+ LD A, $3f
+ LD ($20), A
+ LD A, $f2
+ LD ($21), A
+ LD A, $01
+ LD ($22), A
+ LD A, $80
+ LD ($23), A
+
+ LD A, $00
.loop:
CALL =Next_VBlank_Wait
INC A