summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorlibjet <libj3t@gmail.com>2020-06-06 02:10:37 +0100
committerlibjet <libj3t@gmail.com>2020-06-06 02:10:37 +0100
commit88d1fe6c26ed4da7720d129962d507a26c1f9b17 (patch)
treed5ece206e4ec009efae02fbe27d6ae758f7a566b /engine
parent44229a6cd68bf1e4937f2dab6efe6025dd703bf6 (diff)
Add engine/events/play_slow_cry.asm
Diffstat (limited to 'engine')
-rwxr-xr-xengine/events/play_slow_cry.asm30
1 files changed, 30 insertions, 0 deletions
diff --git a/engine/events/play_slow_cry.asm b/engine/events/play_slow_cry.asm
new file mode 100755
index 00000000..6839b396
--- /dev/null
+++ b/engine/events/play_slow_cry.asm
@@ -0,0 +1,30 @@
+PlaySlowCry:
+ ld a, [wScriptVar]
+ call LoadCry
+ jr c, .done
+
+ ld hl, wCryPitch
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld bc, -$140
+ add hl, bc
+ ld a, l
+ ld [wCryPitch], a
+ ld a, h
+ ld [wCryPitch + 1], a
+ ld hl, wCryLength
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld bc, $60
+ add hl, bc
+ ld a, l
+ ld [wCryLength], a
+ ld a, h
+ ld [wCryLength + 1], a
+ farcall _PlayCry
+ call WaitSFX
+
+.done
+ ret