diff --git a/SF/ASM/IRQ.ASM b/SF/ASM/IRQ.ASM index 0cc5455..505cc8e 100644 --- a/SF/ASM/IRQ.ASM +++ b/SF/ASM/IRQ.ASM @@ -1105,29 +1105,29 @@ irqbit3 lda noirqbit3 bcs .skipt dmacgram 0,5*16,thundercol,32 .skipt + IFNE shieldboostcolorbox lda #2*16+4 sta cgadd lda shieldup beq .nope - lda #$e0 + lda #wireframeshieldmetercolor&$FF sta cgdata - lda #$7e + lda #wireframeshieldmetercolor>>8 sta cgdata bra .conti .nope - IFNE shieldboostcolorbox ;!! Unnecessary color write to palette line 2. ; This is the exact same as a color that is already ; loaded into CGRAM in most level palettes, ; and is used for the "colored boxes" that ; are used in the shield/boost box translucency effect. -; Removing this frees up line 2 of CGRAM for more background -; color palettes, if shieldboostcolorbox is off. - lda #$1f - sta cgdata - stz cgdata - ENDC +; Removing this allows you to use a different color in the shield box +; in each background, if shieldboostcolorbox is on. +; lda #$1f +; sta cgdata +; stz cgdata .conti + ENDC lda bg3scrollflag beq .nobg3 diff --git a/SF/ASM/MAIN.ASM b/SF/ASM/MAIN.ASM index b4398db..cc7f882 100644 --- a/SF/ASM/MAIN.ASM +++ b/SF/ASM/MAIN.ASM @@ -1836,6 +1836,7 @@ SetCharMapgame_l bne .lolv IFNE shieldboostcolorbox + ; Change palette indices for damage and boost meters in BG1 tilemap ; why was this done in the first place? added a flag for vanilla game purposes ; witchcraft lda.l m_meters diff --git a/SF/ASM/TRANS.ASM b/SF/ASM/TRANS.ASM index 96e170a..795b8c9 100644 --- a/SF/ASM/TRANS.ASM +++ b/SF/ASM/TRANS.ASM @@ -606,6 +606,10 @@ dmahpos ai8 ;------------------------------------------------------------------------------ calcmeters a8i16 + ifeq shieldboostcolorbox + lda shieldup + sta.l m_shieldup + endc ldx pcboxobj_b lda al_HP,x bpl .ok diff --git a/SF/CONFIG/GRAPHICS.INC b/SF/CONFIG/GRAPHICS.INC index 96e8bd7..55a6c84 100644 --- a/SF/CONFIG/GRAPHICS.INC +++ b/SF/CONFIG/GRAPHICS.INC @@ -27,11 +27,18 @@ titlelogo equ 1 ; [0 = NTSC, 1 = PAL] (DOES NOT AFFECT JP) controlsscreenpal equ 0 -; Enable colored window over shield and boost meters as in vanilla. -; Set this to 0 if moving meter positions. +; Enable colored window to change from palette line 7 to 2 over shield and boost meters as in vanilla. +; Set this to 0 if moving meter positions, or if using all 15 colors on palette line 2 instead of 12. +; If set to 1, palette line 2 color $d is the outlines' color, +; palette line 2 color 4 is the shield meter's color and palette line 2 color 7 is the boost meter's color. +; Those can be changed by changing the background palette. +; If set to 0, they instead use colors from palette line 7. ; [0 = off, 1 = on] shieldboostcolorbox equ 0 +; Shield meter's color when wireframe is activated. Have to set shieldboostcolorbox to 1 to work. +wireframeshieldmetercolor equ $7ee0 + ; Hides the HUD when a boss is defeated. ; [0 = off, 1 = on] hidehudonbossdeath equ 1 diff --git a/SF/EXT/MARIO.EXT b/SF/EXT/MARIO.EXT index 3158b92..161bf38 100644 --- a/SF/EXT/MARIO.EXT +++ b/SF/EXT/MARIO.EXT @@ -41,6 +41,9 @@ global m_planetstars,m_particlesON,m_defaultID global m_hudcolour,m_hudflags global mallrotzsort,mdrawsprite32 + ifeq shieldboostcolorbox + global m_shieldup + endc ifne mario_stats3d diff --git a/SF/MARIO/MDRAWLIS.MC b/SF/MARIO/MDRAWLIS.MC index 8cf39b4..0212c10 100644 --- a/SF/MARIO/MDRAWLIS.MC +++ b/SF/MARIO/MDRAWLIS.MC @@ -10,6 +10,9 @@ zmalc m_damage,2 zmalc m_boostcnt,2 zmalc m_boostanim,2 + ifeq shieldboostcolorbox + zmalc m_shieldup,2 + endc rlistptr equr r1 rzstore equr r2 @@ -798,7 +801,11 @@ mboostmeter move r2,#boosty+2 move r4,#boostheight-4 + IFNE shieldboostcolorbox move r0,#7 + ELSEIF + move r0,#6 + ENDC mcall mdrawsolidbox nop @@ -902,7 +909,16 @@ mdamagemeter IFNE shieldboostcolorbox move r0,#4 ELSEIF + move r0,[m_shieldup] ; if wireframe shield activated: + dec r0 ; instruction above dosn't set zero flag + bne .nowireframe + nop + move r0,#7 + bra .pickedcolor + nop +.nowireframe move r0,#2 +.pickedcolor ENDC mcall mdrawsolidbox nop