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:
@@ -36,16 +36,21 @@ FairyPond_Init:
|
|||||||
LDA $7EF35E : CMP.b #$02 : BNE ++ : LDA.b #$1E : PHA : BRA .emptyBottle : ++
|
LDA $7EF35E : CMP.b #$02 : BNE ++ : LDA.b #$1E : PHA : BRA .emptyBottle : ++
|
||||||
LDA $7EF35F : CMP.b #$02 : BNE ++ : LDA.b #$1F : PHA : BRA .emptyBottle : ++
|
LDA $7EF35F : CMP.b #$02 : BNE ++ : LDA.b #$1F : PHA : BRA .emptyBottle : ++
|
||||||
.noInventory
|
.noInventory
|
||||||
LDA $0D80, X : !ADD #$0A : STA $0D80, X
|
LDA.b #$0A : STA $0D80, X
|
||||||
LDA.b #$51
|
LDA.b #$51
|
||||||
LDY.b #$01
|
LDY.b #$01
|
||||||
JSL.l Sprite_ShowMessageFromPlayerContact
|
JSL.l Sprite_ShowMessageFromPlayerContact
|
||||||
PLY
|
JMP ++
|
||||||
RTL
|
|
||||||
.emptyBottle
|
.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
|
LDA.b #$01 : STA $02E4
|
||||||
PLA : STA $1CE8
|
PLA : STA $1CE8
|
||||||
|
.cleanup
|
||||||
|
STZ $0EB0, X ; Clear the sprite's item-given variable
|
||||||
|
CLC ; skip rest of original function
|
||||||
+ : PLY
|
+ : PLY
|
||||||
RTL
|
RTL
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
Reference in New Issue
Block a user