From 8dc64295305a0d2bda7cf24d2562e22949e495d8 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Fri, 16 Mar 2018 12:30:48 -0400 Subject: [PATCH] Fix Bizarre Pyramid/Waterfall fairy glitches This will hopefully fixes those weird glitches. The core issue being that the CLC was needed for the no-inventory case, or the game will increment $0D80 again, and put us in the "Link just lied the first time" state instead of the end state like we wanted. --- fairyfixes.asm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/fairyfixes.asm b/fairyfixes.asm index 88ddc11..c9f9dd3 100644 --- a/fairyfixes.asm +++ b/fairyfixes.asm @@ -36,16 +36,21 @@ FairyPond_Init: LDA $7EF35E : CMP.b #$02 : BNE ++ : LDA.b #$1E : PHA : BRA .emptyBottle : ++ LDA $7EF35F : CMP.b #$02 : BNE ++ : LDA.b #$1F : PHA : BRA .emptyBottle : ++ .noInventory - LDA $0D80, X : !ADD #$0A : STA $0D80, X + LDA.b #$0A : STA $0D80, X LDA.b #$51 LDY.b #$01 JSL.l Sprite_ShowMessageFromPlayerContact - PLY - RTL + JMP ++ + .emptyBottle - LDA $0D80, X : !ADD #$02 : STA $0D80, X + LDA.b #$02 : STA $0D80, X + ;JSL Player_ResetState ; If we continue to have issues, add this in too. (After determining the address for it) + STZ $2F LDA.b #$01 : STA $02E4 PLA : STA $1CE8 + .cleanup + STZ $0EB0, X ; Clear the sprite's item-given variable + CLC ; skip rest of original function + : PLY RTL -;-------------------------------------------------------------------------------- \ No newline at end of file +;--------------------------------------------------------------------------------