From 6f032ce9c89864c3a9ad6465ae59cffa6cca156e Mon Sep 17 00:00:00 2001 From: GenericHeroGuy Date: Fri, 24 Jan 2025 16:57:44 +0100 Subject: [PATCH] Revert "2.1 palette pt 1" This reverts commit d22db7540903ed76b28ac099fb316507d6ad8b2f. --- src/console.c | 117 +++++++++++++++++++++-------------------- src/d_clisrv.c | 6 +-- src/d_main.cpp | 2 +- src/deh_tables.c | 6 +-- src/g_demo.c | 2 +- src/hardware/hw_defs.h | 4 +- src/hu_stuff.c | 4 +- src/k_color.c | 2 +- src/k_color.h | 2 +- src/k_kart.c | 21 +++++++- src/m_menu.c | 2 +- src/p_enemy.c | 18 +++---- src/p_mobj.c | 2 +- src/r_draw.cpp | 4 ++ src/r_draw.h | 2 +- src/r_skins.c | 6 +-- src/tmap.nas | 2 +- src/tmap_mmx.nas | 2 +- src/v_video.h | 6 +-- 19 files changed, 117 insertions(+), 93 deletions(-) diff --git a/src/console.c b/src/console.c index 519490e9b..5b34b6537 100644 --- a/src/console.c +++ b/src/console.c @@ -162,25 +162,25 @@ consvar_t cons_backcolor = CVAR_INIT ("con_backcolor", "Black", CV_CALL|CV_SAVE, static CV_PossibleValue_t menuhighlight_cons_t[] = { - {0, "Gametype Default"}, - {V_YELLOWMAP, "Always Yellow"}, - {V_PURPLEMAP, "Always Purple"}, - {V_GREENMAP, "Always Green"}, - {V_BLUEMAP, "Always Blue"}, - {V_REDMAP, "Always Red"}, - {V_GRAYMAP, "Always Gray"}, - {V_ORANGEMAP, "Always Orange"}, - {V_SKYMAP, "Always Sky-Blue"}, - {V_GOLDMAP, "Always Gold"}, - {V_LAVENDERMAP, "Always Lavender"}, - {V_TEAMAP, "Always Tea-Green"}, - {V_STEELMAP, "Always Steel-Blue"}, - {V_PINKMAP, "Always Pink"}, - {V_BROWNMAP, "Always Brown"}, - {V_PEACHMAP, "Always Peach"}, + {0, "Game type"}, + {V_YELLOWMAP, "Always yellow"}, + {V_PURPLEMAP, "Always purple"}, + {V_GREENMAP, "Always green"}, + {V_BLUEMAP, "Always blue"}, + {V_REDMAP, "Always red"}, + {V_GRAYMAP, "Always gray"}, + {V_ORANGEMAP, "Always orange"}, + {V_SKYMAP, "Always sky-blue"}, + {V_GOLDMAP, "Always gold"}, + {V_LAVENDERMAP, "Always lavender"}, + {V_AQUAMAP, "Always aqua-green"}, + {V_MAGENTAMAP, "Always magenta"}, + {V_PINKMAP, "Always pink"}, + {V_BROWNMAP, "Always brown"}, + {V_TANMAP, "Always tan"}, {0, NULL} }; -consvar_t cons_menuhighlight = CVAR_INIT ("menuhighlight", "Gametype Default", CV_SAVE, menuhighlight_cons_t, NULL); +consvar_t cons_menuhighlight = CVAR_INIT ("menuhighlight", "Game type", CV_SAVE, menuhighlight_cons_t, NULL); static void CON_Print(char *msg); @@ -365,8 +365,10 @@ static void CONS_ChooseWeighted_f(void) // Font colormap colors // TODO: This could probably be improved somehow... // These colormaps are 99% identical, with just a few changed bytes +// This could EASILY be handled by modifying a centralised colormap +// for software depending on the prior state - but yknow, OpenGL... UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap,\ - *skymap, *goldmap, *lavendermap, *teamap, *steelmap, *pinkmap, *brownmap, *peachmap; + *skymap, *goldmap, *lavendermap, *aquamap, *magentamap, *pinkmap, *brownmap, *tanmap; // Console BG color UINT8 *consolebgmap = NULL; @@ -385,30 +387,29 @@ void CON_SetupBackColormapEx(INT32 color, boolean prompt) shift = 6; // 12 colors -- shift of 7 means 6 colors - switch (cons_backcolor.value) + switch (color) { case 0: palindex = 15; break; // White - case 1: palindex = 31; break; // Gray - case 2: palindex = 47; break; // Sepia - case 3: palindex = 63; break; // Brown - case 4: palindex = 150; shift = 7; break; // Pink - case 5: palindex = 127; shift = 7; break; // Raspberry - case 6: palindex = 143; break; // Red - case 7: palindex = 86; shift = 7; break; // Creamsicle - case 8: palindex = 95; break; // Orange - case 9: palindex = 119; shift = 7; break; // Gold - case 10: palindex = 111; break; // Yellow - case 11: palindex = 191; shift = 7; break; // Emerald - case 12: palindex = 175; break; // Green - case 13: palindex = 219; break; // Cyan - case 14: palindex = 207; shift = 7; break; // Steel - case 15: palindex = 230; shift = 7; break; // Periwinkle - case 16: palindex = 239; break; // Blue - case 17: palindex = 199; shift = 7; break; // Purple - case 18: palindex = 255; shift = 7; break; // Lavender + case 1: palindex = 31; break; // Black + case 2: palindex = 251; break; // Sepia + case 3: palindex = 239; break; // Brown + case 4: palindex = 215; shift = 7; break; // Pink + case 5: palindex = 37; shift = 7; break; // Raspberry + case 6: palindex = 47; shift = 7; break; // Red + case 7: palindex = 53; shift = 7; break; // Creamsicle + case 8: palindex = 63; break; // Orange + case 9: palindex = 56; shift = 7; break; // Gold + case 10: palindex = 79; shift = 7; break; // Yellow + case 11: palindex = 119; shift = 7; break; // Emerald + case 12: palindex = 111; break; // Green + case 13: palindex = 136; shift = 7; break; // Cyan + case 14: palindex = 175; shift = 7; break; // Steel + case 15: palindex = 166; shift = 7; break; // Periwinkle + case 16: palindex = 159; break; // Blue + case 17: palindex = 187; shift = 7; break; // Purple + case 18: palindex = 199; shift = 7; break; // Lavender // Default green - default: palindex = 175; break; - + default: palindex = 111; break; } if (prompt) @@ -461,11 +462,11 @@ static void CON_SetupColormaps(void) skymap = (orangemap+256); lavendermap = (skymap+256); goldmap = (lavendermap+256); - teamap = (goldmap+256); - steelmap = (teamap+256); - pinkmap = (steelmap+256); + aquamap = (goldmap+256); + magentamap = (aquamap+256); + pinkmap = (magentamap+256); brownmap = (pinkmap+256); - peachmap = (brownmap+256); + tanmap = (brownmap+256); // setup the other colormaps, for console text @@ -475,21 +476,21 @@ static void CON_SetupColormaps(void) for (i = 0; i < (256*15); i++, ++memorysrc) *memorysrc = (UINT8)(i & 0xFF); // remap each color to itself... - purplemap[120] = (UINT8)194; - yellowmap[120] = (UINT8)103; - greenmap[120] = (UINT8)162; - bluemap[120] = (UINT8)228; - redmap[120] = (UINT8)126; // battle - graymap[120] = (UINT8)10; - orangemap[120] = (UINT8)85; // record attack - skymap[120] = (UINT8)214; // race - lavendermap[120] = (UINT8)248; - goldmap[120] = (UINT8)114; - teamap[120] = (UINT8)177; - steelmap[120] = (UINT8)201; - pinkmap[120] = (UINT8)145; - brownmap[120] = (UINT8)48; - peachmap[120] = (UINT8)69; // nice + purplemap[0] = (UINT8)163; + yellowmap[0] = (UINT8)73; + greenmap[0] = (UINT8)98; + bluemap[0] = (UINT8)148; + redmap[0] = (UINT8)34; // battle + graymap[0] = (UINT8)10; + orangemap[0] = (UINT8)52; // record attack + skymap[0] = (UINT8)132; // race + lavendermap[0] = (UINT8)192; + goldmap[0] = (UINT8)65; + aquamap[0] = (UINT8)121; + magentamap[0] = (UINT8)182; + pinkmap[0] = (UINT8)210; + brownmap[0] = (UINT8)224; + tanmap[0] = (UINT8)217; // no longer nice :( // Init back colormap CON_SetupBackColormap(); diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 500db3d2e..57bc4c1f0 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -588,7 +588,7 @@ static inline void CL_DrawConnectionStatus(void) ) { INT32 i, animtime = ((ccstime / 4) & 15) + 16; - UINT8 palstart = (cl_mode == CL_SEARCHING) ? 128 : 160; + UINT8 palstart = (cl_mode == CL_SEARCHING) ? 32 : 96; // 15 pal entries total. const char *cltext; @@ -717,8 +717,8 @@ static inline void CL_DrawConnectionStatus(void) if (dldlength > 256) dldlength = 256; - V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-58, 256, 8, 175); - V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-58, dldlength, 8, 160); + V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-58, 256, 8, 111); + V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-58, dldlength, 8, 96); memset(tempname, 0, sizeof(tempname)); // offset filename to just the name only part diff --git a/src/d_main.cpp b/src/d_main.cpp index 5768fb544..4f8d50e98 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -613,7 +613,7 @@ static bool D_Display(void) } if (demo.rewinding) - V_DrawFadeScreen(TC_RAINBOW, (leveltime & 0x20) ? SKINCOLOR_PASTEL : SKINCOLOR_MOONSLAM); + V_DrawFadeScreen(TC_RAINBOW, (leveltime & 0x20) ? SKINCOLOR_PASTEL : SKINCOLOR_MOONSET); // vid size change is now finished if it was on... vid.recalc = 0; diff --git a/src/deh_tables.c b/src/deh_tables.c index 2e485983d..8e7721317 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -1199,11 +1199,11 @@ struct int_const_s const INT_CONST[] = { {"V_SKYMAP",V_SKYMAP}, {"V_LAVENDERMAP",V_LAVENDERMAP}, {"V_GOLDMAP",V_GOLDMAP}, - {"V_TEAMAP",V_TEAMAP}, - {"V_STEELMAP",V_STEELMAP}, + {"V_AQUAMAP",V_AQUAMAP}, + {"V_MAGENTAMAP",V_MAGENTAMAP}, {"V_PINKMAP",V_PINKMAP}, {"V_BROWNMAP",V_BROWNMAP}, - {"V_PEACHMAP",V_PEACHMAP}, + {"V_TANMAP",V_TANMAP}, {"V_TRANSLUCENT",V_TRANSLUCENT}, {"V_10TRANS",V_10TRANS}, diff --git a/src/g_demo.c b/src/g_demo.c index ff6d47072..e8f771747 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -1371,7 +1371,7 @@ skippedghosttic: g->mo->color = skin->supercolor; } else - g->mo->color = SKINCOLOR_SUPER1; + g->mo->color = SKINCOLOR_SUPERGOLD1; g->mo->color += abs( ( (signed)( (unsigned)leveltime >> 1 ) % 9) - 4); break; case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer) diff --git a/src/hardware/hw_defs.h b/src/hardware/hw_defs.h index c75155f3e..6f279af85 100644 --- a/src/hardware/hw_defs.h +++ b/src/hardware/hw_defs.h @@ -40,8 +40,8 @@ typedef unsigned char FBOOLEAN; // ========================================================================== // byte value for paletted graphics, which represent the transparent color -#define HWR_PATCHES_CHROMAKEY_COLORINDEX 247 -//#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 220 +#define HWR_PATCHES_CHROMAKEY_COLORINDEX 255 +//#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 130 // the chroma key color shows on border sprites, set it to black #define HWR_PATCHES_CHROMAKEY_COLORVALUE (0x00000000) //RGBA format as in grSstWinOpen() diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 9c2350df2..972faab56 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -793,7 +793,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) { UINT16 chatcolor = skincolors[players[playernum].skincolor].chatcolor; - if (chatcolor > V_PEACHMAP) + if (chatcolor > V_TANMAP) { sprintf(color_prefix, "%c", '\x80'); } @@ -832,7 +832,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) { UINT16 chatcolor = skincolors[players[playernum].skincolor].chatcolor; - if (chatcolor > V_PEACHMAP) + if (chatcolor > V_TANMAP) { sprintf(color_prefix, "%c", '\x80'); } diff --git a/src/k_color.c b/src/k_color.c index a71faaa4c..d5ce16bba 100644 --- a/src/k_color.c +++ b/src/k_color.c @@ -121,7 +121,7 @@ void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, skincolornum_t if (skinnum == TC_BOSS) dest_colormap[31] = 0; else if (skinnum == TC_METALSONIC) - dest_colormap[239] = 0; + dest_colormap[143] = 0; return; } diff --git a/src/k_color.h b/src/k_color.h index a3c566cf2..2f002c6e6 100644 --- a/src/k_color.h +++ b/src/k_color.h @@ -20,7 +20,7 @@ extern "C" { #endif #define SKIN_RAMP_LENGTH 16 -#define DEFAULT_STARTTRANSCOLOR 160 +#define DEFAULT_STARTTRANSCOLOR 96 #define NUM_PALETTE_ENTRIES 256 /*-------------------------------------------------- diff --git a/src/k_kart.c b/src/k_kart.c index a71ccd339..8fcd48c15 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2297,7 +2297,26 @@ void K_SpawnNormalSpeedLines(player_t *player) P_SetScale(fast, 3*fast->scale/2); } - if (player->tripwireLeniency) + if (player->eggmanexplode) + { + // Make it red when you have the eggman speed boost + fast->color = SKINCOLOR_RED; + fast->colorized = true; + } + else if (player->invincibilitytimer) + { + const tic_t defaultTime = itemtime+(2*TICRATE); + if (player->invincibilitytimer > defaultTime) + { + fast->color = player->mo->color; + } + else + { + fast->color = SKINCOLOR_INVINCFLASH; + } + fast->colorized = true; + } + else if (player->tripwireLeniency) { // Make it pink+blue+big when you can go through tripwire fast->color = (leveltime & 1) ? SKINCOLOR_LILAC : SKINCOLOR_JAWZ; diff --git a/src/m_menu.c b/src/m_menu.c index 35b13182d..e84014d09 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3755,7 +3755,7 @@ static void M_DrawSlider(INT32 x, INT32 y, const consvar_t *cv, boolean ontop) void M_DrawTextBox(INT32 x, INT32 y, INT32 width, INT32 boxlines) { // Solid color textbox. - V_DrawFill(x+5, y+5, width*8+6, boxlines*8+6, 239); + V_DrawFill(x+5, y+5, width*8+6, boxlines*8+6, 159); //V_DrawFill(x+8, y+8, width*8, boxlines*8, 31); /* patch_t *p; diff --git a/src/p_enemy.c b/src/p_enemy.c index 7fee92e8e..4ab8ca3e0 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -2534,16 +2534,16 @@ void A_Boss1Laser(mobj_t *actor) tic_t dur; static const UINT8 LASERCOLORS[] = { - SKINCOLOR_KSUPER3, - SKINCOLOR_KSUPER4, - SKINCOLOR_KSUPER5, + SKINCOLOR_SUPERRED3, + SKINCOLOR_SUPERRED4, + SKINCOLOR_SUPERRED5, SKINCOLOR_KETCHUP, SKINCOLOR_RED, SKINCOLOR_RED, SKINCOLOR_KETCHUP, - SKINCOLOR_KSUPER5, - SKINCOLOR_KSUPER4, - SKINCOLOR_KSUPER3, + SKINCOLOR_SUPERRED5, + SKINCOLOR_SUPERRED4, + SKINCOLOR_SUPERRED3, }; if (LUA_CallAction(A_BOSS1LASER, actor)) @@ -10232,8 +10232,8 @@ void P_InternalFlickySetColor(mobj_t *actor, UINT8 color) SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_RUBY, - SKINCOLOR_ORANGE, - SKINCOLOR_SUNSET, + SKINCOLOR_BLOSSOM, + SKINCOLOR_SUNSLAM, SKINCOLOR_ORANGE, SKINCOLOR_YELLOW, }; @@ -12706,7 +12706,7 @@ void A_RolloutSpawn(mobj_t *actor) if (actor->target->flags2 & MF2_AMBUSH) { - actor->target->color = SKINCOLOR_BROWN; + actor->target->color = SKINCOLOR_SUPERRUST3; actor->target->colorized = true; } } diff --git a/src/p_mobj.c b/src/p_mobj.c index 447b24fe0..1597642af 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9418,7 +9418,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) mobj->flags2 |= MF2_INVERTAIMABLE; break; case MT_FLICKY_08: - mobj->color = (P_RandomChance(FRACUNIT/2) ? SKINCOLOR_RED : SKINCOLOR_ULTRAMARINE); + mobj->color = (P_RandomChance(FRACUNIT/2) ? SKINCOLOR_RED : SKINCOLOR_AQUAMARINE); break; case MT_BALLOON: { diff --git a/src/r_draw.cpp b/src/r_draw.cpp index e063c57ee..588c1cb99 100644 --- a/src/r_draw.cpp +++ b/src/r_draw.cpp @@ -153,6 +153,10 @@ float zeroheight; #define DEFAULT_STARTTRANSCOLOR 160 #define NUM_PALETTE_ENTRIES 256 +#define SKIN_RAMP_LENGTH 16 +#define DEFAULT_STARTTRANSCOLOR 96 +#define NUM_PALETTE_ENTRIES 256 + static UINT8 **translationtablecache[TT_CACHE_SIZE] = {NULL}; UINT8 skincolor_modified[MAXSKINCOLORS]; diff --git a/src/r_draw.h b/src/r_draw.h index 7a070ccdd..a7bc1bec8 100644 --- a/src/r_draw.h +++ b/src/r_draw.h @@ -188,7 +188,7 @@ void R_FillBackScreen(void); void R_DrawViewBorder(void); #endif -#define TRANSPARENTPIXEL 247 +#define TRANSPARENTPIXEL 255 #define BRIGHTPIXEL 0 // ----------------- diff --git a/src/r_skins.c b/src/r_skins.c index 2ba8b57ed..0ef47fd61 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -109,9 +109,9 @@ static void Sk_SetDefaultValue(skin_t *skin) skin->flags = 0; strcpy(skin->realname, "Someone"); - skin->starttranscolor = 160; + skin->starttranscolor = 96; skin->prefcolor = SKINCOLOR_GREEN; - skin->supercolor = SKINCOLOR_SUPER1; + skin->supercolor = SKINCOLOR_SUPERGOLD1; skin->prefoppositecolor = 0; // use tables skin->kartspeed = 5; @@ -459,7 +459,7 @@ static boolean R_ProcessPatchableFields(skin_t *skin, char *stoken, char *value) else if (!stricmp(stoken, "supercolor")) { UINT16 color = R_GetSuperColorByName(value); - skin->supercolor = (color ? color : SKINCOLOR_SUPER1); + skin->supercolor = (color ? color : SKINCOLOR_SUPERGOLD1); } #define GETFLOAT(field) else if (!stricmp(stoken, #field)) skin->field = FLOAT_TO_FIXED(atof(value)); diff --git a/src/tmap.nas b/src/tmap.nas index dddb1de54..69282d0b4 100644 --- a/src/tmap.nas +++ b/src/tmap.nas @@ -17,7 +17,7 @@ [BITS 32] %define FRACBITS 16 -%define TRANSPARENTPIXEL 247 +%define TRANSPARENTPIXEL 255 %ifdef LINUX %macro cextern 1 diff --git a/src/tmap_mmx.nas b/src/tmap_mmx.nas index 5b82338ee..15b97499d 100644 --- a/src/tmap_mmx.nas +++ b/src/tmap_mmx.nas @@ -18,7 +18,7 @@ [BITS 32] %define FRACBITS 16 -%define TRANSPARENTPIXEL 247 +%define TRANSPARENTPIXEL 255 %ifdef LINUX %macro cextern 1 diff --git a/src/v_video.h b/src/v_video.h index 01cb33ae6..0d3304472 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -119,11 +119,11 @@ void V_CubeApply(UINT8 *red, UINT8 *green, UINT8 *blue); #define V_SKYMAP 0x00008000 #define V_LAVENDERMAP 0x00009000 #define V_GOLDMAP 0x0000A000 -#define V_TEAMAP 0x0000B000 -#define V_STEELMAP 0x0000C000 +#define V_AQUAMAP 0x0000B000 +#define V_MAGENTAMAP 0x0000C000 #define V_PINKMAP 0x0000D000 #define V_BROWNMAP 0x0000E000 -#define V_PEACHMAP 0x0000F000 +#define V_TANMAP 0x0000F000 // use bits 17-20 for alpha transparency #define V_ALPHASHIFT 16