update palettes for mask transformations

This commit is contained in:
scawful
2022-12-21 13:45:52 -05:00
parent 2833312b98
commit 88f35501da
4 changed files with 47 additions and 5 deletions

View File

@@ -33,11 +33,13 @@ LinkItem_Ether:
JSL AddTransformationCloud
LDA.b #$14 : JSR Player_DoSfx2
LDA $02B2 : CMP #$04 : BEQ .unequip ; is the hood already on?
LDA #$37 : STA $BC ; change link's sprite
LDA $02B2 : CMP #$04 : BEQ .unequip ; is the hood already on?
JSL UpdateBunnyPalette
LDA #$37 : STA $BC ; change link's sprite
LDA #$04 : STA $02B2
BRA .return
.unequip
JSL Palette_ArmorAndGloves
LDA #$10 : STA $BC : STZ $02B2 ; take the hood off
.return
@@ -48,6 +50,24 @@ LinkItem_Ether:
org $378000
incbin bunny_link.4bpp
UpdateBunnyPalette:
{
REP #$30 ; change 16bit mode
LDX #$001E
.loop
LDA.l bunny_palette, X : STA $7EC6E0, X
DEX : DEX : BPL .loop
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL ; or RTS depending on where you need it
}
bunny_palette:
dw #$7BDE, #$7FFF, #$2F7D, #$19B5, #$3A9C, #$14A5, #$19FD, #$14B6, #$55BB, #$362A, #$3F4E, #$162B, #$22D0, #$2E5A, #$1970, #$7616, #$6565, #$7271, #$2AB7, #$477E, #$1997, #$14B5, #$459B, #$69F2, #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357, #$0000
org $87E330
JSR $FD66

View File

@@ -22,11 +22,12 @@ LinkItem_Quake:
LDA.b #$14 : JSR Player_DoSfx2
LDA $02B2 : CMP #$01 : BEQ .unequip ; is the deku mask on?
JSL Palette_ArmorAndGloves
LDA #$35 : STA $BC ; put the mask on
LDA #$01 : STA $02B2
BRA .return
.unequip
JSL Palette_ArmorAndGloves
LDA #$10 : STA $BC : STZ $02B2 ; take the mask off
.return

View File

@@ -23,13 +23,15 @@ LinkItem_WolfMask:
LDY.b #$04 : LDA.b #$23
JSL AddTransformationCloud
LDA.b #$14 : JSR Player_DoSfx2
LDA $02B2 : CMP #$03 : BEQ .unequip ; is the wolf mask already on?
JSL UpdateWolfPalette
LDA #$38 : STA $BC ; change link's sprite
LDA #$03 : STA $02B2
BRA .return
.unequip
JSL Palette_ArmorAndGloves
LDA #$10 : STA $BC : STZ $02B2 ; take the mask off
.return
@@ -38,4 +40,22 @@ LinkItem_WolfMask:
}
org $388000
incbin wolf_link.4bpp
incbin wolf_link.4bpp
UpdateWolfPalette:
{
REP #$30 ; change 16bit mode
LDX #$001E
.loop
LDA.l mypalette, X : STA $7EC6E0, X
DEX : DEX : BPL .loop
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL ; or RTS depending on where you need it
}
mypalette:
dw #$7BDE, #$7FFF, #$2F7D, #$19B5, #$3A9C, #$14A5, #$1A3D, #$14B6, #$4650, #$362A, #$3F4E, #$162B, #$318A, #$39CC, #$1CE7, #$76D1, #$6565, #$7271, #$14B5, #$459B, #$3D95, #$22D0, #$567C, #$1890, #$7616, #$0000

View File

@@ -18,6 +18,7 @@ LinkItem_ZoraMask:
LDA #$02 : STA $02B2
BRA .return
.unequip
JSL Palette_ArmorAndGloves
LDA #$10 : STA $BC : STZ $02B2 ; take the mask off
.return