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];
|
||||
cwhitemap[k] = (UINT8)(15 - (j>>6));
|
||||
corangemap[k] = (UINT8)(95 - (j>>6));
|
||||
cbluemap[k] = (UINT8)(239 - (j>>6));
|
||||
cgreenmap[k] = (UINT8)(175 - (j>>6));
|
||||
corangemap[k] = (UINT8)(63 - (j>>6));
|
||||
cbluemap[k] = (UINT8)(159 - (j>>6));
|
||||
cgreenmap[k] = (UINT8)(111 - (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];
|
||||
cwhitemap[k] = (UINT8)(15 - (j>>6));
|
||||
corangemap[k] = (UINT8)(95 - (j>>6));
|
||||
cbluemap[k] = (UINT8)(239 - (j>>6));
|
||||
cgreenmap[k] = (UINT8)(175 - (j>>6));
|
||||
corangemap[k] = (UINT8)(63 - (j>>6));
|
||||
cbluemap[k] = (UINT8)(159 - (j>>6));
|
||||
cgreenmap[k] = (UINT8)(111 - (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
|
||||
|
@ -306,20 +306,20 @@ static void CON_SetupBackColormap(void)
|
|||
orangemap[i] = (UINT8)i;
|
||||
}
|
||||
|
||||
yellowmap[3] = (UINT8)103;
|
||||
yellowmap[9] = (UINT8)115;
|
||||
purplemap[3] = (UINT8)195;
|
||||
purplemap[9] = (UINT8)198;
|
||||
lgreenmap[3] = (UINT8)162;
|
||||
lgreenmap[9] = (UINT8)170;
|
||||
bluemap[3] = (UINT8)228;
|
||||
bluemap[9] = (UINT8)238;
|
||||
yellowmap[3] = (UINT8)73;
|
||||
yellowmap[9] = (UINT8)66;
|
||||
purplemap[3] = (UINT8)184;
|
||||
purplemap[9] = (UINT8)186;
|
||||
lgreenmap[3] = (UINT8)102;
|
||||
lgreenmap[9] = (UINT8)106;
|
||||
bluemap[3] = (UINT8)147;
|
||||
bluemap[9] = (UINT8)158;
|
||||
graymap[3] = (UINT8)10;
|
||||
graymap[9] = (UINT8)15;
|
||||
redmap[3] = (UINT8)124;
|
||||
redmap[9] = (UINT8)127;
|
||||
orangemap[3] = (UINT8)85;
|
||||
orangemap[9] = (UINT8)90;
|
||||
redmap[3] = (UINT8)210;
|
||||
redmap[9] = (UINT8)32;
|
||||
orangemap[3] = (UINT8)52;
|
||||
orangemap[9] = (UINT8)57;
|
||||
}
|
||||
|
||||
// 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)
|
||||
CON_DrawHudlines();
|
||||
}
|
||||
|
||||
|
|
|
@ -1101,7 +1101,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
if (cl_mode != cl_downloadfiles)
|
||||
{
|
||||
INT32 i, animtime = ((ccstime / 4) & 15) + 16;
|
||||
UINT8 palstart = (cl_mode == cl_searching) ? 128 : 160;
|
||||
UINT8 palstart = (cl_mode == cl_searching) ? 32 : 96;
|
||||
// 15 pal entries total.
|
||||
const char *cltext;
|
||||
|
||||
|
@ -1139,8 +1139,8 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
dldlength = (INT32)((fileneeded[lastfilenum].currentsize/(double)fileneeded[lastfilenum].totalsize) * 256);
|
||||
if (dldlength > 256)
|
||||
dldlength = 256;
|
||||
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, 256, 8, 175);
|
||||
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, dldlength, 8, 160);
|
||||
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, 256, 8, 111);
|
||||
V_DrawFill(BASEVIDWIDTH/2-128, BASEVIDHEIGHT-24, dldlength, 8, 96);
|
||||
|
||||
memset(tempname, 0, sizeof(tempname));
|
||||
nameonly(strncpy(tempname, fileneeded[lastfilenum].filename, 31));
|
||||
|
|
|
@ -1129,10 +1129,10 @@ void D_SRB2Main(void)
|
|||
#ifndef DEVELOP // md5s last updated 12/14/14
|
||||
|
||||
// Check MD5s of autoloaded files
|
||||
W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad
|
||||
W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta
|
||||
W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta
|
||||
W_VerifyFileMD5(3, ASSET_HASH_RINGS_DTA); // rings.dta
|
||||
//W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad
|
||||
//W_VerifyFileMD5(1, ASSET_HASH_ZONES_DTA); // zones.dta
|
||||
//W_VerifyFileMD5(2, ASSET_HASH_PLAYER_DTA); // player.dta
|
||||
//W_VerifyFileMD5(3, ASSET_HASH_RINGS_DTA); // rings.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
|
||||
// ...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
|
||||
"GREY", // SKINCOLOR_GREY
|
||||
"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
|
||||
"PEACH", // SKINCOLOR_PEACH
|
||||
"BROWN", // SKINCOLOR_BROWN
|
||||
"RED", // SKINCOLOR_RED
|
||||
"DARKRED", // SKINCOLOR_DARKRED
|
||||
"NEONGREEN", // SKINCOLOR_NEONGREEN
|
||||
"GREEN", // SKINCOLOR_GREEN
|
||||
"ZIM", // SKINCOLOR_ZIM
|
||||
"OLIVE", // SKINCOLOR_OLIVE
|
||||
"CRIMSON", // SKINCOLOR_CRIMSON
|
||||
"ORANGE", // SKINCOLOR_ORANGE
|
||||
"RUST", // SKINCOLOR_RUST
|
||||
"GOLD", // SKINCOLOR_GOLD
|
||||
"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!
|
||||
"SUPER1", // SKINCOLOR_SUPER1
|
||||
"SUPER2", // SKINCOLOR_SUPER2,
|
||||
|
@ -8793,3 +8797,4 @@ void LUA_SetActionByName(void *state, const char *actiontocompare)
|
|||
}
|
||||
|
||||
#endif // HAVE_BLUA
|
||||
|
||||
|
|
|
@ -232,27 +232,31 @@ typedef enum
|
|||
SKINCOLOR_SILVER,
|
||||
SKINCOLOR_GREY,
|
||||
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_PEACH,
|
||||
SKINCOLOR_BROWN,
|
||||
SKINCOLOR_RED,
|
||||
SKINCOLOR_DARKRED,
|
||||
SKINCOLOR_NEONGREEN,
|
||||
SKINCOLOR_GREEN,
|
||||
SKINCOLOR_ZIM,
|
||||
SKINCOLOR_OLIVE,
|
||||
SKINCOLOR_YELLOW,
|
||||
SKINCOLOR_CRIMSON,
|
||||
SKINCOLOR_ORANGE,
|
||||
SKINCOLOR_RUST,
|
||||
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!
|
||||
MAXSKINCOLORS,
|
||||
|
@ -500,3 +504,4 @@ extern const char *compdate, *comptime, *comprevision;
|
|||
//#define REDSANALOG
|
||||
|
||||
#endif // __DOOMDEF__
|
||||
|
||||
|
|
|
@ -100,11 +100,13 @@ typedef long ssize_t;
|
|||
|
||||
#if defined (_MSC_VER) || defined (__OS2__)
|
||||
// Microsoft VisualC++
|
||||
#ifdef _MSC_VER
|
||||
#if (_MSC_VER <= 1800) // MSVC 2013 and back
|
||||
#define snprintf _snprintf
|
||||
#if (_MSC_VER <= 1200) // MSVC 2012 and back
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#define strncasecmp strnicmp
|
||||
#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.
|
||||
#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__
|
||||
#define __BYTEBOOL__
|
||||
|
||||
|
@ -193,7 +197,6 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
|||
#else
|
||||
typedef enum {false, true} boolean;
|
||||
#endif
|
||||
//#endif // __cplusplus
|
||||
#endif // __BYTEBOOL__
|
||||
|
||||
/* 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;
|
||||
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_rowend = scrxpos[maskx + 1];
|
||||
draw_linestart = scrypos[masky];
|
||||
draw_lineend = scrypos[masky + 1];
|
||||
|
||||
// DRAWING LOOP
|
||||
relativepos = (draw_linestart * vid.width) + draw_rowstart;
|
||||
draw_linestogo = draw_lineend - draw_linestart;
|
||||
while (draw_linestogo--)
|
||||
|
||||
if (*mask == 0)
|
||||
{
|
||||
w = w_base + relativepos;
|
||||
s = s_base + relativepos;
|
||||
e = e_base + relativepos;
|
||||
draw_rowstogo = draw_rowend - draw_rowstart;
|
||||
while (draw_rowstogo--)
|
||||
// shortcut - memcpy source to work
|
||||
while (draw_linestogo--)
|
||||
{
|
||||
if (*s != *e)
|
||||
*w = ((*mask == 0) ? *s : (*mask == 10) ? *e : transtbl[(*e<<8) + *s]);
|
||||
++w, ++s, ++e;
|
||||
M_Memcpy(w_base+relativepos, s_base+relativepos, draw_rowend-draw_rowstart);
|
||||
relativepos += vid.width;
|
||||
}
|
||||
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)
|
||||
++masky, maskx = 0;
|
||||
|
|
|
@ -125,7 +125,7 @@ boolean useNightsSS = false;
|
|||
UINT8 skincolor_redteam = SKINCOLOR_RED;
|
||||
UINT8 skincolor_blueteam = SKINCOLOR_BLUE;
|
||||
UINT8 skincolor_redring = SKINCOLOR_RED;
|
||||
UINT8 skincolor_bluering = SKINCOLOR_STEELBLUE;
|
||||
UINT8 skincolor_bluering = SKINCOLOR_AZURE;
|
||||
|
||||
tic_t countdowntimer = 0;
|
||||
boolean countdowntimeup = false;
|
||||
|
@ -299,9 +299,6 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
|
|||
#if JOYAXISSET > 3
|
||||
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
||||
#endif
|
||||
#if JOYAXISSET > 3
|
||||
{7, "Pitch"}, {8, "Roll"}, {-7, "Pitch-"}, {-8, "Roll-"},
|
||||
#endif
|
||||
#if JOYAXISSET > 4
|
||||
{7, "Yaw"}, {8, "Dummy"}, {-7, "Yaw-"}, {-8, "Dummy-"},
|
||||
#endif
|
||||
|
|
|
@ -46,8 +46,8 @@ typedef unsigned char FBOOLEAN;
|
|||
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 0
|
||||
#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 1
|
||||
#else
|
||||
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 247
|
||||
#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 220
|
||||
#define HWR_PATCHES_CHROMAKEY_COLORINDEX 255
|
||||
#define HWR_CHROMAKEY_EQUIVALENTCOLORINDEX 130
|
||||
#endif
|
||||
|
||||
// the chroma key color shows on border sprites, set it to black
|
||||
|
@ -229,3 +229,4 @@ enum hwdfiltermode
|
|||
|
||||
|
||||
#endif //_HWR_DEFS_
|
||||
|
||||
|
|
|
@ -77,7 +77,9 @@ static int lib_finecosine(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;
|
||||
}
|
||||
|
||||
|
|
52
src/m_cond.c
52
src/m_cond.c
|
@ -49,7 +49,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"Streams come to an end\n"
|
||||
"where they can no longer fall.\n"
|
||||
"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"
|
||||
"Why haven't you claimed it?\n"
|
||||
"Surely you saw it.", 0},
|
||||
|
@ -77,7 +77,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"Near the level's end,\n"
|
||||
"another bridge spans a lake.\n"
|
||||
"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"
|
||||
"has a corner that's sunlit.\n"
|
||||
"Go reach for the sky!", 0},
|
||||
|
@ -110,7 +110,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"Spinning through small gaps\n"
|
||||
"can slip you into a cave.\n"
|
||||
"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"
|
||||
"but reaching the floor takes height.\n"
|
||||
"Scream \"Geronimo!\"...", 0},
|
||||
|
@ -138,7 +138,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"There is a hallway\n"
|
||||
"that a button floods with slime.\n"
|
||||
"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"
|
||||
"will send you springing skyward.\n"
|
||||
"Now, do that six times...", 0},
|
||||
|
@ -171,7 +171,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"A caved-in hallway?\n"
|
||||
"The floor falls; the path goes down.\n"
|
||||
"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"
|
||||
"Some rocks dam the water in.\n"
|
||||
"Knuckles can fix that...", 0},
|
||||
|
@ -199,7 +199,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"In the current maze\n"
|
||||
"hides a dark room of columns.\n"
|
||||
"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"
|
||||
"hides another secret room.\n"
|
||||
"There, solve its riddle.", 0},
|
||||
|
@ -232,7 +232,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"The final approach!\n"
|
||||
"A tower holds the emblem\n"
|
||||
"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"
|
||||
"hides this near a canopy,\n"
|
||||
"high, where two trees meet.", 0},
|
||||
|
@ -260,7 +260,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"Some of these bookshelves\n"
|
||||
"are not flush against the walls.\n"
|
||||
"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"
|
||||
"are hiding a small alcove.\n"
|
||||
"Check around outside.", 0},
|
||||
|
@ -293,7 +293,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"Not far from the start,\n"
|
||||
"if you climb toward the sky,\n"
|
||||
"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"
|
||||
"an emblem lies on a cliff.\n"
|
||||
"Ride ropes to reach it.", 0},
|
||||
|
@ -321,7 +321,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"Where once a bridge stood,\n"
|
||||
"now magma falls from above.\n"
|
||||
"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"
|
||||
"ebbs and flows unendingly.\n"
|
||||
"Wait for its nadir.", 0},
|
||||
|
@ -349,7 +349,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"Don't jump too high here!\n"
|
||||
"No conveyor will catch you;\n"
|
||||
"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"
|
||||
"What an intense room this is!\n"
|
||||
"But, what brought you here?", 0},
|
||||
|
@ -377,7 +377,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"Gears with missing teeth\n"
|
||||
"can hide a clever secret!\n"
|
||||
"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"
|
||||
"the defective cargo bay,\n"
|
||||
"fly under a bridge.", 0},
|
||||
|
@ -398,7 +398,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"[PH] In the ceiling of the conveyor belt + laser hallway.", 0},
|
||||
{0,-13728,-13728, 1552, 24, 'D', SKINCOLOR_ORANGE, 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},
|
||||
*/
|
||||
|
||||
|
@ -430,7 +430,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"The underground room\n"
|
||||
"with platforms that fall and rise\n"
|
||||
"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"
|
||||
"What comes to mind when I say:\n"
|
||||
"\"WELCOME TO WARP ZONE!\"?", 0},
|
||||
|
@ -458,7 +458,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"Much like the last one,\n"
|
||||
"you need to find some switches.\n"
|
||||
"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"
|
||||
"Teleport to its switches;\n"
|
||||
"then, check near the goal.", 0},
|
||||
|
@ -486,7 +486,7 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
"A room of currents;\n"
|
||||
"most of them are marked by spikes.\n"
|
||||
"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"
|
||||
"all those gems at once is with\n"
|
||||
"a radial blast.", 0},
|
||||
|
@ -498,63 +498,63 @@ emblem_t emblemlocations[MAXEMBLEMS] =
|
|||
|
||||
// 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_NTIME, 0,0,0, 50, 'T', SKINCOLOR_GREY, 40*TICRATE, "", 0},
|
||||
|
||||
|
||||
// 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_NTIME, 0,0,0, 51, 'T', SKINCOLOR_GREY, 50*TICRATE, "", 0},
|
||||
|
||||
|
||||
// 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_NTIME, 0,0,0, 52, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0},
|
||||
|
||||
|
||||
// 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_NTIME, 0,0,0, 53, 'T', SKINCOLOR_GREY, 75*TICRATE, "", 0},
|
||||
|
||||
|
||||
// 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_NTIME, 0,0,0, 54, 'T', SKINCOLOR_GREY, 65*TICRATE, "", 0},
|
||||
|
||||
|
||||
// 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_NTIME, 0,0,0, 55, 'T', SKINCOLOR_GREY, 80*TICRATE, "", 0},
|
||||
|
||||
|
||||
// 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_NTIME, 0,0,0, 56, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
||||
|
||||
|
||||
// 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_NTIME, 0,0,0, 57, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0},
|
||||
|
||||
|
||||
// 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_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},
|
||||
{"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},
|
||||
{"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},
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
// Solid color textbox.
|
||||
V_DrawFill(x+5, y+5, width*8+6, boxlines*8+6, 239);
|
||||
V_DrawFill(x+5, y+5, width*8+6, boxlines*8+6, 159);
|
||||
//V_DrawFill(x+8, y+8, width*8, boxlines*8, 31);
|
||||
/*
|
||||
patch_t *p;
|
||||
|
@ -7406,3 +7406,4 @@ static void M_HandleFogColor(INT32 choice)
|
|||
}
|
||||
}
|
||||
#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"));
|
||||
}
|
||||
|
||||
/** 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.
|
||||
* Verify that the value of ::cv_pointlimit is greater than zero before
|
||||
* calling this function.
|
||||
*
|
||||
* \sa cv_pointlimit, P_UpdateSpecials
|
||||
* \sa cv_pointlimit, P_CheckTimeLimit, P_UpdateSpecials
|
||||
*/
|
||||
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_PlayerFlagBurst(player_t *player, boolean toss);
|
||||
void P_CheckTimeLimit(void);
|
||||
void P_CheckPointLimit(void);
|
||||
void P_CheckSurvivors(void);
|
||||
boolean P_CheckRacers(void);
|
||||
|
|
|
@ -636,7 +636,7 @@ static void P_NetArchiveWorld(void)
|
|||
if (li->special != SHORT(mld->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;
|
||||
|
||||
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.
|
||||
*
|
||||
* \sa cv_timelimit, P_CheckPointLimit
|
||||
* \sa P_CheckTimeLimit, P_CheckPointLimit
|
||||
*/
|
||||
void P_UpdateSpecials(void)
|
||||
{
|
||||
anim_t *anim;
|
||||
INT32 i, k;
|
||||
INT32 i;
|
||||
INT32 pic;
|
||||
size_t j;
|
||||
|
||||
levelflat_t *foundflats; // for flat animation
|
||||
|
||||
// LEVEL TIMER
|
||||
// Exit if the timer is equal to or greater the timelimit, unless you are
|
||||
// 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);
|
||||
}
|
||||
P_CheckTimeLimit();
|
||||
|
||||
// POINT LIMIT
|
||||
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 ALLWHITE_TT_CACHE_INDEX (MAXSKINS + 3)
|
||||
#define SKIN_RAMP_LENGTH 16
|
||||
#define DEFAULT_STARTTRANSCOLOR 160
|
||||
#define DEFAULT_STARTTRANSCOLOR 96
|
||||
#define NUM_PALETTE_ENTRIES 256
|
||||
|
||||
static UINT8** translationtablecache[MAXSKINS + 4] = {NULL};
|
||||
|
@ -137,62 +137,70 @@ static UINT8** translationtablecache[MAXSKINS + 4] = {NULL};
|
|||
// TODO Callum: Can this be translated?
|
||||
const char *Color_Names[MAXSKINCOLORS] =
|
||||
{
|
||||
"None", // SKINCOLOR_NONE
|
||||
"White", // SKINCOLOR_WHITE
|
||||
"Silver", // SKINCOLOR_SILVER
|
||||
"Grey", // SKINCOLOR_GREY
|
||||
"Black", // SKINCOLOR_BLACK
|
||||
"Cyan", // SKINCOLOR_CYAN
|
||||
"Teal", // SKINCOLOR_TEAL
|
||||
"Steel_Blue",// 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
|
||||
"Brown", // SKINCOLOR_BROWN
|
||||
"Red", // SKINCOLOR_RED
|
||||
"Dark_Red", // SKINCOLOR_DARKRED
|
||||
"Neon_Green",// SKINCOLOR_NEONGREEN
|
||||
"Green", // SKINCOLOR_GREEN
|
||||
"Zim", // SKINCOLOR_ZIM
|
||||
"Olive", // SKINCOLOR_OLIVE
|
||||
"Yellow", // SKINCOLOR_YELLOW
|
||||
"Gold" // SKINCOLOR_GOLD
|
||||
"None", // SKINCOLOR_NONE
|
||||
"White", // SKINCOLOR_WHITE
|
||||
"Silver", // SKINCOLOR_SILVER
|
||||
"Grey", // SKINCOLOR_GREY
|
||||
"Black", // SKINCOLOR_BLACK
|
||||
"Beige", // SKINCOLOR_BEIGE
|
||||
"Peach", // SKINCOLOR_PEACH
|
||||
"Brown", // SKINCOLOR_BROWN
|
||||
"Red", // SKINCOLOR_RED
|
||||
"Crimson", // SKINCOLOR_CRIMSON
|
||||
"Orange", // SKINCOLOR_ORANGE
|
||||
"Rust", // SKINCOLOR_RUST
|
||||
"Gold", // SKINCOLOR_GOLD
|
||||
"Yellow", // SKINCOLOR_YELLOW
|
||||
"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
|
||||
};
|
||||
|
||||
const UINT8 Color_Opposite[MAXSKINCOLORS*2] =
|
||||
{
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_NONE
|
||||
SKINCOLOR_BLACK,10, // SKINCOLOR_WHITE
|
||||
SKINCOLOR_GREY,4, // SKINCOLOR_SILVER
|
||||
SKINCOLOR_SILVER,12,// SKINCOLOR_GREY
|
||||
SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_CYAN
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_TEAL
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_STEELBLUE
|
||||
SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_PEACH
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_TAN
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_PINK
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_LAVENDER
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_PURPLE
|
||||
SKINCOLOR_BLUE,12, // SKINCOLOR_ORANGE
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_ROSEWOOD
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_BEIGE
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_BROWN
|
||||
SKINCOLOR_GREEN,5, // SKINCOLOR_RED
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_DARKRED
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_NEONGREEN
|
||||
SKINCOLOR_RED,11, // SKINCOLOR_GREEN
|
||||
SKINCOLOR_PURPLE,3, // SKINCOLOR_ZIM
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_OLIVE
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_YELLOW
|
||||
SKINCOLOR_NONE,8 // SKINCOLOR_GOLD
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_NONE
|
||||
SKINCOLOR_BLACK,10, // SKINCOLOR_WHITE
|
||||
SKINCOLOR_GREY,4, // SKINCOLOR_SILVER
|
||||
SKINCOLOR_SILVER,12, // SKINCOLOR_GREY
|
||||
SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK
|
||||
SKINCOLOR_BEIGE,8, // SKINCOLOR_BEIGE - needs new offset
|
||||
SKINCOLOR_BROWN,8, // SKINCOLOR_PEACH - ditto
|
||||
SKINCOLOR_PEACH,8, // SKINCOLOR_BROWN - ditto
|
||||
SKINCOLOR_GREEN,5, // SKINCOLOR_RED
|
||||
SKINCOLOR_CYAN,8, // SKINCOLOR_CRIMSON - ditto
|
||||
SKINCOLOR_BLUE,12, // SKINCOLOR_ORANGE
|
||||
SKINCOLOR_TAN,8, // SKINCOLOR_RUST - ditto
|
||||
SKINCOLOR_LAVENDER,8, // SKINCOLOR_GOLD - ditto
|
||||
SKINCOLOR_TEAL,8, // SKINCOLOR_YELLOW - ditto
|
||||
SKINCOLOR_RUST,8, // SKINCOLOR_TAN - ditto
|
||||
SKINCOLOR_MAGENTA,3, // SKINCOLOR_MOSS
|
||||
SKINCOLOR_PURPLE,8, // SKINCOLOR_PERIDOT - ditto
|
||||
SKINCOLOR_RED,11, // SKINCOLOR_GREEN
|
||||
SKINCOLOR_PASTEL,8, // SKINCOLOR_EMERALD - ditto
|
||||
SKINCOLOR_ROSY,8, // SKINCOLOR_AQUA - ditto
|
||||
SKINCOLOR_YELLOW,8, // SKINCOLOR_TEAL - ditto
|
||||
SKINCOLOR_CRIMSON,8, // SKINCOLOR_CYAN - ditto
|
||||
SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE
|
||||
SKINCOLOR_PINK,8, // SKINCOLOR_AZURE - ditto
|
||||
SKINCOLOR_EMERALD,8, // SKINCOLOR_PASTEL - ditto
|
||||
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];
|
||||
|
@ -242,27 +250,31 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
|||
0x03, // SKINCOLOR_SILVER
|
||||
0x08, // SKINCOLOR_GREY
|
||||
0x18, // SKINCOLOR_BLACK
|
||||
0xd0, // SKINCOLOR_CYAN
|
||||
0xdc, // SKINCOLOR_TEAL
|
||||
0xc8, // SKINCOLOR_STEELBLUE
|
||||
0xe2, // SKINCOLOR_BLUE
|
||||
0x40, // SKINCOLOR_PEACH
|
||||
0x48, // SKINCOLOR_TAN
|
||||
0x90, // SKINCOLOR_PINK
|
||||
0xf8, // SKINCOLOR_LAVENDER
|
||||
0xc0, // SKINCOLOR_PURPLE
|
||||
0x52, // SKINCOLOR_ORANGE
|
||||
0x5c, // SKINCOLOR_ROSEWOOD
|
||||
0x20, // SKINCOLOR_BEIGE
|
||||
0x30, // SKINCOLOR_BROWN
|
||||
0x7d, // SKINCOLOR_RED
|
||||
0x85, // SKINCOLOR_DARKRED
|
||||
0xb8, // SKINCOLOR_NEONGREEN
|
||||
0xa0, // SKINCOLOR_GREEN
|
||||
0xb0, // SKINCOLOR_ZIM
|
||||
0x69, // SKINCOLOR_OLIVE
|
||||
0x67, // SKINCOLOR_YELLOW
|
||||
0x70, // SKINCOLOR_GOLD
|
||||
0xf0, // SKINCOLOR_BEIGE
|
||||
0xd8, // SKINCOLOR_PEACH
|
||||
0xe0, // SKINCOLOR_BROWN
|
||||
0x21, // SKINCOLOR_RED
|
||||
0x28, // SKINCOLOR_CRIMSON
|
||||
0x31, // SKINCOLOR_ORANGE
|
||||
0x3a, // SKINCOLOR_RUST
|
||||
0x40, // SKINCOLOR_GOLD
|
||||
0x48, // SKINCOLOR_YELLOW
|
||||
0x54, // SKINCOLOR_TAN
|
||||
0x58, // SKINCOLOR_MOSS
|
||||
0xbc, // SKINCOLOR_PERIDOT
|
||||
0x60, // SKINCOLOR_GREEN
|
||||
0x70, // SKINCOLOR_EMERALD
|
||||
0x78, // SKINCOLOR_AQUA
|
||||
0x8c, // SKINCOLOR_TEAL
|
||||
0x80, // SKINCOLOR_CYAN
|
||||
0x92, // SKINCOLOR_BLUE
|
||||
0xaa, // SKINCOLOR_AZURE
|
||||
0xa0, // SKINCOLOR_PASTEL
|
||||
0xa0, // SKINCOLOR_PURPLE
|
||||
0xc0, // SKINCOLOR_LAVENDER
|
||||
0xb3, // SKINCOLOR_MAGENTA
|
||||
0xd0, // SKINCOLOR_PINK
|
||||
0xc8, // SKINCOLOR_ROSY
|
||||
};
|
||||
INT32 i;
|
||||
INT32 starttranscolor;
|
||||
|
@ -280,7 +292,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
|||
if (skinnum == TC_BOSS)
|
||||
dest_colormap[31] = 0;
|
||||
else if (skinnum == TC_METALSONIC)
|
||||
dest_colormap[239] = 0;
|
||||
dest_colormap[159] = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -299,196 +311,339 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
|||
{
|
||||
case SKINCOLOR_SILVER:
|
||||
case SKINCOLOR_GREY:
|
||||
case SKINCOLOR_PEACH:
|
||||
case SKINCOLOR_BEIGE:
|
||||
case SKINCOLOR_BROWN:
|
||||
case SKINCOLOR_RED:
|
||||
case SKINCOLOR_GREEN:
|
||||
case SKINCOLOR_BLUE:
|
||||
// 16 color ramp
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i);
|
||||
break;
|
||||
|
||||
case SKINCOLOR_ORANGE:
|
||||
// 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_WHITE:
|
||||
case SKINCOLOR_CYAN:
|
||||
// 12 color ramp
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH));
|
||||
break;
|
||||
|
||||
case SKINCOLOR_WHITE:
|
||||
case SKINCOLOR_BLACK:
|
||||
case SKINCOLOR_STEELBLUE:
|
||||
case SKINCOLOR_PINK:
|
||||
case SKINCOLOR_MOSS:
|
||||
case SKINCOLOR_EMERALD:
|
||||
case SKINCOLOR_LAVENDER:
|
||||
case SKINCOLOR_PURPLE:
|
||||
case SKINCOLOR_DARKRED:
|
||||
case SKINCOLOR_ZIM:
|
||||
case SKINCOLOR_YELLOW:
|
||||
case SKINCOLOR_GOLD:
|
||||
case SKINCOLOR_PINK:
|
||||
// 8 color ramp
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (i >> 1));
|
||||
break;
|
||||
|
||||
case SKINCOLOR_TEAL:
|
||||
// 5 color ramp
|
||||
case SKINCOLOR_BEIGE:
|
||||
// 13 colors
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
{
|
||||
if (5*i/16 == 0)
|
||||
dest_colormap[starttranscolor + i] = 0xf7;
|
||||
if (i == 15)
|
||||
dest_colormap[starttranscolor + i] = 0xed; // Darkest
|
||||
else if (i <= 6)
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + ((i + 1) >> 1)); // Brightest
|
||||
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;
|
||||
|
||||
case SKINCOLOR_OLIVE:
|
||||
// 7 color ramp
|
||||
case SKINCOLOR_CRIMSON:
|
||||
// 9 colors
|
||||
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;
|
||||
|
||||
case SKINCOLOR_TAN:
|
||||
// 16 color ramp, from two color ranges
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH/2; i++) // Peach half
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + i);
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH/2; i++) // Brown half
|
||||
dest_colormap[starttranscolor + (i+8)] = (UINT8)(48 + i);
|
||||
// 8 colors
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
{
|
||||
if (i/2 == 0)
|
||||
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;
|
||||
|
||||
case SKINCOLOR_ROSEWOOD:
|
||||
// 12 color ramp, from two color ranges!
|
||||
for (i = 0; i < 6; i++) // Orange ...third?
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(skinbasecolors[color - 1] + (12*i/SKIN_RAMP_LENGTH));
|
||||
for (i = 0; i < 10; i++) // Rosewood two-thirds-ish
|
||||
dest_colormap[starttranscolor + (i+6)] = (UINT8)(152 + (12*i/SKIN_RAMP_LENGTH));
|
||||
case SKINCOLOR_PERIDOT:
|
||||
// 8 colors
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
{
|
||||
if (i/2 == 0)
|
||||
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;
|
||||
|
||||
case SKINCOLOR_NEONGREEN:
|
||||
// Multi-color ramp
|
||||
dest_colormap[starttranscolor] = 0xA0; // Brighter green
|
||||
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)));
|
||||
case SKINCOLOR_AQUA:
|
||||
// 10 colors
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
{
|
||||
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;
|
||||
|
||||
// Super colors, from lightest to darkest!
|
||||
case SKINCOLOR_SUPER1:
|
||||
// Super White
|
||||
for (i = 0; i < 10; i++)
|
||||
dest_colormap[starttranscolor + i] = 120; // True white
|
||||
for (; i < SKIN_RAMP_LENGTH; i++) // White-yellow fade
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(96 + (i-10));
|
||||
dest_colormap[starttranscolor + i] = (UINT8)0; // True white
|
||||
for (; i < 12; i++) // White-yellow fade
|
||||
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;
|
||||
|
||||
case SKINCOLOR_SUPER2:
|
||||
// Super Bright
|
||||
for (i = 0; i < 5; i++) // White-yellow fade
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(96 + i);
|
||||
dest_colormap[starttranscolor + 5] = 112; // Golden shine
|
||||
for (i = 0; i < 8; i++) // Yellow
|
||||
dest_colormap[starttranscolor + (i+6)] = (UINT8)(101 + (i>>1));
|
||||
for (i = 0; i < 2; i++) // With a fine golden finish! :3
|
||||
dest_colormap[starttranscolor + (i+14)] = (UINT8)(113 + i);
|
||||
dest_colormap[starttranscolor] = (UINT8)(0);
|
||||
for (i = 1; i < 4; i++) // White-yellow fade
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(80 + (i-1));
|
||||
for (; i < 6; i++) // Yellow
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(83);
|
||||
for (; i < 8; i++) // Yellow
|
||||
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;
|
||||
|
||||
case SKINCOLOR_SUPER3:
|
||||
// Super Yellow
|
||||
for (i = 0; i < 3; i++) // White-yellow fade
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(98 + i);
|
||||
dest_colormap[starttranscolor + 3] = 112; // Golden shine
|
||||
for (i = 0; i < 8; i++) // Yellow
|
||||
dest_colormap[starttranscolor + (i+4)] = (UINT8)(101 + (i>>1));
|
||||
for (i = 0; i < 4; i++) // With a fine golden finish! :3
|
||||
dest_colormap[starttranscolor + (i+12)] = (UINT8)(113 + i);
|
||||
for (i = 0; i < 2; i++) // White-yellow fade
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(81 + i);
|
||||
for (; i < 4; i++)
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(83);
|
||||
for (; i < 6; i++) // Yellow
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(72);
|
||||
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;
|
||||
|
||||
case SKINCOLOR_SUPER4:
|
||||
// "The SSNTails"
|
||||
dest_colormap[starttranscolor] = 112; // Golden shine
|
||||
for (i = 0; i < 8; i++) // Yellow
|
||||
dest_colormap[starttranscolor + (i+1)] = (UINT8)(101 + (i>>1));
|
||||
for (i = 0; i < 7; i++) // With a fine golden finish! :3
|
||||
dest_colormap[starttranscolor + (i+9)] = (UINT8)(113 + i);
|
||||
dest_colormap[starttranscolor] = 83; // Golden shine
|
||||
for (i = 1; i < 3; i++) // Yellow
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(72);
|
||||
for (; i < 9; 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-9));
|
||||
break;
|
||||
|
||||
case SKINCOLOR_SUPER5:
|
||||
// Golden Delicious
|
||||
for (i = 0; i < 8; i++) // Yellow
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(101 + (i>>1));
|
||||
for (i = 0; i < 7; i++) // With a fine golden finish! :3
|
||||
dest_colormap[starttranscolor + (i+8)] = (UINT8)(113 + i);
|
||||
dest_colormap[starttranscolor + 15] = 155;
|
||||
for (i = 0; i < 2; i++) // Yellow
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(72);
|
||||
for (; i < 8; i++) // Yellow
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(73);
|
||||
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;
|
||||
|
||||
// Super Tails
|
||||
// Super Tails and Knuckles, who really should be dummied out by now
|
||||
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:
|
||||
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:
|
||||
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:
|
||||
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:
|
||||
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:
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(120 + (i >> 2));
|
||||
break;
|
||||
|
||||
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:
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(120 + (i >> 1));
|
||||
break;
|
||||
|
||||
case SKINCOLOR_KSUPER4:
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(121 + (i >> 1));
|
||||
break;
|
||||
|
||||
case SKINCOLOR_KSUPER5:
|
||||
for (i = 0; i < SKIN_RAMP_LENGTH; i++)
|
||||
dest_colormap[starttranscolor + i] = (UINT8)(122 + (i >> 1));
|
||||
dest_colormap[starttranscolor + i] = 0xFF;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -802,3 +957,4 @@ void R_DrawViewBorder(void)
|
|||
// ==========================================================================
|
||||
|
||||
#include "r_draw16.c"
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ void R_DrawColumn_8(void)
|
|||
}
|
||||
}
|
||||
|
||||
#define TRANSPARENTPIXEL 247
|
||||
#define TRANSPARENTPIXEL 255
|
||||
|
||||
void R_Draw2sMultiPatchColumn_8(void)
|
||||
{
|
||||
|
@ -1388,3 +1388,4 @@ void R_DrawColumnShadowed_8(void)
|
|||
if (dc_yl <= realyh)
|
||||
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.
|
||||
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 *scalelightfixed[MAXLIGHTSCALE];
|
||||
lighttable_t *zlight[LIGHTLEVELS][MAXLIGHTZ];
|
||||
|
@ -1278,7 +1269,7 @@ void R_RenderPlayerView(player_t *player)
|
|||
if (cv_homremoval.value == 1)
|
||||
V_DrawFill(0, 0, vid.width, vid.height, 31); // No HOM effect!
|
||||
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;
|
||||
|
|
|
@ -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)
|
||||
if (pl->polyobj->translucency >= 10)
|
||||
return; // Don't even draw it
|
||||
else if (pl->polyobj->translucency == 9)
|
||||
ds_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
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 if (pl->polyobj->translucency > 0)
|
||||
ds_transmap = transtables + ((pl->polyobj->translucency-1)<<FF_TRANSSHIFT);
|
||||
else // Opaque, but allow transparent flat pixels
|
||||
spanfunc = splatfunc;
|
||||
|
||||
if (pl->extra_colormap && pl->extra_colormap->fog)
|
||||
light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
||||
else
|
||||
light = LIGHTLEVELS-1;
|
||||
light = LIGHTLEVELS-1;
|
||||
|
||||
} else
|
||||
#endif
|
||||
|
@ -805,23 +789,23 @@ void R_DrawSinglePlane(visplane_t *pl)
|
|||
if (pl->ffloor->alpha < 12)
|
||||
return; // Don't even draw it
|
||||
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)
|
||||
ds_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
ds_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans60-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
ds_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans40-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
ds_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans20-1)<<FF_TRANSSHIFT);
|
||||
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
|
||||
spanfunc = splatfunc;
|
||||
|
||||
|
@ -1082,7 +1066,7 @@ using the palette colors.
|
|||
if (spanfunc == R_DrawSpan_8)
|
||||
{
|
||||
INT32 i;
|
||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
spanfunc = R_DrawTranslucentSpan_8;
|
||||
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;
|
||||
else
|
||||
{
|
||||
dc_transmap = ((tr_trans50 - 1)<<FF_TRANSSHIFT) + transtables;
|
||||
dc_transmap = transtables + ((tr_trans50 - 1)<<FF_TRANSSHIFT);
|
||||
colfunc = fuzzcolfunc;
|
||||
}
|
||||
|
||||
|
@ -304,39 +304,15 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
switch (ldef->special)
|
||||
{
|
||||
case 900:
|
||||
dc_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 901:
|
||||
dc_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 902:
|
||||
dc_transmap = ((tr_trans30)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 903:
|
||||
dc_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 904:
|
||||
dc_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 905:
|
||||
dc_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 906:
|
||||
dc_transmap = ((tr_trans70)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 907:
|
||||
dc_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 908:
|
||||
dc_transmap = ((tr_trans90)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((ldef->special-900)<<FF_TRANSSHIFT);
|
||||
colfunc = fuzzcolfunc;
|
||||
break;
|
||||
case 909:
|
||||
|
@ -354,7 +330,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
|||
if (curline->polyseg->translucency >= NUMTRANSMAPS)
|
||||
return;
|
||||
|
||||
dc_transmap = ((curline->polyseg->translucency)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((curline->polyseg->translucency-1)<<FF_TRANSSHIFT);
|
||||
colfunc = fuzzcolfunc;
|
||||
}
|
||||
|
||||
|
@ -733,23 +709,23 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
if (pfloor->alpha < 12)
|
||||
return; // Don't even draw it
|
||||
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)
|
||||
dc_transmap = ((tr_trans80)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((tr_trans80-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
dc_transmap = ((tr_trans60)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((tr_trans60-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
dc_transmap = ((tr_trans40)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((tr_trans40-1)<<FF_TRANSSHIFT);
|
||||
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)
|
||||
dc_transmap = ((tr_trans20)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((tr_trans20-1)<<FF_TRANSSHIFT);
|
||||
else if (pfloor->alpha < 243)
|
||||
dc_transmap = ((tr_trans10)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
dc_transmap = transtables + ((tr_trans10-1)<<FF_TRANSSHIFT);
|
||||
else
|
||||
fuzzy = false; // Opaque
|
||||
|
||||
|
|
|
@ -503,7 +503,7 @@ static void R_RenderFloorSplat(floorsplat_t *pSplat, vertex_t *verts, UINT8 *pTe
|
|||
{
|
||||
ds_x1 = x1;
|
||||
ds_x2 = x2;
|
||||
ds_transmap = ((tr_trans50)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
ds_transmap = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
splatfunc();
|
||||
}
|
||||
|
||||
|
|
|
@ -1330,9 +1330,9 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
if (!cv_translucency.value)
|
||||
; // no translucency
|
||||
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)
|
||||
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))
|
||||
&& (!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->superface, "MISSING", 8);
|
||||
|
||||
skin->starttranscolor = 160;
|
||||
skin->starttranscolor = 96;
|
||||
skin->prefcolor = SKINCOLOR_GREEN;
|
||||
|
||||
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
|
||||
static skincolors_t linkColor[14] =
|
||||
{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_STEELBLUE, SKINCOLOR_PEACH, SKINCOLOR_ORANGE,
|
||||
SKINCOLOR_PURPLE, SKINCOLOR_SILVER, SKINCOLOR_SUPER4, SKINCOLOR_PINK, SKINCOLOR_RED,
|
||||
{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_AZURE, SKINCOLOR_PEACH, SKINCOLOR_ORANGE,
|
||||
SKINCOLOR_MAGENTA, SKINCOLOR_SILVER, SKINCOLOR_SUPER4, SKINCOLOR_PINK, SKINCOLOR_RED,
|
||||
SKINCOLOR_BLUE, SKINCOLOR_GREEN, SKINCOLOR_CYAN, SKINCOLOR_GOLD};
|
||||
|
||||
static void ST_drawNightsRecords(void)
|
||||
|
@ -938,7 +938,7 @@ static void ST_drawNightsRecords(void)
|
|||
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(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 (!(netgame || multiplayer) && G_GetBestNightsScore(gamemap, stplyr->lastmare + 1) <= stplyr->lastmarescore)
|
||||
|
@ -1220,7 +1220,7 @@ static void ST_drawNiGHTSHUD(void)
|
|||
#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
|
||||
|
@ -1842,37 +1842,6 @@ static void ST_overlayDrawer(void)
|
|||
LUAh_GameHUD(stplyr);
|
||||
#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
|
||||
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer))
|
||||
#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]
|
||||
|
||||
%define FRACBITS 16
|
||||
%define TRANSPARENTPIXEL 247
|
||||
%define TRANSPARENTPIXEL 255
|
||||
|
||||
%ifdef LINUX
|
||||
%macro cextern 1
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
[BITS 32]
|
||||
|
||||
%define FRACBITS 16
|
||||
%define TRANSPARENTPIXEL 247
|
||||
%define TRANSPARENTPIXEL 255
|
||||
|
||||
%ifdef LINUX
|
||||
%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)
|
||||
{
|
||||
v_translevel = ((alphalevel)<<FF_TRANSSHIFT) - 0x10000 + transtables;
|
||||
v_translevel = transtables + ((alphalevel-1)<<FF_TRANSSHIFT);
|
||||
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
|
||||
INT32 newpix;
|
||||
INT32 sine;
|
||||
//UINT8 *transme = ((tr_trans50)<<FF_TRANSSHIFT) + transtables;
|
||||
//UINT8 *transme = transtables + ((tr_trans50-1)<<FF_TRANSSHIFT);
|
||||
|
||||
for (y = yoffset; y < yoffset+height; y++)
|
||||
{
|
||||
|
@ -1926,7 +1926,7 @@ Unoptimized version
|
|||
INT32 x, y;
|
||||
|
||||
// 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++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue