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.
This commit is contained in:
Kevin Cathcart
2018-03-16 12:30:48 -04:00
committed by GitHub
parent ede55dee85
commit 8dc6429530

View File

@@ -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
;--------------------------------------------------------------------------------