From ead4cf5ca83d855bbc88d4212448569dda69e84b Mon Sep 17 00:00:00 2001 From: Thomas Prescott Date: Sun, 4 Apr 2021 21:33:33 -0500 Subject: [PATCH] new firebar layer fix from Zarby --- LTTP_RND_GeneralBugfixes.asm | 1 + build_linux.sh | 5 +++++ firebarlayer.asm | 8 ++++++++ hooks.asm | 10 ++++++++++ 4 files changed, 24 insertions(+) create mode 100755 build_linux.sh create mode 100644 firebarlayer.asm diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index f3f4480..37e7b04 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -142,6 +142,7 @@ incsrc doorframefixes.asm incsrc music.asm incsrc roomloading.asm incsrc icepalacegraphics.asm +incsrc firebarlayer.asm warnpc $A18000 org $1C8000 ; text tables for translation diff --git a/build_linux.sh b/build_linux.sh new file mode 100755 index 0000000..1b6c338 --- /dev/null +++ b/build_linux.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +rm ../working.sfc +cp ../alttp.sfc ../working.sfc +asar LTTP_RND_GeneralBugfixes.asm ../working.sfc diff --git a/firebarlayer.asm b/firebarlayer.asm new file mode 100644 index 0000000..f7118b2 --- /dev/null +++ b/firebarlayer.asm @@ -0,0 +1,8 @@ +NewFireBarDamage: +{ + LDA $00EE : CMP $0F20, X : BNE .NotSameLayer + JSL Sprite_AttemptDamageToPlayerPlusRecoilLong + RTL + .NotSameLayer + RTL +} \ No newline at end of file diff --git a/hooks.asm b/hooks.asm index 582a31d..cbdc64a 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2522,3 +2522,13 @@ CheckIfReading: CPX #$04 RTS ;================================================================================ + +;-------------------------------------------------------------------------------- +; Keep Firebar Damage on Same Layer +;-------------------------------------------------------------------------------- +org $06F425 +Sprite_AttemptDamageToPlayerPlusRecoilLong: + +org $1ED1B6 +JSL NewFireBarDamage +;================================================================================