fix zora mask resurface bug when entering dungeons from ow after diving

This commit is contained in:
scawful
2024-05-28 08:00:35 -04:00
parent 15b502ed54
commit acd4730bcc

View File

@@ -27,18 +27,18 @@ UpdateZoraPalette:
; =========================================================
; TODO: Change from "bunny palette" to blue zora palette colors
; TODO: Finish the Zora palette
zora_palette:
dw #$7BDE, #$7FFF, #$2F7D, #$19B5, #$3A9C, #$14A5, #$4E48, #$3582
dw #$55BB, #$6EF7, #$7BDE, #$55C7, #$6ECD, #$2E5A, #$1970, #$7616
; dw #$6565, #$7271, #$2AB7, #$477E, #$1997, #$14B5, #$459B, #$69F2
; dw #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357, #$0000
; dw #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357
; zora_palette:
; dw #$7BDE, #$7FFF, #$2F7D, #$19B5, #$3A9C, #$14A5, #$19FD, #$14B6
; dw #$55BB, #$362A, #$3F4E, #$162B, #$22D0, #$2E5A, #$1970, #$7616
; dw #$6565, #$7271, #$2AB7, #$477E, #$1997, #$14B5, #$459B, #$69F2
; dw #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357, #$0000
; dw #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357
; =========================================================
@@ -76,7 +76,6 @@ LinkState_UsingZoraMask:
{
; Check if the mask is equipped
LDA $02B2 : CMP #$02 : BNE .normal : CLC
; Check if we are in water or not
LDA $5D : CMP #$04 : BEQ .swimming : CLC
@@ -137,13 +136,8 @@ LinkState_UsingZoraMask:
{
; Check if we are in water or not
LDA $5D : CMP #$04 : BNE .return_dungeon : CLC
; Check if already underwater
LDA !ZoraDiving : BNE .return_dungeon : CLC
; Check if we are on a proper tile or not
;
; Check the Y button and clear state if activated
JSR Link_CheckNewY_ButtonPress : BCC .return_dungeon
LDA $3A : AND.b #$BF : STA $3A
@@ -180,13 +174,10 @@ warnpc $078364
pullpc
.dungeon_resurface ; TODO: Fix resurfacing bug.
.dungeon_resurface
{
LDA $1B : BEQ .return_default ; We are in overworld actually
; Check if we are swimming
LDA $5D : CMP #$04 : BNE .return_default
; Check if the player is actually diving
LDA !ZoraDiving : BEQ .return_default
@@ -225,6 +216,7 @@ pullpc
}
.return_default
STZ !ZoraDiving
STZ $0302
RTS
}
@@ -262,7 +254,6 @@ LinkState_ResetMaskAnimated:
CMP.b #$06 : BEQ .gbc_form
CMP.b #$02 : BEQ .no_mask
CMP #$01 : BNE .transform
; Restore the sword, shield, and bow override
LDA $0AAF : STA.l $7EF35A