update deku mask transform logic

This commit is contained in:
scawful
2024-06-08 08:53:45 -04:00
parent abb26b4e11
commit 774faf345c

View File

@@ -9,16 +9,16 @@
UpdateDekuPalette: UpdateDekuPalette:
{ {
REP #$30 ; change 16bit mode REP #$30 ; change 16bit mode
LDX #$001E LDX #$001E
.loop .loop
LDA.l deku_palette, X : STA $7EC6E0, X LDA.l deku_palette, X : STA $7EC6E0, X
DEX : DEX : BPL .loop DEX : DEX : BPL .loop
SEP #$30 ; go back to 8 bit mode SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette INC $15 ; update the palette
RTL ; or RTS depending on where you need it RTL ; or RTS depending on where you need it
} }
deku_palette: deku_palette:
@@ -27,6 +27,12 @@ deku_palette:
; ========================================================= ; =========================================================
; Indicates somaria platform status.
; 0x00 - Not on platform
; 0x01 - On platform
; 0x02 - On platform and moving
SOMPLAT = $7E02F5
org $07A64B ; formerly Quake org $07A64B ; formerly Quake
LinkItem_DekuMask: LinkItem_DekuMask:
{ {
@@ -36,12 +42,13 @@ LinkItem_DekuMask:
JSL PrepareQuakeSpell JSL PrepareQuakeSpell
RTS RTS
.continue .continue
LDA #$01 LDA.b #$01
JSL Link_TransformMask : BCC .return JSL Link_TransformMask : BCC .return
LDA #$01 : STA $02F5 ; Somaria platform flag, no dash. LDA.b #$01 : STA.w SOMPLAT
RTS
.return .return
STZ.w SOMPLAT
RTS RTS
} }
@@ -58,7 +65,7 @@ Link_HandleDekuTransformation:
; Check if using Quake Medallion ; Check if using Quake Medallion
LDA $5D : CMP.b #$0A : BEQ .continue LDA $5D : CMP.b #$0A : BEQ .continue
.continue .continue
JSR $82DA ; Link_HandleBunnyTransformation JSR $82DA ; Link_HandleBunnyTransformation
RTS RTS