mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-16 01:31:30 +00:00
Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal into unslot-music
This commit is contained in:
commit
cd1bb9b027
28 changed files with 1174 additions and 1043 deletions
|
@ -248,11 +248,11 @@ void CON_ReSetupBackColormap(UINT16 num)
|
||||||
{
|
{
|
||||||
j = pal[i] + pal[i+1] + pal[i+2];
|
j = pal[i] + pal[i+1] + pal[i+2];
|
||||||
cwhitemap[k] = (UINT8)(15 - (j>>6));
|
cwhitemap[k] = (UINT8)(15 - (j>>6));
|
||||||
corangemap[k] = (UINT8)(95 - (j>>6));
|
corangemap[k] = (UINT8)(63 - (j>>6));
|
||||||
cbluemap[k] = (UINT8)(239 - (j>>6));
|
cbluemap[k] = (UINT8)(159 - (j>>6));
|
||||||
cgreenmap[k] = (UINT8)(175 - (j>>6));
|
cgreenmap[k] = (UINT8)(111 - (j>>6));
|
||||||
cgraymap[k] = (UINT8)(31 - (j>>6));
|
cgraymap[k] = (UINT8)(31 - (j>>6));
|
||||||
credmap[k] = (UINT8)(143 - (j>>6));
|
credmap[k] = (UINT8)(47 - (j>>6));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,11 +283,11 @@ static void CON_SetupBackColormap(void)
|
||||||
{
|
{
|
||||||
j = pal[i] + pal[i+1] + pal[i+2];
|
j = pal[i] + pal[i+1] + pal[i+2];
|
||||||
cwhitemap[k] = (UINT8)(15 - (j>>6));
|
cwhitemap[k] = (UINT8)(15 - (j>>6));
|
||||||
corangemap[k] = (UINT8)(95 - (j>>6));
|
corangemap[k] = (UINT8)(63 - (j>>6));
|
||||||
cbluemap[k] = (UINT8)(239 - (j>>6));
|
cbluemap[k] = (UINT8)(159 - (j>>6));
|
||||||
cgreenmap[k] = (UINT8)(175 - (j>>6));
|
cgreenmap[k] = (UINT8)(111 - (j>>6));
|
||||||
cgraymap[k] = (UINT8)(31 - (j>>6));
|
cgraymap[k] = (UINT8)(31 - (j>>6));
|
||||||
credmap[k] = (UINT8)(143 - (j>>6));
|
credmap[k] = (UINT8)(47 - (j>>6));
|
||||||
}
|
}
|
||||||
|
|
||||||
// setup the other colormaps, for console text
|
// setup the other colormaps, for console text
|
||||||
|
@ -306,20 +306,20 @@ static void CON_SetupBackColormap(void)
|
||||||
orangemap[i] = (UINT8)i;
|
orangemap[i] = (UINT8)i;
|
||||||
}
|
}
|
||||||
|
|
||||||
yellowmap[3] = (UINT8)103;
|
yellowmap[3] = (UINT8)73;
|
||||||
yellowmap[9] = (UINT8)115;
|
yellowmap[9] = (UINT8)66;
|
||||||
purplemap[3] = (UINT8)195;
|
purplemap[3] = (UINT8)184;
|
||||||
purplemap[9] = (UINT8)198;
|
purplemap[9] = (UINT8)186;
|
||||||
lgreenmap[3] = (UINT8)162;
|
lgreenmap[3] = (UINT8)102;
|
||||||
lgreenmap[9] = (UINT8)170;
|
lgreenmap[9] = (UINT8)106;
|
||||||
bluemap[3] = (UINT8)228;
|
bluemap[3] = (UINT8)147;
|
||||||
bluemap[9] = (UINT8)238;
|
bluemap[9] = (UINT8)158;
|
||||||
graymap[3] = (UINT8)10;
|
graymap[3] = (UINT8)10;
|
||||||
graymap[9] = (UINT8)15;
|
graymap[9] = (UINT8)15;
|
||||||
redmap[3] = (UINT8)124;
|
redmap[3] = (UINT8)210;
|
||||||
redmap[9] = (UINT8)127;
|
redmap[9] = (UINT8)32;
|
||||||
orangemap[3] = (UINT8)85;
|
orangemap[3] = (UINT8)52;
|
||||||
orangemap[9] = (UINT8)90;
|
orangemap[9] = (UINT8)57;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup the console text buffer
|
// Setup the console text buffer
|
||||||
|
@ -1472,3 +1472,4 @@ void CON_Drawer(void)
|
||||||
else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS)
|
else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS)
|
||||||
CON_DrawHudlines();
|
CON_DrawHudlines();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1101,7 +1101,7 @@ static inline void CL_DrawConnectionStatus(void)
|
||||||
if (cl_mode != cl_downloadfiles)
|
if (cl_mode != cl_downloadfiles)
|
||||||
{
|
{
|
||||||
INT32 i, animtime = ((ccstime / 4) & 15) + 16;
|
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.
|
// 15 pal entries total.
|
||||||
const char *cltext;
|
const char *cltext;
|
||||||
|
|
||||||
|
@ -1139,8 +1139,8 @@ static inline void CL_DrawConnectionStatus(void)
|
||||||
dldlength = (INT32)((fileneeded[lastfilenum].currentsize/(double)fileneeded[lastfilenum].totalsize) * 256);
|
dldlength = (INT32)((fileneeded[lastfilenum].currentsize/(double)fileneeded[lastfilenum].totalsize) * 256);
|
||||||
if (dldlength > 256)
|
if (dldlength > 256)
|
||||||
dldlength = 256;
|
dldlength = 256;
|
||||||
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, 256, 8, 175);
|
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, 256, 8, 111);
|
||||||
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, dldlength, 8, 160);
|
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, dldlength, 8, 96);
|
||||||
|
|
||||||
memset(tempname, 0, sizeof(tempname));
|
memset(tempname, 0, sizeof(tempname));
|
||||||
nameonly(strncpy(tempname, fileneeded[lastfilenum].filename, 31));
|
nameonly(strncpy(tempname, fileneeded[lastfilenum].filename, 31));
|
||||||
|
|
|
@ -1129,10 +1129,10 @@ void D_SRB2Main(void)
|
||||||
#ifndef DEVELOP // md5s last updated 12/14/14
|
#ifndef DEVELOP // md5s last updated 12/14/14
|
||||||
|
|
||||||
// Check MD5s of autoloaded files
|
// Check MD5s of autoloaded files
|
||||||
W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad
|
//W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad
|
||||||
W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta
|
//W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta
|
||||||
W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta
|
//W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta
|
||||||
W_VerifyFileMD5(3, ASSET_HASH_RINGS_DTA); // rings.dta
|
//W_VerifyFileMD5(3, ASSET_HASH_RINGS_DTA); // rings.dta
|
||||||
//W_VerifyFileMD5(4, "0c66790502e648bfce90fdc5bb15722e"); // patch.dta
|
//W_VerifyFileMD5(4, "0c66790502e648bfce90fdc5bb15722e"); // patch.dta
|
||||||
// don't check music.dta because people like to modify it, and it doesn't matter if they do
|
// don't check music.dta because people like to modify it, and it doesn't matter if they do
|
||||||
// ...except it does if they slip maps in there, and that's what W_VerifyNMUSlumps is for.
|
// ...except it does if they slip maps in there, and that's what W_VerifyNMUSlumps is for.
|
||||||
|
|
|
@ -7337,27 +7337,31 @@ static const char *COLOR_ENUMS[] = {
|
||||||
"SILVER", // SKINCOLOR_SILVER
|
"SILVER", // SKINCOLOR_SILVER
|
||||||
"GREY", // SKINCOLOR_GREY
|
"GREY", // SKINCOLOR_GREY
|
||||||
"BLACK", // SKINCOLOR_BLACK
|
"BLACK", // SKINCOLOR_BLACK
|
||||||
"CYAN", // SKINCOLOR_CYAN
|
|
||||||
"TEAL", // SKINCOLOR_TEAL
|
|
||||||
"STEELBLUE", // SKINCOLOR_STEELBLUE
|
|
||||||
"BLUE", // SKINCOLOR_BLUE
|
|
||||||
"PEACH", // SKINCOLOR_PEACH
|
|
||||||
"TAN", // SKINCOLOR_TAN
|
|
||||||
"PINK", // SKINCOLOR_PINK
|
|
||||||
"LAVENDER", // SKINCOLOR_LAVENDER
|
|
||||||
"PURPLE", // SKINCOLOR_PURPLE
|
|
||||||
"ORANGE", // SKINCOLOR_ORANGE
|
|
||||||
"ROSEWOOD", // SKINCOLOR_ROSEWOOD
|
|
||||||
"BEIGE", // SKINCOLOR_BEIGE
|
"BEIGE", // SKINCOLOR_BEIGE
|
||||||
|
"PEACH", // SKINCOLOR_PEACH
|
||||||
"BROWN", // SKINCOLOR_BROWN
|
"BROWN", // SKINCOLOR_BROWN
|
||||||
"RED", // SKINCOLOR_RED
|
"RED", // SKINCOLOR_RED
|
||||||
"DARKRED", // SKINCOLOR_DARKRED
|
"CRIMSON", // SKINCOLOR_CRIMSON
|
||||||
"NEONGREEN", // SKINCOLOR_NEONGREEN
|
"ORANGE", // SKINCOLOR_ORANGE
|
||||||
"GREEN", // SKINCOLOR_GREEN
|
"RUST", // SKINCOLOR_RUST
|
||||||
"ZIM", // SKINCOLOR_ZIM
|
"GOLD", // SKINCOLOR_GOLD
|
||||||
"OLIVE", // SKINCOLOR_OLIVE
|
|
||||||
"YELLOW", // SKINCOLOR_YELLOW
|
"YELLOW", // SKINCOLOR_YELLOW
|
||||||
"GOLD", // SKINCOLOR_GOLD
|
"TAN", // SKINCOLOR_TAN
|
||||||
|
"MOSS", // SKINCOLOR_MOSS
|
||||||
|
"PERIDOT", // SKINCOLOR_PERIDOT
|
||||||
|
"GREEN", // SKINCOLOR_GREEN
|
||||||
|
"EMERALD", // SKINCOLOR_EMERALD
|
||||||
|
"AQUA", // SKINCOLOR_AQUA
|
||||||
|
"TEAL", // SKINCOLOR_TEAL
|
||||||
|
"CYAN", // SKINCOLOR_CYAN
|
||||||
|
"BLUE", // SKINCOLOR_BLUE
|
||||||
|
"AZURE", // SKINCOLOR_AZURE
|
||||||
|
"PASTEL", // SKINCOLOR_PASTEL
|
||||||
|
"PURPLE", // SKINCOLOR_PURPLE
|
||||||
|
"LAVENDER", // SKINCOLOR_LAVENDER
|
||||||
|
"MAGENTA", // SKINCOLOR_MAGENTA
|
||||||
|
"PINK", // SKINCOLOR_PINK
|
||||||
|
"ROSY", // SKINCOLOR_ROSY
|
||||||
// Super special awesome Super flashing colors!
|
// Super special awesome Super flashing colors!
|
||||||
"SUPER1", // SKINCOLOR_SUPER1
|
"SUPER1", // SKINCOLOR_SUPER1
|
||||||
"SUPER2", // SKINCOLOR_SUPER2,
|
"SUPER2", // SKINCOLOR_SUPER2,
|
||||||
|
@ -8793,3 +8797,4 @@ void LUA_SetActionByName(void *state, const char *actiontocompare)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAVE_BLUA
|
#endif // HAVE_BLUA
|
||||||
|
|
||||||
|
|
|
@ -232,27 +232,31 @@ typedef enum
|
||||||
SKINCOLOR_SILVER,
|
SKINCOLOR_SILVER,
|
||||||
SKINCOLOR_GREY,
|
SKINCOLOR_GREY,
|
||||||
SKINCOLOR_BLACK,
|
SKINCOLOR_BLACK,
|
||||||
SKINCOLOR_CYAN,
|
|
||||||
SKINCOLOR_TEAL,
|
|
||||||
SKINCOLOR_STEELBLUE,
|
|
||||||
SKINCOLOR_BLUE,
|
|
||||||
SKINCOLOR_PEACH,
|
|
||||||
SKINCOLOR_TAN,
|
|
||||||
SKINCOLOR_PINK,
|
|
||||||
SKINCOLOR_LAVENDER,
|
|
||||||
SKINCOLOR_PURPLE,
|
|
||||||
SKINCOLOR_ORANGE,
|
|
||||||
SKINCOLOR_ROSEWOOD,
|
|
||||||
SKINCOLOR_BEIGE,
|
SKINCOLOR_BEIGE,
|
||||||
|
SKINCOLOR_PEACH,
|
||||||
SKINCOLOR_BROWN,
|
SKINCOLOR_BROWN,
|
||||||
SKINCOLOR_RED,
|
SKINCOLOR_RED,
|
||||||
SKINCOLOR_DARKRED,
|
SKINCOLOR_CRIMSON,
|
||||||
SKINCOLOR_NEONGREEN,
|
SKINCOLOR_ORANGE,
|
||||||
SKINCOLOR_GREEN,
|
SKINCOLOR_RUST,
|
||||||
SKINCOLOR_ZIM,
|
|
||||||
SKINCOLOR_OLIVE,
|
|
||||||
SKINCOLOR_YELLOW,
|
|
||||||
SKINCOLOR_GOLD,
|
SKINCOLOR_GOLD,
|
||||||
|
SKINCOLOR_YELLOW,
|
||||||
|
SKINCOLOR_TAN,
|
||||||
|
SKINCOLOR_MOSS,
|
||||||
|
SKINCOLOR_PERIDOT,
|
||||||
|
SKINCOLOR_GREEN,
|
||||||
|
SKINCOLOR_EMERALD,
|
||||||
|
SKINCOLOR_AQUA,
|
||||||
|
SKINCOLOR_TEAL,
|
||||||
|
SKINCOLOR_CYAN,
|
||||||
|
SKINCOLOR_BLUE,
|
||||||
|
SKINCOLOR_AZURE,
|
||||||
|
SKINCOLOR_PASTEL,
|
||||||
|
SKINCOLOR_PURPLE,
|
||||||
|
SKINCOLOR_LAVENDER,
|
||||||
|
SKINCOLOR_MAGENTA,
|
||||||
|
SKINCOLOR_PINK,
|
||||||
|
SKINCOLOR_ROSY,
|
||||||
|
|
||||||
// Careful! MAXSKINCOLORS cannot be greater than 0x20!
|
// Careful! MAXSKINCOLORS cannot be greater than 0x20!
|
||||||
MAXSKINCOLORS,
|
MAXSKINCOLORS,
|
||||||
|
@ -500,3 +504,4 @@ extern const char *compdate, *comptime, *comprevision;
|
||||||
//#define REDSANALOG
|
//#define REDSANALOG
|
||||||
|
|
||||||
#endif // __DOOMDEF__
|
#endif // __DOOMDEF__
|
||||||
|
|
||||||
|
|
|
@ -100,11 +100,13 @@ typedef long ssize_t;
|
||||||
|
|
||||||
#if defined (_MSC_VER) || defined (__OS2__)
|
#if defined (_MSC_VER) || defined (__OS2__)
|
||||||
// Microsoft VisualC++
|
// Microsoft VisualC++
|
||||||
|
#ifdef _MSC_VER
|
||||||
#if (_MSC_VER <= 1800) // MSVC 2013 and back
|
#if (_MSC_VER <= 1800) // MSVC 2013 and back
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#if (_MSC_VER <= 1200) // MSVC 2012 and back
|
#if (_MSC_VER <= 1200) // MSVC 2012 and back
|
||||||
#define vsnprintf _vsnprintf
|
#define vsnprintf _vsnprintf
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define strncasecmp strnicmp
|
#define strncasecmp strnicmp
|
||||||
#define strcasecmp stricmp
|
#define strcasecmp stricmp
|
||||||
|
@ -177,6 +179,8 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||||
// not the number of bytes in the buffer.
|
// not the number of bytes in the buffer.
|
||||||
#define STRBUFCPY(dst,src) strlcpy(dst, src, sizeof dst)
|
#define STRBUFCPY(dst,src) strlcpy(dst, src, sizeof dst)
|
||||||
|
|
||||||
|
// \note __BYTEBOOL__ used to be set above if "macintosh" was defined,
|
||||||
|
// if macintosh's version of boolean type isn't needed anymore, then isn't this macro pointless now?
|
||||||
#ifndef __BYTEBOOL__
|
#ifndef __BYTEBOOL__
|
||||||
#define __BYTEBOOL__
|
#define __BYTEBOOL__
|
||||||
|
|
||||||
|
@ -193,7 +197,6 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||||
#else
|
#else
|
||||||
typedef enum {false, true} boolean;
|
typedef enum {false, true} boolean;
|
||||||
#endif
|
#endif
|
||||||
//#endif // __cplusplus
|
|
||||||
#endif // __BYTEBOOL__
|
#endif // __BYTEBOOL__
|
||||||
|
|
||||||
/* 7.18.2.1 Limits of exact-width integer types */
|
/* 7.18.2.1 Limits of exact-width integer types */
|
||||||
|
|
52
src/f_wipe.c
52
src/f_wipe.c
|
@ -231,34 +231,52 @@ static void F_DoWipe(fademask_t *fademask)
|
||||||
maskx = masky = 0;
|
maskx = masky = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
// pointer to transtable that this mask would use
|
|
||||||
transtbl = transtables + ((9 - *mask)<<FF_TRANSSHIFT);
|
|
||||||
// (ignore that it goes out of bounds if *mask is 0 or 10 --
|
|
||||||
// it wouldn't be used in those cases anyway)
|
|
||||||
|
|
||||||
draw_rowstart = scrxpos[maskx];
|
draw_rowstart = scrxpos[maskx];
|
||||||
draw_rowend = scrxpos[maskx + 1];
|
draw_rowend = scrxpos[maskx + 1];
|
||||||
draw_linestart = scrypos[masky];
|
draw_linestart = scrypos[masky];
|
||||||
draw_lineend = scrypos[masky + 1];
|
draw_lineend = scrypos[masky + 1];
|
||||||
|
|
||||||
// DRAWING LOOP
|
|
||||||
relativepos = (draw_linestart * vid.width) + draw_rowstart;
|
relativepos = (draw_linestart * vid.width) + draw_rowstart;
|
||||||
draw_linestogo = draw_lineend - draw_linestart;
|
draw_linestogo = draw_lineend - draw_linestart;
|
||||||
while (draw_linestogo--)
|
|
||||||
|
if (*mask == 0)
|
||||||
{
|
{
|
||||||
w = w_base + relativepos;
|
// shortcut - memcpy source to work
|
||||||
s = s_base + relativepos;
|
while (draw_linestogo--)
|
||||||
e = e_base + relativepos;
|
|
||||||
draw_rowstogo = draw_rowend - draw_rowstart;
|
|
||||||
while (draw_rowstogo--)
|
|
||||||
{
|
{
|
||||||
if (*s != *e)
|
M_Memcpy(w_base+relativepos, s_base+relativepos, draw_rowend-draw_rowstart);
|
||||||
*w = ((*mask == 0) ? *s : (*mask == 10) ? *e : transtbl[(*e<<8) + *s]);
|
relativepos += vid.width;
|
||||||
++w, ++s, ++e;
|
|
||||||
}
|
}
|
||||||
relativepos += vid.width;
|
|
||||||
}
|
}
|
||||||
// END DRAWING LOOP
|
else if (*mask == 10)
|
||||||
|
{
|
||||||
|
// shortcut - memcpy target to work
|
||||||
|
while (draw_linestogo--)
|
||||||
|
{
|
||||||
|
M_Memcpy(w_base+relativepos, e_base+relativepos, draw_rowend-draw_rowstart);
|
||||||
|
relativepos += vid.width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// pointer to transtable that this mask would use
|
||||||
|
transtbl = transtables + ((9 - *mask)<<FF_TRANSSHIFT);
|
||||||
|
|
||||||
|
// DRAWING LOOP
|
||||||
|
while (draw_linestogo--)
|
||||||
|
{
|
||||||
|
w = w_base + relativepos;
|
||||||
|
s = s_base + relativepos;
|
||||||
|
e = e_base + relativepos;
|
||||||
|
draw_rowstogo = draw_rowend - draw_rowstart;
|
||||||
|
|
||||||
|
while (draw_rowstogo--)
|
||||||
|
*w++ = transtbl[ ( *e++ << 8 ) + *s++ ];
|
||||||
|
|
||||||
|
relativepos += vid.width;
|
||||||
|
}
|
||||||
|
// END DRAWING LOOP
|
||||||
|
}
|
||||||
|
|
||||||
if (++maskx >= fademask->width)
|
if (++maskx >= fademask->width)
|
||||||
++masky, maskx = 0;
|
++masky, maskx = 0;
|
||||||
|
|
|
@ -125,7 +125,7 @@ boolean useNightsSS = false;
|
||||||
UINT8 skincolor_redteam = SKINCOLOR_RED;
|
UINT8 skincolor_redteam = SKINCOLOR_RED;
|
||||||
UINT8 skincolor_blueteam = SKINCOLOR_BLUE;
|
UINT8 skincolor_blueteam = SKINCOLOR_BLUE;
|
||||||
UINT8 skincolor_redring = SKINCOLOR_RED;
|
UINT8 skincolor_redring = SKINCOLOR_RED;
|
||||||
UINT8 skincolor_bluering = SKINCOLOR_STEELBLUE;
|
UINT8 skincolor_bluering = SKINCOLOR_AZURE;
|
||||||
|
|
||||||
tic_t countdowntimer = 0;
|
tic_t countdowntimer = 0;
|
||||||
boolean countdowntimeup = false;
|
boolean countdowntimeup = false;
|
||||||
|
@ -299,9 +299,6 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
|
||||||
#if JOYAXISSET > 3
|
#if JOYAXISSET > 3
|
||||||
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
||||||
#endif
|
#endif
|
||||||
#if JOYAXISSET > 3
|
|
||||||
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
|
||||||
#endif
|
|
||||||
#if JOYAXISSET > 4
|
#if JOYAXISSET > 4
|
||||||
{7, "Yaw"}, {8, "Dummy"}, {-7, "Yaw-"}, {-8, "Dummy-"},
|
{7, "Yaw"}, {8, "Dummy"}, {-7, "Yaw-"}, {-8, "Dummy-"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -46,8 +46,8 @@ typedef unsigned char FBOOLEAN;
|
||||||
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 0
|
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 0
|
||||||
#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 1
|
#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 1
|
||||||
#else
|
#else
|
||||||
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 247
|
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 255
|
||||||
#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 220
|
#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 130
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// the chroma key color shows on border sprites, set it to black
|
// the chroma key color shows on border sprites, set it to black
|
||||||
|
@ -229,3 +229,4 @@ enum hwdfiltermode
|
||||||
|
|
||||||
|
|
||||||
#endif //_HWR_DEFS_
|
#endif //_HWR_DEFS_
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,9 @@ static int lib_finecosine(lua_State *L)
|
||||||
|
|
||||||
static int lib_finetangent(lua_State *L)
|
static int lib_finetangent(lua_State *L)
|
||||||
{
|
{
|
||||||
lua_pushfixed(L, FINETANGENT((luaL_checkangle(L, 1)>>ANGLETOFINESHIFT) & FINEMASK));
|
// HACK: add ANGLE_90 to make tan() in Lua start at 0 like it should
|
||||||
|
// use & 4095 instead of & FINEMASK (8191), so it doesn't go out of the array's bounds
|
||||||
|
lua_pushfixed(L, FINETANGENT(((luaL_checkangle(L, 1)+ANGLE_90)>>ANGLETOFINESHIFT) & 4095));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
52
src/m_cond.c
52
src/m_cond.c
|
@ -49,7 +49,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"Streams come to an end\n"
|
"Streams come to an end\n"
|
||||||
"where they can no longer fall.\n"
|
"where they can no longer fall.\n"
|
||||||
"But if you went up...", 0},
|
"But if you went up...", 0},
|
||||||
{0, -336, 2064, 195, 1, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, -336, 2064, 195, 1, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"This one's in plain sight.\n"
|
"This one's in plain sight.\n"
|
||||||
"Why haven't you claimed it?\n"
|
"Why haven't you claimed it?\n"
|
||||||
"Surely you saw it.", 0},
|
"Surely you saw it.", 0},
|
||||||
|
@ -77,7 +77,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"Near the level's end,\n"
|
"Near the level's end,\n"
|
||||||
"another bridge spans a lake.\n"
|
"another bridge spans a lake.\n"
|
||||||
"What could be under...?", 0},
|
"What could be under...?", 0},
|
||||||
{0, -170, 491, 3821, 2, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, -170, 491, 3821, 2, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"An ivied tunnel\n"
|
"An ivied tunnel\n"
|
||||||
"has a corner that's sunlit.\n"
|
"has a corner that's sunlit.\n"
|
||||||
"Go reach for the sky!", 0},
|
"Go reach for the sky!", 0},
|
||||||
|
@ -110,7 +110,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"Spinning through small gaps\n"
|
"Spinning through small gaps\n"
|
||||||
"can slip you into a cave.\n"
|
"can slip you into a cave.\n"
|
||||||
"In that cave's first stretch...", 0},
|
"In that cave's first stretch...", 0},
|
||||||
{0, 2848, -9088, 488, 4, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, 2848, -9088, 488, 4, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"The slime lake is deep,\n"
|
"The slime lake is deep,\n"
|
||||||
"but reaching the floor takes height.\n"
|
"but reaching the floor takes height.\n"
|
||||||
"Scream \"Geronimo!\"...", 0},
|
"Scream \"Geronimo!\"...", 0},
|
||||||
|
@ -138,7 +138,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"There is a hallway\n"
|
"There is a hallway\n"
|
||||||
"that a button floods with slime.\n"
|
"that a button floods with slime.\n"
|
||||||
"Go through it again!", 0},
|
"Go through it again!", 0},
|
||||||
{0, -2468,-12128, 1312, 5, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, -2468,-12128, 1312, 5, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"Jumping on turtles\n"
|
"Jumping on turtles\n"
|
||||||
"will send you springing skyward.\n"
|
"will send you springing skyward.\n"
|
||||||
"Now, do that six times...", 0},
|
"Now, do that six times...", 0},
|
||||||
|
@ -171,7 +171,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"A caved-in hallway?\n"
|
"A caved-in hallway?\n"
|
||||||
"The floor falls; the path goes down.\n"
|
"The floor falls; the path goes down.\n"
|
||||||
"But those rocks looked weak...", 0},
|
"But those rocks looked weak...", 0},
|
||||||
{0, 12576, 16096, -992, 7, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, 12576, 16096, -992, 7, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"The end is quite dry.\n"
|
"The end is quite dry.\n"
|
||||||
"Some rocks dam the water in.\n"
|
"Some rocks dam the water in.\n"
|
||||||
"Knuckles can fix that...", 0},
|
"Knuckles can fix that...", 0},
|
||||||
|
@ -199,7 +199,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"In the current maze\n"
|
"In the current maze\n"
|
||||||
"hides a dark room of columns.\n"
|
"hides a dark room of columns.\n"
|
||||||
"Find it, then look up.", 0},
|
"Find it, then look up.", 0},
|
||||||
{0, 3104, 16192, 2408, 8, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, 3104, 16192, 2408, 8, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"That same dragon's eye\n"
|
"That same dragon's eye\n"
|
||||||
"hides another secret room.\n"
|
"hides another secret room.\n"
|
||||||
"There, solve its riddle.", 0},
|
"There, solve its riddle.", 0},
|
||||||
|
@ -232,7 +232,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"The final approach!\n"
|
"The final approach!\n"
|
||||||
"A tower holds the emblem\n"
|
"A tower holds the emblem\n"
|
||||||
"near a ring arrow.", 0},
|
"near a ring arrow.", 0},
|
||||||
{0, 9472, -5890, 710, 10, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, 9472, -5890, 710, 10, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"The right starting path\n"
|
"The right starting path\n"
|
||||||
"hides this near a canopy,\n"
|
"hides this near a canopy,\n"
|
||||||
"high, where two trees meet.", 0},
|
"high, where two trees meet.", 0},
|
||||||
|
@ -260,7 +260,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"Some of these bookshelves\n"
|
"Some of these bookshelves\n"
|
||||||
"are not flush against the walls.\n"
|
"are not flush against the walls.\n"
|
||||||
"Wonder why that is?", 0},
|
"Wonder why that is?", 0},
|
||||||
{0, 12708,-13536, 4768, 11, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, 12708,-13536, 4768, 11, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"The ending's towers\n"
|
"The ending's towers\n"
|
||||||
"are hiding a small alcove.\n"
|
"are hiding a small alcove.\n"
|
||||||
"Check around outside.", 0},
|
"Check around outside.", 0},
|
||||||
|
@ -293,7 +293,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"Not far from the start,\n"
|
"Not far from the start,\n"
|
||||||
"if you climb toward the sky,\n"
|
"if you climb toward the sky,\n"
|
||||||
"the cliffs hide something.", 0},
|
"the cliffs hide something.", 0},
|
||||||
{0, 12504, 6848, 3424, 13, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, 12504, 6848, 3424, 13, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"Right by the exit,\n"
|
"Right by the exit,\n"
|
||||||
"an emblem lies on a cliff.\n"
|
"an emblem lies on a cliff.\n"
|
||||||
"Ride ropes to reach it.", 0},
|
"Ride ropes to reach it.", 0},
|
||||||
|
@ -321,7 +321,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"Where once a bridge stood,\n"
|
"Where once a bridge stood,\n"
|
||||||
"now magma falls from above.\n"
|
"now magma falls from above.\n"
|
||||||
"The bridge dropped something...", 0},
|
"The bridge dropped something...", 0},
|
||||||
{0, 8287,-11043, 1328, 16, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, 8287,-11043, 1328, 16, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"A lake of magma\n"
|
"A lake of magma\n"
|
||||||
"ebbs and flows unendingly.\n"
|
"ebbs and flows unendingly.\n"
|
||||||
"Wait for its nadir.", 0},
|
"Wait for its nadir.", 0},
|
||||||
|
@ -349,7 +349,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"Don't jump too high here!\n"
|
"Don't jump too high here!\n"
|
||||||
"No conveyor will catch you;\n"
|
"No conveyor will catch you;\n"
|
||||||
"you'd fall to your death.", 0},
|
"you'd fall to your death.", 0},
|
||||||
{0, -6432, -6192, 584, 22, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, -6432, -6192, 584, 22, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"Conveyors! Magma!\n"
|
"Conveyors! Magma!\n"
|
||||||
"What an intense room this is!\n"
|
"What an intense room this is!\n"
|
||||||
"But, what brought you here?", 0},
|
"But, what brought you here?", 0},
|
||||||
|
@ -377,7 +377,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"Gears with missing teeth\n"
|
"Gears with missing teeth\n"
|
||||||
"can hide a clever secret!\n"
|
"can hide a clever secret!\n"
|
||||||
"Think Green Hill Zone boss.", 0},
|
"Think Green Hill Zone boss.", 0},
|
||||||
{0, 1920, 20608, 1064, 23, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, 1920, 20608, 1064, 23, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"Just before you reach\n"
|
"Just before you reach\n"
|
||||||
"the defective cargo bay,\n"
|
"the defective cargo bay,\n"
|
||||||
"fly under a bridge.", 0},
|
"fly under a bridge.", 0},
|
||||||
|
@ -398,7 +398,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"[PH] In the ceiling of the conveyor belt + laser hallway.", 0},
|
"[PH] In the ceiling of the conveyor belt + laser hallway.", 0},
|
||||||
{0,-13728,-13728, 1552, 24, 'D', SKINCOLOR_ORANGE, 0,
|
{0,-13728,-13728, 1552, 24, 'D', SKINCOLOR_ORANGE, 0,
|
||||||
"[PH] On top of the platform with rows of spikes in reverse gravity.", 0},
|
"[PH] On top of the platform with rows of spikes in reverse gravity.", 0},
|
||||||
{0,-14944, 768, 1232, 24, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0,-14944, 768, 1232, 24, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"Follow the leader.", 0},
|
"Follow the leader.", 0},
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"The underground room\n"
|
"The underground room\n"
|
||||||
"with platforms that fall and rise\n"
|
"with platforms that fall and rise\n"
|
||||||
"only LOOKS empty...", 0},
|
"only LOOKS empty...", 0},
|
||||||
{0 , 4960, -6112, 1312, 30, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0 , 4960, -6112, 1312, 30, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"This one's straightforward.\n"
|
"This one's straightforward.\n"
|
||||||
"What comes to mind when I say:\n"
|
"What comes to mind when I say:\n"
|
||||||
"\"WELCOME TO WARP ZONE!\"?", 0},
|
"\"WELCOME TO WARP ZONE!\"?", 0},
|
||||||
|
@ -458,7 +458,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"Much like the last one,\n"
|
"Much like the last one,\n"
|
||||||
"you need to find some switches.\n"
|
"you need to find some switches.\n"
|
||||||
"Only two, this time.", 0},
|
"Only two, this time.", 0},
|
||||||
{0, 13184, 18880, 6672, 40, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, 13184, 18880, 6672, 40, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"The inner sanctum!\n"
|
"The inner sanctum!\n"
|
||||||
"Teleport to its switches;\n"
|
"Teleport to its switches;\n"
|
||||||
"then, check near the goal.", 0},
|
"then, check near the goal.", 0},
|
||||||
|
@ -486,7 +486,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
"A room of currents;\n"
|
"A room of currents;\n"
|
||||||
"most of them are marked by spikes.\n"
|
"most of them are marked by spikes.\n"
|
||||||
"This one? A corner.", 0},
|
"This one? A corner.", 0},
|
||||||
{0, -4128, 21344, 1120, 41, 'E', SKINCOLOR_NEONGREEN, 0,
|
{0, -4128, 21344, 1120, 41, 'E', SKINCOLOR_EMERALD, 0,
|
||||||
"The only way to hit\n"
|
"The only way to hit\n"
|
||||||
"all those gems at once is with\n"
|
"all those gems at once is with\n"
|
||||||
"a radial blast.", 0},
|
"a radial blast.", 0},
|
||||||
|
@ -498,63 +498,63 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
||||||
|
|
||||||
// FLORAL FIELD
|
// FLORAL FIELD
|
||||||
// ---
|
// ---
|
||||||
{0, 5394, -996, 160, 50, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
{0, 5394, -996, 160, 50, 'N', SKINCOLOR_RUST, 0, "", 0},
|
||||||
{ET_NGRADE, 0,0,0, 50, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
{ET_NGRADE, 0,0,0, 50, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||||
{ET_NTIME, 0,0,0, 50, 'T', SKINCOLOR_GREY, 40*TICRATE, "", 0},
|
{ET_NTIME, 0,0,0, 50, 'T', SKINCOLOR_GREY, 40*TICRATE, "", 0},
|
||||||
|
|
||||||
|
|
||||||
// TOXIC PLATEAU
|
// TOXIC PLATEAU
|
||||||
// ---
|
// ---
|
||||||
{0, 780, -1664, 32, 51, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
{0, 780, -1664, 32, 51, 'N', SKINCOLOR_RUST, 0, "", 0},
|
||||||
{ET_NGRADE, 0,0,0, 51, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
{ET_NGRADE, 0,0,0, 51, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||||
{ET_NTIME, 0,0,0, 51, 'T', SKINCOLOR_GREY, 50*TICRATE, "", 0},
|
{ET_NTIME, 0,0,0, 51, 'T', SKINCOLOR_GREY, 50*TICRATE, "", 0},
|
||||||
|
|
||||||
|
|
||||||
// FLOODED COVE
|
// FLOODED COVE
|
||||||
// ---
|
// ---
|
||||||
{0, 1824, -1888, 2448, 52, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
{0, 1824, -1888, 2448, 52, 'N', SKINCOLOR_RUST, 0, "", 0},
|
||||||
{ET_NGRADE, 0,0,0, 52, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
{ET_NGRADE, 0,0,0, 52, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||||
{ET_NTIME, 0,0,0, 52, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0},
|
{ET_NTIME, 0,0,0, 52, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0},
|
||||||
|
|
||||||
|
|
||||||
// CAVERN FORTRESS
|
// CAVERN FORTRESS
|
||||||
// ---
|
// ---
|
||||||
{0, -3089, -431, 1328, 53, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
{0, -3089, -431, 1328, 53, 'N', SKINCOLOR_RUST, 0, "", 0},
|
||||||
{ET_NGRADE, 0,0,0, 53, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
{ET_NGRADE, 0,0,0, 53, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||||
{ET_NTIME, 0,0,0, 53, 'T', SKINCOLOR_GREY, 75*TICRATE, "", 0},
|
{ET_NTIME, 0,0,0, 53, 'T', SKINCOLOR_GREY, 75*TICRATE, "", 0},
|
||||||
|
|
||||||
|
|
||||||
// DUSTY WASTELAND
|
// DUSTY WASTELAND
|
||||||
// ---
|
// ---
|
||||||
{0, 957, 924, 2956, 54, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
{0, 957, 924, 2956, 54, 'N', SKINCOLOR_RUST, 0, "", 0},
|
||||||
{ET_NGRADE, 0,0,0, 54, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
{ET_NGRADE, 0,0,0, 54, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||||
{ET_NTIME, 0,0,0, 54, 'T', SKINCOLOR_GREY, 65*TICRATE, "", 0},
|
{ET_NTIME, 0,0,0, 54, 'T', SKINCOLOR_GREY, 65*TICRATE, "", 0},
|
||||||
|
|
||||||
|
|
||||||
// MAGMA CAVES
|
// MAGMA CAVES
|
||||||
// ---
|
// ---
|
||||||
{0, -2752, 3104, 1800, 55, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
{0, -2752, 3104, 1800, 55, 'N', SKINCOLOR_RUST, 0, "", 0},
|
||||||
{ET_NGRADE, 0,0,0, 55, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
{ET_NGRADE, 0,0,0, 55, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||||
{ET_NTIME, 0,0,0, 55, 'T', SKINCOLOR_GREY, 80*TICRATE, "", 0},
|
{ET_NTIME, 0,0,0, 55, 'T', SKINCOLOR_GREY, 80*TICRATE, "", 0},
|
||||||
|
|
||||||
|
|
||||||
// EGG SATELLITE
|
// EGG SATELLITE
|
||||||
// ---
|
// ---
|
||||||
{0, 5334, -609, 3426, 56, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
{0, 5334, -609, 3426, 56, 'N', SKINCOLOR_RUST, 0, "", 0},
|
||||||
{ET_NGRADE, 0,0,0, 56, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
{ET_NGRADE, 0,0,0, 56, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||||
{ET_NTIME, 0,0,0, 56, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
{ET_NTIME, 0,0,0, 56, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
||||||
|
|
||||||
|
|
||||||
// BLACK HOLE
|
// BLACK HOLE
|
||||||
// ---
|
// ---
|
||||||
{0, 2108, 3776, 32, 57, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
{0, 2108, 3776, 32, 57, 'N', SKINCOLOR_RUST, 0, "", 0},
|
||||||
{ET_NGRADE, 0,0,0, 57, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
{ET_NGRADE, 0,0,0, 57, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||||
{ET_NTIME, 0,0,0, 57, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0},
|
{ET_NTIME, 0,0,0, 57, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0},
|
||||||
|
|
||||||
|
|
||||||
// SPRING HILL
|
// SPRING HILL
|
||||||
// ---
|
// ---
|
||||||
{0, -1840, -1024, 1644, 58, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
{0, -1840, -1024, 1644, 58, 'N', SKINCOLOR_RUST, 0, "", 0},
|
||||||
{ET_NGRADE, 0,0,0, 58, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
{ET_NGRADE, 0,0,0, 58, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||||
{ET_NTIME, 0,0,0, 58, 'T', SKINCOLOR_GREY, 60*TICRATE, "", 0},
|
{ET_NTIME, 0,0,0, 58, 'T', SKINCOLOR_GREY, 60*TICRATE, "", 0},
|
||||||
};
|
};
|
||||||
|
@ -565,7 +565,7 @@ extraemblem_t extraemblems[MAXEXTRAEMBLEMS] =
|
||||||
{"Game Complete", "Complete 1P Mode", 10, 'X', SKINCOLOR_BLUE, 0},
|
{"Game Complete", "Complete 1P Mode", 10, 'X', SKINCOLOR_BLUE, 0},
|
||||||
{"All Emeralds", "Complete 1P Mode with all Emeralds", 11, 'V', SKINCOLOR_GREY, 0},
|
{"All Emeralds", "Complete 1P Mode with all Emeralds", 11, 'V', SKINCOLOR_GREY, 0},
|
||||||
{"Perfect Bonus", "Perfect Bonus on a non-secret stage", 30, 'P', SKINCOLOR_GOLD, 0},
|
{"Perfect Bonus", "Perfect Bonus on a non-secret stage", 30, 'P', SKINCOLOR_GOLD, 0},
|
||||||
{"SRB1 Remake", "Complete SRB1 Remake", 21, 'O', SKINCOLOR_ROSEWOOD, 0},
|
{"SRB1 Remake", "Complete SRB1 Remake", 21, 'O', SKINCOLOR_RUST, 0},
|
||||||
{"NiGHTS Mastery", "Show your mastery of NiGHTS!", 22, 'W', SKINCOLOR_TEAL, 0},
|
{"NiGHTS Mastery", "Show your mastery of NiGHTS!", 22, 'W', SKINCOLOR_TEAL, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2823,7 +2823,7 @@ static void M_DrawSlider(INT32 x, INT32 y, const consvar_t *cv)
|
||||||
void M_DrawTextBox(INT32 x, INT32 y, INT32 width, INT32 boxlines)
|
void M_DrawTextBox(INT32 x, INT32 y, INT32 width, INT32 boxlines)
|
||||||
{
|
{
|
||||||
// Solid color textbox.
|
// 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);
|
//V_DrawFill(x+8, y+8, width*8, boxlines*8, 31);
|
||||||
/*
|
/*
|
||||||
patch_t *p;
|
patch_t *p;
|
||||||
|
@ -7406,3 +7406,4 @@ static void M_HandleFogColor(INT32 choice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
117
src/p_inter.c
117
src/p_inter.c
|
@ -1648,11 +1648,126 @@ static void P_HitDeathMessages(player_t *player, mobj_t *inflictor, mobj_t *sour
|
||||||
CONS_Printf(str, targetname, deadtarget ? M_GetText("killed") : M_GetText("hit"));
|
CONS_Printf(str, targetname, deadtarget ? M_GetText("killed") : M_GetText("hit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Checks if the level timer is over the timelimit and the round should end,
|
||||||
|
* unless you are in overtime. In which case leveltime may stretch out beyond
|
||||||
|
* timelimitintics and overtime's status will be checked here each tick.
|
||||||
|
* Verify that the value of ::cv_timelimit is greater than zero before
|
||||||
|
* calling this function.
|
||||||
|
*
|
||||||
|
* \sa cv_timelimit, P_CheckPointLimit, P_UpdateSpecials
|
||||||
|
*/
|
||||||
|
void P_CheckTimeLimit(void)
|
||||||
|
{
|
||||||
|
INT32 i, k;
|
||||||
|
|
||||||
|
if (!cv_timelimit.value)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!(multiplayer || netgame))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (G_PlatformGametype())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (leveltime < timelimitintics)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (gameaction == ga_completed)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//Tagmode round end but only on the tic before the
|
||||||
|
//XD_EXITLEVEL packet is recieved by all players.
|
||||||
|
if (G_TagGametype())
|
||||||
|
{
|
||||||
|
if (leveltime == (timelimitintics + 1))
|
||||||
|
{
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (!playeringame[i] || players[i].spectator
|
||||||
|
|| (players[i].pflags & PF_TAGGED) || (players[i].pflags & PF_TAGIT))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
CONS_Printf(M_GetText("%s recieved double points for surviving the round.\n"), player_names[i]);
|
||||||
|
P_AddPlayerScore(&players[i], players[i].score);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (server)
|
||||||
|
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Optional tie-breaker for Match/CTF
|
||||||
|
else if (cv_overtime.value)
|
||||||
|
{
|
||||||
|
INT32 playerarray[MAXPLAYERS];
|
||||||
|
INT32 tempplayer = 0;
|
||||||
|
INT32 spectators = 0;
|
||||||
|
INT32 playercount = 0;
|
||||||
|
|
||||||
|
//Figure out if we have enough participating players to care.
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (playeringame[i] && players[i].spectator)
|
||||||
|
spectators++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((D_NumPlayers() - spectators) > 1)
|
||||||
|
{
|
||||||
|
// Play the starpost sfx after the first second of overtime.
|
||||||
|
if (gamestate == GS_LEVEL && (leveltime == (timelimitintics + TICRATE)))
|
||||||
|
S_StartSound(NULL, sfx_strpst);
|
||||||
|
|
||||||
|
// Normal Match
|
||||||
|
if (!G_GametypeHasTeams())
|
||||||
|
{
|
||||||
|
//Store the nodes of participating players in an array.
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (playeringame[i] && !players[i].spectator)
|
||||||
|
{
|
||||||
|
playerarray[playercount] = i;
|
||||||
|
playercount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Sort 'em.
|
||||||
|
for (i = 1; i < playercount; i++)
|
||||||
|
{
|
||||||
|
for (k = i; k < playercount; k++)
|
||||||
|
{
|
||||||
|
if (players[playerarray[i-1]].score < players[playerarray[k]].score)
|
||||||
|
{
|
||||||
|
tempplayer = playerarray[i-1];
|
||||||
|
playerarray[i-1] = playerarray[k];
|
||||||
|
playerarray[k] = tempplayer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//End the round if the top players aren't tied.
|
||||||
|
if (players[playerarray[0]].score == players[playerarray[1]].score)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//In team match and CTF, determining a tie is much simpler. =P
|
||||||
|
if (redscore == bluescore)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (server)
|
||||||
|
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (server)
|
||||||
|
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/** Checks if a player's score is over the pointlimit and the round should end.
|
/** Checks if a player's score is over the pointlimit and the round should end.
|
||||||
* Verify that the value of ::cv_pointlimit is greater than zero before
|
* Verify that the value of ::cv_pointlimit is greater than zero before
|
||||||
* calling this function.
|
* calling this function.
|
||||||
*
|
*
|
||||||
* \sa cv_pointlimit, P_UpdateSpecials
|
* \sa cv_pointlimit, P_CheckTimeLimit, P_UpdateSpecials
|
||||||
*/
|
*/
|
||||||
void P_CheckPointLimit(void)
|
void P_CheckPointLimit(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -397,6 +397,7 @@ void P_PlayerEmeraldBurst(player_t *player, boolean toss);
|
||||||
|
|
||||||
void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck);
|
void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck);
|
||||||
void P_PlayerFlagBurst(player_t *player, boolean toss);
|
void P_PlayerFlagBurst(player_t *player, boolean toss);
|
||||||
|
void P_CheckTimeLimit(void);
|
||||||
void P_CheckPointLimit(void);
|
void P_CheckPointLimit(void);
|
||||||
void P_CheckSurvivors(void);
|
void P_CheckSurvivors(void);
|
||||||
boolean P_CheckRacers(void);
|
boolean P_CheckRacers(void);
|
||||||
|
|
|
@ -636,7 +636,7 @@ static void P_NetArchiveWorld(void)
|
||||||
if (li->special != SHORT(mld->special))
|
if (li->special != SHORT(mld->special))
|
||||||
diff |= LD_SPECIAL;
|
diff |= LD_SPECIAL;
|
||||||
|
|
||||||
if (mld->special == 321 || mld->special == 322) // only reason li->callcount would be non-zero is if either of these are involved
|
if (SHORT(mld->special) == 321 || SHORT(mld->special) == 322) // only reason li->callcount would be non-zero is if either of these are involved
|
||||||
diff |= LD_CLLCOUNT;
|
diff |= LD_CLLCOUNT;
|
||||||
|
|
||||||
if (li->sidenum[0] != 0xffff)
|
if (li->sidenum[0] != 0xffff)
|
||||||
|
|
101
src/p_spec.c
101
src/p_spec.c
|
@ -4647,114 +4647,19 @@ void P_PlayerInSpecialSector(player_t *player)
|
||||||
|
|
||||||
/** Animate planes, scroll walls, etc. and keeps track of level timelimit and exits if time is up.
|
/** Animate planes, scroll walls, etc. and keeps track of level timelimit and exits if time is up.
|
||||||
*
|
*
|
||||||
* \sa cv_timelimit, P_CheckPointLimit
|
* \sa P_CheckTimeLimit, P_CheckPointLimit
|
||||||
*/
|
*/
|
||||||
void P_UpdateSpecials(void)
|
void P_UpdateSpecials(void)
|
||||||
{
|
{
|
||||||
anim_t *anim;
|
anim_t *anim;
|
||||||
INT32 i, k;
|
INT32 i;
|
||||||
INT32 pic;
|
INT32 pic;
|
||||||
size_t j;
|
size_t j;
|
||||||
|
|
||||||
levelflat_t *foundflats; // for flat animation
|
levelflat_t *foundflats; // for flat animation
|
||||||
|
|
||||||
// LEVEL TIMER
|
// LEVEL TIMER
|
||||||
// Exit if the timer is equal to or greater the timelimit, unless you are
|
P_CheckTimeLimit();
|
||||||
// in overtime. In which case leveltime may stretch out beyond timelimitintics
|
|
||||||
// and overtime's status will be checked here each tick.
|
|
||||||
if (cv_timelimit.value && timelimitintics <= leveltime && (multiplayer || netgame)
|
|
||||||
&& G_RingSlingerGametype() && (gameaction != ga_completed))
|
|
||||||
{
|
|
||||||
boolean pexit = false;
|
|
||||||
|
|
||||||
//Tagmode round end but only on the tic before the
|
|
||||||
//XD_EXITLEVEL packet is recieved by all players.
|
|
||||||
if (G_TagGametype())
|
|
||||||
{
|
|
||||||
if (leveltime == (timelimitintics + 1))
|
|
||||||
{
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
{
|
|
||||||
if (!playeringame[i] || players[i].spectator
|
|
||||||
|| (players[i].pflags & PF_TAGGED) || (players[i].pflags & PF_TAGIT))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
CONS_Printf(M_GetText("%s recieved double points for surviving the round.\n"), player_names[i]);
|
|
||||||
P_AddPlayerScore(&players[i], players[i].score);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pexit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Optional tie-breaker for Match/CTF
|
|
||||||
else if (G_RingSlingerGametype() && cv_overtime.value)
|
|
||||||
{
|
|
||||||
INT32 playerarray[MAXPLAYERS];
|
|
||||||
INT32 tempplayer = 0;
|
|
||||||
INT32 spectators = 0;
|
|
||||||
INT32 playercount = 0;
|
|
||||||
|
|
||||||
//Figure out if we have enough participating players to care.
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
{
|
|
||||||
if (playeringame[i] && players[i].spectator)
|
|
||||||
spectators++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((D_NumPlayers() - spectators) > 1)
|
|
||||||
{
|
|
||||||
// Play the starpost sfx after the first second of overtime.
|
|
||||||
if (gamestate == GS_LEVEL && (leveltime == (timelimitintics + TICRATE)))
|
|
||||||
S_StartSound(NULL, sfx_strpst);
|
|
||||||
|
|
||||||
// Normal Match
|
|
||||||
if (!G_GametypeHasTeams())
|
|
||||||
{
|
|
||||||
//Store the nodes of participating players in an array.
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
{
|
|
||||||
if (playeringame[i] && !players[i].spectator)
|
|
||||||
{
|
|
||||||
playerarray[playercount] = i;
|
|
||||||
playercount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Sort 'em.
|
|
||||||
for (i = 1; i < playercount; i++)
|
|
||||||
{
|
|
||||||
for (k = i; k < playercount; k++)
|
|
||||||
{
|
|
||||||
if (players[playerarray[i-1]].score < players[playerarray[k]].score)
|
|
||||||
{
|
|
||||||
tempplayer = playerarray[i-1];
|
|
||||||
playerarray[i-1] = playerarray[k];
|
|
||||||
playerarray[k] = tempplayer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//End the round if the top players aren't tied.
|
|
||||||
if (!(players[playerarray[0]].score == players[playerarray[1]].score))
|
|
||||||
pexit = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//In team match and CTF, determining a tie is much simpler. =P
|
|
||||||
if (!(redscore == bluescore))
|
|
||||||
pexit = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pexit = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pexit = true;
|
|
||||||
|
|
||||||
if (server && pexit)
|
|
||||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// POINT LIMIT
|
// POINT LIMIT
|
||||||
P_CheckPointLimit();
|
P_CheckPointLimit();
|
||||||
|
|
548
src/r_draw.c
548
src/r_draw.c
|
@ -127,7 +127,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};
|
||||||
|
@ -137,62 +137,70 @@ static UINT8** translationtablecache[MAXSKINS + 4] = {NULL};
|
||||||
// TODO Callum: Can this be translated?
|
// TODO Callum: Can this be translated?
|
||||||
const char *Color_Names[MAXSKINCOLORS] =
|
const char *Color_Names[MAXSKINCOLORS] =
|
||||||
{
|
{
|
||||||
"None", // SKINCOLOR_NONE
|
"None", // SKINCOLOR_NONE
|
||||||
"White", // SKINCOLOR_WHITE
|
"White", // SKINCOLOR_WHITE
|
||||||
"Silver", // SKINCOLOR_SILVER
|
"Silver", // SKINCOLOR_SILVER
|
||||||
"Grey", // SKINCOLOR_GREY
|
"Grey", // SKINCOLOR_GREY
|
||||||
"Black", // SKINCOLOR_BLACK
|
"Black", // SKINCOLOR_BLACK
|
||||||
"Cyan", // SKINCOLOR_CYAN
|
"Beige", // SKINCOLOR_BEIGE
|
||||||
"Teal", // SKINCOLOR_TEAL
|
"Peach", // SKINCOLOR_PEACH
|
||||||
"Steel_Blue",// SKINCOLOR_STEELBLUE
|
"Brown", // SKINCOLOR_BROWN
|
||||||
"Blue", // SKINCOLOR_BLUE
|
"Red", // SKINCOLOR_RED
|
||||||
"Peach", // SKINCOLOR_PEACH
|
"Crimson", // SKINCOLOR_CRIMSON
|
||||||
"Tan", // SKINCOLOR_TAN
|
"Orange", // SKINCOLOR_ORANGE
|
||||||
"Pink", // SKINCOLOR_PINK
|
"Rust", // SKINCOLOR_RUST
|
||||||
"Lavender", // SKINCOLOR_LAVENDER
|
"Gold", // SKINCOLOR_GOLD
|
||||||
"Purple", // SKINCOLOR_PURPLE
|
"Yellow", // SKINCOLOR_YELLOW
|
||||||
"Orange", // SKINCOLOR_ORANGE
|
"Tan", // SKINCOLOR_TAN
|
||||||
"Rosewood", // SKINCOLOR_ROSEWOOD
|
"Moss", // SKINCOLOR_MOSS
|
||||||
"Beige", // SKINCOLOR_BEIGE
|
"Peridot", // SKINCOLOR_PERIDOT
|
||||||
"Brown", // SKINCOLOR_BROWN
|
"Green", // SKINCOLOR_GREEN
|
||||||
"Red", // SKINCOLOR_RED
|
"Emerald", // SKINCOLOR_EMERALD
|
||||||
"Dark_Red", // SKINCOLOR_DARKRED
|
"Aqua", // SKINCOLOR_AQUA
|
||||||
"Neon_Green",// SKINCOLOR_NEONGREEN
|
"Teal", // SKINCOLOR_TEAL
|
||||||
"Green", // SKINCOLOR_GREEN
|
"Cyan", // SKINCOLOR_CYAN
|
||||||
"Zim", // SKINCOLOR_ZIM
|
"Blue", // SKINCOLOR_BLUE
|
||||||
"Olive", // SKINCOLOR_OLIVE
|
"Azure", // SKINCOLOR_AZURE
|
||||||
"Yellow", // SKINCOLOR_YELLOW
|
"Pastel", // SKINCOLOR_PASTEL
|
||||||
"Gold" // SKINCOLOR_GOLD
|
"Purple", // SKINCOLOR_PURPLE
|
||||||
|
"Lavender", // SKINCOLOR_LAVENDER
|
||||||
|
"Magenta", // SKINCOLOR_MAGENTA
|
||||||
|
"Pink", // SKINCOLOR_PINK
|
||||||
|
"Rosy" // SKINCOLOR_ROSY
|
||||||
};
|
};
|
||||||
|
|
||||||
const UINT8 Color_Opposite[MAXSKINCOLORS*2] =
|
const UINT8 Color_Opposite[MAXSKINCOLORS*2] =
|
||||||
{
|
{
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_NONE
|
SKINCOLOR_NONE,8, // SKINCOLOR_NONE
|
||||||
SKINCOLOR_BLACK,10, // SKINCOLOR_WHITE
|
SKINCOLOR_BLACK,10, // SKINCOLOR_WHITE
|
||||||
SKINCOLOR_GREY,4, // SKINCOLOR_SILVER
|
SKINCOLOR_GREY,4, // SKINCOLOR_SILVER
|
||||||
SKINCOLOR_SILVER,12,// SKINCOLOR_GREY
|
SKINCOLOR_SILVER,12, // SKINCOLOR_GREY
|
||||||
SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK
|
SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_CYAN
|
SKINCOLOR_BEIGE,8, // SKINCOLOR_BEIGE - needs new offset
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_TEAL
|
SKINCOLOR_BROWN,8, // SKINCOLOR_PEACH - ditto
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_STEELBLUE
|
SKINCOLOR_PEACH,8, // SKINCOLOR_BROWN - ditto
|
||||||
SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE
|
SKINCOLOR_GREEN,5, // SKINCOLOR_RED
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_PEACH
|
SKINCOLOR_CYAN,8, // SKINCOLOR_CRIMSON - ditto
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_TAN
|
SKINCOLOR_BLUE,12, // SKINCOLOR_ORANGE
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_PINK
|
SKINCOLOR_TAN,8, // SKINCOLOR_RUST - ditto
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_LAVENDER
|
SKINCOLOR_LAVENDER,8, // SKINCOLOR_GOLD - ditto
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_PURPLE
|
SKINCOLOR_TEAL,8, // SKINCOLOR_YELLOW - ditto
|
||||||
SKINCOLOR_BLUE,12, // SKINCOLOR_ORANGE
|
SKINCOLOR_RUST,8, // SKINCOLOR_TAN - ditto
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_ROSEWOOD
|
SKINCOLOR_MAGENTA,3, // SKINCOLOR_MOSS
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_BEIGE
|
SKINCOLOR_PURPLE,8, // SKINCOLOR_PERIDOT - ditto
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_BROWN
|
SKINCOLOR_RED,11, // SKINCOLOR_GREEN
|
||||||
SKINCOLOR_GREEN,5, // SKINCOLOR_RED
|
SKINCOLOR_PASTEL,8, // SKINCOLOR_EMERALD - ditto
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_DARKRED
|
SKINCOLOR_ROSY,8, // SKINCOLOR_AQUA - ditto
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_NEONGREEN
|
SKINCOLOR_YELLOW,8, // SKINCOLOR_TEAL - ditto
|
||||||
SKINCOLOR_RED,11, // SKINCOLOR_GREEN
|
SKINCOLOR_CRIMSON,8, // SKINCOLOR_CYAN - ditto
|
||||||
SKINCOLOR_PURPLE,3, // SKINCOLOR_ZIM
|
SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_OLIVE
|
SKINCOLOR_PINK,8, // SKINCOLOR_AZURE - ditto
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_YELLOW
|
SKINCOLOR_EMERALD,8, // SKINCOLOR_PASTEL - ditto
|
||||||
SKINCOLOR_NONE,8 // SKINCOLOR_GOLD
|
SKINCOLOR_PERIDOT,8, // SKINCOLOR_PURPLE - ditto
|
||||||
|
SKINCOLOR_GOLD,8, // SKINCOLOR_LAVENDER - ditto
|
||||||
|
SKINCOLOR_MOSS,8, // SKINCOLOR_MAGENTA - ditto
|
||||||
|
SKINCOLOR_AZURE,8, // SKINCOLOR_PINK - ditto
|
||||||
|
SKINCOLOR_AQUA,8 // SKINCOLOR_ROSY - ditto
|
||||||
};
|
};
|
||||||
|
|
||||||
CV_PossibleValue_t Color_cons_t[MAXSKINCOLORS+1];
|
CV_PossibleValue_t Color_cons_t[MAXSKINCOLORS+1];
|
||||||
|
@ -242,27 +250,31 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
||||||
0x03, // SKINCOLOR_SILVER
|
0x03, // SKINCOLOR_SILVER
|
||||||
0x08, // SKINCOLOR_GREY
|
0x08, // SKINCOLOR_GREY
|
||||||
0x18, // SKINCOLOR_BLACK
|
0x18, // SKINCOLOR_BLACK
|
||||||
0xd0, // SKINCOLOR_CYAN
|
0xf0, // SKINCOLOR_BEIGE
|
||||||
0xdc, // SKINCOLOR_TEAL
|
0xd8, // SKINCOLOR_PEACH
|
||||||
0xc8, // SKINCOLOR_STEELBLUE
|
0xe0, // SKINCOLOR_BROWN
|
||||||
0xe2, // SKINCOLOR_BLUE
|
0x21, // SKINCOLOR_RED
|
||||||
0x40, // SKINCOLOR_PEACH
|
0x28, // SKINCOLOR_CRIMSON
|
||||||
0x48, // SKINCOLOR_TAN
|
0x31, // SKINCOLOR_ORANGE
|
||||||
0x90, // SKINCOLOR_PINK
|
0x3a, // SKINCOLOR_RUST
|
||||||
0xf8, // SKINCOLOR_LAVENDER
|
0x40, // SKINCOLOR_GOLD
|
||||||
0xc0, // SKINCOLOR_PURPLE
|
0x48, // SKINCOLOR_YELLOW
|
||||||
0x52, // SKINCOLOR_ORANGE
|
0x54, // SKINCOLOR_TAN
|
||||||
0x5c, // SKINCOLOR_ROSEWOOD
|
0x58, // SKINCOLOR_MOSS
|
||||||
0x20, // SKINCOLOR_BEIGE
|
0xbc, // SKINCOLOR_PERIDOT
|
||||||
0x30, // SKINCOLOR_BROWN
|
0x60, // SKINCOLOR_GREEN
|
||||||
0x7d, // SKINCOLOR_RED
|
0x70, // SKINCOLOR_EMERALD
|
||||||
0x85, // SKINCOLOR_DARKRED
|
0x78, // SKINCOLOR_AQUA
|
||||||
0xb8, // SKINCOLOR_NEONGREEN
|
0x8c, // SKINCOLOR_TEAL
|
||||||
0xa0, // SKINCOLOR_GREEN
|
0x80, // SKINCOLOR_CYAN
|
||||||
0xb0, // SKINCOLOR_ZIM
|
0x92, // SKINCOLOR_BLUE
|
||||||
0x69, // SKINCOLOR_OLIVE
|
0xaa, // SKINCOLOR_AZURE
|
||||||
0x67, // SKINCOLOR_YELLOW
|
0xa0, // SKINCOLOR_PASTEL
|
||||||
0x70, // SKINCOLOR_GOLD
|
0xa0, // SKINCOLOR_PURPLE
|
||||||
|
0xc0, // SKINCOLOR_LAVENDER
|
||||||
|
0xb3, // SKINCOLOR_MAGENTA
|
||||||
|
0xd0, // SKINCOLOR_PINK
|
||||||
|
0xc8, // SKINCOLOR_ROSY
|
||||||
};
|
};
|
||||||
INT32 i;
|
INT32 i;
|
||||||
INT32 starttranscolor;
|
INT32 starttranscolor;
|
||||||
|
@ -280,7 +292,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
||||||
if (skinnum == TC_BOSS)
|
if (skinnum == TC_BOSS)
|
||||||
dest_colormap[31] = 0;
|
dest_colormap[31] = 0;
|
||||||
else if (skinnum == TC_METALSONIC)
|
else if (skinnum == TC_METALSONIC)
|
||||||
dest_colormap[239] = 0;
|
dest_colormap[159] = 0;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -299,196 +311,339 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
||||||
{
|
{
|
||||||
case SKINCOLOR_SILVER:
|
case SKINCOLOR_SILVER:
|
||||||
case SKINCOLOR_GREY:
|
case SKINCOLOR_GREY:
|
||||||
case SKINCOLOR_PEACH:
|
|
||||||
case SKINCOLOR_BEIGE:
|
|
||||||
case SKINCOLOR_BROWN:
|
case SKINCOLOR_BROWN:
|
||||||
case SKINCOLOR_RED:
|
|
||||||
case SKINCOLOR_GREEN:
|
case SKINCOLOR_GREEN:
|
||||||
case SKINCOLOR_BLUE:
|
|
||||||
// 16 color ramp
|
// 16 color ramp
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i);
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_ORANGE:
|
case SKINCOLOR_WHITE:
|
||||||
// 14 colors of orange + brown
|
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH-2; i++)
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i);
|
|
||||||
for (i = 0; i < 2; i++)
|
|
||||||
dest_colormap[starttranscolor + (i+SKIN_RAMP_LENGTH-2)] = (UINT8)(152 + i);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_CYAN:
|
case SKINCOLOR_CYAN:
|
||||||
// 12 color ramp
|
// 12 color ramp
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH));
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_WHITE:
|
|
||||||
case SKINCOLOR_BLACK:
|
case SKINCOLOR_BLACK:
|
||||||
case SKINCOLOR_STEELBLUE:
|
case SKINCOLOR_MOSS:
|
||||||
case SKINCOLOR_PINK:
|
case SKINCOLOR_EMERALD:
|
||||||
case SKINCOLOR_LAVENDER:
|
case SKINCOLOR_LAVENDER:
|
||||||
case SKINCOLOR_PURPLE:
|
case SKINCOLOR_PINK:
|
||||||
case SKINCOLOR_DARKRED:
|
|
||||||
case SKINCOLOR_ZIM:
|
|
||||||
case SKINCOLOR_YELLOW:
|
|
||||||
case SKINCOLOR_GOLD:
|
|
||||||
// 8 color ramp
|
// 8 color ramp
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1));
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_TEAL:
|
case SKINCOLOR_BEIGE:
|
||||||
// 5 color ramp
|
// 13 colors
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
{
|
{
|
||||||
if (5*i/16 == 0)
|
if (i == 15)
|
||||||
dest_colormap[starttranscolor + i] = 0xf7;
|
dest_colormap[starttranscolor + i] = 0xed; // Darkest
|
||||||
|
else if (i <= 6)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + ((i + 1) >> 1)); // Brightest
|
||||||
else
|
else
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (5*i/SKIN_RAMP_LENGTH) - 1);
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 3);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_PEACH:
|
||||||
|
// 11 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i == 0)
|
||||||
|
dest_colormap[starttranscolor + i] = 0xD0; // Lightest 1
|
||||||
|
else if (i == 1)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x30; // Lightest 2
|
||||||
|
else if (i <= 11)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 1);
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 7); // Darkest
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_RED:
|
||||||
|
// 16 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i == 13)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x47; // Semidark
|
||||||
|
else if (i > 13)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 1); // Darkest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_OLIVE:
|
case SKINCOLOR_CRIMSON:
|
||||||
// 7 color ramp
|
// 9 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));
|
{
|
||||||
|
if (i/2 == 6)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x47; // Semidark
|
||||||
|
else if (i/2 == 7)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 8); // Darkest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_ORANGE:
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i == 15)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x2c; // Darkest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_RUST:
|
||||||
|
// 10 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i <= 11)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1));
|
||||||
|
else if (i == 12)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x2c; // Darkest 4
|
||||||
|
else if (i == 13)
|
||||||
|
dest_colormap[starttranscolor + i] = 0xfe; // Darkest 3
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = 0x2d + i - 14; // Darkest 2 and 1
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_GOLD:
|
||||||
|
// 10 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i == 0)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x50; // Lightest 1
|
||||||
|
else if (i == 1)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x53; // Lightest 2
|
||||||
|
else if (i/2 == 7)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 8); //Darkest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_YELLOW:
|
||||||
|
// 10 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i == 0)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x53; // Lightest
|
||||||
|
else if (i == 15)
|
||||||
|
dest_colormap[starttranscolor + i] = 0xed; // Darkest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_TAN:
|
case SKINCOLOR_TAN:
|
||||||
// 16 color ramp, from two color ranges
|
// 8 colors
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH/2; i++) // Peach half
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i);
|
{
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH/2; i++) // Brown half
|
if (i/2 == 0)
|
||||||
dest_colormap[starttranscolor + (i+8)] = (UINT8)(48 + i);
|
dest_colormap[starttranscolor + i] = 0x51; // Lightest
|
||||||
|
else if (i/2 == 5)
|
||||||
|
dest_colormap[starttranscolor + i] = 0xf5; // Darkest 1
|
||||||
|
else if (i/2 == 6)
|
||||||
|
dest_colormap[starttranscolor + i] = 0xf9; // Darkest 2
|
||||||
|
else if (i/2 == 7)
|
||||||
|
dest_colormap[starttranscolor + i] = 0xed; // Darkest 3
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_ROSEWOOD:
|
case SKINCOLOR_PERIDOT:
|
||||||
// 12 color ramp, from two color ranges!
|
// 8 colors
|
||||||
for (i = 0; i < 6; i++) // Orange ...third?
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH));
|
{
|
||||||
for (i = 0; i < 10; i++) // Rosewood two-thirds-ish
|
if (i/2 == 0)
|
||||||
dest_colormap[starttranscolor + (i+6)] = (UINT8)(152 + (12*i/SKIN_RAMP_LENGTH));
|
dest_colormap[starttranscolor + i] = 0x58; // Lightest
|
||||||
|
else if (i/2 == 7)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x77; // Darkest
|
||||||
|
else if (i/2 >= 5)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(0x5e + (i >> 1) - 5); // Semidark
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_NEONGREEN:
|
case SKINCOLOR_AQUA:
|
||||||
// Multi-color ramp
|
// 10 colors
|
||||||
dest_colormap[starttranscolor] = 0xA0; // Brighter green
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH-1; i++) // Neon Green
|
{
|
||||||
dest_colormap[starttranscolor + (i+1)] = (UINT8)(skinbasecolors[color - 1] + (6*i/(SKIN_RAMP_LENGTH-1)));
|
if (i == 0)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x78; // Lightest
|
||||||
|
else if (i >= 14)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(0x76 + i - 14); // Darkest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) + 1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_TEAL:
|
||||||
|
// 6 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i <= 1)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x78; // Lightest
|
||||||
|
else if (i >= 13)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x8a; // Darkest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + ((i - 1)/3));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_AZURE:
|
||||||
|
// 8 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i <= 3)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(0x90 + i/2); // Lightest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 2);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_BLUE:
|
||||||
|
// 16 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i == 15)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x1F; //Darkest 1
|
||||||
|
else if (i == 14)
|
||||||
|
dest_colormap[starttranscolor + i] = 0xfd; //Darkest 2
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_PASTEL:
|
||||||
|
// 10 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i >= 12)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i - 7); // Darkest
|
||||||
|
else if (i <= 1)
|
||||||
|
dest_colormap[starttranscolor + i] = 0x90; // Lightest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) - 1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_PURPLE:
|
||||||
|
// 10 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i <= 3)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i); // Lightest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) + 2);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_MAGENTA:
|
||||||
|
// 9 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
if (i == 0)
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1]); // Lightest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1) + 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SKINCOLOR_ROSY:
|
||||||
|
// 9 colors
|
||||||
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
|
{
|
||||||
|
if (i == 0)
|
||||||
|
dest_colormap[starttranscolor + i] = 0xfc; // Lightest
|
||||||
|
else
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + ((i - 1) >> 1));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Super colors, from lightest to darkest!
|
// Super colors, from lightest to darkest!
|
||||||
case SKINCOLOR_SUPER1:
|
case SKINCOLOR_SUPER1:
|
||||||
// Super White
|
// Super White
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
dest_colormap[starttranscolor + i] = 120; // True white
|
dest_colormap[starttranscolor + i] = (UINT8)0; // True white
|
||||||
for (; i < SKIN_RAMP_LENGTH; i++) // White-yellow fade
|
for (; i < 12; i++) // White-yellow fade
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(96 + (i-10));
|
dest_colormap[starttranscolor + i] = (UINT8)(80);
|
||||||
|
for (; i < 15; i++) // White-yellow fade
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(81 + (i-12));
|
||||||
|
dest_colormap[starttranscolor + 15] = (UINT8)(72);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_SUPER2:
|
case SKINCOLOR_SUPER2:
|
||||||
// Super Bright
|
// Super Bright
|
||||||
for (i = 0; i < 5; i++) // White-yellow fade
|
dest_colormap[starttranscolor] = (UINT8)(0);
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(96 + i);
|
for (i = 1; i < 4; i++) // White-yellow fade
|
||||||
dest_colormap[starttranscolor + 5] = 112; // Golden shine
|
dest_colormap[starttranscolor + i] = (UINT8)(80 + (i-1));
|
||||||
for (i = 0; i < 8; i++) // Yellow
|
for (; i < 6; i++) // Yellow
|
||||||
dest_colormap[starttranscolor + (i+6)] = (UINT8)(101 + (i>>1));
|
dest_colormap[starttranscolor + i] = (UINT8)(83);
|
||||||
for (i = 0; i < 2; i++) // With a fine golden finish! :3
|
for (; i < 8; i++) // Yellow
|
||||||
dest_colormap[starttranscolor + (i+14)] = (UINT8)(113 + i);
|
dest_colormap[starttranscolor + i] = (UINT8)(72);
|
||||||
|
for (; i < 14; i++) // Yellow
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(73);
|
||||||
|
for (; i < 16; i++) // With a fine golden finish! :3
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(64 + (i-14));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_SUPER3:
|
case SKINCOLOR_SUPER3:
|
||||||
// Super Yellow
|
// Super Yellow
|
||||||
for (i = 0; i < 3; i++) // White-yellow fade
|
for (i = 0; i < 2; i++) // White-yellow fade
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(98 + i);
|
dest_colormap[starttranscolor + i] = (UINT8)(81 + i);
|
||||||
dest_colormap[starttranscolor + 3] = 112; // Golden shine
|
for (; i < 4; i++)
|
||||||
for (i = 0; i < 8; i++) // Yellow
|
dest_colormap[starttranscolor + i] = (UINT8)(83);
|
||||||
dest_colormap[starttranscolor + (i+4)] = (UINT8)(101 + (i>>1));
|
for (; i < 6; i++) // Yellow
|
||||||
for (i = 0; i < 4; i++) // With a fine golden finish! :3
|
dest_colormap[starttranscolor + i] = (UINT8)(72);
|
||||||
dest_colormap[starttranscolor + (i+12)] = (UINT8)(113 + i);
|
for (; i < 12; i++) // Yellow
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(73);
|
||||||
|
for (; i < 16; i++) // With a fine golden finish! :3
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(64 + (i-12));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_SUPER4:
|
case SKINCOLOR_SUPER4:
|
||||||
// "The SSNTails"
|
// "The SSNTails"
|
||||||
dest_colormap[starttranscolor] = 112; // Golden shine
|
dest_colormap[starttranscolor] = 83; // Golden shine
|
||||||
for (i = 0; i < 8; i++) // Yellow
|
for (i = 1; i < 3; i++) // Yellow
|
||||||
dest_colormap[starttranscolor + (i+1)] = (UINT8)(101 + (i>>1));
|
dest_colormap[starttranscolor + i] = (UINT8)(72);
|
||||||
for (i = 0; i < 7; i++) // With a fine golden finish! :3
|
for (; i < 9; i++) // Yellow
|
||||||
dest_colormap[starttranscolor + (i+9)] = (UINT8)(113 + i);
|
dest_colormap[starttranscolor + i] = (UINT8)(73);
|
||||||
|
for (; i < 16; i++) // With a fine golden finish! :3
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(64 + (i-9));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SKINCOLOR_SUPER5:
|
case SKINCOLOR_SUPER5:
|
||||||
// Golden Delicious
|
// Golden Delicious
|
||||||
for (i = 0; i < 8; i++) // Yellow
|
for (i = 0; i < 2; i++) // Yellow
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(101 + (i>>1));
|
dest_colormap[starttranscolor + i] = (UINT8)(72);
|
||||||
for (i = 0; i < 7; i++) // With a fine golden finish! :3
|
for (; i < 8; i++) // Yellow
|
||||||
dest_colormap[starttranscolor + (i+8)] = (UINT8)(113 + i);
|
dest_colormap[starttranscolor + i] = (UINT8)(73);
|
||||||
dest_colormap[starttranscolor + 15] = 155;
|
for (; i < 15; i++) // With a fine golden finish! :3
|
||||||
|
dest_colormap[starttranscolor + i] = (UINT8)(64 + (i-8));
|
||||||
|
dest_colormap[starttranscolor + 15] = (UINT8)63;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Super Tails
|
// Super Tails and Knuckles, who really should be dummied out by now
|
||||||
case SKINCOLOR_TSUPER1:
|
case SKINCOLOR_TSUPER1:
|
||||||
for (i = 0; i < 10; i++) // white
|
|
||||||
dest_colormap[starttranscolor + i] = 120;
|
|
||||||
for (; i < SKIN_RAMP_LENGTH; i++) // orange
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(80 + (i-10));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_TSUPER2:
|
case SKINCOLOR_TSUPER2:
|
||||||
for (i = 0; i < 4; i++) // white
|
|
||||||
dest_colormap[starttranscolor + i] = 120;
|
|
||||||
for (; i < SKIN_RAMP_LENGTH; i++) // orange
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(80 + ((i-4)>>1));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_TSUPER3:
|
case SKINCOLOR_TSUPER3:
|
||||||
dest_colormap[starttranscolor] = 120; // pure white
|
|
||||||
dest_colormap[starttranscolor+1] = 120;
|
|
||||||
for (i = 2; i < SKIN_RAMP_LENGTH; i++) // orange
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(80 + ((i-2)>>1));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_TSUPER4:
|
case SKINCOLOR_TSUPER4:
|
||||||
dest_colormap[starttranscolor] = 120; // pure white
|
|
||||||
for (i = 1; i < 9; i++) // orange
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(80 + (i-1));
|
|
||||||
for (; i < SKIN_RAMP_LENGTH; i++) // gold
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(115 + (5*(i-9)/7));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_TSUPER5:
|
case SKINCOLOR_TSUPER5:
|
||||||
for (i = 0; i < 8; i++) // orange
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(80 + i);
|
|
||||||
for (; i < SKIN_RAMP_LENGTH; i++) // gold
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(115 + (5*(i-8)/8));
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Super Knuckles
|
|
||||||
case SKINCOLOR_KSUPER1:
|
case SKINCOLOR_KSUPER1:
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(120 + (i >> 2));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_KSUPER2:
|
case SKINCOLOR_KSUPER2:
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(120 + (6*i/SKIN_RAMP_LENGTH));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_KSUPER3:
|
case SKINCOLOR_KSUPER3:
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(120 + (i >> 1));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_KSUPER4:
|
case SKINCOLOR_KSUPER4:
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(121 + (i >> 1));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_KSUPER5:
|
case SKINCOLOR_KSUPER5:
|
||||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||||
dest_colormap[starttranscolor + i] = (UINT8)(122 + (i >> 1));
|
dest_colormap[starttranscolor + i] = 0xFF;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -802,3 +957,4 @@ void R_DrawViewBorder(void)
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
#include "r_draw16.c"
|
#include "r_draw16.c"
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ void R_DrawColumn_8(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TRANSPARENTPIXEL 247
|
#define TRANSPARENTPIXEL 255
|
||||||
|
|
||||||
void R_Draw2sMultiPatchColumn_8(void)
|
void R_Draw2sMultiPatchColumn_8(void)
|
||||||
{
|
{
|
||||||
|
@ -1388,3 +1388,4 @@ void R_DrawColumnShadowed_8(void)
|
||||||
if (dc_yl <= realyh)
|
if (dc_yl <= realyh)
|
||||||
walldrawerfunc(); // R_DrawWallColumn_8 for the appropriate architecture
|
walldrawerfunc(); // R_DrawWallColumn_8 for the appropriate architecture
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
11
src/r_main.c
11
src/r_main.c
|
@ -114,15 +114,6 @@ INT32 viewangletox[FINEANGLES/2];
|
||||||
// from clipangle to -clipangle.
|
// from clipangle to -clipangle.
|
||||||
angle_t xtoviewangle[MAXVIDWIDTH+1];
|
angle_t xtoviewangle[MAXVIDWIDTH+1];
|
||||||
|
|
||||||
// UNUSED.
|
|
||||||
// The finetangentgent[angle+FINEANGLES/4] table
|
|
||||||
// holds the fixed_t tangent values for view angles,
|
|
||||||
// ranging from INT32_MIN to 0 to INT32_MAX.
|
|
||||||
|
|
||||||
#if !(defined _NDS) || !(defined NONET)
|
|
||||||
fixed_t *finecosine = &finesine[FINEANGLES/4];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lighttable_t *scalelight[LIGHTLEVELS][MAXLIGHTSCALE];
|
lighttable_t *scalelight[LIGHTLEVELS][MAXLIGHTSCALE];
|
||||||
lighttable_t *scalelightfixed[MAXLIGHTSCALE];
|
lighttable_t *scalelightfixed[MAXLIGHTSCALE];
|
||||||
lighttable_t *zlight[LIGHTLEVELS][MAXLIGHTZ];
|
lighttable_t *zlight[LIGHTLEVELS][MAXLIGHTZ];
|
||||||
|
@ -1278,7 +1269,7 @@ void R_RenderPlayerView(player_t *player)
|
||||||
if (cv_homremoval.value == 1)
|
if (cv_homremoval.value == 1)
|
||||||
V_DrawFill(0, 0, vid.width, vid.height, 31); // No HOM effect!
|
V_DrawFill(0, 0, vid.width, vid.height, 31); // No HOM effect!
|
||||||
else //'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
|
else //'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
|
||||||
V_DrawFill(0, 0, vid.width, vid.height, 128+(timeinmap&15));
|
V_DrawFill(0, 0, vid.width, vid.height, 32+(timeinmap&15));
|
||||||
}
|
}
|
||||||
|
|
||||||
portalrender = 0;
|
portalrender = 0;
|
||||||
|
|
|
@ -750,31 +750,15 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
// Hacked up support for alpha value in software mode Tails 09-24-2002 (sidenote: ported to polys 10-15-2014, there was no time travel involved -Red)
|
// Hacked up support for alpha value in software mode Tails 09-24-2002 (sidenote: ported to polys 10-15-2014, there was no time travel involved -Red)
|
||||||
if (pl->polyobj->translucency >= 10)
|
if (pl->polyobj->translucency >= 10)
|
||||||
return; // Don't even draw it
|
return; // Don't even draw it
|
||||||
else if (pl->polyobj->translucency == 9)
|
else if (pl->polyobj->translucency > 0)
|
||||||
ds_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((pl->polyobj->translucency-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->polyobj->translucency == 8)
|
|
||||||
ds_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 7)
|
|
||||||
ds_transmap = ((tr_trans70)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 6)
|
|
||||||
ds_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 5)
|
|
||||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 4)
|
|
||||||
ds_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 3)
|
|
||||||
ds_transmap = ((tr_trans30)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 2)
|
|
||||||
ds_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else if (pl->polyobj->translucency == 1)
|
|
||||||
ds_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
else // Opaque, but allow transparent flat pixels
|
else // Opaque, but allow transparent flat pixels
|
||||||
spanfunc = splatfunc;
|
spanfunc = splatfunc;
|
||||||
|
|
||||||
if (pl->extra_colormap && pl->extra_colormap->fog)
|
if (pl->extra_colormap && pl->extra_colormap->fog)
|
||||||
light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
||||||
else
|
else
|
||||||
light = LIGHTLEVELS-1;
|
light = LIGHTLEVELS-1;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
@ -805,23 +789,23 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
if (pl->ffloor->alpha < 12)
|
if (pl->ffloor->alpha < 12)
|
||||||
return; // Don't even draw it
|
return; // Don't even draw it
|
||||||
else if (pl->ffloor->alpha < 38)
|
else if (pl->ffloor->alpha < 38)
|
||||||
ds_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans90-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 64)
|
else if (pl->ffloor->alpha < 64)
|
||||||
ds_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 89)
|
else if (pl->ffloor->alpha < 89)
|
||||||
ds_transmap = ((tr_trans70)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans70-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 115)
|
else if (pl->ffloor->alpha < 115)
|
||||||
ds_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans60-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 140)
|
else if (pl->ffloor->alpha < 140)
|
||||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 166)
|
else if (pl->ffloor->alpha < 166)
|
||||||
ds_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans40-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 192)
|
else if (pl->ffloor->alpha < 192)
|
||||||
ds_transmap = ((tr_trans30)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans30-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 217)
|
else if (pl->ffloor->alpha < 217)
|
||||||
ds_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans20-1)<<FF_TRANSSHIFT);
|
||||||
else if (pl->ffloor->alpha < 243)
|
else if (pl->ffloor->alpha < 243)
|
||||||
ds_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans10-1)<<FF_TRANSSHIFT);
|
||||||
else // Opaque, but allow transparent flat pixels
|
else // Opaque, but allow transparent flat pixels
|
||||||
spanfunc = splatfunc;
|
spanfunc = splatfunc;
|
||||||
|
|
||||||
|
@ -1082,7 +1066,7 @@ using the palette colors.
|
||||||
if (spanfunc == R_DrawSpan_8)
|
if (spanfunc == R_DrawSpan_8)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||||
spanfunc = R_DrawTranslucentSpan_8;
|
spanfunc = R_DrawTranslucentSpan_8;
|
||||||
for (i=0; i<4; i++)
|
for (i=0; i<4; i++)
|
||||||
{
|
{
|
||||||
|
|
48
src/r_segs.c
48
src/r_segs.c
|
@ -183,7 +183,7 @@ static void R_DrawWallSplats(void)
|
||||||
colfunc = basecolfunc;
|
colfunc = basecolfunc;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dc_transmap = ((tr_trans50 - 1)<<FF_TRANSSHIFT) + transtables;
|
dc_transmap = transtables + ((tr_trans50 - 1)<<FF_TRANSSHIFT);
|
||||||
colfunc = fuzzcolfunc;
|
colfunc = fuzzcolfunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,39 +304,15 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||||
switch (ldef->special)
|
switch (ldef->special)
|
||||||
{
|
{
|
||||||
case 900:
|
case 900:
|
||||||
dc_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 901:
|
case 901:
|
||||||
dc_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 902:
|
case 902:
|
||||||
dc_transmap = ((tr_trans30)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 903:
|
case 903:
|
||||||
dc_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 904:
|
case 904:
|
||||||
dc_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 905:
|
case 905:
|
||||||
dc_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 906:
|
case 906:
|
||||||
dc_transmap = ((tr_trans70)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 907:
|
case 907:
|
||||||
dc_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
|
||||||
colfunc = fuzzcolfunc;
|
|
||||||
break;
|
|
||||||
case 908:
|
case 908:
|
||||||
dc_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((ldef->special-900)<<FF_TRANSSHIFT);
|
||||||
colfunc = fuzzcolfunc;
|
colfunc = fuzzcolfunc;
|
||||||
break;
|
break;
|
||||||
case 909:
|
case 909:
|
||||||
|
@ -354,7 +330,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||||
if (curline->polyseg->translucency >= NUMTRANSMAPS)
|
if (curline->polyseg->translucency >= NUMTRANSMAPS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dc_transmap = ((curline->polyseg->translucency)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((curline->polyseg->translucency-1)<<FF_TRANSSHIFT);
|
||||||
colfunc = fuzzcolfunc;
|
colfunc = fuzzcolfunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -733,23 +709,23 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
||||||
if (pfloor->alpha < 12)
|
if (pfloor->alpha < 12)
|
||||||
return; // Don't even draw it
|
return; // Don't even draw it
|
||||||
else if (pfloor->alpha < 38)
|
else if (pfloor->alpha < 38)
|
||||||
dc_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans90-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 64)
|
else if (pfloor->alpha < 64)
|
||||||
dc_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 89)
|
else if (pfloor->alpha < 89)
|
||||||
dc_transmap = ((tr_trans70)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans70-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 115)
|
else if (pfloor->alpha < 115)
|
||||||
dc_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans60-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 140)
|
else if (pfloor->alpha < 140)
|
||||||
dc_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 166)
|
else if (pfloor->alpha < 166)
|
||||||
dc_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans40-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 192)
|
else if (pfloor->alpha < 192)
|
||||||
dc_transmap = ((tr_trans30)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans30-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 217)
|
else if (pfloor->alpha < 217)
|
||||||
dc_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans20-1)<<FF_TRANSSHIFT);
|
||||||
else if (pfloor->alpha < 243)
|
else if (pfloor->alpha < 243)
|
||||||
dc_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
dc_transmap = transtables + ((tr_trans10-1)<<FF_TRANSSHIFT);
|
||||||
else
|
else
|
||||||
fuzzy = false; // Opaque
|
fuzzy = false; // Opaque
|
||||||
|
|
||||||
|
|
|
@ -503,7 +503,7 @@ static void R_RenderFloorSplat(floorsplat_t *pSplat, vertex_t *verts, UINT8 *pTe
|
||||||
{
|
{
|
||||||
ds_x1 = x1;
|
ds_x1 = x1;
|
||||||
ds_x2 = x2;
|
ds_x2 = x2;
|
||||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||||
splatfunc();
|
splatfunc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1330,9 +1330,9 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
if (!cv_translucency.value)
|
if (!cv_translucency.value)
|
||||||
; // no translucency
|
; // no translucency
|
||||||
else if (thing->flags2 & MF2_SHADOW) // actually only the player should use this (temporary invisibility)
|
else if (thing->flags2 & MF2_SHADOW) // actually only the player should use this (temporary invisibility)
|
||||||
vis->transmap = ((tr_trans80-1)<<FF_TRANSSHIFT) + transtables; // because now the translucency is set through FF_TRANSMASK
|
vis->transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT); // because now the translucency is set through FF_TRANSMASK
|
||||||
else if (thing->frame & FF_TRANSMASK)
|
else if (thing->frame & FF_TRANSMASK)
|
||||||
vis->transmap = (thing->frame & FF_TRANSMASK) - 0x10000 + transtables;
|
vis->transmap = transtables + (thing->frame & FF_TRANSMASK) - 0x10000;
|
||||||
|
|
||||||
if (((thing->frame & FF_FULLBRIGHT) || (thing->flags2 & MF2_SHADOW))
|
if (((thing->frame & FF_FULLBRIGHT) || (thing->flags2 & MF2_SHADOW))
|
||||||
&& (!vis->extra_colormap || !vis->extra_colormap->fog))
|
&& (!vis->extra_colormap || !vis->extra_colormap->fog))
|
||||||
|
@ -2296,7 +2296,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;
|
||||||
|
|
|
@ -888,8 +888,8 @@ static void ST_drawFirstPersonHUD(void)
|
||||||
|
|
||||||
// [21:42] <+Rob> Beige - Lavender - Steel Blue - Peach - Orange - Purple - Silver - Yellow - Pink - Red - Blue - Green - Cyan - Gold
|
// [21:42] <+Rob> Beige - Lavender - Steel Blue - Peach - Orange - Purple - Silver - Yellow - Pink - Red - Blue - Green - Cyan - Gold
|
||||||
static skincolors_t linkColor[14] =
|
static skincolors_t linkColor[14] =
|
||||||
{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_STEELBLUE, SKINCOLOR_PEACH, SKINCOLOR_ORANGE,
|
{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_AZURE, SKINCOLOR_PEACH, SKINCOLOR_ORANGE,
|
||||||
SKINCOLOR_PURPLE, SKINCOLOR_SILVER, SKINCOLOR_SUPER4, SKINCOLOR_PINK, SKINCOLOR_RED,
|
SKINCOLOR_MAGENTA, SKINCOLOR_SILVER, SKINCOLOR_SUPER4, SKINCOLOR_PINK, SKINCOLOR_RED,
|
||||||
SKINCOLOR_BLUE, SKINCOLOR_GREEN, SKINCOLOR_CYAN, SKINCOLOR_GOLD};
|
SKINCOLOR_BLUE, SKINCOLOR_GREEN, SKINCOLOR_CYAN, SKINCOLOR_GOLD};
|
||||||
|
|
||||||
static void ST_drawNightsRecords(void)
|
static void ST_drawNightsRecords(void)
|
||||||
|
@ -938,7 +938,7 @@ static void ST_drawNightsRecords(void)
|
||||||
V_DrawString(BASEVIDWIDTH/2 - 48, STRINGY(148), aflag, "BONUS:");
|
V_DrawString(BASEVIDWIDTH/2 - 48, STRINGY(148), aflag, "BONUS:");
|
||||||
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(140), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings));
|
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(140), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings));
|
||||||
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(148), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings * 50));
|
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(148), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings * 50));
|
||||||
ST_DrawNightsOverlayNum(BASEVIDWIDTH/2 + 48, STRINGY(160), aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_STEELBLUE);
|
ST_DrawNightsOverlayNum(BASEVIDWIDTH/2 + 48, STRINGY(160), aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_AZURE);
|
||||||
|
|
||||||
// If new record, say so!
|
// If new record, say so!
|
||||||
if (!(netgame || multiplayer) && G_GetBestNightsScore(gamemap, stplyr->lastmare + 1) <= stplyr->lastmarescore)
|
if (!(netgame || multiplayer) && G_GetBestNightsScore(gamemap, stplyr->lastmare + 1) <= stplyr->lastmarescore)
|
||||||
|
@ -1220,7 +1220,7 @@ static void ST_drawNiGHTSHUD(void)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ST_DrawNightsOverlayNum(304, STRINGY(16), SPLITFLAGS(V_SNAPTOTOP)|V_SNAPTORIGHT, stplyr->marescore, nightsnum, SKINCOLOR_STEELBLUE);
|
ST_DrawNightsOverlayNum(304, STRINGY(16), SPLITFLAGS(V_SNAPTOTOP)|V_SNAPTORIGHT, stplyr->marescore, nightsnum, SKINCOLOR_AZURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stplyr->exiting
|
if (!stplyr->exiting
|
||||||
|
@ -1842,37 +1842,6 @@ static void ST_overlayDrawer(void)
|
||||||
LUAh_GameHUD(stplyr);
|
LUAh_GameHUD(stplyr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0 // Pope XVI
|
|
||||||
if (!(netgame || multiplayer) && !modifiedgame && gamemap == 11 && ALL7EMERALDS(emeralds)
|
|
||||||
&& stplyr->mo && stplyr->mo->subsector && stplyr->mo->subsector->sector-sectors == 1361)
|
|
||||||
{
|
|
||||||
if (grade & 2048) // NAGZ
|
|
||||||
{
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 70, 0, M_GetText("I, Pope Rededict XVI proclaim"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 80, 0, M_GetText("AJ & Amy"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 90, 0, M_GetText("Husband & Wife"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 100, 0, M_GetText("on this day"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 110, 0, M_GetText("May 16, 2009"));
|
|
||||||
|
|
||||||
P_GivePlayerRings(stplyr, 9999);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 60, 0, M_GetText("Oh... it's you again..."));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 80, 0, M_GetText("Look, I wanted to apologize for the way"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 90, 0, M_GetText("I've acted in the past."));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 110, 0, M_GetText("I've seen the error of my ways"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 120, 0, M_GetText("and turned over a new leaf."));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 140, 0, M_GetText("Instead of sending people to hell,"));
|
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, 150, 0, M_GetText("I now send them to heaven!"));
|
|
||||||
|
|
||||||
P_LinedefExecute(4200, stplyr->mo, stplyr->mo->subsector->sector);
|
|
||||||
P_LinedefExecute(4201, stplyr->mo, stplyr->mo->subsector->sector);
|
|
||||||
stplyr->mo->momx = stplyr->mo->momy = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// draw level title Tails
|
// draw level title Tails
|
||||||
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer))
|
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer))
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
|
|
1028
src/tables.c
1028
src/tables.c
File diff suppressed because it is too large
Load diff
|
@ -17,7 +17,7 @@
|
||||||
[BITS 32]
|
[BITS 32]
|
||||||
|
|
||||||
%define FRACBITS 16
|
%define FRACBITS 16
|
||||||
%define TRANSPARENTPIXEL 247
|
%define TRANSPARENTPIXEL 255
|
||||||
|
|
||||||
%ifdef LINUX
|
%ifdef LINUX
|
||||||
%macro cextern 1
|
%macro cextern 1
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
[BITS 32]
|
[BITS 32]
|
||||||
|
|
||||||
%define FRACBITS 16
|
%define FRACBITS 16
|
||||||
%define TRANSPARENTPIXEL 247
|
%define TRANSPARENTPIXEL 255
|
||||||
|
|
||||||
%ifdef LINUX
|
%ifdef LINUX
|
||||||
%macro cextern 1
|
%macro cextern 1
|
||||||
|
|
|
@ -366,7 +366,7 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
}
|
}
|
||||||
if (alphalevel)
|
if (alphalevel)
|
||||||
{
|
{
|
||||||
v_translevel = ((alphalevel)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
v_translevel = transtables + ((alphalevel-1)<<FF_TRANSSHIFT);
|
||||||
patchdrawfunc = translucentpdraw;
|
patchdrawfunc = translucentpdraw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1869,7 +1869,7 @@ void V_DoPostProcessor(INT32 view, postimg_t type, INT32 param)
|
||||||
angle_t disStart = (leveltime * 128) & FINEMASK; // in 0 to FINEANGLE
|
angle_t disStart = (leveltime * 128) & FINEMASK; // in 0 to FINEANGLE
|
||||||
INT32 newpix;
|
INT32 newpix;
|
||||||
INT32 sine;
|
INT32 sine;
|
||||||
//UINT8 *transme = ((tr_trans50)<<FF_TRANSSHIFT) + transtables;
|
//UINT8 *transme = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||||
|
|
||||||
for (y = yoffset; y < yoffset+height; y++)
|
for (y = yoffset; y < yoffset+height; y++)
|
||||||
{
|
{
|
||||||
|
@ -1926,7 +1926,7 @@ Unoptimized version
|
||||||
INT32 x, y;
|
INT32 x, y;
|
||||||
|
|
||||||
// TODO: Add a postimg_param so that we can pick the translucency level...
|
// TODO: Add a postimg_param so that we can pick the translucency level...
|
||||||
UINT8 *transme = ((param)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
UINT8 *transme = transtables + ((param-1)<<FF_TRANSSHIFT);
|
||||||
|
|
||||||
for (y = yoffset; y < yoffset+height; y++)
|
for (y = yoffset; y < yoffset+height; y++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue