add gbc link red mail, fix palette bugs

This commit is contained in:
scawful
2024-06-05 11:25:01 -04:00
parent 2d6808c0ca
commit 7b6f0c8a45

View File

@@ -8,6 +8,7 @@ UpdateGbcPalette:
LDX #$001E LDX #$001E
LDA $7EF35B : AND.w #$00FF : CMP #$0001 : BEQ .blue_mail LDA $7EF35B : AND.w #$00FF : CMP #$0001 : BEQ .blue_mail
LDA $7EF35B : AND.w #$00FF : CMP #$0002 : BEQ .red_mail
.loop .loop
LDA.l GameboyLinkPalette, X : STA $7EC6E0, X LDA.l GameboyLinkPalette, X : STA $7EC6E0, X
@@ -25,6 +26,14 @@ UpdateGbcPalette:
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
.red_mail
LDX #$001E
.loop3
LDA.l GameboyLinkRedMail, X : STA $7EC6E0, X
DEX : DEX : BPL .loop3
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL ; or RTS depending on where you need it
} }
GameboyLinkPalette: GameboyLinkPalette:
@@ -39,6 +48,12 @@ GameboyLinkBlueMail:
dw #$46FF, #$4D25, #$3B68, #$0A4A, #$12EF, #$2A5C, #$1571, #$7A18 dw #$46FF, #$4D25, #$3B68, #$0A4A, #$12EF, #$2A5C, #$1571, #$7A18
} }
GameboyLinkRedMail:
{
dw #$0000, #$7FFF, #$237E, #$B711, #$369E, #$14A5, #$01FF, #$1078
dw #$46FF, #$081D, #$3B68, #$0A4A, #$12EF, #$2A5C, #$1571, #$7A18
}
LinkState_GameboyInDungeonEntrance: LinkState_GameboyInDungeonEntrance:
{ {
; if link is in the dark world, change his sprite to the gbc one ; if link is in the dark world, change his sprite to the gbc one
@@ -61,6 +76,7 @@ LoadOverworld_CheckForGbcLink:
LDA.b #$06 : STA $02B2 LDA.b #$06 : STA $02B2
LDA.b #$3B : STA $BC ; change link's sprite LDA.b #$3B : STA $BC ; change link's sprite
JSL UpdateGbcPalette
JMP .return JMP .return
.return_lw .return_lw
@@ -127,7 +143,7 @@ LinkState_GameboyForm:
LDA #$3B : STA $BC ; change link's sprite LDA #$3B : STA $BC ; change link's sprite
LDA #$06 : STA $02B2 LDA #$06 : STA $02B2
JSL Palette_ArmorAndGloves JSL UpdateGbcPalette
BRA .return BRA .return
.already_gbc .already_gbc