projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ebe540
)
audio: Added simple attack noise
author
Lukas Krickl
<lukas@krickl.dev>
Mon, 15 Sep 2025 20:06:28 +0000
(22:06 +0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Mon, 15 Sep 2025 20:06:28 +0000
(22:06 +0200)
src/attack.s
patch
|
blob
|
history
src/audio.s
patch
|
blob
|
history
diff --git
a/src/attack.s
b/src/attack.s
index 292f1dd8128de14ab8d86453163a6b14cd930c73..8955dd434a59cbe5def9c46e4aa00ab426eaccd7 100644
(file)
--- a/
src/attack.s
+++ b/
src/attack.s
@@
-88,6
+88,7
@@
unit_action_attack_damage_calc:
; play animation
push de
call unit_action_attack_decide_animation
+ call play_attack_noise
pop de
; set flag
diff --git
a/src/audio.s
b/src/audio.s
index 3bd4d0c89a2d83e377e730b9bda780dccb2b47eb..3ebfa83a911e075a2a0eedbfc147fcd981c819d9 100644
(file)
--- a/
src/audio.s
+++ b/
src/audio.s
@@
-34,3
+34,17
@@
play_door_open_noise:
ld [CH4_CTRL], a
ret
+
+play_attack_noise:
+ ld a, 0b11110001
+ ld [CH4_VOLUME_ENV], a
+
+ ld a, 1
+ ld [CH4_LENGTH], a
+
+ ld a, 0b1100000
+ ld [CH4_FREQ_RAND], a
+
+ ld a, 0b11000000
+ ld [CH4_CTRL], a
+ ret