Default Translation color + Neon Green change

This commit is contained in:
Sryder13 2015-07-23 21:43:30 +01:00
parent e054f4b6c6
commit 721a5f9b4b
2 changed files with 15 additions and 17 deletions

View file

@ -121,7 +121,7 @@ UINT32 nflatxshift, nflatyshift, nflatshiftup, nflatmask;
#define METALSONIC_TT_CACHE_INDEX (MAXSKINS + 2) #define METALSONIC_TT_CACHE_INDEX (MAXSKINS + 2)
#define ALLWHITE_TT_CACHE_INDEX (MAXSKINS + 3) #define ALLWHITE_TT_CACHE_INDEX (MAXSKINS + 3)
#define SKIN_RAMP_LENGTH 16 #define SKIN_RAMP_LENGTH 16
#define DEFAULT_STARTTRANSCOLOR 160 #define DEFAULT_STARTTRANSCOLOR 96
#define NUM_PALETTE_ENTRIES 256 #define NUM_PALETTE_ENTRIES 256
static UINT8** translationtablecache[MAXSKINS + 4] = {NULL}; static UINT8** translationtablecache[MAXSKINS + 4] = {NULL};
@ -347,7 +347,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
break; break;
case SKINCOLOR_PEACH: case SKINCOLOR_PEACH:
// 10 color rame, from 2 color ranges // 10 colors
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
{ {
if (10*i/16 == 0) if (10*i/16 == 0)
@ -360,7 +360,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
break; break;
case SKINCOLOR_BEIGE: case SKINCOLOR_BEIGE:
// 13 color range, from 2 color ranges // 13 colors
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
{ {
if (13*i/16 == 12) if (13*i/16 == 12)
@ -396,7 +396,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
break; break;
case SKINCOLOR_GOLD: case SKINCOLOR_GOLD:
// 10 color range, from 2 color ranges // 10 colors
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
{ {
if (10*i/16 == 0) if (10*i/16 == 0)
@ -409,7 +409,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
break; break;
case SKINCOLOR_TAN: case SKINCOLOR_TAN:
// 8 color range, from 3 color ranges // 8 colors
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
{ {
if (8*i/16 == 0) if (8*i/16 == 0)
@ -426,13 +426,13 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
break; break;
case SKINCOLOR_OLIVE: case SKINCOLOR_OLIVE:
// 7 color ramp // 7 colors
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (7*i/SKIN_RAMP_LENGTH)); dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (7*i/SKIN_RAMP_LENGTH));
break; break;
case SKINCOLOR_YELLOW: case SKINCOLOR_YELLOW:
// 10 color range, from 2 color ranges // 10 colors
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
{ {
if (10*i/16 == 0) if (10*i/16 == 0)
@ -445,20 +445,18 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
break; break;
case SKINCOLOR_NEONGREEN: case SKINCOLOR_NEONGREEN:
// Multi-color ramp // 8 colors
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
{ {
if (10*i/16 <= 1) if (8*i/16 == 7)
dest_colormap[starttranscolor + i] = 0x60 + 10*i/16; // Brighter green dest_colormap[starttranscolor + i] = 0x6E; // Darkest
else if (10*i/16 < 9)
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (10*i/SKIN_RAMP_LENGTH) - 2); // Neon green
else else
dest_colormap[starttranscolor + i] = 0x6F; dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (8*i/SKIN_RAMP_LENGTH)); // Neon green
} }
break; break;
case SKINCOLOR_TEAL: case SKINCOLOR_TEAL:
// 6 color ramp // 6 colors
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
{ {
if (6*i/16 == 0) if (6*i/16 == 0)
@ -483,7 +481,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
break; break;
case SKINCOLOR_STEELBLUE: case SKINCOLOR_STEELBLUE:
// 8 color range, from 2 color ranges // 8 colors
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
{ {
if (8*i/16 <= 1) if (8*i/16 <= 1)
@ -496,7 +494,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
break; break;
case SKINCOLOR_LAVENDER: case SKINCOLOR_LAVENDER:
// 10 color range, from 2 color ranges // 10 colors
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
{ {
if (10*i/16 <= 1) if (10*i/16 <= 1)

View file

@ -2235,7 +2235,7 @@ static void Sk_SetDefaultValue(skin_t *skin)
strncpy(skin->face, "MISSING", 8); strncpy(skin->face, "MISSING", 8);
strncpy(skin->superface, "MISSING", 8); strncpy(skin->superface, "MISSING", 8);
skin->starttranscolor = 160; skin->starttranscolor = 96;
skin->prefcolor = SKINCOLOR_GREEN; skin->prefcolor = SKINCOLOR_GREEN;
skin->normalspeed = 36<<FRACBITS; skin->normalspeed = 36<<FRACBITS;