From 88f1b8165b4e0ce0e416e26d7cb7b3105b8f8c31 Mon Sep 17 00:00:00 2001 From: pfero Date: Sun, 29 Oct 2017 11:09:24 +0100 Subject: [PATCH] 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. --- engine/scripting.asm | 2 +- engine/tile_events.asm | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engine/scripting.asm b/engine/scripting.asm index e9899ef0f..42976ad65 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -958,7 +958,7 @@ Script_waitsfx: Script_warpsound: ; script command 0x87 - callba Function14a07 + callba GetWarpSFX call PlaySFX ret diff --git a/engine/tile_events.asm b/engine/tile_events.asm index c1ae93363..1595d436f 100755 --- a/engine/tile_events.asm +++ b/engine/tile_events.asm @@ -97,14 +97,14 @@ CheckCutCollision: ; 149f5 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