This commit is contained in:
TehRealSalt 2017-10-22 17:39:04 -04:00
commit 5233c442fb
16 changed files with 648 additions and 471 deletions

View file

@ -1548,6 +1548,30 @@ void CV_AddValue(consvar_t *var, INT32 increment)
return; return;
} }
} }
else if (var == &cv_playercolor)
{
// Special case for the playercolor variable, used only directly from the menu
if (increment > 0) // Going up!
{
newvalue = var->value + 1;
if (newvalue > MAXSKINCOLORS-1)
newvalue = 1;
var->value = newvalue;
var->string = var->PossibleValue[var->value].strvalue;
var->func();
return;
}
else if (increment < 0) // Going down!
{
newvalue = var->value - 1;
if (newvalue < 1)
newvalue = MAXSKINCOLORS-1;
var->value = newvalue;
var->string = var->PossibleValue[var->value].strvalue;
var->func();
return;
}
}
#ifdef PARANOIA #ifdef PARANOIA
if (currentindice == -1) if (currentindice == -1)
I_Error("CV_AddValue: current value %d not found in possible value\n", I_Error("CV_AddValue: current value %d not found in possible value\n",

View file

@ -3272,7 +3272,7 @@ void SV_StartSinglePlayerServer(void)
server = true; server = true;
netgame = false; netgame = false;
multiplayer = false; multiplayer = false;
gametype = GT_COOP; gametype = GT_RACE; //srb2kart
// no more tic the game with this settings! // no more tic the game with this settings!
SV_StopServer(); SV_StopServer();

View file

@ -701,9 +701,10 @@ void D_RegisterClientCommands(void)
// time attack ghost options are also saved to config // time attack ghost options are also saved to config
CV_RegisterVar(&cv_ghost_bestscore); CV_RegisterVar(&cv_ghost_bestscore);
CV_RegisterVar(&cv_ghost_besttime); CV_RegisterVar(&cv_ghost_besttime);
CV_RegisterVar(&cv_ghost_bestrings); //CV_RegisterVar(&cv_ghost_bestlap);
CV_RegisterVar(&cv_ghost_last); CV_RegisterVar(&cv_ghost_last);
CV_RegisterVar(&cv_ghost_guest); CV_RegisterVar(&cv_ghost_guest);
CV_RegisterVar(&cv_ghost_staff);
COM_AddCommand("displayplayer", Command_Displayplayer_f); COM_AddCommand("displayplayer", Command_Displayplayer_f);
COM_AddCommand("tunes", Command_Tunes_f); COM_AddCommand("tunes", Command_Tunes_f);
@ -1147,7 +1148,7 @@ static void SendNameAndColor(void)
return; return;
// If you're not in a netgame, merely update the skin, color, and name. // If you're not in a netgame, merely update the skin, color, and name.
if (!netgame) if (!netgame && !modeattacking)
{ {
INT32 foundskin; INT32 foundskin;
@ -1270,7 +1271,7 @@ static void SendNameAndColor2(void)
SetPlayerSkinByNum(secondplaya, botskin-1); SetPlayerSkinByNum(secondplaya, botskin-1);
return; return;
} }
else if (!netgame) else if (!netgame && !modeattacking)
{ {
INT32 foundskin; INT32 foundskin;
@ -1862,12 +1863,13 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
if (modeattacking) if (modeattacking)
{ {
SetPlayerSkinByNum(0, cv_chooseskin.value-1); SetPlayerSkinByNum(0, cv_chooseskin.value-1);
players[0].skincolor = skins[players[0].skin].prefcolor; players[0].skincolor = cv_playercolor.value; // srb2kart
CV_StealthSetValue(&cv_playercolor, players[0].skincolor);
// a copy of color // a copy of color
if (players[0].mo) if (players[0].mo)
players[0].mo->color = players[0].skincolor; players[0].mo->color = players[0].skincolor;
CV_StealthSetValue(&cv_kartcc, 150); // srb2kart
} }
if (metalrecording) if (metalrecording)
G_BeginMetal(); G_BeginMetal();
@ -4208,7 +4210,7 @@ static void Color_OnChange(void)
if (!Playing()) if (!Playing())
return; // do whatever you want return; // do whatever you want
if (!(cv_debug || devparm) && !(multiplayer || netgame)) // In single player. if (!(cv_debug || devparm) && !(multiplayer || netgame || modeattacking)) // In single player.
{ {
CV_StealthSet(&cv_skin, skins[players[consoleplayer].skin].name); CV_StealthSet(&cv_skin, skins[players[consoleplayer].skin].name);
return; return;

View file

@ -7150,70 +7150,70 @@ static const char *const ML_LIST[16] = {
// This DOES differ from r_draw's Color_Names, unfortunately. // This DOES differ from r_draw's Color_Names, unfortunately.
// Also includes Super colors // Also includes Super colors
static const char *COLOR_ENUMS[] = { // Rejigged for Kart. static const char *COLOR_ENUMS[] = { // Rejigged for Kart.
"NONE", // 00 // SKINCOLOR_NONE "NONE", // 00 // SKINCOLOR_NONE
"IVORY", // 01 // SKINCOLOR_IVORY "IVORY", // 01 // SKINCOLOR_IVORY
"WHITE", // 02 // SKINCOLOR_WHITE "WHITE", // 02 // SKINCOLOR_WHITE
"SILVER", // 03 // SKINCOLOR_SILVER "SILVER", // 03 // SKINCOLOR_SILVER
"CLOUDY", // 04 // SKINCOLOR_CLOUDY "CLOUDY", // 04 // SKINCOLOR_CLOUDY
"GREY", // 05 // SKINCOLOR_GREY "GREY", // 05 // SKINCOLOR_GREY
"DARKGREY", // 06 // SKINCOLOR_DARKGREY "DARKGREY", // 06 // SKINCOLOR_DARKGREY
"BLACK", // 07 // SKINCOLOR_BLACK "BLACK", // 07 // SKINCOLOR_BLACK
"SALMON", // 08 // SKINCOLOR_SALMON "SALMON", // 08 // SKINCOLOR_SALMON
"PINK", // 09 // SKINCOLOR_PINK "PINK", // 09 // SKINCOLOR_PINK
"LIGHTRED", // 10 // SKINCOLOR_LIGHTRED "LIGHTRED", // 10 // SKINCOLOR_LIGHTRED
"FULLRANGERED", // 11 // SKINCOLOR_FULLRANGERED "SHINYRED", // 11 // SKINCOLOR_SHINYRED
"RED", // 12 // SKINCOLOR_RED "RED", // 12 // SKINCOLOR_RED
"DARKPINK", // 13 // SKINCOLOR_DARKPINK "DARKPINK", // 13 // SKINCOLOR_DARKPINK
"DARKRED", // 14 // SKINCOLOR_DARKRED "DARKRED", // 14 // SKINCOLOR_DARKRED
"DAWN", // 15 // SKINCOLOR_DAWN "DAWN", // 15 // SKINCOLOR_DAWN
"ORANGE", // 16 // SKINCOLOR_ORANGE "ORANGE", // 16 // SKINCOLOR_ORANGE
"FULLRANGEORANGE", // 17 // SKINCOLOR_FULLRANGEORANGE "SHINYORANGE", // 17 // SKINCOLOR_SHINYORANGE
"DARKORANGE", // 18 // SKINCOLOR_DARKORANGE "DARKORANGE", // 18 // SKINCOLOR_DARKORANGE
"GOLDENBROWN", // 19 // SKINCOLOR_GOLDENBROWN "GOLDENBROWN", // 19 // SKINCOLOR_GOLDENBROWN
"ROSEWOOD", // 20 // SKINCOLOR_ROSEWOOD "ROSEWOOD", // 20 // SKINCOLOR_ROSEWOOD
"DARKROSEWOOD", // 21 // SKINCOLOR_DARKROSEWOOD "DARKROSEWOOD", // 21 // SKINCOLOR_DARKROSEWOOD
"SEPIA", // 22 // SKINCOLOR_SEPIA "SEPIA", // 22 // SKINCOLOR_SEPIA
"BEIGE", // 23 // SKINCOLOR_BEIGE "BEIGE", // 23 // SKINCOLOR_BEIGE
"BROWN", // 24 // SKINCOLOR_BROWN "BROWN", // 24 // SKINCOLOR_BROWN
"LEATHER", // 25 // SKINCOLOR_LEATHER "LEATHER", // 25 // SKINCOLOR_LEATHER
"YELLOW", // 26 // SKINCOLOR_YELLOW "YELLOW", // 26 // SKINCOLOR_YELLOW
"PEACH", // 27 // SKINCOLOR_PEACH "PEACH", // 27 // SKINCOLOR_PEACH
"LIGHTORANGE", // 28 // SKINCOLOR_LIGHTORANGE "LIGHTORANGE", // 28 // SKINCOLOR_LIGHTORANGE
"PEACHBROWN", // 29 // SKINCOLOR_PEACHBROWN "CARAMEL", // 29 // SKINCOLOR_CARAMEL
"GOLD", // 30 // SKINCOLOR_GOLD "GOLD", // 30 // SKINCOLOR_GOLD
"FULLRANGEPEACHBROWN", // 31 // SKINCOLOR_FULLRANGEPEACHBROWN "SHINYCARAMEL", // 31 // SKINCOLOR_SHINYCARAMEL
"GYPSYVOMIT", // 32 // SKINCOLOR_GYPSYVOMIT "VOMIT", // 32 // SKINCOLOR_VOMIT
"GARDEN", // 33 // SKINCOLOR_GARDEN "GARDEN", // 33 // SKINCOLOR_GARDEN
"LIGHTARMY", // 34 // SKINCOLOR_LIGHTARMY "LIGHTARMY", // 34 // SKINCOLOR_LIGHTARMY
"ARMY", // 35 // SKINCOLOR_ARMY "ARMY", // 35 // SKINCOLOR_ARMY
"PISTACHIO", // 36 // SKINCOLOR_PISTACHIO "PISTACHIO", // 36 // SKINCOLOR_PISTACHIO
"ROBOHOODGREEN", // 37 // SKINCOLOR_ROBOHOODGREEN "ROBOHOOD", // 37 // SKINCOLOR_ROBOHOOD
"OLIVE", // 38 // SKINCOLOR_OLIVE "OLIVE", // 38 // SKINCOLOR_OLIVE
"DARKARMY", // 39 // SKINCOLOR_DARKARMY "DARKARMY", // 39 // SKINCOLOR_DARKARMY
"LIGHTGREEN", // 40 // SKINCOLOR_LIGHTGREEN "LIGHTGREEN", // 40 // SKINCOLOR_LIGHTGREEN
"UGLYGREEN", // 41 // SKINCOLOR_UGLYGREEN "UGLYGREEN", // 41 // SKINCOLOR_UGLYGREEN
"NEONGREEN", // 42 // SKINCOLOR_NEONGREEN "NEONGREEN", // 42 // SKINCOLOR_NEONGREEN
"GREEN", // 43 // SKINCOLOR_GREEN "GREEN", // 43 // SKINCOLOR_GREEN
"DARKGREEN", // 44 // SKINCOLOR_DARKGREEN "DARKGREEN", // 44 // SKINCOLOR_DARKGREEN
"DARKNEONGREEN", // 45 // SKINCOLOR_DARKNEONGREEN "SWAMP", // 45 // SKINCOLOR_SWAMP
"FROST", // 46 // SKINCOLOR_FROST "FROST", // 46 // SKINCOLOR_FROST
"LIGHTSTEELBLUE", // 47 // SKINCOLOR_LIGHTSTEELBLUE "SLATE", // 47 // SKINCOLOR_SLATE
"LIGHTBLUE", // 48 // SKINCOLOR_LIGHTBLUE "LIGHTBLUE", // 48 // SKINCOLOR_LIGHTBLUE
"CYAN", // 49 // SKINCOLOR_CYAN "CYAN", // 49 // SKINCOLOR_CYAN
"CERULEAN", // 50 // SKINCOLOR_CERULEAN "CERULEAN", // 50 // SKINCOLOR_CERULEAN
"TURQUOISE", // 51 // SKINCOLOR_TURQUOISE "TURQUOISE", // 51 // SKINCOLOR_TURQUOISE
"TEAL", // 52 // SKINCOLOR_TEAL "TEAL", // 52 // SKINCOLOR_TEAL
"STEELBLUE", // 53 // SKINCOLOR_STEELBLUE "STEELBLUE", // 53 // SKINCOLOR_STEELBLUE
"BLUE", // 54 // SKINCOLOR_BLUE "BLUE", // 54 // SKINCOLOR_BLUE
"FULLRANGEBLUE", // 55 // SKINCOLOR_FULLRANGEBLUE "SHINYBLUE", // 55 // SKINCOLOR_SHINYBLUE
"DARKSTEELBLUE", // 56 // SKINCOLOR_DARKSTEELBLUE "NAVY", // 56 // SKINCOLOR_NAVY
"DARKBLUE", // 57 // SKINCOLOR_DARKBLUE "DARKBLUE", // 57 // SKINCOLOR_DARKBLUE
"JETBLACK", // 58 // SKINCOLOR_JETBLACK "JETBLACK", // 58 // SKINCOLOR_JETBLACK
"LILAC", // 59 // SKINCOLOR_LILAC "LILAC", // 59 // SKINCOLOR_LILAC
"PURPLE", // 60 // SKINCOLOR_PURPLE "PURPLE", // 60 // SKINCOLOR_PURPLE
"LAVENDER", // 61 // SKINCOLOR_LAVENDER "LAVENDER", // 61 // SKINCOLOR_LAVENDER
"BYZANTIUM", // 62 // SKINCOLOR_BYZANTIUM "BYZANTIUM", // 62 // SKINCOLOR_BYZANTIUM
"INDIGO", // 63 // SKINCOLOR_INDIGO "INDIGO", // 63 // SKINCOLOR_INDIGO
// Super special awesome Super flashing colors! // Super special awesome Super flashing colors!
"SUPER1", // SKINCOLOR_SUPER1 "SUPER1", // SKINCOLOR_SUPER1

View file

@ -143,16 +143,16 @@ extern FILE *logstream;
#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3 #define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3
#ifdef DEVELOP #ifdef DEVELOP
#define VERSION 104 // Game version #define VERSION 104 // Game version
#define SUBVERSION 7 // more precise version number #define SUBVERSION 8 // more precise version number
#define VERSIONSTRING "Development EXE" #define VERSIONSTRING "Development EXE"
#define VERSIONSTRINGW "v1.4.7" #define VERSIONSTRINGW "v1.4.8"
// most interface strings are ignored in development mode. // most interface strings are ignored in development mode.
// we use comprevision and compbranch instead. // we use comprevision and compbranch instead.
#else #else
#define VERSION 104 // Game version #define VERSION 104 // Game version
#define SUBVERSION 7 // more precise version number #define SUBVERSION 8 // more precise version number
#define VERSIONSTRING "DevEXE v1.4.7" #define VERSIONSTRING "DevEXE v1.4.8"
#define VERSIONSTRINGW L"v1.4.7" #define VERSIONSTRINGW L"v1.4.8"
// Hey! If you change this, add 1 to the MODVERSION below! // Hey! If you change this, add 1 to the MODVERSION below!
// Otherwise we can't force updates! // Otherwise we can't force updates!
#endif #endif
@ -239,13 +239,13 @@ typedef enum
SKINCOLOR_SALMON, SKINCOLOR_SALMON,
SKINCOLOR_PINK, SKINCOLOR_PINK,
SKINCOLOR_LIGHTRED, SKINCOLOR_LIGHTRED,
SKINCOLOR_FULLRANGERED, SKINCOLOR_SHINYRED,
SKINCOLOR_RED, SKINCOLOR_RED,
SKINCOLOR_DARKPINK, SKINCOLOR_DARKPINK,
SKINCOLOR_DARKRED, SKINCOLOR_DARKRED,
SKINCOLOR_DAWN, SKINCOLOR_DAWN,
SKINCOLOR_ORANGE, SKINCOLOR_ORANGE,
SKINCOLOR_FULLRANGEORANGE, SKINCOLOR_SHINYORANGE,
SKINCOLOR_DARKORANGE, SKINCOLOR_DARKORANGE,
SKINCOLOR_GOLDENBROWN, SKINCOLOR_GOLDENBROWN,
SKINCOLOR_ROSEWOOD, SKINCOLOR_ROSEWOOD,
@ -257,15 +257,15 @@ typedef enum
SKINCOLOR_YELLOW, SKINCOLOR_YELLOW,
SKINCOLOR_PEACH, SKINCOLOR_PEACH,
SKINCOLOR_LIGHTORANGE, SKINCOLOR_LIGHTORANGE,
SKINCOLOR_PEACHBROWN, SKINCOLOR_CARAMEL,
SKINCOLOR_GOLD, SKINCOLOR_GOLD,
SKINCOLOR_FULLRANGEPEACHBROWN, SKINCOLOR_SHINYCARAMEL,
SKINCOLOR_GYPSYVOMIT, SKINCOLOR_VOMIT,
SKINCOLOR_GARDEN, SKINCOLOR_GARDEN,
SKINCOLOR_LIGHTARMY, SKINCOLOR_LIGHTARMY,
SKINCOLOR_ARMY, SKINCOLOR_ARMY,
SKINCOLOR_PISTACHIO, SKINCOLOR_PISTACHIO,
SKINCOLOR_ROBOHOODGREEN, SKINCOLOR_ROBOHOOD,
SKINCOLOR_OLIVE, SKINCOLOR_OLIVE,
SKINCOLOR_DARKARMY, SKINCOLOR_DARKARMY,
SKINCOLOR_LIGHTGREEN, SKINCOLOR_LIGHTGREEN,
@ -273,9 +273,9 @@ typedef enum
SKINCOLOR_NEONGREEN, SKINCOLOR_NEONGREEN,
SKINCOLOR_GREEN, SKINCOLOR_GREEN,
SKINCOLOR_DARKGREEN, SKINCOLOR_DARKGREEN,
SKINCOLOR_DARKNEONGREEN, SKINCOLOR_SWAMP,
SKINCOLOR_FROST, SKINCOLOR_FROST,
SKINCOLOR_LIGHTSTEELBLUE, SKINCOLOR_SLATE,
SKINCOLOR_LIGHTBLUE, SKINCOLOR_LIGHTBLUE,
SKINCOLOR_CYAN, SKINCOLOR_CYAN,
SKINCOLOR_CERULEAN, SKINCOLOR_CERULEAN,
@ -283,8 +283,8 @@ typedef enum
SKINCOLOR_TEAL, SKINCOLOR_TEAL,
SKINCOLOR_STEELBLUE, SKINCOLOR_STEELBLUE,
SKINCOLOR_BLUE, SKINCOLOR_BLUE,
SKINCOLOR_FULLRANGEBLUE, SKINCOLOR_SHINYBLUE,
SKINCOLOR_DARKSTEELBLUE, SKINCOLOR_NAVY,
SKINCOLOR_DARKBLUE, SKINCOLOR_DARKBLUE,
SKINCOLOR_JETBLACK, SKINCOLOR_JETBLACK,
SKINCOLOR_LILAC, SKINCOLOR_LILAC,

View file

@ -645,7 +645,7 @@ void G_SetNightsRecords(void)
// Save demo! // Save demo!
bestdemo[255] = '\0'; bestdemo[255] = '\0';
lastdemo[255] = '\0'; lastdemo[255] = '\0';
G_SetDemoTime(totaltime, totalscore, 0); G_SetDemoTime(totaltime, totalscore);
G_CheckDemoStatus(); G_CheckDemoStatus();
I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755); I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755);
@ -2932,7 +2932,7 @@ static void G_DoCompleted(void)
// a map of the proper gametype -- skip levels that don't support // a map of the proper gametype -- skip levels that don't support
// the current gametype. (Helps avoid playing boss levels in Race, // the current gametype. (Helps avoid playing boss levels in Race,
// for instance). // for instance).
if (!token && !G_IsSpecialStage(gamemap) if (!token && !G_IsSpecialStage(gamemap) && !modeattacking
&& (nextmap >= 0 && nextmap < NUMMAPS)) && (nextmap >= 0 && nextmap < NUMMAPS))
{ {
register INT16 cm = nextmap; register INT16 cm = nextmap;
@ -3649,11 +3649,13 @@ void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar, b
SplitScreen_OnChange(); SplitScreen_OnChange();
} }
if (!color) if (!color && !modeattacking)
color = skins[pickedchar].prefcolor; color = skins[pickedchar].prefcolor;
SetPlayerSkinByNum(consoleplayer, pickedchar); SetPlayerSkinByNum(consoleplayer, pickedchar);
CV_StealthSet(&cv_skin, skins[pickedchar].name); CV_StealthSet(&cv_skin, skins[pickedchar].name);
CV_StealthSetValue(&cv_playercolor, color);
if (color)
CV_StealthSetValue(&cv_playercolor, color);
if (mapname) if (mapname)
D_MapChange(M_MapNumber(mapname[3], mapname[4]), gametype, pultmode, true, 1, false, FLS); D_MapChange(M_MapNumber(mapname[3], mapname[4]), gametype, pultmode, true, 1, false, FLS);
@ -3809,11 +3811,11 @@ char *G_BuildMapTitle(INT32 mapnum)
// DEMO RECORDING // DEMO RECORDING
// //
#define DEMOVERSION 0x0009 #define DEMOVERSION 0x0001
#define DEMOHEADER "\xF0" "SRB2Replay" "\x0F" #define DEMOHEADER "\xF0" "KartReplay" "\x0F"
#define DF_GHOST 0x01 // This demo contains ghost data too! #define DF_GHOST 0x01 // This demo contains ghost data too!
#define DF_RECORDATTACK 0x02 // This demo is from record attack and contains its final completion time, score, and rings! #define DF_RECORDATTACK 0x02 // This demo is from record attack and contains its final completion time!
#define DF_NIGHTSATTACK 0x04 // This demo is from NiGHTS attack and contains its time left, score, and mares! #define DF_NIGHTSATTACK 0x04 // This demo is from NiGHTS attack and contains its time left, score, and mares!
#define DF_ATTACKMASK 0x06 // This demo is from ??? attack and contains ??? #define DF_ATTACKMASK 0x06 // This demo is from ??? attack and contains ???
#define DF_ATTACKSHIFT 1 #define DF_ATTACKSHIFT 1
@ -4779,8 +4781,6 @@ void G_BeginRecording(void)
case ATTACKING_RECORD: // 1 case ATTACKING_RECORD: // 1
demotime_p = demo_p; demotime_p = demo_p;
WRITEUINT32(demo_p,UINT32_MAX); // time WRITEUINT32(demo_p,UINT32_MAX); // time
WRITEUINT32(demo_p,0); // score
WRITEUINT16(demo_p,0); // rings
break; break;
case ATTACKING_NIGHTS: // 2 case ATTACKING_NIGHTS: // 2
demotime_p = demo_p; demotime_p = demo_p;
@ -4824,8 +4824,8 @@ void G_BeginRecording(void)
WRITEUINT8(demo_p,player->mindash>>FRACBITS); WRITEUINT8(demo_p,player->mindash>>FRACBITS);
WRITEUINT8(demo_p,player->maxdash>>FRACBITS); WRITEUINT8(demo_p,player->maxdash>>FRACBITS);
// SRB2kart // SRB2kart
WRITEUINT8(demo_p,player->kartspeed>>FRACBITS); WRITEUINT8(demo_p,player->kartspeed);
WRITEUINT8(demo_p,player->kartweight>>FRACBITS); WRITEUINT8(demo_p,player->kartweight);
// //
WRITEUINT8(demo_p,player->normalspeed>>FRACBITS); WRITEUINT8(demo_p,player->normalspeed>>FRACBITS);
WRITEUINT8(demo_p,player->runspeed>>FRACBITS); WRITEUINT8(demo_p,player->runspeed>>FRACBITS);
@ -4887,15 +4887,13 @@ void G_BeginMetal(void)
oldmetal.angle = mo->angle; oldmetal.angle = mo->angle;
} }
void G_SetDemoTime(UINT32 ptime, UINT32 pscore, UINT16 prings) void G_SetDemoTime(UINT32 ptime, UINT32 pscore)
{ {
if (!demorecording || !demotime_p) if (!demorecording || !demotime_p)
return; return;
if (demoflags & DF_RECORDATTACK) if (demoflags & DF_RECORDATTACK)
{ {
WRITEUINT32(demotime_p, ptime); WRITEUINT32(demotime_p, ptime);
WRITEUINT32(demotime_p, pscore);
WRITEUINT16(demotime_p, prings);
demotime_p = NULL; demotime_p = NULL;
} }
else if (demoflags & DF_NIGHTSATTACK) else if (demoflags & DF_NIGHTSATTACK)
@ -4915,7 +4913,7 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
UINT8 *buffer,*p; UINT8 *buffer,*p;
UINT8 flags; UINT8 flags;
UINT32 oldtime, newtime, oldscore, newscore; UINT32 oldtime, newtime, oldscore, newscore;
UINT16 oldrings, newrings, oldversion; UINT16 oldversion;
size_t bufsize ATTRUNUSED; size_t bufsize ATTRUNUSED;
UINT8 c; UINT8 c;
UINT16 s ATTRUNUSED; UINT16 s ATTRUNUSED;
@ -4948,14 +4946,12 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
if (flags & DF_RECORDATTACK) if (flags & DF_RECORDATTACK)
{ {
newtime = READUINT32(p); newtime = READUINT32(p);
newscore = READUINT32(p); newscore = 0;
newrings = READUINT16(p);
} }
else if (flags & DF_NIGHTSATTACK) else if (flags & DF_NIGHTSATTACK)
{ {
newtime = READUINT32(p); newtime = READUINT32(p);
newscore = READUINT32(p); newscore = READUINT32(p);
newrings = 0;
} }
else // appease compiler else // appease compiler
return 0; return 0;
@ -4984,8 +4980,6 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
switch(oldversion) // demoversion switch(oldversion) // demoversion
{ {
case DEMOVERSION: // latest always supported case DEMOVERSION: // latest always supported
// compatibility available?
case 0x0008:
break; break;
// too old, cannot support. // too old, cannot support.
default: default:
@ -5000,10 +4994,7 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
Z_Free(buffer); Z_Free(buffer);
return UINT8_MAX; return UINT8_MAX;
} p += 4; // "PLAY" } p += 4; // "PLAY"
if (oldversion <= 0x0008) p += 2; // gamemap
p++; // gamemap
else
p += 2; // gamemap
p += 16; // mapmd5 p += 16; // mapmd5
flags = READUINT8(p); flags = READUINT8(p);
if (!(flags & aflags)) if (!(flags & aflags))
@ -5015,14 +5006,12 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
if (flags & DF_RECORDATTACK) if (flags & DF_RECORDATTACK)
{ {
oldtime = READUINT32(p); oldtime = READUINT32(p);
oldscore = READUINT32(p); oldscore = 0;
oldrings = READUINT16(p);
} }
else if (flags & DF_NIGHTSATTACK) else if (flags & DF_NIGHTSATTACK)
{ {
oldtime = READUINT32(p); oldtime = READUINT32(p);
oldscore = READUINT32(p); oldscore = READUINT32(p);
oldrings = 0;
} }
else // appease compiler else // appease compiler
return UINT8_MAX; return UINT8_MAX;
@ -5031,14 +5020,11 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
c = 0; c = 0;
if (newtime < oldtime if (newtime < oldtime
|| (newtime == oldtime && (newscore > oldscore || newrings > oldrings))) || (newtime == oldtime && (newscore > oldscore)))
c |= 1; // Better time c |= 1; // Better time
if (newscore > oldscore if (newscore > oldscore
|| (newscore == oldscore && newtime < oldtime)) || (newscore == oldscore && newtime < oldtime))
c |= 1<<1; // Better score c |= 1<<1; // Better score
if (newrings > oldrings
|| (newrings == oldrings && newtime < oldtime))
c |= 1<<2; // Better rings
return c; return c;
} }
@ -5060,9 +5046,9 @@ void G_DoPlayDemo(char *defdemoname)
UINT8 i; UINT8 i;
lumpnum_t l; lumpnum_t l;
char skin[17],color[17],*n,*pdemoname; char skin[17],color[17],*n,*pdemoname;
UINT8 version,subversion,charability,charability2,thrustfactor,accelstart,acceleration; UINT8 version,subversion,charability,charability2,kartspeed,kartweight,thrustfactor,accelstart,acceleration;
UINT32 randseed; UINT32 randseed;
fixed_t actionspd,mindash,maxdash,kartspeed,kartweight,normalspeed,runspeed,jumpfactor; fixed_t actionspd,mindash,maxdash,normalspeed,runspeed,jumpfactor;
char msg[1024]; char msg[1024];
skin[16] = '\0'; skin[16] = '\0';
@ -5124,8 +5110,6 @@ void G_DoPlayDemo(char *defdemoname)
switch(demoversion) switch(demoversion)
{ {
case DEMOVERSION: // latest always supported case DEMOVERSION: // latest always supported
// compatibility available?
case 0x0008:
break; break;
// too old, cannot support. // too old, cannot support.
default: default:
@ -5151,10 +5135,7 @@ void G_DoPlayDemo(char *defdemoname)
return; return;
} }
demo_p += 4; // "PLAY" demo_p += 4; // "PLAY"
if (demoversion <= 0x0008) gamemap = READINT16(demo_p);
gamemap = READUINT8(demo_p);
else
gamemap = READINT16(demo_p);
demo_p += 16; // mapmd5 demo_p += 16; // mapmd5
demoflags = READUINT8(demo_p); demoflags = READUINT8(demo_p);
@ -5163,7 +5144,6 @@ void G_DoPlayDemo(char *defdemoname)
hu_demoscore = 0; hu_demoscore = 0;
hu_demotime = UINT32_MAX; hu_demotime = UINT32_MAX;
hu_demorings = 0;
switch (modeattacking) switch (modeattacking)
{ {
@ -5171,8 +5151,6 @@ void G_DoPlayDemo(char *defdemoname)
break; break;
case ATTACKING_RECORD: // 1 case ATTACKING_RECORD: // 1
hu_demotime = READUINT32(demo_p); hu_demotime = READUINT32(demo_p);
hu_demoscore = READUINT32(demo_p);
hu_demorings = READUINT16(demo_p);
break; break;
case ATTACKING_NIGHTS: // 2 case ATTACKING_NIGHTS: // 2
hu_demotime = READUINT32(demo_p); hu_demotime = READUINT32(demo_p);
@ -5204,8 +5182,8 @@ void G_DoPlayDemo(char *defdemoname)
mindash = (fixed_t)READUINT8(demo_p)<<FRACBITS; mindash = (fixed_t)READUINT8(demo_p)<<FRACBITS;
maxdash = (fixed_t)READUINT8(demo_p)<<FRACBITS; maxdash = (fixed_t)READUINT8(demo_p)<<FRACBITS;
// SRB2kart // SRB2kart
kartspeed = READUINT8(demo_p)<<FRACBITS; kartspeed = READUINT8(demo_p);
kartweight = READUINT8(demo_p)<<FRACBITS; kartweight = READUINT8(demo_p);
// //
normalspeed = (fixed_t)READUINT8(demo_p)<<FRACBITS; normalspeed = (fixed_t)READUINT8(demo_p)<<FRACBITS;
runspeed = (fixed_t)READUINT8(demo_p)<<FRACBITS; runspeed = (fixed_t)READUINT8(demo_p)<<FRACBITS;
@ -5251,8 +5229,8 @@ void G_DoPlayDemo(char *defdemoname)
memset(playeringame,0,sizeof(playeringame)); memset(playeringame,0,sizeof(playeringame));
playeringame[0] = true; playeringame[0] = true;
P_SetRandSeed(randseed); P_SetRandSeed(randseed);
//G_InitNew(false, G_BuildMapName(gamemap), true, true); // resetplayer needs to be false to retain score //G_InitNew(false, G_BuildMapName(gamemap), false, true); // resetplayer needs to be false to retain score
G_InitNew(false, G_BuildMapName(gamemap), false, true); G_InitNew(false, G_BuildMapName(gamemap), true, true); // ...but uh, for demos? doing that makes them start in different positions depending on the last demo you watched
// Set skin // Set skin
SetPlayerSkin(0, skin); SetPlayerSkin(0, skin);
@ -5354,8 +5332,6 @@ void G_AddGhost(char *defdemoname)
switch(ghostversion) switch(ghostversion)
{ {
case DEMOVERSION: // latest always supported case DEMOVERSION: // latest always supported
// compatibility available?
case 0x0008:
break; break;
// too old, cannot support. // too old, cannot support.
default: default:
@ -5380,10 +5356,7 @@ void G_AddGhost(char *defdemoname)
Z_Free(buffer); Z_Free(buffer);
return; return;
} p += 4; // "PLAY" } p += 4; // "PLAY"
if (ghostversion <= 0x0008) p += 2; // gamemap
p++; // gamemap
else
p += 2; // gamemap
p += 16; // mapmd5 (possibly check for consistency?) p += 16; // mapmd5 (possibly check for consistency?)
flags = READUINT8(p); flags = READUINT8(p);
if (!(flags & DF_GHOST)) if (!(flags & DF_GHOST))
@ -5398,7 +5371,7 @@ void G_AddGhost(char *defdemoname)
case ATTACKING_NONE: // 0 case ATTACKING_NONE: // 0
break; break;
case ATTACKING_RECORD: // 1 case ATTACKING_RECORD: // 1
p += 10; // demo time, score, and rings p += 4; // demo time
break; break;
case ATTACKING_NIGHTS: // 2 case ATTACKING_NIGHTS: // 2
p += 8; // demo time left, score p += 8; // demo time left, score
@ -5584,8 +5557,6 @@ void G_DoPlayMetal(void)
switch(metalversion) switch(metalversion)
{ {
case DEMOVERSION: // latest always supported case DEMOVERSION: // latest always supported
// compatibility available?
case 0x0008:
break; break;
// too old, cannot support. // too old, cannot support.
default: default:

View file

@ -58,7 +58,7 @@ extern consvar_t cv_crosshair, cv_crosshair2;
extern consvar_t cv_invertmouse, cv_alwaysfreelook, cv_mousemove; extern consvar_t cv_invertmouse, cv_alwaysfreelook, cv_mousemove;
extern consvar_t cv_sideaxis,cv_turnaxis,cv_moveaxis,cv_lookaxis,cv_fireaxis,cv_firenaxis; extern consvar_t cv_sideaxis,cv_turnaxis,cv_moveaxis,cv_lookaxis,cv_fireaxis,cv_firenaxis;
extern consvar_t cv_sideaxis2,cv_turnaxis2,cv_moveaxis2,cv_lookaxis2,cv_fireaxis2,cv_firenaxis2; extern consvar_t cv_sideaxis2,cv_turnaxis2,cv_moveaxis2,cv_lookaxis2,cv_fireaxis2,cv_firenaxis2;
extern consvar_t cv_ghost_bestscore, cv_ghost_besttime, cv_ghost_bestrings, cv_ghost_last, cv_ghost_guest; extern consvar_t cv_ghost_bestscore, cv_ghost_besttime, cv_ghost_last, cv_ghost_guest, cv_ghost_staff; //cv_ghost_bestlap
// mouseaiming (looking up/down with the mouse or keyboard) // mouseaiming (looking up/down with the mouse or keyboard)
#define KB_LOOKSPEED (1<<25) #define KB_LOOKSPEED (1<<25)
@ -120,7 +120,7 @@ void G_BeginRecording(void);
void G_BeginMetal(void); void G_BeginMetal(void);
// Only called by shutdown code. // Only called by shutdown code.
void G_SetDemoTime(UINT32 ptime, UINT32 pscore, UINT16 prings); void G_SetDemoTime(UINT32 ptime, UINT32 pscore);
UINT8 G_CmpDemoTime(char *oldname, char *newname); UINT8 G_CmpDemoTime(char *oldname, char *newname);
typedef enum typedef enum
@ -158,6 +158,7 @@ void G_StopMetalDemo(void);
ATTRNORETURN void FUNCNORETURN G_StopMetalRecording(void); ATTRNORETURN void FUNCNORETURN G_StopMetalRecording(void);
void G_StopDemo(void); void G_StopDemo(void);
boolean G_CheckDemoStatus(void); boolean G_CheckDemoStatus(void);
char *G_DemoPlayerName(char *defdemoname);
boolean G_IsSpecialStage(INT32 mapnum); boolean G_IsSpecialStage(INT32 mapnum);
boolean G_GametypeUsesLives(void); boolean G_GametypeUsesLives(void);

View file

@ -1038,30 +1038,28 @@ static void HU_drawGametype(void)
// //
UINT32 hu_demoscore; UINT32 hu_demoscore;
UINT32 hu_demotime; UINT32 hu_demotime;
UINT16 hu_demorings;
static void HU_DrawDemoInfo(void) static void HU_DrawDemoInfo(void)
{ {
V_DrawString(4, 188-24, V_YELLOWMAP, va(M_GetText("%s's replay"), player_names[0])); UINT8 timeoffset = 8;
V_DrawString(4, 188-16, V_YELLOWMAP, va(M_GetText("%s's replay"), player_names[0]));
if (modeattacking) if (modeattacking)
{ {
V_DrawString(4, 188-16, V_YELLOWMAP|V_MONOSPACE, "SCORE:"); if (modeattacking == ATTACKING_NIGHTS)
V_DrawRightAlignedString(120, 188-16, V_MONOSPACE, va("%d", hu_demoscore)); {
V_DrawString(4, 188-8, V_YELLOWMAP|V_MONOSPACE, "SCORE:");
V_DrawRightAlignedString(120, 188-8, V_MONOSPACE, va("%d", hu_demoscore));
timeoffset = 0;
}
V_DrawString(4, 188- 8, V_YELLOWMAP|V_MONOSPACE, "TIME:"); V_DrawString(4, 188- timeoffset, V_YELLOWMAP|V_MONOSPACE, "TIME:");
if (hu_demotime != UINT32_MAX) if (hu_demotime != UINT32_MAX)
V_DrawRightAlignedString(120, 188- 8, V_MONOSPACE, va("%i:%02i.%02i", V_DrawRightAlignedString(120, 188- timeoffset, V_MONOSPACE, va("%i:%02i.%02i",
G_TicsToMinutes(hu_demotime,true), G_TicsToMinutes(hu_demotime,true),
G_TicsToSeconds(hu_demotime), G_TicsToSeconds(hu_demotime),
G_TicsToCentiseconds(hu_demotime))); G_TicsToCentiseconds(hu_demotime)));
else else
V_DrawRightAlignedString(120, 188- 8, V_MONOSPACE, "--:--.--"); V_DrawRightAlignedString(120, 188- timeoffset, V_MONOSPACE, "--:--.--");
if (modeattacking == ATTACKING_RECORD)
{
V_DrawString(4, 188 , V_YELLOWMAP|V_MONOSPACE, "RINGS:");
V_DrawRightAlignedString(120, 188 , V_MONOSPACE, va("%d", hu_demorings));
}
} }
} }

View file

@ -25,72 +25,73 @@
#define DEFAULT_STARTTRANSCOLOR 160 #define DEFAULT_STARTTRANSCOLOR 160
#define NUM_PALETTE_ENTRIES 256 #define NUM_PALETTE_ENTRIES 256
// These should be within 14 characters to fit on the character select screen
const char *KartColor_Names[MAXSKINCOLORS] = const char *KartColor_Names[MAXSKINCOLORS] =
{ {
"None", // 00 // SKINCOLOR_NONE "None", // 00 // SKINCOLOR_NONE
"Ivory", // 01 // SKINCOLOR_IVORY "Ivory", // 01 // SKINCOLOR_IVORY
"White", // 02 // SKINCOLOR_WHITE "White", // 02 // SKINCOLOR_WHITE
"Silver", // 03 // SKINCOLOR_SILVER "Silver", // 03 // SKINCOLOR_SILVER
"Cloudy", // 04 // SKINCOLOR_CLOUDY "Cloudy", // 04 // SKINCOLOR_CLOUDY
"Grey", // 05 // SKINCOLOR_GREY "Grey", // 05 // SKINCOLOR_GREY
"Dark Grey", // 06 // SKINCOLOR_DARKGREY "Dark Grey", // 06 // SKINCOLOR_DARKGREY
"Black", // 07 // SKINCOLOR_BLACK "Black", // 07 // SKINCOLOR_BLACK
"Salmon", // 08 // SKINCOLOR_SALMON "Salmon", // 08 // SKINCOLOR_SALMON
"Pink", // 09 // SKINCOLOR_PINK "Pink", // 09 // SKINCOLOR_PINK
"Light Red", // 10 // SKINCOLOR_LIGHTRED "Light Red", // 10 // SKINCOLOR_LIGHTRED
"Full-Range Red", // 11 // SKINCOLOR_FULLRANGERED "Shiny Red", // 11 // SKINCOLOR_SHINYRED
"Red", // 12 // SKINCOLOR_RED "Red", // 12 // SKINCOLOR_RED
"Dark Pink", // 13 // SKINCOLOR_DARKPINK "Dark Pink", // 13 // SKINCOLOR_DARKPINK
"Dark Red", // 14 // SKINCOLOR_DARKRED "Dark Red", // 14 // SKINCOLOR_DARKRED
"Dawn", // 15 // SKINCOLOR_DAWN "Dawn", // 15 // SKINCOLOR_DAWN
"Orange", // 16 // SKINCOLOR_ORANGE "Orange", // 16 // SKINCOLOR_ORANGE
"Full-Range Orange", // 17 // SKINCOLOR_FULLRANGEORANGE "Shiny Orange", // 17 // SKINCOLOR_SHINYORANGE
"Dark Orange", // 18 // SKINCOLOR_DARKORANGE "Dark Orange", // 18 // SKINCOLOR_DARKORANGE
"Golden Brown", // 19 // SKINCOLOR_GOLDENBROWN "Golden Brown", // 19 // SKINCOLOR_GOLDENBROWN
"Rosewood", // 20 // SKINCOLOR_ROSEWOOD "Rosewood", // 20 // SKINCOLOR_ROSEWOOD
"Dark Rosewood", // 21 // SKINCOLOR_DARKROSEWOOD "Dark Rosewood", // 21 // SKINCOLOR_DARKROSEWOOD
"Sepia", // 22 // SKINCOLOR_SEPIA "Sepia", // 22 // SKINCOLOR_SEPIA
"Beige", // 23 // SKINCOLOR_BEIGE "Beige", // 23 // SKINCOLOR_BEIGE
"Brown", // 24 // SKINCOLOR_BROWN "Brown", // 24 // SKINCOLOR_BROWN
"Leather", // 25 // SKINCOLOR_LEATHER "Leather", // 25 // SKINCOLOR_LEATHER
"Yellow", // 26 // SKINCOLOR_YELLOW "Yellow", // 26 // SKINCOLOR_YELLOW
"Peach", // 27 // SKINCOLOR_PEACH "Peach", // 27 // SKINCOLOR_PEACH
"Light Orange", // 28 // SKINCOLOR_LIGHTORANGE "Light Orange", // 28 // SKINCOLOR_LIGHTORANGE
"Peach-Brown", // 29 // SKINCOLOR_PEACHBROWN "Caramel", // 29 // SKINCOLOR_CARAMEL
"Gold", // 30 // SKINCOLOR_GOLD "Gold", // 30 // SKINCOLOR_GOLD
"Full-Range Peach-Brown", // 31 // SKINCOLOR_FULLRANGEPEACHBROWN "Shiny Caramel", // 31 // SKINCOLOR_SHINYCARAMEL
"Gypsy Vomit", // 32 // SKINCOLOR_GYPSYVOMIT "Vomit", // 32 // SKINCOLOR_VOMIT
"Garden", // 33 // SKINCOLOR_GARDEN "Garden", // 33 // SKINCOLOR_GARDEN
"Light Army", // 34 // SKINCOLOR_LIGHTARMY "Light Army", // 34 // SKINCOLOR_LIGHTARMY
"Army", // 35 // SKINCOLOR_ARMY "Army", // 35 // SKINCOLOR_ARMY
"Pistachio", // 36 // SKINCOLOR_PISTACHIO "Pistachio", // 36 // SKINCOLOR_PISTACHIO
"Robo-Hood Green", // 37 // SKINCOLOR_ROBOHOODGREEN "Robo-Hood", // 37 // SKINCOLOR_ROBOHOOD
"Olive", // 38 // SKINCOLOR_OLIVE "Olive", // 38 // SKINCOLOR_OLIVE
"Dark Army", // 39 // SKINCOLOR_DARKARMY "Dark Army", // 39 // SKINCOLOR_DARKARMY
"Light Green", // 40 // SKINCOLOR_LIGHTGREEN "Light Green", // 40 // SKINCOLOR_LIGHTGREEN
"Ugly Green", // 41 // SKINCOLOR_UGLYGREEN "Ugly Green", // 41 // SKINCOLOR_UGLYGREEN
"Neon Green", // 42 // SKINCOLOR_NEONGREEN "Neon Green", // 42 // SKINCOLOR_NEONGREEN
"Green", // 43 // SKINCOLOR_GREEN "Green", // 43 // SKINCOLOR_GREEN
"Dark Green", // 44 // SKINCOLOR_DARKGREEN "Dark Green", // 44 // SKINCOLOR_DARKGREEN
"Dark Neon Green", // 45 // SKINCOLOR_DARKNEONGREEN "Swamp", // 45 // SKINCOLOR_SWAMP
"Frost", // 46 // SKINCOLOR_FROST "Frost", // 46 // SKINCOLOR_FROST
"Light Steel Blue", // 47 // SKINCOLOR_LIGHTSTEELBLUE "Slate", // 47 // SKINCOLOR_SLATEBLUE
"Light Blue", // 48 // SKINCOLOR_LIGHTBLUE "Light Blue", // 48 // SKINCOLOR_LIGHTBLUE
"Cyan", // 49 // SKINCOLOR_CYAN "Cyan", // 49 // SKINCOLOR_CYAN
"Cerulean", // 50 // SKINCOLOR_CERULEAN "Cerulean", // 50 // SKINCOLOR_CERULEAN
"Turquoise", // 51 // SKINCOLOR_TURQUOISE "Turquoise", // 51 // SKINCOLOR_TURQUOISE
"Teal", // 52 // SKINCOLOR_TEAL "Teal", // 52 // SKINCOLOR_TEAL
"Steel Blue", // 53 // SKINCOLOR_STEELBLUE "Steel Blue", // 53 // SKINCOLOR_STEELBLUE
"Blue", // 54 // SKINCOLOR_BLUE "Blue", // 54 // SKINCOLOR_BLUE
"Full-Range Blue", // 55 // SKINCOLOR_FULLRANGEBLUE "Shiny Blue", // 55 // SKINCOLOR_SHINYBLUE
"Dark Steel Blue", // 56 // SKINCOLOR_DARKSTEELBLUE "Navy", // 56 // SKINCOLOR_NAVY
"Dark Blue", // 57 // SKINCOLOR_DARKBLUE "Dark Blue", // 57 // SKINCOLOR_DARKBLUE
"Jet Black", // 58 // SKINCOLOR_JETBLACK "Jet Black", // 58 // SKINCOLOR_JETBLACK
"Lilac", // 59 // SKINCOLOR_LILAC "Lilac", // 59 // SKINCOLOR_LILAC
"Purple", // 60 // SKINCOLOR_PURPLE "Purple", // 60 // SKINCOLOR_PURPLE
"Lavender", // 61 // SKINCOLOR_LAVENDER "Lavender", // 61 // SKINCOLOR_LAVENDER
"Byzantium", // 62 // SKINCOLOR_BYZANTIUM "Byzantium", // 62 // SKINCOLOR_BYZANTIUM
"Indigo" // 63 // SKINCOLOR_INDIGO "Indigo" // 63 // SKINCOLOR_INDIGO
}; };
/** \brief Generates a simple case table for given values. Not very optimal, but makes it easy to read in K_GenerateKartColormap. /** \brief Generates a simple case table for given values. Not very optimal, but makes it easy to read in K_GenerateKartColormap.
@ -175,69 +176,69 @@ void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color)
for (i = 0; i < SKIN_RAMP_LENGTH; i++) for (i = 0; i < SKIN_RAMP_LENGTH; i++)
switch (color) switch (color)
{ {
case SKINCOLOR_IVORY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 120, 120, 120, 0, 0, 0, 0, 1, 1, 2, 2, 4, 6, 8, 10); break; case SKINCOLOR_IVORY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 120, 120, 120, 0, 0, 0, 0, 1, 1, 2, 2, 4, 6, 8, 10); break;
case SKINCOLOR_WHITE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7); break; case SKINCOLOR_WHITE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7); break;
case SKINCOLOR_SILVER: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); break; case SKINCOLOR_SILVER: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); break;
case SKINCOLOR_CLOUDY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31); break; case SKINCOLOR_CLOUDY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31); break;
case SKINCOLOR_GREY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23); break; case SKINCOLOR_GREY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23); break;
case SKINCOLOR_DARKGREY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31); break; case SKINCOLOR_DARKGREY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31); break;
case SKINCOLOR_BLACK: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31); break; case SKINCOLOR_BLACK: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31); break;
case SKINCOLOR_SALMON: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 120, 121, 121, 122, 122, 123, 123, 124, 124, 125, 125, 126, 126, 127, 127); break; case SKINCOLOR_SALMON: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 120, 121, 121, 122, 122, 123, 123, 124, 124, 125, 125, 126, 126, 127, 127); break;
case SKINCOLOR_PINK: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 144, 144, 145, 145, 146, 146, 147, 147, 148, 148, 149, 149, 150, 150, 151, 151); break; case SKINCOLOR_PINK: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 144, 144, 145, 145, 146, 146, 147, 147, 148, 148, 149, 149, 150, 150, 151, 151); break;
case SKINCOLOR_LIGHTRED: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135); break; case SKINCOLOR_LIGHTRED: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135); break;
case SKINCOLOR_FULLRANGERED: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 121, 123, 124, 126, 127, 129, 130, 132, 133, 135, 136, 138, 139, 141, 143); break; case SKINCOLOR_SHINYRED: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 121, 123, 124, 126, 127, 129, 130, 132, 133, 135, 136, 138, 139, 141, 143); break;
case SKINCOLOR_RED: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140); break; case SKINCOLOR_RED: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140); break;
case SKINCOLOR_DARKPINK: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 144, 145, 146, 147, 148, 149, 150, 151, 134, 135, 136, 137, 138, 139, 140, 141); break; case SKINCOLOR_DARKPINK: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 144, 145, 146, 147, 148, 149, 150, 151, 134, 135, 136, 137, 138, 139, 140, 141); break;
case SKINCOLOR_DARKRED: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 136, 136, 137, 137, 138, 138, 139, 139, 140, 140, 141, 141, 142, 142, 143, 143); break; case SKINCOLOR_DARKRED: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 136, 136, 137, 137, 138, 138, 139, 139, 140, 140, 141, 141, 142, 142, 143, 143); break;
case SKINCOLOR_DAWN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 121, 122, 123, 124, 147, 88, 89, 149, 91, 92, 151, 94, 95, 152, 153); break; case SKINCOLOR_DAWN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 121, 122, 123, 124, 147, 88, 89, 149, 91, 92, 151, 94, 95, 152, 153); break;
case SKINCOLOR_ORANGE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95); break; case SKINCOLOR_ORANGE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95); break;
case SKINCOLOR_FULLRANGEORANGE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 80, 81, 83, 85, 86, 88, 90, 91, 93, 95, 152, 153, 154, 156, 157, 159); break; case SKINCOLOR_SHINYORANGE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 80, 81, 83, 85, 86, 88, 90, 91, 93, 95, 152, 153, 154, 156, 157, 159); break;
case SKINCOLOR_DARKORANGE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 88, 89, 90, 91, 92, 93, 94, 95, 152, 153, 154, 155, 156, 157, 158, 159); break; case SKINCOLOR_DARKORANGE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 88, 89, 90, 91, 92, 93, 94, 95, 152, 153, 154, 155, 156, 157, 158, 159); break;
case SKINCOLOR_GOLDENBROWN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 112, 113, 114, 115, 116, 117, 118, 119, 156, 156, 157, 157, 158, 158, 159, 159); break; case SKINCOLOR_GOLDENBROWN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 112, 113, 114, 115, 116, 117, 118, 119, 156, 156, 157, 157, 158, 158, 159, 159); break;
case SKINCOLOR_ROSEWOOD: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 152, 152, 153, 153, 154, 154, 155, 155, 156, 156, 157, 157, 158, 158, 159, 159); break; case SKINCOLOR_ROSEWOOD: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 152, 152, 153, 153, 154, 154, 155, 155, 156, 156, 157, 157, 158, 158, 159, 159); break;
case SKINCOLOR_DARKROSEWOOD: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 152, 153, 154, 155, 156, 157, 158, 159, 139, 140, 141, 142, 143, 31, 31, 31); break; case SKINCOLOR_DARKROSEWOOD: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 152, 153, 154, 155, 156, 157, 158, 159, 139, 140, 141, 142, 143, 31, 31, 31); break;
case SKINCOLOR_SEPIA: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 3, 5, 7, 32, 9, 34, 36, 37, 39, 42, 45, 59, 60, 61, 62, 63); break; case SKINCOLOR_SEPIA: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 3, 5, 7, 32, 9, 34, 36, 37, 39, 42, 45, 59, 60, 61, 62, 63); break;
case SKINCOLOR_BEIGE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47); break; case SKINCOLOR_BEIGE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47); break;
case SKINCOLOR_BROWN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63); break; case SKINCOLOR_BROWN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63); break;
case SKINCOLOR_LEATHER: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 57, 58, 59, 59, 60, 60, 61, 61, 62, 62, 63, 63, 28, 29, 30, 31); break; case SKINCOLOR_LEATHER: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 57, 58, 59, 59, 60, 60, 61, 61, 62, 62, 63, 63, 28, 29, 30, 31); break;
case SKINCOLOR_YELLOW: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 97, 98, 99, 100, 101, 102, 103, 104, 113, 113, 114, 115, 115, 115, 116, 117); break; case SKINCOLOR_YELLOW: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 97, 98, 99, 100, 101, 102, 103, 104, 113, 113, 114, 115, 115, 115, 116, 117); break;
case SKINCOLOR_PEACH: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79); break; case SKINCOLOR_PEACH: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79); break;
case SKINCOLOR_LIGHTORANGE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 80, 80, 81, 81, 82, 82, 83, 83, 84, 84, 85, 85, 86, 86, 87, 87); break; case SKINCOLOR_LIGHTORANGE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 80, 80, 81, 81, 82, 82, 83, 83, 84, 84, 85, 85, 86, 86, 87, 87); break;
case SKINCOLOR_PEACHBROWN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 72, 73, 74, 75, 76, 77, 78, 79, 48, 49, 50, 51, 52, 53, 54, 55); break; case SKINCOLOR_CARAMEL: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 72, 73, 74, 75, 76, 77, 78, 79, 48, 49, 50, 51, 52, 53, 54, 55); break;
case SKINCOLOR_GOLD: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 112, 112, 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, 118, 119, 119); break; case SKINCOLOR_GOLD: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 112, 112, 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, 118, 119, 119); break;
case SKINCOLOR_FULLRANGEPEACHBROWN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 64, 66, 68, 70, 72, 74, 76, 78, 48, 50, 52, 54, 56, 58, 60, 62); break; case SKINCOLOR_SHINYCARAMEL: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 64, 66, 68, 70, 72, 74, 76, 78, 48, 50, 52, 54, 56, 58, 60, 62); break;
case SKINCOLOR_GYPSYVOMIT: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 121, 144, 145, 72, 73, 84, 114, 115, 107, 108, 109, 183, 223, 207, 30, 246); break; case SKINCOLOR_VOMIT: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 121, 144, 145, 72, 73, 84, 114, 115, 107, 108, 109, 183, 223, 207, 30, 246); break;
case SKINCOLOR_GARDEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 98, 99, 112, 101, 113, 114, 106, 179, 180, 181, 182, 172, 183, 173, 174, 175); break; case SKINCOLOR_GARDEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 98, 99, 112, 101, 113, 114, 106, 179, 180, 181, 182, 172, 183, 173, 174, 175); break;
case SKINCOLOR_LIGHTARMY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 176, 176, 176, 176, 177, 177, 177, 177, 178, 178, 178, 178, 179, 179, 179, 179); break; case SKINCOLOR_LIGHTARMY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 176, 176, 176, 176, 177, 177, 177, 177, 178, 178, 178, 178, 179, 179, 179, 179); break;
case SKINCOLOR_ARMY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 176, 176, 177, 177, 178, 178, 179, 179, 180, 180, 181, 181, 182, 182, 183, 183); break; case SKINCOLOR_ARMY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 176, 176, 177, 177, 178, 178, 179, 179, 180, 180, 181, 181, 182, 182, 183, 183); break;
case SKINCOLOR_PISTACHIO: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 176, 176, 177, 177, 178, 178, 179, 179, 166, 167, 168, 169, 170, 171, 172, 173); break; case SKINCOLOR_PISTACHIO: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 176, 176, 177, 177, 178, 178, 179, 179, 166, 167, 168, 169, 170, 171, 172, 173); break;
case SKINCOLOR_ROBOHOODGREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 177, 177, 178, 178, 165, 165, 167, 167, 182, 182, 171, 171, 183, 183, 173, 173); break; case SKINCOLOR_ROBOHOOD: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 177, 177, 178, 178, 165, 165, 167, 167, 182, 182, 171, 171, 183, 183, 173, 173); break;
case SKINCOLOR_OLIVE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 105, 105, 106, 106, 107, 107, 108, 108, 109, 109, 110, 110, 111, 111, 31, 31); break; case SKINCOLOR_OLIVE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 105, 105, 106, 106, 107, 107, 108, 108, 109, 109, 110, 110, 111, 111, 31, 31); break;
case SKINCOLOR_DARKARMY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 176, 177, 178, 179, 170, 181, 182, 183, 173, 173, 174, 174, 175, 175, 31, 31); break; case SKINCOLOR_DARKARMY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 176, 177, 178, 179, 170, 181, 182, 183, 173, 173, 174, 174, 175, 175, 31, 31); break;
case SKINCOLOR_LIGHTGREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 160, 160, 161, 161, 162, 162, 163, 163, 164, 164, 165, 165, 166, 166, 167, 167); break; case SKINCOLOR_LIGHTGREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 160, 160, 161, 161, 162, 162, 163, 163, 164, 164, 165, 165, 166, 166, 167, 167); break;
case SKINCOLOR_UGLYGREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 184, 184, 184, 184, 185, 185, 185, 185, 186, 186, 186, 186, 187, 187, 187, 187); break; case SKINCOLOR_UGLYGREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 184, 184, 184, 184, 185, 185, 185, 185, 186, 186, 186, 186, 187, 187, 187, 187); break;
case SKINCOLOR_NEONGREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 184, 184, 185, 185, 186, 186, 187, 187, 188, 188, 189, 189, 190, 190, 191, 191); break; case SKINCOLOR_NEONGREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 184, 184, 185, 185, 186, 186, 187, 187, 188, 188, 189, 189, 190, 190, 191, 191); break;
case SKINCOLOR_GREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175); break; case SKINCOLOR_GREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175); break;
case SKINCOLOR_DARKGREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 168, 168, 169, 169, 170, 170, 171, 171, 172, 172, 173, 173, 174, 174, 175, 175); break; case SKINCOLOR_DARKGREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 168, 168, 169, 169, 170, 170, 171, 171, 172, 172, 173, 173, 174, 174, 175, 175); break;
case SKINCOLOR_DARKNEONGREEN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 187, 187, 188, 188, 189, 189, 190, 190, 191, 191, 175, 175, 30, 30, 31, 31); break; case SKINCOLOR_SWAMP: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 187, 187, 188, 188, 189, 189, 190, 190, 191, 191, 175, 175, 30, 30, 31, 31); break;
case SKINCOLOR_FROST: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 224, 225, 226, 212, 213, 213, 214, 215, 220, 221, 172, 222, 173, 223, 174, 175); break; case SKINCOLOR_FROST: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 224, 225, 226, 212, 213, 213, 214, 215, 220, 221, 172, 222, 173, 223, 174, 175); break;
case SKINCOLOR_LIGHTSTEELBLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 200, 200, 200, 200, 201, 201, 201, 201, 202, 202, 202, 202, 203, 203, 203, 203); break; case SKINCOLOR_SLATE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 200, 200, 200, 200, 201, 201, 201, 201, 202, 202, 202, 202, 203, 203, 203, 203); break;
case SKINCOLOR_LIGHTBLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 224, 224, 225, 225, 226, 226, 227, 227, 228, 228, 229, 229, 230, 230, 231, 231); break; case SKINCOLOR_LIGHTBLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 224, 224, 225, 225, 226, 226, 227, 227, 228, 228, 229, 229, 230, 230, 231, 231); break;
case SKINCOLOR_CYAN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 208, 208, 209, 210, 210, 211, 212, 213, 213, 214, 215, 216, 216, 217, 218, 219); break; case SKINCOLOR_CYAN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 208, 208, 209, 210, 210, 211, 212, 213, 213, 214, 215, 216, 216, 217, 218, 219); break;
case SKINCOLOR_CERULEAN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 216, 216, 216, 216, 217, 217, 217, 217, 218, 218, 218, 218, 219, 219, 219, 219); break; case SKINCOLOR_CERULEAN: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 216, 216, 216, 216, 217, 217, 217, 217, 218, 218, 218, 218, 219, 219, 219, 219); break;
case SKINCOLOR_TURQUOISE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 208, 208, 209, 210, 210, 211, 212, 213, 213, 214, 215, 220, 220, 221, 222, 223); break; case SKINCOLOR_TURQUOISE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 208, 208, 209, 210, 210, 211, 212, 213, 213, 214, 215, 220, 220, 221, 222, 223); break;
case SKINCOLOR_TEAL: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 220, 220, 220, 220, 221, 221, 221, 221, 222, 222, 222, 222, 223, 223, 223, 223); break; case SKINCOLOR_TEAL: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 220, 220, 220, 220, 221, 221, 221, 221, 222, 222, 222, 222, 223, 223, 223, 223); break;
case SKINCOLOR_STEELBLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 200, 200, 201, 201, 202, 202, 203, 203, 204, 204, 205, 205, 206, 206, 207, 207); break; case SKINCOLOR_STEELBLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 200, 200, 201, 201, 202, 202, 203, 203, 204, 204, 205, 205, 206, 206, 207, 207); break;
case SKINCOLOR_BLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239); break; case SKINCOLOR_BLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239); break;
case SKINCOLOR_FULLRANGEBLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 224, 225, 226, 228, 229, 231, 232, 234, 235, 237, 238, 240, 241, 243, 244, 246); break; case SKINCOLOR_SHINYBLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 224, 225, 226, 228, 229, 231, 232, 234, 235, 237, 238, 240, 241, 243, 244, 246); break;
case SKINCOLOR_DARKSTEELBLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 200, 201, 202, 203, 204, 205, 206, 238, 239, 240, 241, 242, 243, 244, 245, 246); break; case SKINCOLOR_NAVY: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 200, 201, 202, 203, 204, 205, 206, 238, 239, 240, 241, 242, 243, 244, 245, 246); break;
case SKINCOLOR_DARKBLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246); break; case SKINCOLOR_DARKBLUE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246); break;
case SKINCOLOR_JETBLACK: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 200, 201, 202, 203, 204, 205, 206, 207, 28, 28, 29, 29, 30, 30, 31, 31); break; case SKINCOLOR_JETBLACK: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 200, 201, 202, 203, 204, 205, 206, 207, 28, 28, 29, 29, 30, 30, 31, 31); break;
case SKINCOLOR_LILAC: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 120, 121, 121, 122, 122, 123, 123, 192, 192, 248, 248, 249, 249, 250, 250); break; case SKINCOLOR_LILAC: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 120, 120, 121, 121, 122, 122, 123, 123, 192, 192, 248, 248, 249, 249, 250, 250); break;
case SKINCOLOR_PURPLE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 192, 192, 193, 193, 194, 194, 195, 195, 196, 196, 197, 197, 198, 198, 199, 199); break; case SKINCOLOR_PURPLE: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 192, 192, 193, 193, 194, 194, 195, 195, 196, 196, 197, 197, 198, 198, 199, 199); break;
case SKINCOLOR_LAVENDER: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 248, 248, 249, 249, 250, 250, 251, 251, 252, 252, 253, 253, 254, 254, 255, 255); break; case SKINCOLOR_LAVENDER: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 248, 248, 249, 249, 250, 250, 251, 251, 252, 252, 253, 253, 254, 254, 255, 255); break;
case SKINCOLOR_BYZANTIUM: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 192, 248, 249, 250, 251, 252, 253, 254, 255, 255, 29, 29, 30, 30, 31, 31); break; case SKINCOLOR_BYZANTIUM: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 192, 248, 249, 250, 251, 252, 253, 254, 255, 255, 29, 29, 30, 30, 31, 31); break;
case SKINCOLOR_INDIGO: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 192, 193, 194, 195, 196, 197, 198, 199, 255, 255, 29, 29, 30, 30, 31, 31); break; case SKINCOLOR_INDIGO: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 192, 193, 194, 195, 196, 197, 198, 199, 255, 255, 29, 29, 30, 30, 31, 31); break;
/* /*
* Removed Colors: * Removed Colors:
* case SKINCOLOR_DUSK: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 192, 192, 248, 249, 250, 251, 229, 204, 230, 205, 206, 239, 240, 241, 242, 243); break; * case SKINCOLOR_DUSK: dest_colormap[starttranscolor + i] = R_KartColorSetter(i, 192, 192, 248, 249, 250, 251, 229, 204, 230, 205, 206, 239, 240, 241, 242, 243); break;
@ -4031,7 +4032,7 @@ void K_drawKartHUD(void)
// If not splitscreen, draw... // If not splitscreen, draw...
// The little triple-item icons at the bottom // The little triple-item icons at the bottom
// The top-four faces on the left // The top-four faces on the left
if (!splitscreen) if (!(splitscreen || modeattacking))
{ {
//K_DrawKartTripleItem(); //K_DrawKartTripleItem();
K_drawKartPositionFaces(); K_drawKartPositionFaces();
@ -4048,7 +4049,8 @@ void K_drawKartHUD(void)
V_DrawKartString(LAPS_X+33, STRINGY(LAPS_Y+3), 0, va("%d/%d", stplyr->laps+1, cv_numlaps.value)); V_DrawKartString(LAPS_X+33, STRINGY(LAPS_Y+3), 0, va("%d/%d", stplyr->laps+1, cv_numlaps.value));
// Draw the numerical position // Draw the numerical position
K_DrawKartPositionNum(stplyr->kartstuff[k_position]); if (!modeattacking)
K_DrawKartPositionNum(stplyr->kartstuff[k_position]);
// Draw the speedometer // Draw the speedometer
// TODO: Make a better speedometer. // TODO: Make a better speedometer.

View file

@ -574,8 +574,8 @@ extraemblem_t extraemblems[MAXEXTRAEMBLEMS] =
unlockable_t unlockables[MAXUNLOCKABLES] = unlockable_t unlockables[MAXUNLOCKABLES] =
{ {
// Name, Objective, Menu Height, ConditionSet, Unlock Type, Variable, NoCecho, NoChecklist // Name, Objective, Menu Height, ConditionSet, Unlock Type, Variable, NoCecho, NoChecklist
/* 01 */ {"Record Attack", "Complete Greenflower Zone, Act 1", 0, 1, SECRET_RECORDATTACK, 0, true, true, 0}, /* 01 */ {"Record Attack", "Complete Greenflower Zone, Act 1", 0, -1, SECRET_RECORDATTACK, 0, true, true, 0},
/* 02 */ {"NiGHTS Mode", "Complete Floral Field", 0, 2, SECRET_NIGHTSMODE, 0, true, true, 0}, /* 02 */ {"NiGHTS Mode", "Complete Floral Field", 0, -1, SECRET_NIGHTSMODE, 0, true, true, 0},
/* 03 */ {"Play Credits", "Complete 1P Mode", 30, 10, SECRET_CREDITS, 0, true, true, 0}, /* 03 */ {"Play Credits", "Complete 1P Mode", 30, 10, SECRET_CREDITS, 0, true, true, 0},
/* 04 */ {"Sound Test", "Complete 1P Mode", 40, 10, SECRET_SOUNDTEST, 0, false, false, 0}, /* 04 */ {"Sound Test", "Complete 1P Mode", 40, 10, SECRET_SOUNDTEST, 0, false, false, 0},

View file

@ -111,10 +111,10 @@ const char *quitmsg[NUM_QUITMESSAGES];
// Stuff for customizing the player select screen Tails 09-22-2003 // Stuff for customizing the player select screen Tails 09-22-2003
description_t description[32] = description_t description[32] =
{ {
{"\x82Sonic\x80 is the fastest of the three, but also the hardest to control. Beginners beware, but experts will find Sonic very powerful.\n\n\x82""Ability:\x80 Speed Thok\nDouble jump to zoom forward with a huge burst of speed.\n\n\x82Tip:\x80 Simply letting go of forward does not slow down in SRB2. To slow down, hold the opposite direction.", "", "sonic"}, {"\x82Sonic\x80\n\x82Speed:\x80 6\n\x82Weight:\x80 4", "", "sonic"},
{"\x82Tails\x80 is the most mobile of the three, but has the slowest speed. Because of his mobility, he's well-\nsuited to beginners.\n\n\x82""Ability:\x80 Fly\nDouble jump to start flying for a limited time. Repetitively hit the jump button to ascend.\n\n\x82Tip:\x80 To quickly descend while flying, hit the spin button.", "", "tails"}, {"???", "", ""},
{"\x82Knuckles\x80 is well-\nrounded and can destroy breakable walls simply by touching them, but he can't jump as high as the other two.\n\n\x82""Ability:\x80 Glide & Climb\nDouble jump to glide in the air as long as jump is held. Glide into a wall to climb it.\n\n\x82Tip:\x80 Press spin while climbing to jump off the wall; press jump instead to jump off\nand face away from\nthe wall.", "", "knuckles"}, {"???", "", ""},
{"\x82Sonic & Tails\x80 team up to take on Dr. Eggman!\nControl Sonic while Tails desperately struggles to keep up.\n\nPlayer 2 can control Tails directly by setting the controls in the options menu.\nTails's directional controls are relative to Player 1's camera.\n\nTails can pick up Sonic while flying and carry him around.", "CHRS&T", "sonic&tails"}, {"???", "", ""},
{"???", "", ""}, {"???", "", ""},
{"???", "", ""}, {"???", "", ""},
{"???", "", ""}, {"???", "", ""},
@ -240,6 +240,7 @@ static void M_LoadGame(INT32 choice);
static void M_TimeAttack(INT32 choice); static void M_TimeAttack(INT32 choice);
static void M_NightsAttack(INT32 choice); static void M_NightsAttack(INT32 choice);
static void M_Statistics(INT32 choice); static void M_Statistics(INT32 choice);
static void M_HandleStaffReplay(INT32 choice);
static void M_ReplayTimeAttack(INT32 choice); static void M_ReplayTimeAttack(INT32 choice);
static void M_ChooseTimeAttack(INT32 choice); static void M_ChooseTimeAttack(INT32 choice);
static void M_ChooseNightsAttack(INT32 choice); static void M_ChooseNightsAttack(INT32 choice);
@ -355,6 +356,7 @@ static void M_HandleVideoMode(INT32 choice);
static void Nextmap_OnChange(void); static void Nextmap_OnChange(void);
static void Newgametype_OnChange(void); static void Newgametype_OnChange(void);
static void Dummymares_OnChange(void); static void Dummymares_OnChange(void);
static void Dummystaff_OnChange(void);
// ========================================================================== // ==========================================================================
// CONSOLE VARIABLES AND THEIR POSSIBLE VALUES GO HERE. // CONSOLE VARIABLES AND THEIR POSSIBLE VALUES GO HERE.
@ -410,11 +412,12 @@ static consvar_t cv_autorecord = {"autorecord", "Yes", 0, CV_YesNo, NULL, 0, NUL
CV_PossibleValue_t ghost_cons_t[] = {{0, "Hide"}, {1, "Show"}, {2, "Show All"}, {0, NULL}}; CV_PossibleValue_t ghost_cons_t[] = {{0, "Hide"}, {1, "Show"}, {2, "Show All"}, {0, NULL}};
CV_PossibleValue_t ghost2_cons_t[] = {{0, "Hide"}, {1, "Show"}, {0, NULL}}; CV_PossibleValue_t ghost2_cons_t[] = {{0, "Hide"}, {1, "Show"}, {0, NULL}};
consvar_t cv_ghost_bestscore = {"ghost_bestscore", "Show", CV_SAVE, ghost_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_ghost_bestscore = {"ghost_bestscore", "Show All", CV_SAVE, ghost_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ghost_besttime = {"ghost_besttime", "Show", CV_SAVE, ghost_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_ghost_besttime = {"ghost_besttime", "Show All", CV_SAVE, ghost_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ghost_bestrings = {"ghost_bestrings", "Show", CV_SAVE, ghost_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; //consvar_t cv_ghost_bestlap = {"ghost_bestlap", "Show All", CV_SAVE, ghost_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ghost_last = {"ghost_last", "Show", CV_SAVE, ghost_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_ghost_last = {"ghost_last", "Show All", CV_SAVE, ghost_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ghost_guest = {"ghost_guest", "Show", CV_SAVE, ghost2_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_ghost_guest = {"ghost_guest", "Show", CV_SAVE, ghost2_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ghost_staff = {"ghost_staff", "Show", CV_SAVE, ghost2_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
//Console variables used solely in the menu system. //Console variables used solely in the menu system.
//todo: add a way to use non-console variables in the menu //todo: add a way to use non-console variables in the menu
@ -426,6 +429,7 @@ static CV_PossibleValue_t liveslimit_cons_t[] = {{0, "MIN"}, {99, "MAX"}, {0, NU
static CV_PossibleValue_t dummymares_cons_t[] = { static CV_PossibleValue_t dummymares_cons_t[] = {
{-1, "END"}, {0,"Overall"}, {1,"Mare 1"}, {2,"Mare 2"}, {3,"Mare 3"}, {4,"Mare 4"}, {5,"Mare 5"}, {6,"Mare 6"}, {7,"Mare 7"}, {8,"Mare 8"}, {0,NULL} {-1, "END"}, {0,"Overall"}, {1,"Mare 1"}, {2,"Mare 2"}, {3,"Mare 3"}, {4,"Mare 4"}, {5,"Mare 5"}, {6,"Mare 6"}, {7,"Mare 7"}, {8,"Mare 8"}, {0,NULL}
}; };
static CV_PossibleValue_t dummystaff_cons_t[] = {{0, "MIN"}, {100, "MAX"}, {0, NULL}};
static consvar_t cv_dummyteam = {"dummyteam", "Spectator", CV_HIDEN, dummyteam_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; static consvar_t cv_dummyteam = {"dummyteam", "Spectator", CV_HIDEN, dummyteam_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static consvar_t cv_dummyscramble = {"dummyscramble", "Random", CV_HIDEN, dummyscramble_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; static consvar_t cv_dummyscramble = {"dummyscramble", "Random", CV_HIDEN, dummyscramble_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
@ -433,6 +437,7 @@ static consvar_t cv_dummyrings = {"dummyrings", "0", CV_HIDEN, ringlimit_cons_t,
static consvar_t cv_dummylives = {"dummylives", "0", CV_HIDEN, liveslimit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; static consvar_t cv_dummylives = {"dummylives", "0", CV_HIDEN, liveslimit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static consvar_t cv_dummycontinues = {"dummycontinues", "0", CV_HIDEN, liveslimit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; static consvar_t cv_dummycontinues = {"dummycontinues", "0", CV_HIDEN, liveslimit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static consvar_t cv_dummymares = {"dummymares", "Overall", CV_HIDEN|CV_CALL, dummymares_cons_t, Dummymares_OnChange, 0, NULL, NULL, 0, 0, NULL}; static consvar_t cv_dummymares = {"dummymares", "Overall", CV_HIDEN|CV_CALL, dummymares_cons_t, Dummymares_OnChange, 0, NULL, NULL, 0, 0, NULL};
static consvar_t cv_dummystaff = {"dummystaff", "0", CV_HIDEN|CV_CALL, dummystaff_cons_t, Dummystaff_OnChange, 0, NULL, NULL, 0, 0, NULL};
// ========================================================================== // ==========================================================================
// ORGANIZATION START. // ORGANIZATION START.
@ -449,10 +454,10 @@ static consvar_t cv_dummymares = {"dummymares", "Overall", CV_HIDEN|CV_CALL, dum
static menuitem_t MainMenu[] = static menuitem_t MainMenu[] =
{ {
{IT_CALL |IT_STRING, NULL, "Secrets", M_SecretsMenu, 84}, {IT_CALL |IT_STRING, NULL, "Secrets", M_SecretsMenu, 84},
{IT_CALL |IT_STRING, NULL, "1 player", M_SinglePlayerMenu, 92}, {IT_CALL |IT_STRING, NULL, "1 Player", M_SinglePlayerMenu, 92},
{IT_SUBMENU|IT_STRING, NULL, "multiplayer", &MP_MainDef, 100}, {IT_SUBMENU|IT_STRING, NULL, "Multiplayer", &MP_MainDef, 100},
{IT_CALL |IT_STRING, NULL, "options", M_Options, 108}, {IT_CALL |IT_STRING, NULL, "Options", M_Options, 108},
{IT_CALL |IT_STRING, NULL, "quit game", M_QuitSRB2, 116}, {IT_CALL |IT_STRING, NULL, "Quit Game", M_QuitSRB2, 116},
}; };
typedef enum typedef enum
@ -703,6 +708,7 @@ static menuitem_t SP_TimeAttackMenu[] =
{ {
{IT_STRING|IT_CVAR, NULL, "Level", &cv_nextmap, 52}, {IT_STRING|IT_CVAR, NULL, "Level", &cv_nextmap, 52},
{IT_STRING|IT_CVAR, NULL, "Player", &cv_chooseskin, 62}, {IT_STRING|IT_CVAR, NULL, "Player", &cv_chooseskin, 62},
{IT_STRING|IT_CVAR, NULL, "Color", &cv_playercolor, 72},
{IT_DISABLED, NULL, "Guest Option...", &SP_GuestReplayDef, 100}, {IT_DISABLED, NULL, "Guest Option...", &SP_GuestReplayDef, 100},
{IT_DISABLED, NULL, "Replay...", &SP_ReplayDef, 110}, {IT_DISABLED, NULL, "Replay...", &SP_ReplayDef, 110},
@ -714,6 +720,7 @@ enum
{ {
talevel, talevel,
taplayer, taplayer,
tacolor,
taguest, taguest,
tareplay, tareplay,
@ -723,32 +730,30 @@ enum
static menuitem_t SP_ReplayMenu[] = static menuitem_t SP_ReplayMenu[] =
{ {
{IT_WHITESTRING|IT_CALL, NULL, "Replay Best Score", M_ReplayTimeAttack, 0},
{IT_WHITESTRING|IT_CALL, NULL, "Replay Best Time", M_ReplayTimeAttack, 8}, {IT_WHITESTRING|IT_CALL, NULL, "Replay Best Time", M_ReplayTimeAttack, 8},
{IT_WHITESTRING|IT_CALL, NULL, "Replay Best Rings", M_ReplayTimeAttack,16},
{IT_WHITESTRING|IT_CALL, NULL, "Replay Last", M_ReplayTimeAttack,29}, {IT_WHITESTRING|IT_CALL, NULL, "Replay Last", M_ReplayTimeAttack,21},
{IT_WHITESTRING|IT_CALL, NULL, "Replay Guest", M_ReplayTimeAttack,37}, {IT_WHITESTRING|IT_CALL, NULL, "Replay Guest", M_ReplayTimeAttack,29},
{IT_WHITESTRING|IT_KEYHANDLER, NULL, "Replay Staff",M_HandleStaffReplay,37},
{IT_WHITESTRING|IT_SUBMENU, NULL, "Back", &SP_TimeAttackDef, 50} {IT_WHITESTRING|IT_SUBMENU, NULL, "Back", &SP_TimeAttackDef, 50}
}; };
static menuitem_t SP_NightsReplayMenu[] = static menuitem_t SP_NightsReplayMenu[] =
{ {
{IT_WHITESTRING|IT_CALL, NULL, "Replay Best Score", M_ReplayTimeAttack, 8}, {IT_WHITESTRING|IT_CALL, NULL, "Replay Best Score", M_ReplayTimeAttack, 0},
{IT_WHITESTRING|IT_CALL, NULL, "Replay Best Time", M_ReplayTimeAttack,16}, {IT_WHITESTRING|IT_CALL, NULL, "Replay Best Time", M_ReplayTimeAttack,16},
{IT_WHITESTRING|IT_CALL, NULL, "Replay Last", M_ReplayTimeAttack,29}, {IT_WHITESTRING|IT_CALL, NULL, "Replay Last", M_ReplayTimeAttack,21},
{IT_WHITESTRING|IT_CALL, NULL, "Replay Guest", M_ReplayTimeAttack,37}, {IT_WHITESTRING|IT_CALL, NULL, "Replay Guest", M_ReplayTimeAttack,29},
{IT_WHITESTRING|IT_KEYHANDLER, NULL, "Replay Staff",M_HandleStaffReplay,37},
{IT_WHITESTRING|IT_SUBMENU, NULL, "Back", &SP_NightsAttackDef, 50} {IT_WHITESTRING|IT_SUBMENU, NULL, "Back", &SP_NightsAttackDef, 50}
}; };
static menuitem_t SP_GuestReplayMenu[] = static menuitem_t SP_GuestReplayMenu[] =
{ {
{IT_WHITESTRING|IT_CALL, NULL, "Save Best Score as Guest", M_SetGuestReplay, 0}, {IT_WHITESTRING|IT_CALL, NULL, "Save Best Time as Guest", M_SetGuestReplay,16},
{IT_WHITESTRING|IT_CALL, NULL, "Save Best Time as Guest", M_SetGuestReplay, 8},
{IT_WHITESTRING|IT_CALL, NULL, "Save Best Rings as Guest", M_SetGuestReplay,16},
{IT_WHITESTRING|IT_CALL, NULL, "Save Last as Guest", M_SetGuestReplay,24}, {IT_WHITESTRING|IT_CALL, NULL, "Save Last as Guest", M_SetGuestReplay,24},
{IT_WHITESTRING|IT_CALL, NULL, "Delete Guest Replay", M_SetGuestReplay,37}, {IT_WHITESTRING|IT_CALL, NULL, "Delete Guest Replay", M_SetGuestReplay,37},
@ -769,25 +774,25 @@ static menuitem_t SP_NightsGuestReplayMenu[] =
static menuitem_t SP_GhostMenu[] = static menuitem_t SP_GhostMenu[] =
{ {
{IT_STRING|IT_CVAR, NULL, "Best Score", &cv_ghost_bestscore, 0}, {IT_STRING|IT_CVAR, NULL, "Best Time", &cv_ghost_besttime, 8},
{IT_STRING|IT_CVAR, NULL, "Best Time", &cv_ghost_besttime, 8}, {IT_STRING|IT_CVAR, NULL, "Last", &cv_ghost_last, 16},
{IT_STRING|IT_CVAR, NULL, "Best Rings", &cv_ghost_bestrings,16},
{IT_STRING|IT_CVAR, NULL, "Last", &cv_ghost_last, 24},
{IT_STRING|IT_CVAR, NULL, "Guest", &cv_ghost_guest, 37}, {IT_STRING|IT_CVAR, NULL, "Guest", &cv_ghost_guest, 29},
{IT_STRING|IT_CVAR, NULL, "Staff Attack",&cv_ghost_staff, 37},
{IT_WHITESTRING|IT_SUBMENU, NULL, "Back", &SP_TimeAttackDef, 50} {IT_WHITESTRING|IT_SUBMENU, NULL, "Back", &SP_TimeAttackDef, 50}
}; };
static menuitem_t SP_NightsGhostMenu[] = static menuitem_t SP_NightsGhostMenu[] =
{ {
{IT_STRING|IT_CVAR, NULL, "Best Score", &cv_ghost_bestscore, 8}, {IT_STRING|IT_CVAR, NULL, "Best Score", &cv_ghost_bestscore, 0},
{IT_STRING|IT_CVAR, NULL, "Best Time", &cv_ghost_besttime, 16}, {IT_STRING|IT_CVAR, NULL, "Best Time", &cv_ghost_besttime, 8},
{IT_STRING|IT_CVAR, NULL, "Last", &cv_ghost_last, 24}, {IT_STRING|IT_CVAR, NULL, "Last", &cv_ghost_last, 16},
{IT_STRING|IT_CVAR, NULL, "Guest", &cv_ghost_guest, 37}, {IT_STRING|IT_CVAR, NULL, "Guest", &cv_ghost_guest, 29},
{IT_STRING|IT_CVAR, NULL, "Staff Attack",&cv_ghost_staff, 37},
{IT_WHITESTRING|IT_SUBMENU, NULL, "Back", &SP_NightsAttackDef, 50} {IT_WHITESTRING|IT_SUBMENU, NULL, "Back", &SP_NightsAttackDef, 50}
}; };
// Single Player Nights Attack // Single Player Nights Attack
@ -830,9 +835,9 @@ static menuitem_t SP_LevelStatsMenu[] =
menuitem_t PlayerMenu[32] = menuitem_t PlayerMenu[32] =
{ {
{IT_CALL, NULL, NULL, M_ChoosePlayer, 0}, {IT_CALL, NULL, NULL, M_ChoosePlayer, 0},
{IT_CALL, NULL, NULL, M_ChoosePlayer, 0}, {IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
{IT_CALL, NULL, NULL, M_ChoosePlayer, 0}, {IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
{IT_CALL, NULL, NULL, M_ChoosePlayer, 0}, {IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0}, {IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0}, {IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
{IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0}, {IT_DISABLED, NULL, NULL, M_ChoosePlayer, 0},
@ -1761,7 +1766,8 @@ static void Nextmap_OnChange(void)
char *leveltitle; char *leveltitle;
char tabase[256]; char tabase[256];
short i; short i;
boolean active; UINT8 active;
lumpnum_t l;
// Update the string in the consvar. // Update the string in the consvar.
Z_Free(cv_nextmap.zstring); Z_Free(cv_nextmap.zstring);
@ -1777,6 +1783,8 @@ static void Nextmap_OnChange(void)
else else
SP_NightsAttackMenu[narecords].status = IT_STRING|IT_CVAR; SP_NightsAttackMenu[narecords].status = IT_STRING|IT_CVAR;
CV_StealthSetValue(&cv_dummystaff, 0);
// Do the replay things. // Do the replay things.
active = false; active = false;
SP_NightsAttackMenu[naguest].status = IT_DISABLED; SP_NightsAttackMenu[naguest].status = IT_DISABLED;
@ -1785,33 +1793,40 @@ static void Nextmap_OnChange(void)
// Check if file exists, if not, disable REPLAY option // Check if file exists, if not, disable REPLAY option
sprintf(tabase,"%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s",srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value)); sprintf(tabase,"%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s",srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value));
for (i = 0; i < 4; i++) { for (i = 0; i < 5; i++) {
SP_NightsReplayMenu[i].status = IT_DISABLED; SP_NightsReplayMenu[i].status = IT_DISABLED;
SP_NightsGuestReplayMenu[i].status = IT_DISABLED; SP_NightsGuestReplayMenu[i].status = IT_DISABLED;
} }
if (FIL_FileExists(va("%s-score-best.lmp", tabase))) { if (FIL_FileExists(va("%s-score-best.lmp", tabase))) {
SP_NightsReplayMenu[0].status = IT_WHITESTRING|IT_CALL; SP_NightsReplayMenu[0].status = IT_WHITESTRING|IT_CALL;
SP_NightsGuestReplayMenu[0].status = IT_WHITESTRING|IT_CALL; SP_NightsGuestReplayMenu[0].status = IT_WHITESTRING|IT_CALL;
active = true; active |= 3;
} }
if (FIL_FileExists(va("%s-time-best.lmp", tabase))) { if (FIL_FileExists(va("%s-time-best.lmp", tabase))) {
SP_NightsReplayMenu[1].status = IT_WHITESTRING|IT_CALL; SP_NightsReplayMenu[1].status = IT_WHITESTRING|IT_CALL;
SP_NightsGuestReplayMenu[1].status = IT_WHITESTRING|IT_CALL; SP_NightsGuestReplayMenu[1].status = IT_WHITESTRING|IT_CALL;
active = true; active |= 3;
} }
if (FIL_FileExists(va("%s-last.lmp", tabase))) { if (FIL_FileExists(va("%s-last.lmp", tabase))) {
SP_NightsReplayMenu[2].status = IT_WHITESTRING|IT_CALL; SP_NightsReplayMenu[2].status = IT_WHITESTRING|IT_CALL;
SP_NightsGuestReplayMenu[2].status = IT_WHITESTRING|IT_CALL; SP_NightsGuestReplayMenu[2].status = IT_WHITESTRING|IT_CALL;
active = true; active |= 3;
} }
if (FIL_FileExists(va("%s-guest.lmp", tabase))) { if (FIL_FileExists(va("%s-guest.lmp", tabase))) {
SP_NightsReplayMenu[3].status = IT_WHITESTRING|IT_CALL; SP_NightsReplayMenu[3].status = IT_WHITESTRING|IT_CALL;
SP_NightsGuestReplayMenu[3].status = IT_WHITESTRING|IT_CALL; SP_NightsGuestReplayMenu[3].status = IT_WHITESTRING|IT_CALL;
active = true; active |= 3;
}
if ((l = W_CheckNumForName(va("%sS01",G_BuildMapName(cv_nextmap.value)))) != LUMPERROR) {
SP_NightsReplayMenu[4].status = IT_WHITESTRING|IT_KEYHANDLER;
CV_StealthSetValue(&cv_dummystaff, 1);
active |= 1;
} }
if (active) { if (active) {
SP_NightsAttackMenu[naguest].status = IT_WHITESTRING|IT_SUBMENU; if (active & 1)
SP_NightsAttackMenu[nareplay].status = IT_WHITESTRING|IT_SUBMENU; SP_NightsAttackMenu[nareplay].status = IT_WHITESTRING|IT_SUBMENU;
if (active & 2)
SP_NightsAttackMenu[naguest].status = IT_WHITESTRING|IT_SUBMENU;
SP_NightsAttackMenu[naghost].status = IT_WHITESTRING|IT_SUBMENU; SP_NightsAttackMenu[naghost].status = IT_WHITESTRING|IT_SUBMENU;
} }
else if(itemOn == nareplay) // Reset lastOn so replay isn't still selected when not available. else if(itemOn == nareplay) // Reset lastOn so replay isn't still selected when not available.
@ -1822,6 +1837,8 @@ static void Nextmap_OnChange(void)
} }
else if (currentMenu == &SP_TimeAttackDef) else if (currentMenu == &SP_TimeAttackDef)
{ {
CV_StealthSetValue(&cv_dummystaff, 0);
active = false; active = false;
SP_TimeAttackMenu[taguest].status = IT_DISABLED; SP_TimeAttackMenu[taguest].status = IT_DISABLED;
SP_TimeAttackMenu[tareplay].status = IT_DISABLED; SP_TimeAttackMenu[tareplay].status = IT_DISABLED;
@ -1829,38 +1846,35 @@ static void Nextmap_OnChange(void)
// Check if file exists, if not, disable REPLAY option // Check if file exists, if not, disable REPLAY option
sprintf(tabase,"%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-%s",srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value), cv_chooseskin.string); sprintf(tabase,"%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-%s",srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value), cv_chooseskin.string);
for (i = 0; i < 5; i++) { for (i = 0; i < 4; i++) {
SP_ReplayMenu[i].status = IT_DISABLED; SP_ReplayMenu[i].status = IT_DISABLED;
SP_GuestReplayMenu[i].status = IT_DISABLED; SP_GuestReplayMenu[i].status = IT_DISABLED;
} }
if (FIL_FileExists(va("%s-time-best.lmp", tabase))) { if (FIL_FileExists(va("%s-time-best.lmp", tabase))) {
SP_ReplayMenu[0].status = IT_WHITESTRING|IT_CALL; SP_ReplayMenu[0].status = IT_WHITESTRING|IT_CALL;
SP_GuestReplayMenu[0].status = IT_WHITESTRING|IT_CALL; SP_GuestReplayMenu[0].status = IT_WHITESTRING|IT_CALL;
active = true; active |= 3;
}
if (FIL_FileExists(va("%s-score-best.lmp", tabase))) {
SP_ReplayMenu[1].status = IT_WHITESTRING|IT_CALL;
SP_GuestReplayMenu[1].status = IT_WHITESTRING|IT_CALL;
active = true;
}
if (FIL_FileExists(va("%s-rings-best.lmp", tabase))) {
SP_ReplayMenu[2].status = IT_WHITESTRING|IT_CALL;
SP_GuestReplayMenu[2].status = IT_WHITESTRING|IT_CALL;
active = true;
} }
if (FIL_FileExists(va("%s-last.lmp", tabase))) { if (FIL_FileExists(va("%s-last.lmp", tabase))) {
SP_ReplayMenu[3].status = IT_WHITESTRING|IT_CALL; SP_ReplayMenu[1].status = IT_WHITESTRING|IT_CALL;
SP_GuestReplayMenu[3].status = IT_WHITESTRING|IT_CALL; SP_GuestReplayMenu[1].status = IT_WHITESTRING|IT_CALL;
active = true; active |= 3;
} }
if (FIL_FileExists(va("%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-guest.lmp", srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value)))) { if (FIL_FileExists(va("%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-guest.lmp", srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value)))) {
SP_ReplayMenu[4].status = IT_WHITESTRING|IT_CALL; SP_ReplayMenu[2].status = IT_WHITESTRING|IT_CALL;
SP_GuestReplayMenu[4].status = IT_WHITESTRING|IT_CALL; SP_GuestReplayMenu[2].status = IT_WHITESTRING|IT_CALL;
active = true; active |= 3;
}
if ((l = W_CheckNumForName(va("%sS01",G_BuildMapName(cv_nextmap.value)))) != LUMPERROR) {
SP_ReplayMenu[3].status = IT_WHITESTRING|IT_KEYHANDLER;
CV_StealthSetValue(&cv_dummystaff, 1);
active |= 1;
} }
if (active) { if (active) {
SP_TimeAttackMenu[taguest].status = IT_WHITESTRING|IT_SUBMENU; if (active & 1)
SP_TimeAttackMenu[tareplay].status = IT_WHITESTRING|IT_SUBMENU; SP_TimeAttackMenu[tareplay].status = IT_WHITESTRING|IT_SUBMENU;
if (active & 2)
SP_TimeAttackMenu[taguest].status = IT_WHITESTRING|IT_SUBMENU;
SP_TimeAttackMenu[taghost].status = IT_WHITESTRING|IT_SUBMENU; SP_TimeAttackMenu[taghost].status = IT_WHITESTRING|IT_SUBMENU;
} }
else if(itemOn == tareplay) // Reset lastOn so replay isn't still selected when not available. else if(itemOn == tareplay) // Reset lastOn so replay isn't still selected when not available.
@ -1892,6 +1906,27 @@ static void Dummymares_OnChange(void)
} }
} }
static void Dummystaff_OnChange(void)
{
lumpnum_t l;
if ((l = W_CheckNumForName(va("%sS01",G_BuildMapName(cv_nextmap.value)))) == LUMPERROR)
{
CV_StealthSetValue(&cv_dummystaff, 0);
return;
}
else
{
UINT8 numstaff = 1;
while (numstaff < 100 && (l = W_CheckNumForName(va("%sS%02u",G_BuildMapName(cv_nextmap.value),numstaff+1))) != LUMPERROR)
numstaff++;
if (cv_dummystaff.value < 1)
CV_StealthSetValue(&cv_dummystaff, numstaff);
else if (cv_dummystaff.value > numstaff)
CV_StealthSetValue(&cv_dummystaff, 1);
}
}
// Newgametype. Used for gametype changes. // Newgametype. Used for gametype changes.
static void Newgametype_OnChange(void) static void Newgametype_OnChange(void)
{ {
@ -2712,6 +2747,7 @@ void M_Init(void)
CV_RegisterVar(&cv_dummylives); CV_RegisterVar(&cv_dummylives);
CV_RegisterVar(&cv_dummycontinues); CV_RegisterVar(&cv_dummycontinues);
CV_RegisterVar(&cv_dummymares); CV_RegisterVar(&cv_dummymares);
CV_RegisterVar(&cv_dummystaff);
quitmsg[QUITMSG] = M_GetText("Eggman's tied explosives\nto your girlfriend, and\nwill activate them if\nyou press the 'Y' key!\nPress 'N' to save her!\n\n(Press 'Y' to quit)"); quitmsg[QUITMSG] = M_GetText("Eggman's tied explosives\nto your girlfriend, and\nwill activate them if\nyou press the 'Y' key!\nPress 'N' to save her!\n\n(Press 'Y' to quit)");
quitmsg[QUITMSG1] = M_GetText("What would Tails say if\nhe saw you quitting the game?\n\n(Press 'Y' to quit)"); quitmsg[QUITMSG1] = M_GetText("What would Tails say if\nhe saw you quitting the game?\n\n(Press 'Y' to quit)");
@ -5183,23 +5219,23 @@ static void M_DrawGameStats(void)
V_DrawCenteredString(BASEVIDWIDTH/2, 90, 0, "* COMBINED RECORDS *"); V_DrawCenteredString(BASEVIDWIDTH/2, 90, 0, "* COMBINED RECORDS *");
sprintf(beststr, "%u", bestscore); /*sprintf(beststr, "%u", bestscore);
V_DrawString(32, 100, V_YELLOWMAP, "SCORE:"); V_DrawString(32, 100, V_YELLOWMAP, "SCORE:");
V_DrawRightAlignedString(BASEVIDWIDTH-32, 100, 0, beststr); V_DrawRightAlignedString(BASEVIDWIDTH-32, 100, 0, beststr);
if (mapsunfinished[0]) if (mapsunfinished[0])
V_DrawRightAlignedString(BASEVIDWIDTH-32, 108, V_REDMAP, va("(%d unfinished)", mapsunfinished[0])); V_DrawRightAlignedString(BASEVIDWIDTH-32, 108, V_REDMAP, va("(%d unfinished)", mapsunfinished[0]));*/
sprintf(beststr, "%i:%02i:%02i.%02i", G_TicsToHours(besttime), G_TicsToMinutes(besttime, false), G_TicsToSeconds(besttime), G_TicsToCentiseconds(besttime)); sprintf(beststr, "%i:%02i:%02i.%02i", G_TicsToHours(besttime), G_TicsToMinutes(besttime, false), G_TicsToSeconds(besttime), G_TicsToCentiseconds(besttime));
V_DrawString(32, 120, V_YELLOWMAP, "TIME:"); V_DrawString(32, 100, V_YELLOWMAP, "TIME:");
V_DrawRightAlignedString(BASEVIDWIDTH-32, 120, 0, beststr); V_DrawRightAlignedString(BASEVIDWIDTH-32, 100, 0, beststr);
if (mapsunfinished[1]) if (mapsunfinished[1])
V_DrawRightAlignedString(BASEVIDWIDTH-32, 128, V_REDMAP, va("(%d unfinished)", mapsunfinished[1])); V_DrawRightAlignedString(BASEVIDWIDTH-32, 108, V_REDMAP, va("(%d unfinished)", mapsunfinished[1]));
sprintf(beststr, "%u", bestrings); /*sprintf(beststr, "%u", bestrings);
V_DrawString(32, 140, V_YELLOWMAP, "RINGS:"); V_DrawString(32, 140, V_YELLOWMAP, "RINGS:");
V_DrawRightAlignedString(BASEVIDWIDTH-32, 140, 0, beststr); V_DrawRightAlignedString(BASEVIDWIDTH-32, 140, 0, beststr);
if (mapsunfinished[2]) if (mapsunfinished[2])
V_DrawRightAlignedString(BASEVIDWIDTH-32, 148, V_REDMAP, va("(%d unfinished)", mapsunfinished[2])); V_DrawRightAlignedString(BASEVIDWIDTH-32, 148, V_REDMAP, va("(%d unfinished)", mapsunfinished[2]));*/
} }
static void M_HandleGameStats(INT32 choice) static void M_HandleGameStats(INT32 choice)
@ -5266,14 +5302,21 @@ void M_DrawTimeAttackMenu(void)
if ((currentMenu->menuitems[i].status & IT_TYPE) == IT_CVAR) if ((currentMenu->menuitems[i].status & IT_TYPE) == IT_CVAR)
{ {
consvar_t *cv = (consvar_t *)currentMenu->menuitems[i].itemaction; consvar_t *cv = (consvar_t *)currentMenu->menuitems[i].itemaction;
INT32 soffset = 0; INT32 soffset = 40;
// hack to keep the menu from overlapping the player icon // hack to keep the menu from overlapping the player icon
if (currentMenu != &SP_TimeAttackDef) if (currentMenu != &SP_TimeAttackDef)
soffset = 80; soffset = 80;
// Should see nothing but strings // Should see nothing but strings
V_DrawString(BASEVIDWIDTH - x - soffset - V_StringWidth(cv->string, 0), y, V_YELLOWMAP, cv->string); if (cv == &cv_chooseskin)
V_DrawString(BASEVIDWIDTH - x - soffset - V_StringWidth(skins[cv_chooseskin.value-1].realname, 0), y, V_YELLOWMAP, skins[cv_chooseskin.value-1].realname);
else
V_DrawString(BASEVIDWIDTH - x - soffset - V_StringWidth(cv->string, 0), y, V_YELLOWMAP, cv->string);
}
else if ((currentMenu->menuitems[i].status & IT_TYPE) == IT_KEYHANDLER && cv_dummystaff.value) // bad hacky assumption: IT_KEYHANDLER is assumed to be staff ghost selector
{
V_DrawString(BASEVIDWIDTH - x - 80 - V_StringWidth(cv_dummystaff.string, 0), y, V_YELLOWMAP, cv_dummystaff.string);
} }
} }
@ -5292,13 +5335,11 @@ void M_DrawTimeAttackMenu(void)
V_DrawSmallScaledPatch(208, 32, 0, PictureOfLevel); V_DrawSmallScaledPatch(208, 32, 0, PictureOfLevel);
// Character face! // Character face!
if (W_CheckNumForName(skins[cv_chooseskin.value-1].charsel) != LUMPERROR) if (W_CheckNumForName(skins[cv_chooseskin.value-1].face) != LUMPERROR)
{ {
PictureOfUrFace = W_CachePatchName(skins[cv_chooseskin.value-1].charsel, PU_CACHE); UINT8 *colormap = R_GetTranslationColormap(cv_chooseskin.value-1, cv_playercolor.value, 0);
if (PictureOfUrFace->width >= 256) PictureOfUrFace = W_CachePatchName(skins[cv_chooseskin.value-1].face, PU_CACHE);
V_DrawTinyScaledPatch(224, 120, 0, PictureOfUrFace); V_DrawMappedPatch(256,90,0,PictureOfUrFace, colormap);
else
V_DrawSmallScaledPatch(224, 120, 0, PictureOfUrFace);
} }
// Level record list // Level record list
@ -5309,13 +5350,13 @@ void M_DrawTimeAttackMenu(void)
V_DrawCenteredString(104, 32, 0, "* LEVEL RECORDS *"); V_DrawCenteredString(104, 32, 0, "* LEVEL RECORDS *");
if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->score) /*if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->score)
sprintf(beststr, "(none)"); sprintf(beststr, "(none)");
else else
sprintf(beststr, "%u", mainrecords[cv_nextmap.value-1]->score); sprintf(beststr, "%u", mainrecords[cv_nextmap.value-1]->score);
V_DrawString(104-72, 48, V_YELLOWMAP, "SCORE:"); V_DrawString(104-72, 48, V_YELLOWMAP, "SCORE:");
V_DrawRightAlignedString(104+72, 48, V_ALLOWLOWERCASE, beststr); V_DrawRightAlignedString(104+72, 48, V_ALLOWLOWERCASE, beststr);*/
if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->time) if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->time)
sprintf(beststr, "(none)"); sprintf(beststr, "(none)");
@ -5327,23 +5368,14 @@ void M_DrawTimeAttackMenu(void)
V_DrawString(104-72, 58, V_YELLOWMAP, "TIME:"); V_DrawString(104-72, 58, V_YELLOWMAP, "TIME:");
V_DrawRightAlignedString(104+72, 58, V_ALLOWLOWERCASE, beststr); V_DrawRightAlignedString(104+72, 58, V_ALLOWLOWERCASE, beststr);
if (!mainrecords[cv_nextmap.value-1] || !mainrecords[cv_nextmap.value-1]->rings)
sprintf(beststr, "(none)");
else
sprintf(beststr, "%hu", mainrecords[cv_nextmap.value-1]->rings);
V_DrawString(104-72, 68, V_YELLOWMAP, "RINGS:");
V_DrawRightAlignedString(104+72, 68, V_ALLOWLOWERCASE, beststr);
// Draw record emblems. // Draw record emblems.
em = M_GetLevelEmblems(cv_nextmap.value); em = M_GetLevelEmblems(cv_nextmap.value);
while (em) while (em)
{ {
switch (em->type) switch (em->type)
{ {
case ET_SCORE: yHeight = 48; break; //case ET_SCORE: yHeight = 48; break;
case ET_TIME: yHeight = 58; break; case ET_TIME: yHeight = 58; break;
case ET_RINGS: yHeight = 68; break;
default: default:
goto skipThisOne; goto skipThisOne;
} }
@ -5359,7 +5391,7 @@ void M_DrawTimeAttackMenu(void)
} }
} }
// ALWAYS DRAW level name and skin even when not on this menu! // ALWAYS DRAW level name, skin and color even when not on this menu!
if (currentMenu != &SP_TimeAttackDef) if (currentMenu != &SP_TimeAttackDef)
{ {
consvar_t *ncv; consvar_t *ncv;
@ -5367,13 +5399,17 @@ void M_DrawTimeAttackMenu(void)
x = SP_TimeAttackDef.x; x = SP_TimeAttackDef.x;
y = SP_TimeAttackDef.y; y = SP_TimeAttackDef.y;
for (i = 0; i < 2; ++i) for (i = 0; i < 3; ++i)
{ {
ncv = (consvar_t *)SP_TimeAttackMenu[i].itemaction; ncv = (consvar_t *)SP_TimeAttackMenu[i].itemaction;
V_DrawString(x, y + SP_TimeAttackMenu[i].alphaKey, V_TRANSLUCENT, SP_TimeAttackMenu[i].text); V_DrawString(x, y + SP_TimeAttackMenu[i].alphaKey, V_TRANSLUCENT, SP_TimeAttackMenu[i].text);
V_DrawString(BASEVIDWIDTH - x - V_StringWidth(ncv->string, 0), if (ncv == &cv_chooseskin)
y + SP_TimeAttackMenu[i].alphaKey, V_YELLOWMAP|V_TRANSLUCENT, ncv->string); V_DrawString(BASEVIDWIDTH - x - 40 - V_StringWidth(skins[cv_chooseskin.value-1].realname, 0),
y + SP_TimeAttackMenu[i].alphaKey, V_YELLOWMAP|V_TRANSLUCENT, skins[cv_chooseskin.value-1].realname);
else
V_DrawString(BASEVIDWIDTH - x - 40 - V_StringWidth(ncv->string, 0),
y + SP_TimeAttackMenu[i].alphaKey, V_YELLOWMAP|V_TRANSLUCENT, ncv->string);
} }
} }
} }
@ -5588,6 +5624,52 @@ static void M_ChooseTimeAttack(INT32 choice)
G_DeferedInitNew(false, G_BuildMapName(cv_nextmap.value), (UINT8)(cv_chooseskin.value-1), false, false); G_DeferedInitNew(false, G_BuildMapName(cv_nextmap.value), (UINT8)(cv_chooseskin.value-1), false, false);
} }
static void M_HandleStaffReplay(INT32 choice)
{
boolean exitmenu = false; // exit to previous menu
lumpnum_t l = W_CheckNumForName(va("%sS%02u",G_BuildMapName(cv_nextmap.value),cv_dummystaff.value));
switch (choice)
{
case KEY_DOWNARROW:
M_NextOpt();
S_StartSound(NULL, sfx_bewar1);
break;
case KEY_UPARROW:
M_PrevOpt();
S_StartSound(NULL, sfx_bewar1);
break;
case KEY_BACKSPACE:
case KEY_ESCAPE:
exitmenu = true;
break;
case KEY_RIGHTARROW:
CV_AddValue(&cv_dummystaff, 1);
S_StartSound(NULL, sfx_menu1);
break;
case KEY_LEFTARROW:
CV_AddValue(&cv_dummystaff, -1);
S_StartSound(NULL, sfx_menu1);
break;
case KEY_ENTER:
if (l == LUMPERROR)
break;
M_ClearMenus(true);
modeattacking = ATTACKING_RECORD;
G_DoPlayDemo(va("%sS%02u",G_BuildMapName(cv_nextmap.value),cv_dummystaff.value));
break;
default:
break;
}
if (exitmenu)
{
if (currentMenu->prevMenu)
M_SetupNextMenu(currentMenu->prevMenu);
else
M_ClearMenus(true);
}
}
// Player has selected the "REPLAY" from the time attack screen // Player has selected the "REPLAY" from the time attack screen
static void M_ReplayTimeAttack(INT32 choice) static void M_ReplayTimeAttack(INT32 choice)
{ {
@ -5599,19 +5681,15 @@ static void M_ReplayTimeAttack(INT32 choice)
{ {
switch(choice) { switch(choice) {
default: default:
case 0: // best score case 0: // best time
which = "score-best";
break;
case 1: // best time
which = "time-best"; which = "time-best";
break; break;
case 2: // best rings case 1: // last
which = "rings-best";
break;
case 3: // last
which = "last"; which = "last";
break; break;
case 4: // guest case 2: // best staff
return; // M_HandleStaffReplay
case 3: // guest
// srb2/replay/main/map01-guest.lmp // srb2/replay/main/map01-guest.lmp
G_DoPlayDemo(va("%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-guest.lmp", srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value))); G_DoPlayDemo(va("%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-guest.lmp", srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value)));
return; return;
@ -5632,7 +5710,9 @@ static void M_ReplayTimeAttack(INT32 choice)
case 2: // last case 2: // last
which = "last"; which = "last";
break; break;
case 3: // guest case 3: // staff
return; // M_HandleStaffReplay
case 4: // guest
which = "guest"; which = "guest";
break; break;
} }
@ -5695,11 +5775,12 @@ static void M_OverwriteGuest_Score(INT32 choice)
M_OverwriteGuest("score-best", currentMenu == &SP_NightsGuestReplayDef); M_OverwriteGuest("score-best", currentMenu == &SP_NightsGuestReplayDef);
} }
/* // srb2kart
static void M_OverwriteGuest_Rings(INT32 choice) static void M_OverwriteGuest_Rings(INT32 choice)
{ {
(void)choice; (void)choice;
M_OverwriteGuest("rings-best", false); M_OverwriteGuest("rings-best", false);
} }*/
static void M_OverwriteGuest_Last(INT32 choice) static void M_OverwriteGuest_Last(INT32 choice)
{ {
@ -5710,8 +5791,8 @@ static void M_OverwriteGuest_Last(INT32 choice)
static void M_SetGuestReplay(INT32 choice) static void M_SetGuestReplay(INT32 choice)
{ {
void (*which)(INT32); void (*which)(INT32);
if (currentMenu == &SP_NightsGuestReplayDef && choice >= 2) if (currentMenu == &SP_TimeAttackDef && choice <= 0)
choice++; // skip best rings choice++; // skip best score
switch(choice) switch(choice)
{ {
case 0: // best score case 0: // best score
@ -5720,9 +5801,6 @@ static void M_SetGuestReplay(INT32 choice)
case 1: // best time case 1: // best time
which = M_OverwriteGuest_Time; which = M_OverwriteGuest_Time;
break; break;
case 2: // best rings
which = M_OverwriteGuest_Rings;
break;
case 3: // last case 3: // last
which = M_OverwriteGuest_Last; which = M_OverwriteGuest_Last;
break; break;

View file

@ -35,6 +35,8 @@
#include "p_slopes.h" #include "p_slopes.h"
#endif #endif
#include "k_kart.h"
// protos. // protos.
static CV_PossibleValue_t viewheight_cons_t[] = {{16, "MIN"}, {56, "MAX"}, {0, NULL}}; static CV_PossibleValue_t viewheight_cons_t[] = {{16, "MIN"}, {56, "MAX"}, {0, NULL}};
consvar_t cv_viewheight = {"viewheight", VIEWHEIGHTS, 0, viewheight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_viewheight = {"viewheight", VIEWHEIGHTS, 0, viewheight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
@ -7496,28 +7498,73 @@ void P_MobjThinker(mobj_t *mobj)
} }
break; break;
case MT_GREENITEM: case MT_GREENITEM:
{
fixed_t finalspeed = mobj->info->speed;
if (cv_kartcc.value == 50)
{
finalspeed = FixedMul(finalspeed, FRACUNIT-FRACUNIT/4);
}
else if (cv_kartcc.value == 150)
{
finalspeed = FixedMul(finalspeed, FRACUNIT+FRACUNIT/4);
}
mobj->angle = R_PointToAngle2(mobj->x, mobj->y, mobj->x+mobj->momx, mobj->y+mobj->momy); mobj->angle = R_PointToAngle2(mobj->x, mobj->y, mobj->x+mobj->momx, mobj->y+mobj->momy);
P_InstaThrust(mobj, mobj->angle, mobj->info->speed); if (mobj->health <= 5)
{
INT32 i;
for (i = 5; i >= mobj->health; i--)
{
finalspeed = FixedMul(finalspeed, FRACUNIT-FRACUNIT/4);
}
P_InstaThrust(mobj, mobj->angle, finalspeed);
}
else
{
P_InstaThrust(mobj, mobj->angle, finalspeed);
}
if (mobj->threshold > 0) if (mobj->threshold > 0)
mobj->threshold--; mobj->threshold--;
if (leveltime % 6 == 0) if (leveltime % 6 == 0)
S_StartSound(mobj, mobj->info->activesound); S_StartSound(mobj, mobj->info->activesound);
break; break;
}
case MT_REDITEM: case MT_REDITEM:
{ {
fixed_t magnitude; fixed_t topspeed = 64*FRACUNIT;
fixed_t distbarrier = 512*FRACUNIT;
fixed_t distaway;
if (mobj->threshold > 0) if (mobj->threshold > 0)
mobj->threshold--; mobj->threshold--;
if (leveltime % 7 == 0) if (leveltime % 7 == 0)
S_StartSound(mobj, mobj->info->activesound); S_StartSound(mobj, mobj->info->activesound);
// Do a similar thing to what is done to the player to keep the red shell at a speed cap if (cv_kartcc.value == 50)
magnitude = P_AproxDistance(mobj->momx, mobj->momy);
if (magnitude > 64*FRACUNIT)
{ {
mobj->momx = FixedMul(FixedDiv(mobj->momx, magnitude), 64*FRACUNIT); topspeed = FixedMul(topspeed, FRACUNIT-FRACUNIT/4);
mobj->momy = FixedMul(FixedDiv(mobj->momy, magnitude), 64*FRACUNIT); distbarrier = FixedMul(distbarrier, FRACUNIT-FRACUNIT/4);
} }
else if (cv_kartcc.value == 150)
{
topspeed = FixedMul(topspeed, FRACUNIT+FRACUNIT/4);
distbarrier = FixedMul(distbarrier, FRACUNIT+FRACUNIT/4);
}
if (mobj->tracer)
{
distaway = P_AproxDistance(mobj->tracer->x - mobj->x, mobj->tracer->y - mobj->y);
if (distaway < distbarrier)
{
if (mobj->tracer->player)
{
fixed_t speeddifference = abs(topspeed - min(mobj->tracer->player->speed, K_GetKartSpeed(mobj->tracer->player, false)));
topspeed = topspeed - FixedMul(speeddifference, FRACUNIT-FixedDiv(distaway, distbarrier));
}
}
}
P_InstaThrust(mobj, R_PointToAngle2(0, 0, mobj->momx, mobj->momy), topspeed);
break; break;
} }
case MT_REDITEMDUD: case MT_REDITEMDUD:
@ -8932,9 +8979,7 @@ void P_RespawnSpecials(void)
mapthing_t *mthing = NULL; mapthing_t *mthing = NULL;
// only respawn items when cv_itemrespawn is on // only respawn items when cv_itemrespawn is on
if (!(netgame || multiplayer) // Never respawn in single player if (!cv_itemrespawn.value)
|| gametype == GT_COOP // Never respawn in co-op gametype
|| !cv_itemrespawn.value) // cvar is turned off
return; return;
// Don't respawn in special stages! // Don't respawn in special stages!
@ -9517,12 +9562,8 @@ void P_SpawnMapThing(mapthing_t *mthing)
if (modeattacking) // Record Attack special stuff if (modeattacking) // Record Attack special stuff
{ {
// Don't spawn starposts that wouldn't be usable
if (i == MT_STARPOST)
return;
// Emerald Tokens -->> Score Tokens // Emerald Tokens -->> Score Tokens
else if (i == MT_EMMY) if (i == MT_EMMY)
return; /// \todo return; /// \todo
// 1UPs -->> Score TVs // 1UPs -->> Score TVs

View file

@ -224,7 +224,7 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
DEH_WriteUndoline("LEVELFLAGS", va("%d", mapheaderinfo[num]->levelflags), UNDO_NONE); DEH_WriteUndoline("LEVELFLAGS", va("%d", mapheaderinfo[num]->levelflags), UNDO_NONE);
mapheaderinfo[num]->levelflags = 0; mapheaderinfo[num]->levelflags = 0;
DEH_WriteUndoline("MENUFLAGS", va("%d", mapheaderinfo[num]->menuflags), UNDO_NONE); DEH_WriteUndoline("MENUFLAGS", va("%d", mapheaderinfo[num]->menuflags), UNDO_NONE);
mapheaderinfo[num]->menuflags = 0; mapheaderinfo[num]->menuflags = LF2_RECORDATTACK|LF2_NOVISITNEEDED; // 0
// TODO grades support for delfile (pfft yeah right) // TODO grades support for delfile (pfft yeah right)
P_DeleteGrades(num); P_DeleteGrades(num);
// an even further impossibility, delfile custom opts support // an even further impossibility, delfile custom opts support
@ -2363,7 +2363,7 @@ static void P_ForceCharacter(const char *forcecharskin)
if (splitscreen) if (splitscreen)
{ {
SetPlayerSkin(secondarydisplayplayer, forcecharskin); SetPlayerSkin(secondarydisplayplayer, forcecharskin);
if ((unsigned)cv_playercolor2.value != skins[players[secondarydisplayplayer].skin].prefcolor) if ((unsigned)cv_playercolor2.value != skins[players[secondarydisplayplayer].skin].prefcolor && !modeattacking)
{ {
CV_StealthSetValue(&cv_playercolor2, skins[players[secondarydisplayplayer].skin].prefcolor); CV_StealthSetValue(&cv_playercolor2, skins[players[secondarydisplayplayer].skin].prefcolor);
players[secondarydisplayplayer].skincolor = skins[players[secondarydisplayplayer].skin].prefcolor; players[secondarydisplayplayer].skincolor = skins[players[secondarydisplayplayer].skin].prefcolor;
@ -2372,7 +2372,7 @@ static void P_ForceCharacter(const char *forcecharskin)
SetPlayerSkin(consoleplayer, forcecharskin); SetPlayerSkin(consoleplayer, forcecharskin);
// normal player colors in single player // normal player colors in single player
if ((unsigned)cv_playercolor.value != skins[players[consoleplayer].skin].prefcolor) if ((unsigned)cv_playercolor.value != skins[players[consoleplayer].skin].prefcolor && !modeattacking)
{ {
CV_StealthSetValue(&cv_playercolor, skins[players[consoleplayer].skin].prefcolor); CV_StealthSetValue(&cv_playercolor, skins[players[consoleplayer].skin].prefcolor);
players[consoleplayer].skincolor = skins[players[consoleplayer].skin].prefcolor; players[consoleplayer].skincolor = skins[players[consoleplayer].skin].prefcolor;
@ -2392,7 +2392,7 @@ static void P_LoadRecordGhosts(void)
sprintf(gpath,"%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s", srb2home, timeattackfolder, G_BuildMapName(gamemap)); sprintf(gpath,"%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s", srb2home, timeattackfolder, G_BuildMapName(gamemap));
// Best Score ghost // Best Score ghost
if (cv_ghost_bestscore.value) /*if (cv_ghost_bestscore.value)
{ {
for (i = 0; i < numskins; ++i) for (i = 0; i < numskins; ++i)
{ {
@ -2402,7 +2402,7 @@ static void P_LoadRecordGhosts(void)
if (FIL_FileExists(va("%s-%s-score-best.lmp", gpath, skins[i].name))) if (FIL_FileExists(va("%s-%s-score-best.lmp", gpath, skins[i].name)))
G_AddGhost(va("%s-%s-score-best.lmp", gpath, skins[i].name)); G_AddGhost(va("%s-%s-score-best.lmp", gpath, skins[i].name));
} }
} }*/
// Best Time ghost // Best Time ghost
if (cv_ghost_besttime.value) if (cv_ghost_besttime.value)
@ -2417,18 +2417,18 @@ static void P_LoadRecordGhosts(void)
} }
} }
// Best Rings ghost // Best lap ghost
if (cv_ghost_bestrings.value) /*if (cv_ghost_bestlap.value)
{ {
for (i = 0; i < numskins; ++i) for (i = 0; i < numskins; ++i)
{ {
if (cv_ghost_bestrings.value == 1 && players[consoleplayer].skin != i) if (cv_ghost_bestlap.value == 1 && players[consoleplayer].skin != i)
continue; continue;
if (FIL_FileExists(va("%s-%s-rings-best.lmp", gpath, skins[i].name))) if (FIL_FileExists(va("%s-%s-lap-best.lmp", gpath, skins[i].name)))
G_AddGhost(va("%s-%s-rings-best.lmp", gpath, skins[i].name)); G_AddGhost(va("%s-%s-lap-best.lmp", gpath, skins[i].name));
} }
} }*/
// Last ghost // Last ghost
if (cv_ghost_last.value) if (cv_ghost_last.value)
@ -2446,6 +2446,18 @@ static void P_LoadRecordGhosts(void)
// Guest ghost // Guest ghost
if (cv_ghost_guest.value && FIL_FileExists(va("%s-guest.lmp", gpath))) if (cv_ghost_guest.value && FIL_FileExists(va("%s-guest.lmp", gpath)))
G_AddGhost(va("%s-guest.lmp", gpath)); G_AddGhost(va("%s-guest.lmp", gpath));
// Staff Attack ghosts
if (cv_ghost_staff.value)
{
lumpnum_t l;
UINT8 i = 1;
while (i <= 99 && (l = W_CheckNumForName(va("%sS%02u",G_BuildMapName(gamemap),i))) != LUMPERROR)
{
G_AddGhost(va("%sS%02u",G_BuildMapName(gamemap),i));
i++;
}
}
free(gpath); free(gpath);
} }
@ -2476,6 +2488,18 @@ static void P_LoadNightsGhosts(void)
if (cv_ghost_guest.value && FIL_FileExists(va("%s-guest.lmp", gpath))) if (cv_ghost_guest.value && FIL_FileExists(va("%s-guest.lmp", gpath)))
G_AddGhost(va("%s-guest.lmp", gpath)); G_AddGhost(va("%s-guest.lmp", gpath));
// Staff Attack ghosts
if (cv_ghost_staff.value)
{
lumpnum_t l;
UINT8 i = 1;
while (i <= 99 && (l = W_CheckNumForName(va("%sS%02u",G_BuildMapName(gamemap),i))) != LUMPERROR)
{
G_AddGhost(va("%sS%02u",G_BuildMapName(gamemap),i));
i++;
}
}
free(gpath); free(gpath);
} }

View file

@ -4684,7 +4684,7 @@ static void P_RunSpecialSectorCheck(player_t *player, sector_t *sector)
// Check Section 1 // Check Section 1
switch(GETSECSPECIAL(sector->special, 1)) switch(GETSECSPECIAL(sector->special, 1))
{ {
case 2: // Damage (water) //case 2: // Damage (water)
case 8: // Instant kill case 8: // Instant kill
case 10: // Ring drainer that doesn't require floor touch case 10: // Ring drainer that doesn't require floor touch
case 12: // Space countdown case 12: // Space countdown

View file

@ -149,7 +149,12 @@ static void R_InstallSpriteLump(UINT16 wad, // graphics patch
sprtemp[frame].lumppat[r + rightfactor] = lumppat; sprtemp[frame].lumppat[r + rightfactor] = lumppat;
sprtemp[frame].lumpid[r + rightfactor] = lumpid; sprtemp[frame].lumpid[r + rightfactor] = lumpid;
} }
sprtemp[frame].flip |= (flipped ? (0x0F << rightfactor) : 0); // 00001111 or 11110000 in binary, depending on rotation being ROT_L or ROT_R
if (flipped)
sprtemp[frame].flip |= (0x0F<<rightfactor); // 00001111 or 11110000 in binary, depending on rotation being ROT_L or ROT_R
else
sprtemp[frame].flip &= ~(0x0F<<rightfactor); // ditto
return; return;
} }
@ -2615,7 +2620,7 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
player->jumpfactor = skin->jumpfactor; player->jumpfactor = skin->jumpfactor;
if (!(cv_debug || devparm) && !(netgame || multiplayer || demoplayback)) if (!(cv_debug || devparm) && !(netgame || multiplayer || demoplayback || modeattacking))
{ {
if (playernum == consoleplayer) if (playernum == consoleplayer)
CV_StealthSetValue(&cv_playercolor, skin->prefcolor); CV_StealthSetValue(&cv_playercolor, skin->prefcolor);

View file

@ -864,7 +864,10 @@ void Y_Ticker(void)
if (r) if (r)
S_StartSound(NULL, sfx_menu1); S_StartSound(NULL, sfx_menu1);
else else
endtic = intertic + 3*TICRATE; // 3 second pause after end of tally if (modeattacking)
endtic = intertic + 10*TICRATE; // 10 second pause after end of tally
else
endtic = intertic + 3*TICRATE; // 3 second pause after end of tally
} }
else if (intertype == int_match || intertype == int_ctf || intertype == int_teammatch) // match else if (intertype == int_match || intertype == int_ctf || intertype == int_teammatch) // match
{ {
@ -901,19 +904,13 @@ static void Y_UpdateRecordReplays(void)
if (!mainrecords[gamemap-1]) if (!mainrecords[gamemap-1])
G_AllocMainRecordData(gamemap-1); G_AllocMainRecordData(gamemap-1);
if (players[consoleplayer].score > mainrecords[gamemap-1]->score)
mainrecords[gamemap-1]->score = players[consoleplayer].score;
if ((mainrecords[gamemap-1]->time == 0) || (players[consoleplayer].realtime < mainrecords[gamemap-1]->time)) if ((mainrecords[gamemap-1]->time == 0) || (players[consoleplayer].realtime < mainrecords[gamemap-1]->time))
mainrecords[gamemap-1]->time = players[consoleplayer].realtime; mainrecords[gamemap-1]->time = players[consoleplayer].realtime;
if ((UINT16)(players[consoleplayer].health - 1) > mainrecords[gamemap-1]->rings)
mainrecords[gamemap-1]->rings = (UINT16)(players[consoleplayer].health - 1);
// Save demo! // Save demo!
bestdemo[255] = '\0'; bestdemo[255] = '\0';
lastdemo[255] = '\0'; lastdemo[255] = '\0';
G_SetDemoTime(players[consoleplayer].realtime, players[consoleplayer].score, (UINT16)(players[consoleplayer].health-1)); G_SetDemoTime(players[consoleplayer].realtime, 0);
G_CheckDemoStatus(); G_CheckDemoStatus();
I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755); I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755);
@ -939,24 +936,6 @@ static void Y_UpdateRecordReplays(void)
CONS_Printf("\x83%s\x80 %s '%s'\n", M_GetText("NEW RECORD TIME!"), M_GetText("Saved replay as"), bestdemo); CONS_Printf("\x83%s\x80 %s '%s'\n", M_GetText("NEW RECORD TIME!"), M_GetText("Saved replay as"), bestdemo);
} }
snprintf(bestdemo, 255, "%s-%s-score-best.lmp", gpath, cv_chooseskin.string);
if (!FIL_FileExists(bestdemo) || (G_CmpDemoTime(bestdemo, lastdemo) & (1<<1)))
{ // Better score, save this demo.
if (FIL_FileExists(bestdemo))
remove(bestdemo);
FIL_WriteFile(bestdemo, buf, len);
CONS_Printf("\x83%s\x80 %s '%s'\n", M_GetText("NEW HIGH SCORE!"), M_GetText("Saved replay as"), bestdemo);
}
snprintf(bestdemo, 255, "%s-%s-rings-best.lmp", gpath, cv_chooseskin.string);
if (!FIL_FileExists(bestdemo) || (G_CmpDemoTime(bestdemo, lastdemo) & (1<<2)))
{ // Better rings, save this demo.
if (FIL_FileExists(bestdemo))
remove(bestdemo);
FIL_WriteFile(bestdemo, buf, len);
CONS_Printf("\x83%s\x80 %s '%s'\n", M_GetText("NEW MOST RINGS!"), M_GetText("Saved replay as"), bestdemo);
}
//CONS_Printf("%s '%s'\n", M_GetText("Saved replay as"), lastdemo); //CONS_Printf("%s '%s'\n", M_GetText("Saved replay as"), lastdemo);
Z_Free(buf); Z_Free(buf);
@ -998,9 +977,11 @@ void Y_StartIntermission(void)
else else
intertype = (maptol & TOL_NIGHTS) ? int_nights : int_coop; intertype = (maptol & TOL_NIGHTS) ? int_nights : int_coop;
*/ */
/* // srb2kart: time attack tally is UGLY rn
if (modeattacking) if (modeattacking)
intertype = int_timeattack; intertype = int_timeattack;
else else
*/
intertype = int_race; intertype = int_race;
} }
else else
@ -1282,16 +1263,32 @@ void Y_StartIntermission(void)
Y_CalculateMatchWinners(); Y_CalculateMatchWinners();
// set up the levelstring // set up the levelstring
if (mapheaderinfo[prevmap]->actnum) if (mapheaderinfo[prevmap]->zonttl)
snprintf(data.match.levelstring, {
sizeof data.match.levelstring, if (mapheaderinfo[prevmap]->actnum)
"%.32s * %d *", snprintf(data.match.levelstring,
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->actnum); sizeof data.match.levelstring,
"%.32s %.32s * %d *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->zonttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"* %.32s %.32s *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->zonttl);
}
else else
snprintf(data.match.levelstring, {
sizeof data.match.levelstring, if (mapheaderinfo[prevmap]->actnum)
"* %.32s *", snprintf(data.match.levelstring,
mapheaderinfo[prevmap]->lvlttl); sizeof data.match.levelstring,
"%.32s * %d *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"* %.32s *",
mapheaderinfo[prevmap]->lvlttl);
}
data.match.levelstring[sizeof data.match.levelstring - 1] = '\0'; data.match.levelstring[sizeof data.match.levelstring - 1] = '\0';
@ -1307,20 +1304,54 @@ void Y_StartIntermission(void)
case int_race: // (time-only race) case int_race: // (time-only race)
{ {
if ((!modifiedgame || savemoddata) && !multiplayer && !demoplayback) // remove this once we have a proper time attack screen
{
// setup time data
data.coop.tics = players[consoleplayer].realtime;
// Update visitation flags
mapvisited[gamemap-1] |= MV_BEATEN;
if (ALL7EMERALDS(emeralds))
mapvisited[gamemap-1] |= MV_ALLEMERALDS;
if (ultimatemode)
mapvisited[gamemap-1] |= MV_ULTIMATE;
if (data.coop.gotperfbonus)
mapvisited[gamemap-1] |= MV_PERFECT;
if (modeattacking == ATTACKING_RECORD)
Y_UpdateRecordReplays();
}
// Calculate who won // Calculate who won
Y_CalculateTournamentPoints(); Y_CalculateTournamentPoints();
// set up the levelstring // set up the levelstring
if (mapheaderinfo[prevmap]->actnum) if (mapheaderinfo[prevmap]->zonttl)
snprintf(data.match.levelstring, {
sizeof data.match.levelstring, if (mapheaderinfo[prevmap]->actnum)
"%.32s * %d *", snprintf(data.match.levelstring,
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->actnum); sizeof data.match.levelstring,
"%.32s %.32s * %d *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->zonttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"* %.32s %.32s *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->zonttl);
}
else else
snprintf(data.match.levelstring, {
sizeof data.match.levelstring, if (mapheaderinfo[prevmap]->actnum)
"* %.32s *", snprintf(data.match.levelstring,
mapheaderinfo[prevmap]->lvlttl); sizeof data.match.levelstring,
"%.32s * %d *",
mapheaderinfo[prevmap]->lvlttl, mapheaderinfo[prevmap]->actnum);
else
snprintf(data.match.levelstring,
sizeof data.match.levelstring,
"* %.32s *",
mapheaderinfo[prevmap]->lvlttl);
}
data.match.levelstring[sizeof data.match.levelstring - 1] = '\0'; data.match.levelstring[sizeof data.match.levelstring - 1] = '\0';