Cleanup Asar warnings with deprecated #$ format in tables

This commit is contained in:
scawful
2024-09-29 22:01:34 -04:00
parent 76d08711f0
commit 42ce2c4ee2
9 changed files with 153 additions and 181 deletions

View File

@@ -3,10 +3,10 @@
; Based on the Fairy Flippers item by Conn
; Special Thanks to Zarby89 for the PaletteArmorAndGloves hook
;
; Transforms Link into Zora Link
; Transforms Link into Zora Link
; Allows Link to dive underwater in the overworld and dungeons as Zora Link.
;
; How To Use:
; How To Use:
; Press R to transform into Zora Link. Press R again to transform back.
; Press Y in deep water to dive. Press Y again to resurface.
; =========================================================
@@ -22,15 +22,15 @@ UpdateZoraPalette:
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL
RTL
}
; =========================================================
; 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 $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
@@ -44,7 +44,7 @@ zora_palette:
org $0998FC
AddTransitionSplash:
; =========================================================
; Replaces Bombos medallion
@@ -74,58 +74,58 @@ org $079781
pullpc ; Bank07 Free Space from Deku Mask
LinkState_UsingZoraMask:
{
; Check if the mask is equipped
; Check if the mask is equipped
LDA $02B2 : CMP #$02 : BNE .normal
; Check if we are in water or not
; Check if we are in water or not
LDA $5D : CMP #$04 : BEQ .swimming
.normal
; Return to normal state
; Return to normal state
STZ $55
STZ $5E ; Reset speed to normal
STZ $5E ; Reset speed to normal
STZ $037B
STZ $0351
JMP .return
.swimming
; Check if we are indoors or outdoors
LDA $1B : BNE .dungeon ; z flag is 1
; Check if we are indoors or outdoors
LDA $1B : BNE .dungeon ; z flag is 1
; OVERWORLD ---------------------------------------------
.overworld
.overworld
{
; Check the Y button and clear state if activated
JSR Link_CheckNewY_ButtonPress : BCC .return
LDA $3A : AND.b #$BF : STA $3A
; Check if already underwater
; Check if already underwater
LDA !ZoraDiving : BEQ .dive
STZ $55 ; Reset cape flag
STZ !ZoraDiving ; Reset underwater flag
STZ $0351 ; Reset ripple flag
STZ $55 ; Reset cape flag
STZ !ZoraDiving ; Reset underwater flag
STZ $0351 ; Reset ripple flag
STZ $037B ; Reset invincibility flag
LDA #$04 : STA $5D ; Put Link in Swimming State
JMP .return
.dive
; Handle overworld underwater swimming
LDA #$01 : STA $55 ; Set cape flag
STA $037B ; Set invincible flag
LDA #$08 : STA $5E ; Set underwater speed
; Handle overworld underwater swimming
LDA #$01 : STA $55 ; Set cape flag
STA $037B ; Set invincible flag
LDA #$08 : STA $5E ; Set underwater speed
LDA #$01 : STA !ZoraDiving ; Set underwater flag
STA $0351 ; Set ripple flag
; Splash visual effect
; Splash visual effect
LDA.b #$15 : LDY.b #$00
JSL AddTransitionSplash
; Stay in swimming mode
; Stay in swimming mode
LDA #$04 : STA $5D
; Splash sound effect
; LDA #$24 : STA $012E
; Splash sound effect
; LDA #$24 : STA $012E
.return
JSR $E8F0 ; HandleIndoorCameraAndDoors
RTS
@@ -134,7 +134,7 @@ LinkState_UsingZoraMask:
; DUNGEON DIVE ------------------------------------------
.dungeon
{
; Check if we are in water or not
; Check if we are in water or not
LDA $5D : CMP #$04 : BNE .return_dungeon
; Check if already underwater
LDA !ZoraDiving : BNE .return_dungeon
@@ -143,17 +143,16 @@ LinkState_UsingZoraMask:
LDA $3A : AND.b #$BF : STA $3A
.dive_dungeon
; Splash effect
; Splash effect
LDA.b #$15 : LDY.b #$00
JSL AddTransitionSplash
STZ $5D ; reset player to ground state
STZ $5D ; reset player to ground state
STZ $EE ; move link to lower level
LDA #$72 : STA $9A ; Set layer
LDA #$08 : STA $5E ; Set the player speed
LDA #$72 : STA $9A ; Set layer
LDA #$08 : STA $5E ; Set the player speed
STZ $0345 ; Reset deep water flag
LDA #$01 : STA !ZoraDiving ; Set the player underwater flag
LDA #$01 : STA !ZoraDiving ; Set the player underwater flag
.return_dungeon
JSR $E8F0 ; HandleIndoorCameraAndDoors
@@ -163,7 +162,7 @@ LinkState_UsingZoraMask:
pushpc
; End of LinkState_Default
; End of LinkState_Default
org $0782D2
JSR LinkState_UsingZoraMask_dungeon_resurface
JSR $E8F0 ; HandleIndoorCameraAndDoors
@@ -176,9 +175,9 @@ pullpc
.dungeon_resurface
{
LDA $1B : BEQ .return_overworld ; We are in overworld actually
LDA $1B : BEQ .return_overworld ; We are in overworld actually
; Check if the player is actually diving
; Check if the player is actually diving
LDA !ZoraDiving : BEQ .return_default
; Check precise tile types for interaction
@@ -199,15 +198,15 @@ pullpc
LDA.b #$15 : LDY.b #$00 : JSL AddTransitionSplash
.remove_dive
LDA #$04 : STA $5D ; Set Link to Swimming State
LDA #$01 : STA $EE ; Set Link to upper level
STA $0345 ; Set deep water flag
STA $0345 ; Set deep water flag
; Remove Diving Effects
.player_is_falling
LDA $67 : AND #$01 : STA $2F
STZ $5E ; Reset speed to normal
STZ !ZoraDiving ; Reset underwater flag
STZ !ZoraDiving ; Reset underwater flag
STZ $0351 ; Reset ripple flag
STZ $24 ; Reset z coordinate for link
STZ $0372 ; Reset link bounce flag
@@ -240,7 +239,7 @@ pullpc
{
LDA $02B2 : CMP #$02 : BNE .return_hop
STZ $5E ; Reset speed to normal
STZ !ZoraDiving ; Reset underwater flag
STZ !ZoraDiving ; Reset underwater flag
LDA #$62 : STA $9A ; Reset dungeon layer
.return_hop
LDA #$06 : STA $5D ; Set Link to Recoil State