shithub: pokecrystal

Download patch

ref: 88f1b8165b4e0ce0e416e26d7cb7b3105b8f8c31
parent: 7c9a1561332d3ac9522b6c2dfa74e40835ab790b
author: pfero <ohpee@loves.dicksinhisan.us>
date: Sun Oct 29 07:09:24 EDT 2017

Define GetWarpSFX

This function checks the current tile at the player's feet, and returns
an appropriate SFX that should be played when warping from it.

--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -958,7 +958,7 @@
 Script_warpsound:
 ; script command 0x87
 
-	callba Function14a07
+	callba GetWarpSFX
 	call PlaySFX
 	ret
 
--- a/engine/tile_events.asm
+++ b/engine/tile_events.asm
@@ -97,14 +97,14 @@
 	db -1
 ; 14a07
 
-Function14a07:: ; 14a07
+GetWarpSFX:: ; 14a07
 	ld a, [PlayerStandingTile]
-	ld de, $1f
+	ld de, SFX_ENTER_DOOR
 	cp $71 ; door
 	ret z
-	ld de, $13
+	ld de, SFX_WARP_TO
 	cp $7c ; warp pad
 	ret z
-	ld de, $23
+	ld de, SFX_EXIT_BUILDING
 	ret
 ; 14a1a