mask housekeeping

This commit is contained in:
scawful
2024-12-08 20:11:58 -05:00
parent d9bd2ad4aa
commit 70f13ff1c0
2 changed files with 21 additions and 32 deletions

View File

@@ -18,12 +18,10 @@ endmacro
; Change Link's sprite by setting $BC to the gfx bank
; InitializeMemoryAndSRAM
org $008827
JSL StartupMasks
org $008827 : JSL StartupMasks
; Link Sprite hook before game starts
org $008A01
LDA $BC
org $008A01 : LDA $BC
; =========================================================
; Change Link's palette based on $02B2 (mask value)
@@ -42,12 +40,10 @@ org $1BEE1B
; =========================================================
; GameOver_DelayBeforeIris
org $09F347
JSL ForceResetMask_GameOver
org $09F347 : JSL ForceResetMask_GameOver
; Module17_SaveAndQuit
org $09F7B5
JSL ForceResetMask_SaveAndQuit
org $09F7B5 : JSL ForceResetMask_SaveAndQuit
; =========================================================
; EXPANDED SPACE
@@ -61,7 +57,6 @@ StartupMasks:
; set links sprite bank
LDA #$10 : STA $BC
RTL
}
@@ -207,7 +202,6 @@ Palette_ArmorAndGloves:
; =========================================================
; Overworld Palette Persist
Overworld_CgramAuxToMain_Override:
{
; Copies the auxiliary CGRAM buffer to the main one

View File

@@ -13,7 +13,7 @@
UpdateZoraPalette:
{
REP #$30 ; change 16 bit mode
REP #$30
LDX #$001E
.loop
@@ -25,8 +25,8 @@ UpdateZoraPalette:
STA $7EC6E0, X
DEX : DEX : BPL .loop
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
SEP #$30
INC $15
RTL
}
@@ -45,10 +45,7 @@ zora_palette:
; dw #$6565, #$7271, #$2AB7, #$477E, #$1997, #$14B5, #$459B, #$69F2
; dw #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357
; =========================================================
org $0998FC
AddTransitionSplash:
AddTransitionSplash = $0998FC
; =========================================================
@@ -60,7 +57,6 @@ LinkItem_ZoraMask:
LDA !ZoraDiving : BNE .return
LDA.b #$02
JSL Link_TransformMask
.return
RTS
}
@@ -105,16 +101,15 @@ LinkState_UsingZoraMask:
; Check if already underwater
LDA !ZoraDiving : BEQ .dive
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