merge sonicitems into chat-changes so that it's not lagging 10 years behind
This commit is contained in:
commit
3af7b7bf91
|
@ -1,3 +1,4 @@
|
||||||
*.exe
|
*.exe
|
||||||
*.mo
|
*.mo
|
||||||
r_opengl.dll
|
r_opengl.dll
|
||||||
|
*.bat
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
*.exe
|
*.exe
|
||||||
*.mo
|
*.mo
|
||||||
r_opengl.dll
|
r_opengl.dll
|
||||||
|
*.bat
|
||||||
|
|
|
@ -1088,32 +1088,42 @@ static void Setvalue(consvar_t *var, const char *valstr, boolean stealth)
|
||||||
|
|
||||||
if (var->PossibleValue[0].strvalue && !stricmp(var->PossibleValue[0].strvalue, "MIN")) // bounded cvar
|
if (var->PossibleValue[0].strvalue && !stricmp(var->PossibleValue[0].strvalue, "MIN")) // bounded cvar
|
||||||
{
|
{
|
||||||
|
#define MINVAL 0
|
||||||
|
#define MAXVAL 1
|
||||||
INT32 i;
|
INT32 i;
|
||||||
// search for maximum
|
|
||||||
for (i = 1; var->PossibleValue[i].strvalue; i++)
|
|
||||||
if (!stricmp(var->PossibleValue[i].strvalue, "MAX"))
|
|
||||||
break;
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
if (!var->PossibleValue[i].strvalue)
|
if (!var->PossibleValue[MAXVAL].strvalue)
|
||||||
I_Error("Bounded cvar \"%s\" without maximum!\n", var->name);
|
I_Error("Bounded cvar \"%s\" without maximum!\n", var->name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((v != INT32_MIN && v < var->PossibleValue[0].value) || !stricmp(valstr, "MIN"))
|
// search for other
|
||||||
|
for (i = MAXVAL+1; var->PossibleValue[i].strvalue; i++)
|
||||||
|
if (!stricmp(var->PossibleValue[i].strvalue, valstr))
|
||||||
|
{
|
||||||
|
var->value = var->PossibleValue[i].value;
|
||||||
|
var->string = var->PossibleValue[i].strvalue;
|
||||||
|
goto finish;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((v != INT32_MIN && v < var->PossibleValue[MINVAL].value) || !stricmp(valstr, "MIN"))
|
||||||
{
|
{
|
||||||
v = var->PossibleValue[0].value;
|
v = var->PossibleValue[MINVAL].value;
|
||||||
valstr = var->PossibleValue[0].strvalue;
|
valstr = var->PossibleValue[MINVAL].strvalue;
|
||||||
override = true;
|
override = true;
|
||||||
overrideval = v;
|
overrideval = v;
|
||||||
}
|
}
|
||||||
else if ((v != INT32_MIN && v > var->PossibleValue[i].value) || !stricmp(valstr, "MAX"))
|
else if ((v != INT32_MIN && v > var->PossibleValue[MAXVAL].value) || !stricmp(valstr, "MAX"))
|
||||||
{
|
{
|
||||||
v = var->PossibleValue[i].value;
|
v = var->PossibleValue[MAXVAL].value;
|
||||||
valstr = var->PossibleValue[i].strvalue;
|
valstr = var->PossibleValue[MAXVAL].strvalue;
|
||||||
override = true;
|
override = true;
|
||||||
overrideval = v;
|
overrideval = v;
|
||||||
}
|
}
|
||||||
if (v == INT32_MIN)
|
if (v == INT32_MIN)
|
||||||
goto badinput;
|
goto badinput;
|
||||||
|
#undef MINVAL
|
||||||
|
#undef MAXVAL
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1453,7 +1463,6 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||||
|
|
||||||
if (var->PossibleValue)
|
if (var->PossibleValue)
|
||||||
{
|
{
|
||||||
#define MINVAL 0
|
|
||||||
if (var == &cv_nextmap)
|
if (var == &cv_nextmap)
|
||||||
{
|
{
|
||||||
// Special case for the nextmap variable, used only directly from the menu
|
// Special case for the nextmap variable, used only directly from the menu
|
||||||
|
@ -1478,33 +1487,52 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newvalue == oldvalue)
|
if (newvalue == oldvalue)
|
||||||
gt = -1; // don't loop forever if there's none of a certain gametype
|
break; // don't loop forever if there's none of a certain gametype
|
||||||
|
|
||||||
if(!mapheaderinfo[newvalue])
|
if(!mapheaderinfo[newvalue])
|
||||||
continue; // Don't allocate the header. That just makes memory usage skyrocket.
|
continue; // Don't allocate the header. That just makes memory usage skyrocket.
|
||||||
|
|
||||||
} while (newvalue != oldvalue && !M_CanShowLevelInList(newvalue, gt));
|
} while (!M_CanShowLevelInList(newvalue, gt));
|
||||||
|
|
||||||
var->value = newvalue + 1;
|
var->value = newvalue + 1;
|
||||||
var->func();
|
var->func();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#define MINVAL 0
|
||||||
|
#define MAXVAL 1
|
||||||
else if (var->PossibleValue[MINVAL].strvalue && !strcmp(var->PossibleValue[MINVAL].strvalue, "MIN"))
|
else if (var->PossibleValue[MINVAL].strvalue && !strcmp(var->PossibleValue[MINVAL].strvalue, "MIN"))
|
||||||
{
|
{ // SRB2Kart
|
||||||
// search the next to last
|
#ifdef PARANOIA
|
||||||
for (max = 0; var->PossibleValue[max+1].strvalue; max++)
|
if (!var->PossibleValue[MAXVAL].strvalue)
|
||||||
;
|
I_Error("Bounded cvar \"%s\" without maximum!\n", var->name);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (newvalue < var->PossibleValue[MINVAL].value) // add the max+1
|
if (newvalue < var->PossibleValue[MINVAL].value || newvalue > var->PossibleValue[MAXVAL].value)
|
||||||
newvalue += var->PossibleValue[max].value - var->PossibleValue[MINVAL].value + 1;
|
{
|
||||||
|
INT32 currentindice = -1, newindice;
|
||||||
|
for (max = MAXVAL+1; var->PossibleValue[max].strvalue; max++)
|
||||||
|
if (var->PossibleValue[max].value == var->value)
|
||||||
|
currentindice = max;
|
||||||
|
|
||||||
newvalue = var->PossibleValue[MINVAL].value + (newvalue - var->PossibleValue[MINVAL].value)
|
if (currentindice == -1 && max != MAXVAL+1)
|
||||||
% (var->PossibleValue[max].value - var->PossibleValue[MINVAL].value + 1);
|
newindice = ((increment > 0) ? MAXVAL : max) + increment;
|
||||||
|
else
|
||||||
|
newindice = currentindice + increment;
|
||||||
|
|
||||||
CV_SetValue(var, newvalue);
|
if (newindice >= max || newindice <= MAXVAL)
|
||||||
#undef MINVAL
|
{
|
||||||
|
newvalue = var->PossibleValue[((increment > 0) ? MINVAL : MAXVAL)].value;
|
||||||
|
CV_SetValue(var, newvalue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CV_Set(var, var->PossibleValue[newindice].strvalue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CV_SetValue(var, newvalue);
|
||||||
}
|
}
|
||||||
|
#undef MINVAL
|
||||||
|
#undef MAXVAL
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
INT32 currentindice = -1, newindice;
|
INT32 currentindice = -1, newindice;
|
||||||
|
@ -1514,8 +1542,6 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||||
if (var->PossibleValue[max].value == var->value)
|
if (var->PossibleValue[max].value == var->value)
|
||||||
currentindice = max;
|
currentindice = max;
|
||||||
|
|
||||||
max--;
|
|
||||||
|
|
||||||
if (var == &cv_chooseskin)
|
if (var == &cv_chooseskin)
|
||||||
{
|
{
|
||||||
// Special case for the chooseskin variable, used only directly from the menu
|
// Special case for the chooseskin variable, used only directly from the menu
|
||||||
|
@ -1578,7 +1604,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||||
var->value);
|
var->value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
newindice = (currentindice + increment + max + 1) % (max+1);
|
newindice = (currentindice + increment + max) % max;
|
||||||
CV_Set(var, var->PossibleValue[newindice].strvalue);
|
CV_Set(var, var->PossibleValue[newindice].strvalue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,6 +139,21 @@ static CV_PossibleValue_t backcolor_cons_t[] = {{0, "White"}, {1, "Gray"}, {2,
|
||||||
{0, NULL}};
|
{0, NULL}};
|
||||||
consvar_t cons_backcolor = {"con_backcolor", "Green", CV_CALL|CV_SAVE, backcolor_cons_t, CONS_backcolor_Change, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cons_backcolor = {"con_backcolor", "Green", CV_CALL|CV_SAVE, backcolor_cons_t, CONS_backcolor_Change, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
static CV_PossibleValue_t menuhighlight_cons_t[] =
|
||||||
|
{
|
||||||
|
{0, "Game type"},
|
||||||
|
{V_YELLOWMAP, "Always yellow"},
|
||||||
|
{V_PURPLEMAP, "Always purple"},
|
||||||
|
{V_GREENMAP, "Always green"},
|
||||||
|
{V_BLUEMAP, "Always blue"},
|
||||||
|
{V_REDMAP, "Always red"},
|
||||||
|
{V_GRAYMAP, "Always gray"},
|
||||||
|
{V_ORANGEMAP, "Always orange"},
|
||||||
|
{V_SKYMAP, "Always sky-blue"},
|
||||||
|
{0, NULL}
|
||||||
|
};
|
||||||
|
consvar_t cons_menuhighlight = {"menuhighlight", "Game type", CV_SAVE, menuhighlight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
static void CON_Print(char *msg);
|
static void CON_Print(char *msg);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -227,13 +242,7 @@ static void CONS_Bind_f(void)
|
||||||
// Font colormap colors
|
// Font colormap colors
|
||||||
// TODO: This could probably be improved somehow...
|
// TODO: This could probably be improved somehow...
|
||||||
// These colormaps are 99% identical, with just a few changed bytes
|
// These colormaps are 99% identical, with just a few changed bytes
|
||||||
UINT8 *yellowmap;
|
UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap;
|
||||||
UINT8 *purplemap;
|
|
||||||
UINT8 *lgreenmap;
|
|
||||||
UINT8 *bluemap;
|
|
||||||
UINT8 *graymap;
|
|
||||||
UINT8 *redmap;
|
|
||||||
UINT8 *orangemap;
|
|
||||||
|
|
||||||
// Console BG color
|
// Console BG color
|
||||||
UINT8 *consolebgmap = NULL;
|
UINT8 *consolebgmap = NULL;
|
||||||
|
@ -278,39 +287,34 @@ static void CONS_backcolor_Change(void)
|
||||||
static void CON_SetupColormaps(void)
|
static void CON_SetupColormaps(void)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
UINT8 *memorysrc = (UINT8 *)Z_Malloc((256*8), PU_STATIC, NULL);
|
||||||
|
|
||||||
yellowmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
purplemap = memorysrc;
|
||||||
graymap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
yellowmap = (purplemap+256);
|
||||||
purplemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
greenmap = (yellowmap+256);
|
||||||
lgreenmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
bluemap = (greenmap+256);
|
||||||
bluemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
redmap = (bluemap+256);
|
||||||
redmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
graymap = (redmap+256);
|
||||||
orangemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
orangemap = (graymap+256);
|
||||||
|
skymap = (orangemap+256);
|
||||||
|
|
||||||
// setup the other colormaps, for console text
|
// setup the other colormaps, for console text
|
||||||
|
|
||||||
// these don't need to be aligned, unless you convert the
|
// these don't need to be aligned, unless you convert the
|
||||||
// V_DrawMappedPatch() into optimised asm.
|
// V_DrawMappedPatch() into optimised asm.
|
||||||
|
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < (256*8); i++, ++memorysrc)
|
||||||
{
|
*memorysrc = (UINT8)(i & 0xFF); // remap each color to itself...
|
||||||
yellowmap[i] = (UINT8)i; // remap each color to itself...
|
|
||||||
graymap[i] = (UINT8)i;
|
|
||||||
purplemap[i] = (UINT8)i;
|
|
||||||
lgreenmap[i] = (UINT8)i;
|
|
||||||
bluemap[i] = (UINT8)i;
|
|
||||||
redmap[i] = (UINT8)i;
|
|
||||||
orangemap[i] = (UINT8)i;
|
|
||||||
}
|
|
||||||
|
|
||||||
// SRB2Kart: Different console font, new colors
|
// SRB2Kart: Different console font, new colors
|
||||||
yellowmap[120] = (UINT8)103;
|
|
||||||
purplemap[120] = (UINT8)194;
|
purplemap[120] = (UINT8)194;
|
||||||
lgreenmap[120] = (UINT8)162;
|
yellowmap[120] = (UINT8)103;
|
||||||
|
greenmap[120] = (UINT8)162;
|
||||||
bluemap[120] = (UINT8)228;
|
bluemap[120] = (UINT8)228;
|
||||||
graymap[120] = (UINT8)10;
|
graymap[120] = (UINT8)10;
|
||||||
redmap[120] = (UINT8)126;
|
redmap[120] = (UINT8)126; // battle
|
||||||
orangemap[120] = (UINT8)85;
|
orangemap[120] = (UINT8)85; // record attack
|
||||||
|
skymap[120] = (UINT8)214; // race
|
||||||
|
|
||||||
// Init back colormap
|
// Init back colormap
|
||||||
CON_SetupBackColormap();
|
CON_SetupBackColormap();
|
||||||
|
@ -367,6 +371,7 @@ void CON_Init(void)
|
||||||
CV_RegisterVar(&cons_height);
|
CV_RegisterVar(&cons_height);
|
||||||
CV_RegisterVar(&cons_backpic);
|
CV_RegisterVar(&cons_backpic);
|
||||||
CV_RegisterVar(&cons_backcolor);
|
CV_RegisterVar(&cons_backcolor);
|
||||||
|
CV_RegisterVar(&cons_menuhighlight);
|
||||||
COM_AddCommand("bind", CONS_Bind_f);
|
COM_AddCommand("bind", CONS_Bind_f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1620,6 +1625,6 @@ void CON_Drawer(void)
|
||||||
if (con_curlines > 0)
|
if (con_curlines > 0)
|
||||||
CON_DrawConsole();
|
CON_DrawConsole();
|
||||||
else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS
|
else if (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE || gamestate == GS_CREDITS
|
||||||
|| gamestate == GS_VOTING)
|
|| gamestate == GS_VOTING || gamestate == GS_EVALUATION || gamestate == GS_WAITINGPLAYERS)
|
||||||
CON_DrawHudlines();
|
CON_DrawHudlines();
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,9 @@ extern INT32 con_clearlines; // lines of top of screen to refresh
|
||||||
extern boolean con_hudupdate; // hud messages have changed, need refresh
|
extern boolean con_hudupdate; // hud messages have changed, need refresh
|
||||||
extern UINT32 con_scalefactor; // console text scale factor
|
extern UINT32 con_scalefactor; // console text scale factor
|
||||||
|
|
||||||
extern consvar_t cons_backcolor;
|
extern consvar_t cons_backcolor, cons_menuhighlight;
|
||||||
|
|
||||||
extern UINT8 *yellowmap, *purplemap, *lgreenmap, *bluemap, *graymap, *redmap, *orangemap;
|
extern UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap;
|
||||||
|
|
||||||
// Console bg color (auto updated to match)
|
// Console bg color (auto updated to match)
|
||||||
extern UINT8 *consolebgmap;
|
extern UINT8 *consolebgmap;
|
||||||
|
|
169
src/d_clisrv.c
169
src/d_clisrv.c
|
@ -1166,7 +1166,7 @@ static inline void CL_DrawConnectionStatus(void)
|
||||||
INT32 ccstime = I_GetTime();
|
INT32 ccstime = I_GetTime();
|
||||||
|
|
||||||
// Draw background fade
|
// Draw background fade
|
||||||
V_DrawFadeScreen();
|
V_DrawFadeScreen(0xFF00, 16);
|
||||||
|
|
||||||
// Draw the bottom box.
|
// Draw the bottom box.
|
||||||
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-24-8, 32, 1);
|
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-24-8, 32, 1);
|
||||||
|
@ -1559,7 +1559,7 @@ static void SV_SavedGame(void)
|
||||||
{
|
{
|
||||||
size_t length;
|
size_t length;
|
||||||
UINT8 *savebuffer;
|
UINT8 *savebuffer;
|
||||||
XBOXSTATIC char tmpsave[256];
|
XBOXSTATIC char tmpsave[264];
|
||||||
|
|
||||||
if (!cv_dumpconsistency.value)
|
if (!cv_dumpconsistency.value)
|
||||||
return;
|
return;
|
||||||
|
@ -1601,7 +1601,7 @@ static void CL_LoadReceivedSavegame(void)
|
||||||
{
|
{
|
||||||
UINT8 *savebuffer = NULL;
|
UINT8 *savebuffer = NULL;
|
||||||
size_t length, decompressedlen;
|
size_t length, decompressedlen;
|
||||||
XBOXSTATIC char tmpsave[256];
|
XBOXSTATIC char tmpsave[264];
|
||||||
|
|
||||||
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
||||||
|
|
||||||
|
@ -2062,7 +2062,7 @@ static void CL_ConnectToServer(boolean viams)
|
||||||
tic_t asksent;
|
tic_t asksent;
|
||||||
#endif
|
#endif
|
||||||
#ifdef JOININGAME
|
#ifdef JOININGAME
|
||||||
XBOXSTATIC char tmpsave[256];
|
XBOXSTATIC char tmpsave[264];
|
||||||
|
|
||||||
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2145,6 +2145,8 @@ static void CL_ConnectToServer(boolean viams)
|
||||||
}
|
}
|
||||||
while (!(cl_mode == CL_CONNECTED && (client || (server && nodewaited <= pnumnodes))));
|
while (!(cl_mode == CL_CONNECTED && (client || (server && nodewaited <= pnumnodes))));
|
||||||
|
|
||||||
|
if (netgame)
|
||||||
|
F_StartWaitingPlayers();
|
||||||
DEBFILE(va("Synchronisation Finished\n"));
|
DEBFILE(va("Synchronisation Finished\n"));
|
||||||
|
|
||||||
displayplayer = consoleplayer;
|
displayplayer = consoleplayer;
|
||||||
|
@ -2430,6 +2432,9 @@ static void CL_RemovePlayer(INT32 playernum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (K_IsPlayerWanted(&players[playernum]))
|
||||||
|
K_CalculateBattleWanted();
|
||||||
|
|
||||||
if (gametype == GT_CTF)
|
if (gametype == GT_CTF)
|
||||||
P_PlayerFlagBurst(&players[playernum], false); // Don't take the flag with you!
|
P_PlayerFlagBurst(&players[playernum], false); // Don't take the flag with you!
|
||||||
|
|
||||||
|
@ -2490,7 +2495,7 @@ static void CL_RemovePlayer(INT32 playernum)
|
||||||
if (G_TagGametype()) //Check if you still have a game. Location flexible. =P
|
if (G_TagGametype()) //Check if you still have a game. Location flexible. =P
|
||||||
P_CheckSurvivors();
|
P_CheckSurvivors();
|
||||||
else if (G_BattleGametype()) // SRB2Kart
|
else if (G_BattleGametype()) // SRB2Kart
|
||||||
K_CheckBalloons();
|
K_CheckBumpers();
|
||||||
else if (G_RaceGametype())
|
else if (G_RaceGametype())
|
||||||
P_CheckRacers();
|
P_CheckRacers();
|
||||||
}
|
}
|
||||||
|
@ -3534,7 +3539,7 @@ static void HandleConnect(SINT8 node)
|
||||||
#ifdef JOININGAME
|
#ifdef JOININGAME
|
||||||
if (nodewaiting[node])
|
if (nodewaiting[node])
|
||||||
{
|
{
|
||||||
if ((gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING) && newnode)
|
if (node && newnode)
|
||||||
{
|
{
|
||||||
SV_SendSaveGame(node); // send a complete game state
|
SV_SendSaveGame(node); // send a complete game state
|
||||||
DEBFILE("send savegame\n");
|
DEBFILE("send savegame\n");
|
||||||
|
@ -3705,7 +3710,8 @@ static void HandlePacketFromAwayNode(SINT8 node)
|
||||||
if (client)
|
if (client)
|
||||||
{
|
{
|
||||||
maketic = gametic = neededtic = (tic_t)LONG(netbuffer->u.servercfg.gametic);
|
maketic = gametic = neededtic = (tic_t)LONG(netbuffer->u.servercfg.gametic);
|
||||||
gametype = netbuffer->u.servercfg.gametype;
|
if ((gametype = netbuffer->u.servercfg.gametype) >= NUMGAMETYPES)
|
||||||
|
I_Error("Bad gametype in cliserv!");
|
||||||
modifiedgame = netbuffer->u.servercfg.modifiedgame;
|
modifiedgame = netbuffer->u.servercfg.modifiedgame;
|
||||||
for (j = 0; j < MAXPLAYERS; j++)
|
for (j = 0; j < MAXPLAYERS; j++)
|
||||||
adminplayers[j] = netbuffer->u.servercfg.adminplayers[j];
|
adminplayers[j] = netbuffer->u.servercfg.adminplayers[j];
|
||||||
|
@ -3746,13 +3752,12 @@ static void HandlePacketFromAwayNode(SINT8 node)
|
||||||
/// \note Wait. What if a Lua script uses some global custom variables synched with the NetVars hook?
|
/// \note Wait. What if a Lua script uses some global custom variables synched with the NetVars hook?
|
||||||
/// Shouldn't them be downloaded even at intermission time?
|
/// Shouldn't them be downloaded even at intermission time?
|
||||||
/// Also, according to HandleConnect, the server will send the savegame even during intermission...
|
/// Also, according to HandleConnect, the server will send the savegame even during intermission...
|
||||||
if (netbuffer->u.servercfg.gamestate == GS_LEVEL
|
/// Sryder 2018-07-05: If we don't want to send the player config another way we need to send the gamestate
|
||||||
/*|| netbuffer->u.servercfg.gamestate == GS_INTERMISSION
|
/// At almost any gamestate there could be joiners... So just always send gamestate?
|
||||||
|| netbuffer->u.servercfg.gamestate == GS_VOTING*/)
|
cl_mode = ((server) ? CL_CONNECTED : CL_DOWNLOADSAVEGAME);
|
||||||
cl_mode = CL_DOWNLOADSAVEGAME;
|
#else
|
||||||
else
|
cl_mode = CL_CONNECTED;
|
||||||
#endif
|
#endif
|
||||||
cl_mode = CL_CONNECTED;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3874,9 +3879,8 @@ FILESTAMP
|
||||||
// Update the nettics
|
// Update the nettics
|
||||||
nettics[node] = realend;
|
nettics[node] = realend;
|
||||||
|
|
||||||
// Don't do anything for packets of type NODEKEEPALIVE?
|
// This should probably still timeout though, as the node should always have a player 1 number
|
||||||
if (netconsole == -1 || netbuffer->packettype == PT_NODEKEEPALIVE
|
if (netconsole == -1)
|
||||||
|| netbuffer->packettype == PT_NODEKEEPALIVEMIS)
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// If a client sends a ticcmd it should mean they are done receiving the savegame
|
// If a client sends a ticcmd it should mean they are done receiving the savegame
|
||||||
|
@ -3886,6 +3890,12 @@ FILESTAMP
|
||||||
/// \todo Use a separate cvar for that kind of timeout?
|
/// \todo Use a separate cvar for that kind of timeout?
|
||||||
freezetimeout[node] = I_GetTime() + connectiontimeout;
|
freezetimeout[node] = I_GetTime() + connectiontimeout;
|
||||||
|
|
||||||
|
// Don't do anything for packets of type NODEKEEPALIVE?
|
||||||
|
// Sryder 2018/07/01: Update the freezetimeout still!
|
||||||
|
if (netbuffer->packettype == PT_NODEKEEPALIVE
|
||||||
|
|| netbuffer->packettype == PT_NODEKEEPALIVEMIS)
|
||||||
|
break;
|
||||||
|
|
||||||
// Copy ticcmd
|
// Copy ticcmd
|
||||||
G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][netconsole], &netbuffer->u.clientpak.cmd, 1);
|
G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][netconsole], &netbuffer->u.clientpak.cmd, 1);
|
||||||
|
|
||||||
|
@ -4335,7 +4345,7 @@ static INT16 Consistancy(void)
|
||||||
{
|
{
|
||||||
if (!playeringame[i])
|
if (!playeringame[i])
|
||||||
ret ^= 0xCCCC;
|
ret ^= 0xCCCC;
|
||||||
else if (!players[i].mo);
|
else if (!players[i].mo || gamestate != GS_LEVEL);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret += players[i].mo->x;
|
ret += players[i].mo->x;
|
||||||
|
@ -4346,7 +4356,7 @@ static INT16 Consistancy(void)
|
||||||
}
|
}
|
||||||
// I give up
|
// I give up
|
||||||
// Coop desynching enemies is painful
|
// Coop desynching enemies is painful
|
||||||
if (!G_RaceGametype())
|
if (gamestate == GS_LEVEL)
|
||||||
ret += P_GetRandSeed();
|
ret += P_GetRandSeed();
|
||||||
|
|
||||||
#ifdef MOBJCONSISTANCY
|
#ifdef MOBJCONSISTANCY
|
||||||
|
@ -4355,70 +4365,73 @@ static INT16 Consistancy(void)
|
||||||
DEBFILE(va("Consistancy = %u\n", ret));
|
DEBFILE(va("Consistancy = %u\n", ret));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
if (gamestate == GS_LEVEL)
|
||||||
{
|
{
|
||||||
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||||
continue;
|
|
||||||
|
|
||||||
mo = (mobj_t *)th;
|
|
||||||
|
|
||||||
if (mo->flags & (MF_SPECIAL | MF_SOLID | MF_PUSHABLE | MF_BOSS | MF_MISSILE | MF_SPRING | MF_MONITOR | MF_FIRE | MF_ENEMY | MF_PAIN | MF_STICKY))
|
|
||||||
{
|
{
|
||||||
ret -= mo->type;
|
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
||||||
ret += mo->x;
|
continue;
|
||||||
ret -= mo->y;
|
|
||||||
ret += mo->z;
|
mo = (mobj_t *)th;
|
||||||
ret -= mo->momx;
|
|
||||||
ret += mo->momy;
|
if (mo->flags & (MF_SPECIAL | MF_SOLID | MF_PUSHABLE | MF_BOSS | MF_MISSILE | MF_SPRING | MF_MONITOR | MF_FIRE | MF_ENEMY | MF_PAIN | MF_STICKY))
|
||||||
ret -= mo->momz;
|
|
||||||
ret += mo->angle;
|
|
||||||
ret -= mo->flags;
|
|
||||||
ret += mo->flags2;
|
|
||||||
ret -= mo->eflags;
|
|
||||||
if (mo->target)
|
|
||||||
{
|
{
|
||||||
ret += mo->target->type;
|
ret -= mo->type;
|
||||||
ret -= mo->target->x;
|
ret += mo->x;
|
||||||
ret += mo->target->y;
|
ret -= mo->y;
|
||||||
ret -= mo->target->z;
|
ret += mo->z;
|
||||||
ret += mo->target->momx;
|
ret -= mo->momx;
|
||||||
ret -= mo->target->momy;
|
ret += mo->momy;
|
||||||
ret += mo->target->momz;
|
ret -= mo->momz;
|
||||||
ret -= mo->target->angle;
|
ret += mo->angle;
|
||||||
ret += mo->target->flags;
|
ret -= mo->flags;
|
||||||
ret -= mo->target->flags2;
|
ret += mo->flags2;
|
||||||
ret += mo->target->eflags;
|
ret -= mo->eflags;
|
||||||
ret -= mo->target->state - states;
|
if (mo->target)
|
||||||
ret += mo->target->tics;
|
{
|
||||||
ret -= mo->target->sprite;
|
ret += mo->target->type;
|
||||||
ret += mo->target->frame;
|
ret -= mo->target->x;
|
||||||
|
ret += mo->target->y;
|
||||||
|
ret -= mo->target->z;
|
||||||
|
ret += mo->target->momx;
|
||||||
|
ret -= mo->target->momy;
|
||||||
|
ret += mo->target->momz;
|
||||||
|
ret -= mo->target->angle;
|
||||||
|
ret += mo->target->flags;
|
||||||
|
ret -= mo->target->flags2;
|
||||||
|
ret += mo->target->eflags;
|
||||||
|
ret -= mo->target->state - states;
|
||||||
|
ret += mo->target->tics;
|
||||||
|
ret -= mo->target->sprite;
|
||||||
|
ret += mo->target->frame;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ret ^= 0x3333;
|
||||||
|
if (mo->tracer && mo->tracer->type != MT_OVERLAY)
|
||||||
|
{
|
||||||
|
ret += mo->tracer->type;
|
||||||
|
ret -= mo->tracer->x;
|
||||||
|
ret += mo->tracer->y;
|
||||||
|
ret -= mo->tracer->z;
|
||||||
|
ret += mo->tracer->momx;
|
||||||
|
ret -= mo->tracer->momy;
|
||||||
|
ret += mo->tracer->momz;
|
||||||
|
ret -= mo->tracer->angle;
|
||||||
|
ret += mo->tracer->flags;
|
||||||
|
ret -= mo->tracer->flags2;
|
||||||
|
ret += mo->tracer->eflags;
|
||||||
|
ret -= mo->tracer->state - states;
|
||||||
|
ret += mo->tracer->tics;
|
||||||
|
ret -= mo->tracer->sprite;
|
||||||
|
ret += mo->tracer->frame;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ret ^= 0xAAAA;
|
||||||
|
ret -= mo->state - states;
|
||||||
|
ret += mo->tics;
|
||||||
|
ret -= mo->sprite;
|
||||||
|
ret += mo->frame;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
ret ^= 0x3333;
|
|
||||||
if (mo->tracer && mo->tracer->type != MT_OVERLAY)
|
|
||||||
{
|
|
||||||
ret += mo->tracer->type;
|
|
||||||
ret -= mo->tracer->x;
|
|
||||||
ret += mo->tracer->y;
|
|
||||||
ret -= mo->tracer->z;
|
|
||||||
ret += mo->tracer->momx;
|
|
||||||
ret -= mo->tracer->momy;
|
|
||||||
ret += mo->tracer->momz;
|
|
||||||
ret -= mo->tracer->angle;
|
|
||||||
ret += mo->tracer->flags;
|
|
||||||
ret -= mo->tracer->flags2;
|
|
||||||
ret += mo->tracer->eflags;
|
|
||||||
ret -= mo->tracer->state - states;
|
|
||||||
ret += mo->tracer->tics;
|
|
||||||
ret -= mo->tracer->sprite;
|
|
||||||
ret += mo->tracer->frame;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret ^= 0xAAAA;
|
|
||||||
ret -= mo->state - states;
|
|
||||||
ret += mo->tics;
|
|
||||||
ret -= mo->sprite;
|
|
||||||
ret += mo->frame;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
68
src/d_main.c
68
src/d_main.c
|
@ -125,10 +125,12 @@ INT32 postimgparam3;
|
||||||
postimg_t postimgtype4 = postimg_none;
|
postimg_t postimgtype4 = postimg_none;
|
||||||
INT32 postimgparam4;
|
INT32 postimgparam4;
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
boolean nomidimusic = true, nosound = true;
|
boolean nomidimusic = false;
|
||||||
|
boolean nosound = true;
|
||||||
boolean nodigimusic = true;
|
boolean nodigimusic = true;
|
||||||
#else
|
#else
|
||||||
boolean nomidimusic = false, nosound = false;
|
boolean nomidimusic = false;
|
||||||
|
boolean nosound = false;
|
||||||
boolean nodigimusic = false; // No fmod-based music
|
boolean nodigimusic = false; // No fmod-based music
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -295,15 +297,15 @@ static void D_Display(void)
|
||||||
{
|
{
|
||||||
// set for all later
|
// set for all later
|
||||||
wipedefindex = gamestate; // wipe_xxx_toblack
|
wipedefindex = gamestate; // wipe_xxx_toblack
|
||||||
if (gamestate == GS_INTERMISSION)
|
if (gamestate == GS_TITLESCREEN && wipegamestate != GS_INTRO)
|
||||||
|
wipedefindex = wipe_timeattack_toblack;
|
||||||
|
else if (gamestate == GS_INTERMISSION)
|
||||||
{
|
{
|
||||||
if (intertype == int_spec) // Special Stage
|
if (intertype == int_spec) // Special Stage
|
||||||
wipedefindex = wipe_specinter_toblack;
|
wipedefindex = wipe_specinter_toblack;
|
||||||
else //if (intertype != int_coop) // Multiplayer
|
else //if (intertype != int_coop) // Multiplayer
|
||||||
wipedefindex = wipe_multinter_toblack;
|
wipedefindex = wipe_multinter_toblack;
|
||||||
}
|
}
|
||||||
else if (gamestate == GS_VOTING)
|
|
||||||
wipedefindex = wipe_multinter_toblack;
|
|
||||||
|
|
||||||
if (rendermode != render_none)
|
if (rendermode != render_none)
|
||||||
{
|
{
|
||||||
|
@ -315,6 +317,8 @@ static void D_Display(void)
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
F_WipeEndScreen();
|
F_WipeEndScreen();
|
||||||
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK);
|
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK);
|
||||||
|
if (wipegamestate == GS_LEVEL && rendermode != render_none)
|
||||||
|
V_SetPaletteLump("PLAYPAL"); // Reset the palette
|
||||||
}
|
}
|
||||||
|
|
||||||
F_WipeStartScreen();
|
F_WipeStartScreen();
|
||||||
|
@ -368,6 +372,7 @@ static void D_Display(void)
|
||||||
|
|
||||||
case GS_EVALUATION:
|
case GS_EVALUATION:
|
||||||
F_GameEvaluationDrawer();
|
F_GameEvaluationDrawer();
|
||||||
|
HU_Erase();
|
||||||
HU_Drawer();
|
HU_Drawer();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -383,10 +388,19 @@ static void D_Display(void)
|
||||||
|
|
||||||
case GS_TITLESCREEN:
|
case GS_TITLESCREEN:
|
||||||
F_TitleScreenDrawer();
|
F_TitleScreenDrawer();
|
||||||
|
if (wipe)
|
||||||
|
wipedefindex = wipe_titlescreen_toblack;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GS_WAITINGPLAYERS:
|
case GS_WAITINGPLAYERS:
|
||||||
// The clientconnect drawer is independent...
|
// The clientconnect drawer is independent...
|
||||||
|
if (netgame)
|
||||||
|
{
|
||||||
|
// I don't think HOM from nothing drawing is independent...
|
||||||
|
F_WaitingPlayersDrawer();
|
||||||
|
HU_Erase();
|
||||||
|
HU_Drawer();
|
||||||
|
}
|
||||||
case GS_DEDICATEDSERVER:
|
case GS_DEDICATEDSERVER:
|
||||||
case GS_NULL:
|
case GS_NULL:
|
||||||
break;
|
break;
|
||||||
|
@ -526,7 +540,7 @@ static void D_Display(void)
|
||||||
wipegamestate = gamestate;
|
wipegamestate = gamestate;
|
||||||
|
|
||||||
// draw pause pic
|
// draw pause pic
|
||||||
if (paused && cv_showhud.value && (!menuactive || netgame))
|
if (paused && cv_showhud.value)
|
||||||
{
|
{
|
||||||
INT32 py;
|
INT32 py;
|
||||||
patch_t *patch;
|
patch_t *patch;
|
||||||
|
@ -812,9 +826,9 @@ void D_StartTitle(void)
|
||||||
F_StartTitleScreen();
|
F_StartTitleScreen();
|
||||||
CON_ToggleOff();
|
CON_ToggleOff();
|
||||||
|
|
||||||
// Reset the palette
|
// Reset the palette -- SRB2Kart: actually never mind let's do this in the middle of every fade
|
||||||
if (rendermode != render_none)
|
/*if (rendermode != render_none)
|
||||||
V_SetPaletteLump("PLAYPAL");
|
V_SetPaletteLump("PLAYPAL");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -942,6 +956,10 @@ static void IdentifyVersion(void)
|
||||||
D_AddFile(va(pandf,srb2waddir,"maps.kart"));
|
D_AddFile(va(pandf,srb2waddir,"maps.kart"));
|
||||||
D_AddFile(va(pandf,srb2waddir,"sounds.kart"));
|
D_AddFile(va(pandf,srb2waddir,"sounds.kart"));
|
||||||
|
|
||||||
|
#ifdef USE_PATCH_KART
|
||||||
|
D_AddFile(va(pandf,srb2waddir,"patch.kart"));
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
|
#if !defined (HAVE_SDL) || defined (HAVE_MIXER)
|
||||||
{
|
{
|
||||||
#if defined (DC) && 0
|
#if defined (DC) && 0
|
||||||
|
@ -1240,25 +1258,23 @@ void D_SRB2Main(void)
|
||||||
#ifndef DEVELOP // md5s last updated 12/14/14
|
#ifndef DEVELOP // md5s last updated 12/14/14
|
||||||
|
|
||||||
// Check MD5s of autoloaded files
|
// Check MD5s of autoloaded files
|
||||||
W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad
|
mainwads = 0;
|
||||||
W_VerifyFileMD5(1, ASSET_HASH_GFX_DTA); // gfx.kart
|
W_VerifyFileMD5(mainwads, ASSET_HASH_SRB2_SRB); mainwads++; // srb2.srb/srb2.wad
|
||||||
W_VerifyFileMD5(2, ASSET_HASH_CHARS_DTA); // chars.kart
|
|
||||||
W_VerifyFileMD5(3, ASSET_HASH_MAPS_DTA); // maps.kart
|
|
||||||
// sounds.kart - since music is large, we'll ignore it for now.
|
|
||||||
|
|
||||||
#ifdef USE_PATCH_DTA
|
#ifdef USE_PATCH_DTA
|
||||||
W_VerifyFileMD5(4, ASSET_HASH_PATCH_DTA); // patch.dta
|
W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_DTA); mainwads++; // patch.dta
|
||||||
|
#endif
|
||||||
|
W_VerifyFileMD5(mainwads, ASSET_HASH_GFX_KART); mainwads++; // gfx.kart
|
||||||
|
W_VerifyFileMD5(mainwads, ASSET_HASH_CHARS_KART); mainwads++; // chars.kart
|
||||||
|
W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_KART); mainwads++; // maps.kart
|
||||||
|
//W_VerifyFileMD5(mainwads, ASSET_HASH_SOUNDS_KART); mainwads++; // sounds.kart - doesn't trigger modifiedgame, doesn't need an MD5...?
|
||||||
|
#ifdef USE_PATCH_KART
|
||||||
|
W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_KART); mainwads++; // patch.kart
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// don't check music.dta because people like to modify it, and it doesn't matter if they do
|
// don't check music.dta because people like to modify it, and it doesn't matter if they do
|
||||||
// ...except it does if they slip maps in there, and that's what W_VerifyNMUSlumps is for.
|
// ...except it does if they slip maps in there, and that's what W_VerifyNMUSlumps is for.
|
||||||
#endif //ifndef DEVELOP
|
#endif //ifndef DEVELOP
|
||||||
|
|
||||||
mainwads = 4; // there are 4 wads not to unload
|
|
||||||
#ifdef USE_PATCH_DTA
|
|
||||||
++mainwads; // patch.dta adds one more
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cht_Init();
|
cht_Init();
|
||||||
|
|
||||||
//---------------------------------------------------- READY SCREEN
|
//---------------------------------------------------- READY SCREEN
|
||||||
|
@ -1325,7 +1341,7 @@ void D_SRB2Main(void)
|
||||||
if (dedicated)
|
if (dedicated)
|
||||||
{
|
{
|
||||||
nosound = true;
|
nosound = true;
|
||||||
nomidimusic = nodigimusic = true;
|
/*nomidimusic = */nodigimusic = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1334,17 +1350,17 @@ void D_SRB2Main(void)
|
||||||
if (M_CheckParm("-nosound"))
|
if (M_CheckParm("-nosound"))
|
||||||
nosound = true;
|
nosound = true;
|
||||||
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
|
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
|
||||||
nomidimusic = nodigimusic = true;
|
/*nomidimusic = */nodigimusic = true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (M_CheckParm("-nomidimusic"))
|
/*if (M_CheckParm("-nomidimusic"))
|
||||||
nomidimusic = true; ; // WARNING: DOS version initmusic in I_StartupSound
|
nomidimusic = true; ; // WARNING: DOS version initmusic in I_StartupSound*/
|
||||||
if (M_CheckParm("-nodigmusic"))
|
if (M_CheckParm("-nodigmusic"))
|
||||||
nodigimusic = true; // WARNING: DOS version initmusic in I_StartupSound
|
nodigimusic = true; // WARNING: DOS version initmusic in I_StartupSound
|
||||||
}
|
}
|
||||||
I_StartupSound();
|
I_StartupSound();
|
||||||
I_InitMusic();
|
I_InitMusic();
|
||||||
S_Init(cv_soundvolume.value, cv_digmusicvolume.value, cv_midimusicvolume.value);
|
S_Init(cv_soundvolume.value, cv_digmusicvolume.value);//, cv_midimusicvolume.value);
|
||||||
|
|
||||||
CONS_Printf("ST_Init(): Init status bar.\n");
|
CONS_Printf("ST_Init(): Init status bar.\n");
|
||||||
ST_Init();
|
ST_Init();
|
||||||
|
|
|
@ -41,7 +41,7 @@ void D_SRB2Main(void);
|
||||||
// Called by IO functions when input is detected.
|
// Called by IO functions when input is detected.
|
||||||
void D_PostEvent(const event_t *ev);
|
void D_PostEvent(const event_t *ev);
|
||||||
#ifndef DOXYGEN
|
#ifndef DOXYGEN
|
||||||
FUNCMATH void D_PostEvent_end(void); // delimiter for locking memory
|
void D_PostEvent_end(void); // delimiter for locking memory
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void D_ProcessEvents(void);
|
void D_ProcessEvents(void);
|
||||||
|
|
439
src/d_netcmd.c
439
src/d_netcmd.c
|
@ -109,10 +109,12 @@ static void Color4_OnChange(void);
|
||||||
static void DummyConsvar_OnChange(void);
|
static void DummyConsvar_OnChange(void);
|
||||||
static void SoundTest_OnChange(void);
|
static void SoundTest_OnChange(void);
|
||||||
|
|
||||||
|
static void BaseNumLaps_OnChange(void);
|
||||||
static void KartFrantic_OnChange(void);
|
static void KartFrantic_OnChange(void);
|
||||||
static void KartSpeed_OnChange(void);
|
static void KartSpeed_OnChange(void);
|
||||||
static void KartMirror_OnChange(void);
|
static void KartMirror_OnChange(void);
|
||||||
static void KartComeback_OnChange(void);
|
static void KartComeback_OnChange(void);
|
||||||
|
static void KartEliminateLast_OnChange(void);
|
||||||
|
|
||||||
#ifdef NETGAME_DEVMODE
|
#ifdef NETGAME_DEVMODE
|
||||||
static void Fishcake_OnChange(void);
|
static void Fishcake_OnChange(void);
|
||||||
|
@ -220,7 +222,7 @@ static CV_PossibleValue_t competitionboxes_cons_t[] = {{0, "Normal"}, {1, "Rando
|
||||||
static CV_PossibleValue_t matchboxes_cons_t[] = {{0, "Normal"}, {1, "Random"}, {2, "Non-Random"},
|
static CV_PossibleValue_t matchboxes_cons_t[] = {{0, "Normal"}, {1, "Random"}, {2, "Non-Random"},
|
||||||
{3, "None"}, {0, NULL}};
|
{3, "None"}, {0, NULL}};
|
||||||
|
|
||||||
static CV_PossibleValue_t chances_cons_t[] = {{0, "MIN"}, {9, "MAX"}, {0, NULL}};
|
//static CV_PossibleValue_t chances_cons_t[] = {{0, "MIN"}, {9, "MAX"}, {0, NULL}};
|
||||||
static CV_PossibleValue_t match_scoring_cons_t[] = {{0, "Normal"}, {1, "Classic"}, {0, NULL}};
|
static CV_PossibleValue_t match_scoring_cons_t[] = {{0, "Normal"}, {1, "Classic"}, {0, NULL}};
|
||||||
static CV_PossibleValue_t pause_cons_t[] = {{0, "Server"}, {1, "All"}, {0, NULL}};
|
static CV_PossibleValue_t pause_cons_t[] = {{0, "Server"}, {1, "All"}, {0, NULL}};
|
||||||
|
|
||||||
|
@ -244,7 +246,7 @@ consvar_t cv_competitionboxes = {"competitionboxes", "Random", CV_NETVAR|CV_CHEA
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
static CV_PossibleValue_t seenames_cons_t[] = {{0, "Off"}, {1, "Colorless"}, {2, "Team"}, {3, "Ally/Foe"}, {0, NULL}};
|
static CV_PossibleValue_t seenames_cons_t[] = {{0, "Off"}, {1, "Colorless"}, {2, "Team"}, {3, "Ally/Foe"}, {0, NULL}};
|
||||||
consvar_t cv_seenames = {"seenames", "Ally/Foe", CV_SAVE, seenames_cons_t, 0, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_seenames = {"seenames", "Off", CV_SAVE, seenames_cons_t, 0, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_allowseenames = {"allowseenames", "Yes", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_allowseenames = {"allowseenames", "Yes", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -271,26 +273,15 @@ INT32 cv_debug;
|
||||||
consvar_t cv_usemouse = {"use_mouse", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_usemouse = {"use_mouse", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_usemouse2 = {"use_mouse2", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse2, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_usemouse2 = {"use_mouse2", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse2, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
#if defined (DC) || defined (_XBOX) || defined (WMINPUT) || defined (_WII) //joystick 1 and 2
|
|
||||||
consvar_t cv_usejoystick = {"use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
consvar_t cv_usejoystick = {"use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||||
I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
|
I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_usejoystick2 = {"use_joystick2", "2", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
consvar_t cv_usejoystick2 = {"use_joystick2", "2", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||||
I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL};
|
I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL};
|
||||||
#elif defined (PSP) || defined (GP2X) || defined (_NDS) //only one joystick
|
consvar_t cv_usejoystick3 = {"use_joystick3", "3", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||||
consvar_t cv_usejoystick = {"use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
|
||||||
I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_usejoystick2 = {"use_joystick2", "0", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
|
||||||
I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
#else //all esle, no joystick
|
|
||||||
consvar_t cv_usejoystick = {"use_joystick", "0", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
|
||||||
I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_usejoystick2 = {"use_joystick2", "0", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
|
||||||
I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_usejoystick3 = {"use_joystick3", "0", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
|
||||||
I_InitJoystick3, 0, NULL, NULL, 0, 0, NULL};
|
I_InitJoystick3, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_usejoystick4 = {"use_joystick4", "0", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
consvar_t cv_usejoystick4 = {"use_joystick4", "4", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||||
I_InitJoystick4, 0, NULL, NULL, 0, 0, NULL};
|
I_InitJoystick4, 0, NULL, NULL, 0, 0, NULL};
|
||||||
#endif
|
|
||||||
#if (defined (LJOYSTICK) || defined (HAVE_SDL))
|
#if (defined (LJOYSTICK) || defined (HAVE_SDL))
|
||||||
#ifdef LJOYSTICK
|
#ifdef LJOYSTICK
|
||||||
consvar_t cv_joyport = {"joyport", "/dev/js0", CV_SAVE, joyport_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_joyport = {"joyport", "/dev/js0", CV_SAVE, joyport_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
@ -315,7 +306,7 @@ consvar_t cv_matchboxes = {"matchboxes", "Normal", CV_NETVAR|CV_CHEAT, matchboxe
|
||||||
consvar_t cv_specialrings = {"specialrings", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_specialrings = {"specialrings", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_powerstones = {"powerstones", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_powerstones = {"powerstones", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_recycler = {"tv_recycler", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
/*consvar_t cv_recycler = {"tv_recycler", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_teleporters = {"tv_teleporter", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_teleporters = {"tv_teleporter", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_superring = {"tv_superring", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_superring = {"tv_superring", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_supersneakers = {"tv_supersneaker", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_supersneakers = {"tv_supersneaker", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
@ -326,45 +317,56 @@ consvar_t cv_ringshield = {"tv_ringshield", "5", CV_NETVAR|CV_CHEAT, chanc
|
||||||
consvar_t cv_forceshield = {"tv_forceshield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_forceshield = {"tv_forceshield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_bombshield = {"tv_bombshield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_bombshield = {"tv_bombshield", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_1up = {"tv_1up", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_1up = {"tv_1up", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_eggmanbox = {"tv_eggman", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_eggmanbox = {"tv_eggman", "5", CV_NETVAR|CV_CHEAT, chances_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};*/
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
consvar_t cv_magnet = {"magnets", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_sneaker = {"sneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_boo = {"boos", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_rocketsneaker = {"rocketsneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_mushroom = {"mushrooms", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_invincibility = {"invincibility", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_triplemushroom = {"triplemushrooms", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_banana = {"banana", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_megashroom = {"megashrooms", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_eggmanmonitor = {"eggmanmonitor", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_goldshroom = {"goldshrooms", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_orbinaut = {"orbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_star = {"stars", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_jawz = {"jawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_triplebanana = {"triplebananas", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_mine = {"mine", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_fakeitem = {"fakeitems", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_ballhog = {"ballhog", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_banana = {"bananas", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_selfpropelledbomb = {"selfpropelledbomb", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_greenshell = {"greenshells", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_grow = {"grow", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_redshell = {"redshells", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_shrink = {"shrink", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_laserwisp = {"laserwisps", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_lightningshield = {"lightningshield", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_triplegreenshell = {"triplegreenshells", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_hyudoro = {"hyudoro", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_bobomb = {"bobombs", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_pogospring = {"pogospring", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_blueshell = {"blueshells", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
consvar_t cv_jaws = {"jaws", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_triplesneaker = {"triplesneaker", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_fireflower = {"fireflowers", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_triplebanana = {"triplebanana", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_tripleredshell = {"tripleredshells", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_tripleorbinaut = {"tripleorbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_lightning = {"lightning", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_dualjawz = {"dualjawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_feather = {"feathers", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
|
|
||||||
consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
static CV_PossibleValue_t kartstarsfx_cons_t[] = {{0, "Music"}, {1, "SMK"}, {0, NULL}};
|
static CV_PossibleValue_t kartinvinsfx_cons_t[] = {{0, "Music"}, {1, "SFX"}, {0, NULL}};
|
||||||
consvar_t cv_kartstarsfx = {"kartstarsfx", "SMK", CV_SAVE, kartstarsfx_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_kartinvinsfx = {"kartinvinsfx", "SFX", CV_SAVE, kartinvinsfx_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_kartspeed = {"kartspeed", "Normal", CV_NETVAR|CV_CALL|CV_NOINIT, kartspeed_cons_t, KartSpeed_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_kartspeed = {"kartspeed", "Normal", CV_NETVAR|CV_CALL|CV_NOINIT, kartspeed_cons_t, KartSpeed_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
static CV_PossibleValue_t kartballoons_cons_t[] = {{1, "MIN"}, {12, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t kartbumpers_cons_t[] = {{1, "MIN"}, {12, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_kartballoons = {"kartballoons", "3", CV_NETVAR|CV_CHEAT, kartballoons_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_kartbumpers = {"kartbumpers", "3", CV_NETVAR|CV_CHEAT, kartbumpers_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_kartfrantic = {"kartfrantic", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartFrantic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_kartfrantic = {"kartfrantic", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartFrantic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_kartcomeback = {"kartcomeback", "On", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartComeback_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_kartcomeback = {"kartcomeback", "On", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartComeback_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_kartmirror = {"kartmirror", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartMirror_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_kartmirror = {"kartmirror", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartMirror_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
static CV_PossibleValue_t speedometer_cons_t[] = {{0, "Off"}, {1, "Kilometers"}, {2, "Miles"}, {3, "Fracunits"}, {0, NULL}};
|
static CV_PossibleValue_t kartspeedometer_cons_t[] = {{0, "Off"}, {1, "Kilometers"}, {2, "Miles"}, {3, "Fracunits"}, {0, NULL}};
|
||||||
consvar_t cv_speedometer = {"speedometer", "Off", CV_SAVE, speedometer_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display
|
consvar_t cv_kartspeedometer = {"kartdisplayspeed", "Off", CV_SAVE, kartspeedometer_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display
|
||||||
|
static CV_PossibleValue_t kartvoices_cons_t[] = {{0, "Never"}, {1, "Tasteful"}, {2, "Meme"}, {0, NULL}};
|
||||||
|
consvar_t cv_kartvoices = {"kartvoices", "Tasteful", CV_SAVE, kartvoices_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
// this might be a debug or it might be an undocumented regular feature
|
||||||
|
consvar_t cv_karteliminatelast = {"karteliminatelast", "Yes", CV_NETVAR|CV_CHEAT|CV_CALL, CV_OnOff, KartEliminateLast_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
static CV_PossibleValue_t kartdebugitem_cons_t[] = {{-1, "MIN"}, {NUMKARTITEMS-1, "MAX"}, {0, NULL}};
|
||||||
|
consvar_t cv_kartdebugitem = {"kartdebugitem", "0", CV_NETVAR|CV_CHEAT, kartdebugitem_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
static CV_PossibleValue_t kartdebugamount_cons_t[] = {{1, "MIN"}, {255, "MAX"}, {0, NULL}};
|
||||||
|
consvar_t cv_kartdebugamount = {"kartdebugamount", "1", CV_NETVAR|CV_CHEAT, kartdebugamount_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
consvar_t cv_kartdebugcheckpoint = {"kartdebugcheckpoint", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
consvar_t cv_kartdebugshrink = {"kartdebugshrink", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
static CV_PossibleValue_t votetime_cons_t[] = {{10, "MIN"}, {3600, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t votetime_cons_t[] = {{10, "MIN"}, {3600, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_votetime = {"votetime", "20", CV_NETVAR, votetime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_votetime = {"votetime", "20", CV_NETVAR, votetime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
@ -403,10 +405,11 @@ consvar_t cv_pointlimit = {"pointlimit", "0", CV_NETVAR|CV_CALL|CV_NOINIT, point
|
||||||
static CV_PossibleValue_t timelimit_cons_t[] = {{0, "MIN"}, {30, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t timelimit_cons_t[] = {{0, "MIN"}, {30, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_timelimit = {"timelimit", "0", CV_NETVAR|CV_CALL|CV_NOINIT, timelimit_cons_t,
|
consvar_t cv_timelimit = {"timelimit", "0", CV_NETVAR|CV_CALL|CV_NOINIT, timelimit_cons_t,
|
||||||
TimeLimit_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
TimeLimit_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
static CV_PossibleValue_t numlaps_cons_t[] = {{0, "MIN"}, {50, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t numlaps_cons_t[] = {{1, "MIN"}, {50, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_numlaps = {"numlaps", "3", CV_NETVAR|CV_CALL|CV_NOINIT, numlaps_cons_t,
|
consvar_t cv_numlaps = {"numlaps", "3", CV_NETVAR|CV_CALL|CV_NOINIT, numlaps_cons_t,
|
||||||
NumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
NumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_usemapnumlaps = {"usemaplaps", "Yes", CV_NETVAR|CV_CHEAT, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
static CV_PossibleValue_t basenumlaps_cons_t[] = {{1, "MIN"}, {50, "MAX"}, {0, "Map default"}, {0, NULL}};
|
||||||
|
consvar_t cv_basenumlaps = {"basenumlaps", "Map default", CV_NETVAR|CV_CALL|CV_CHEAT, basenumlaps_cons_t, BaseNumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
// log elemental hazards -- not a netvar, is local to current player
|
// log elemental hazards -- not a netvar, is local to current player
|
||||||
consvar_t cv_hazardlog = {"hazardlog", "Yes", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_hazardlog = {"hazardlog", "Yes", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
@ -429,7 +432,7 @@ consvar_t cv_maxping = {"maxping", "0", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NUL
|
||||||
static CV_PossibleValue_t inttime_cons_t[] = {{0, "MIN"}, {3600, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t inttime_cons_t[] = {{0, "MIN"}, {3600, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_inttime = {"inttime", "20", CV_NETVAR, inttime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_inttime = {"inttime", "20", CV_NETVAR, inttime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
static CV_PossibleValue_t advancemap_cons_t[] = {{0, "Off"}, {1, "Next"}, {2, "Random"}, {3, "Vote"}, {0, NULL}};
|
static CV_PossibleValue_t advancemap_cons_t[] = {{0, "Same"}, {1, "Next"}, {2, "Random"}, {3, "Vote"}, {0, NULL}};
|
||||||
consvar_t cv_advancemap = {"advancemap", "Vote", CV_NETVAR, advancemap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_advancemap = {"advancemap", "Vote", CV_NETVAR, advancemap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
static CV_PossibleValue_t playersforexit_cons_t[] = {{0, "One"}, {1, "All"}, {0, NULL}};
|
static CV_PossibleValue_t playersforexit_cons_t[] = {{0, "One"}, {1, "All"}, {0, NULL}};
|
||||||
consvar_t cv_playersforexit = {"playersforexit", "One", CV_NETVAR, playersforexit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_playersforexit = {"playersforexit", "One", CV_NETVAR, playersforexit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
@ -442,6 +445,7 @@ consvar_t cv_mute = {"mute", "Off", CV_NETVAR|CV_CALL, CV_OnOff, Mute_OnChange,
|
||||||
consvar_t cv_sleep = {"cpusleep", "-1", CV_SAVE, sleeping_cons_t, NULL, -1, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_sleep = {"cpusleep", "-1", CV_SAVE, sleeping_cons_t, NULL, -1, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
INT16 gametype = GT_RACE; // SRB2kart
|
INT16 gametype = GT_RACE; // SRB2kart
|
||||||
|
boolean forceresetplayers = false;
|
||||||
UINT8 splitscreen = 0;
|
UINT8 splitscreen = 0;
|
||||||
boolean circuitmap = true; // SRB2kart
|
boolean circuitmap = true; // SRB2kart
|
||||||
INT32 adminplayers[MAXPLAYERS];
|
INT32 adminplayers[MAXPLAYERS];
|
||||||
|
@ -579,7 +583,7 @@ void D_RegisterServerCommands(void)
|
||||||
CV_RegisterVar(&cv_friendlyfire);
|
CV_RegisterVar(&cv_friendlyfire);
|
||||||
CV_RegisterVar(&cv_pointlimit);
|
CV_RegisterVar(&cv_pointlimit);
|
||||||
CV_RegisterVar(&cv_numlaps);
|
CV_RegisterVar(&cv_numlaps);
|
||||||
CV_RegisterVar(&cv_usemapnumlaps);
|
CV_RegisterVar(&cv_basenumlaps);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_hazardlog);
|
CV_RegisterVar(&cv_hazardlog);
|
||||||
|
|
||||||
|
@ -603,7 +607,7 @@ void D_RegisterServerCommands(void)
|
||||||
CV_RegisterVar(&cv_competitionboxes);
|
CV_RegisterVar(&cv_competitionboxes);
|
||||||
CV_RegisterVar(&cv_matchboxes);
|
CV_RegisterVar(&cv_matchboxes);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_recycler);
|
/*CV_RegisterVar(&cv_recycler);
|
||||||
CV_RegisterVar(&cv_teleporters);
|
CV_RegisterVar(&cv_teleporters);
|
||||||
CV_RegisterVar(&cv_superring);
|
CV_RegisterVar(&cv_superring);
|
||||||
CV_RegisterVar(&cv_supersneakers);
|
CV_RegisterVar(&cv_supersneakers);
|
||||||
|
@ -614,7 +618,7 @@ void D_RegisterServerCommands(void)
|
||||||
CV_RegisterVar(&cv_forceshield);
|
CV_RegisterVar(&cv_forceshield);
|
||||||
CV_RegisterVar(&cv_bombshield);
|
CV_RegisterVar(&cv_bombshield);
|
||||||
CV_RegisterVar(&cv_1up);
|
CV_RegisterVar(&cv_1up);
|
||||||
CV_RegisterVar(&cv_eggmanbox);
|
CV_RegisterVar(&cv_eggmanbox);*/
|
||||||
|
|
||||||
K_RegisterKartStuff(); // SRB2kart
|
K_RegisterKartStuff(); // SRB2kart
|
||||||
|
|
||||||
|
@ -865,7 +869,7 @@ void D_RegisterClientCommands(void)
|
||||||
// s_sound.c
|
// s_sound.c
|
||||||
CV_RegisterVar(&cv_soundvolume);
|
CV_RegisterVar(&cv_soundvolume);
|
||||||
CV_RegisterVar(&cv_digmusicvolume);
|
CV_RegisterVar(&cv_digmusicvolume);
|
||||||
CV_RegisterVar(&cv_midimusicvolume);
|
//CV_RegisterVar(&cv_midimusicvolume);
|
||||||
CV_RegisterVar(&cv_numChannels);
|
CV_RegisterVar(&cv_numChannels);
|
||||||
|
|
||||||
// i_cdmus.c
|
// i_cdmus.c
|
||||||
|
@ -1159,7 +1163,7 @@ UINT8 CanChangeSkin(INT32 playernum)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Can change skin during initial countdown.
|
// Can change skin during initial countdown.
|
||||||
if (leveltime < 4*TICRATE)
|
if (leveltime < starttime)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (G_TagGametype())
|
if (G_TagGametype())
|
||||||
|
@ -1882,6 +1886,8 @@ void D_MapChange(INT32 mapnum, INT32 newgametype, boolean pultmode, boolean rese
|
||||||
static char buf[2+MAX_WADPATH+1+4];
|
static char buf[2+MAX_WADPATH+1+4];
|
||||||
static char *buf_p = buf;
|
static char *buf_p = buf;
|
||||||
|
|
||||||
|
forceresetplayers = false;
|
||||||
|
|
||||||
// The supplied data are assumed to be good.
|
// The supplied data are assumed to be good.
|
||||||
I_Assert(delay >= 0 && delay <= 2);
|
I_Assert(delay >= 0 && delay <= 2);
|
||||||
|
|
||||||
|
@ -1962,16 +1968,22 @@ void D_MapChange(INT32 mapnum, INT32 newgametype, boolean pultmode, boolean rese
|
||||||
|
|
||||||
void D_SetupVote(void)
|
void D_SetupVote(void)
|
||||||
{
|
{
|
||||||
char buf[8];
|
UINT8 buf[6*2]; // five UINT16 maps (at twice the width of a UINT8), and two gametypes
|
||||||
char *p = buf;
|
UINT8 *p = buf;
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
UINT8 secondgt = G_SometimesGetDifferentGametype();
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
WRITEUINT8(p, gametype);
|
||||||
|
WRITEUINT8(p, secondgt);
|
||||||
|
|
||||||
|
for (i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
if (i == 3)
|
if (i == 2) // sometimes a different gametype
|
||||||
WRITEUINT16(p, G_RandMap(G_TOLFlag(gametype), prevmap, true, false));
|
WRITEUINT16(p, G_RandMap(G_TOLFlag(secondgt), prevmap, false, false, 0, true));
|
||||||
|
else if (i >= 3) // unknown-random and force-unknown MAP HELL
|
||||||
|
WRITEUINT16(p, G_RandMap(G_TOLFlag(gametype), prevmap, true, false, (i-2), (i < 4)));
|
||||||
else
|
else
|
||||||
WRITEUINT16(p, G_RandMap(G_TOLFlag(gametype), prevmap, false, false));
|
WRITEUINT16(p, G_RandMap(G_TOLFlag(gametype), prevmap, false, false, 0, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
SendNetXCmd(XD_SETUPVOTE, buf, p - buf);
|
SendNetXCmd(XD_SETUPVOTE, buf, p - buf);
|
||||||
|
@ -1997,7 +2009,9 @@ void D_PickVote(void)
|
||||||
char* p = buf;
|
char* p = buf;
|
||||||
SINT8 temppicks[MAXPLAYERS];
|
SINT8 temppicks[MAXPLAYERS];
|
||||||
SINT8 templevels[MAXPLAYERS];
|
SINT8 templevels[MAXPLAYERS];
|
||||||
|
SINT8 votecompare = -1;
|
||||||
UINT8 numvotes = 0, key = 0;
|
UINT8 numvotes = 0, key = 0;
|
||||||
|
boolean force = true;
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
@ -2009,6 +2023,10 @@ void D_PickVote(void)
|
||||||
temppicks[numvotes] = i;
|
temppicks[numvotes] = i;
|
||||||
templevels[numvotes] = votes[i];
|
templevels[numvotes] = votes[i];
|
||||||
numvotes++;
|
numvotes++;
|
||||||
|
if (votecompare == -1)
|
||||||
|
votecompare = votes[i];
|
||||||
|
else if (votes[i] != votecompare)
|
||||||
|
force = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2017,7 +2035,10 @@ void D_PickVote(void)
|
||||||
if (numvotes > 0)
|
if (numvotes > 0)
|
||||||
{
|
{
|
||||||
WRITESINT8(p, temppicks[key]);
|
WRITESINT8(p, temppicks[key]);
|
||||||
WRITESINT8(p, templevels[key]);
|
if (force && templevels[key] == 3 && numvotes > 1)
|
||||||
|
WRITESINT8(p, 4);
|
||||||
|
else
|
||||||
|
WRITESINT8(p, templevels[key]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2109,7 +2130,6 @@ static void Command_Map_f(void)
|
||||||
// Don't do any variable setting here. Wait until you get your
|
// Don't do any variable setting here. Wait until you get your
|
||||||
// map packet first to avoid sending the same info twice!
|
// map packet first to avoid sending the same info twice!
|
||||||
newgametype = gametype_cons_t[j].value;
|
newgametype = gametype_cons_t[j].value;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2127,26 +2147,23 @@ static void Command_Map_f(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(i = COM_CheckParm("-force")) && newgametype == gametype) // SRB2Kart
|
||||||
|
newresetplayers = false; // if not forcing and gametypes is the same
|
||||||
|
|
||||||
// don't use a gametype the map doesn't support
|
// don't use a gametype the map doesn't support
|
||||||
if (cv_debug || COM_CheckParm("-force") || cv_skipmapcheck.value)
|
if (cv_debug || i || cv_skipmapcheck.value)
|
||||||
; // The player wants us to trek on anyway. Do so.
|
; // The player wants us to trek on anyway. Do so.
|
||||||
// G_TOLFlag handles both multiplayer gametype and ignores it for !multiplayer
|
// G_TOLFlag handles both multiplayer gametype and ignores it for !multiplayer
|
||||||
// Alternatively, bail if the map header is completely missing anyway.
|
// Alternatively, bail if the map header is completely missing anyway.
|
||||||
else if (!mapheaderinfo[newmapnum-1]
|
else
|
||||||
|| !(mapheaderinfo[newmapnum-1]->typeoflevel & G_TOLFlag(newgametype)))
|
|
||||||
{
|
{
|
||||||
char gametypestring[32] = "Single Player";
|
if (!mapheaderinfo[newmapnum-1]
|
||||||
|
|| !(mapheaderinfo[newmapnum-1]->typeoflevel & G_TOLFlag(newgametype)))
|
||||||
if (multiplayer)
|
{
|
||||||
for (i = 0; gametype_cons_t[i].strvalue != NULL; i++)
|
CONS_Alert(CONS_WARNING, M_GetText("%s doesn't support %s mode!\n(Use -force to override)\n"), mapname,
|
||||||
if (gametype_cons_t[i].value == newgametype)
|
(multiplayer ? gametype_cons_t[newgametype].strvalue : "Single Player"));
|
||||||
{
|
return;
|
||||||
strcpy(gametypestring, gametype_cons_t[i].strvalue);
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("%s doesn't support %s mode!\n(Use -force to override)\n"), mapname, gametypestring);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent warping to locked levels
|
// Prevent warping to locked levels
|
||||||
|
@ -2232,6 +2249,9 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
||||||
emeralds = 0;
|
emeralds = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (modeattacking) // i remember moving this here in internal fixed a heisenbug so
|
||||||
|
SetPlayerSkinByNum(0, cv_chooseskin.value-1);
|
||||||
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
LUAh_MapChange();
|
LUAh_MapChange();
|
||||||
#endif
|
#endif
|
||||||
|
@ -2243,15 +2263,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
||||||
if (timingdemo)
|
if (timingdemo)
|
||||||
G_DoneLevelLoad();
|
G_DoneLevelLoad();
|
||||||
|
|
||||||
if (modeattacking)
|
|
||||||
{
|
|
||||||
SetPlayerSkinByNum(0, cv_chooseskin.value-1);
|
|
||||||
players[0].skincolor = cv_playercolor.value; // srb2kart
|
|
||||||
|
|
||||||
// a copy of color
|
|
||||||
if (players[0].mo)
|
|
||||||
players[0].mo->color = players[0].skincolor;
|
|
||||||
}
|
|
||||||
if (metalrecording)
|
if (metalrecording)
|
||||||
G_BeginMetal();
|
G_BeginMetal();
|
||||||
if (demorecording) // Okay, level loaded, character spawned and skinned,
|
if (demorecording) // Okay, level loaded, character spawned and skinned,
|
||||||
|
@ -2276,7 +2287,7 @@ static void Command_Pause(void)
|
||||||
|
|
||||||
if (cv_pause.value || server || (IsPlayerAdmin(consoleplayer)))
|
if (cv_pause.value || server || (IsPlayerAdmin(consoleplayer)))
|
||||||
{
|
{
|
||||||
if (modeattacking || !(gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING))
|
if (!paused && (modeattacking || !(gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS)))
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("You can't pause here.\n"));
|
CONS_Printf(M_GetText("You can't pause here.\n"));
|
||||||
return;
|
return;
|
||||||
|
@ -2351,7 +2362,7 @@ static void Command_Suicide(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (!G_RaceGametype()) // srb2kart: not necessary, suiciding makes you lose a balloon in battle, so it's not desirable to use as a way to escape a hit
|
/*if (!G_RaceGametype()) // srb2kart: not necessary, suiciding makes you lose a bumper in battle, so it's not desirable to use as a way to escape a hit
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("You may only use this in co-op, race, and competition!\n"));
|
CONS_Printf(M_GetText("You may only use this in co-op, race, and competition!\n"));
|
||||||
return;
|
return;
|
||||||
|
@ -2518,18 +2529,12 @@ static void Command_Teamchange_f(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_GametypeHasTeams())
|
if (players[consoleplayer].spectator)
|
||||||
{
|
error = !(NetPacket.packet.newteam || (players[consoleplayer].pflags & PF_WANTSTOJOIN)); // :lancer:
|
||||||
if (NetPacket.packet.newteam == (unsigned)players[consoleplayer].ctfteam ||
|
else if (G_GametypeHasTeams())
|
||||||
(players[consoleplayer].spectator && !NetPacket.packet.newteam))
|
error = (NetPacket.packet.newteam == (unsigned)players[consoleplayer].ctfteam);
|
||||||
error = true;
|
else if (G_GametypeHasSpectators() && !players[consoleplayer].spectator)
|
||||||
}
|
error = (NetPacket.packet.newteam == 3);
|
||||||
else if (G_GametypeHasSpectators())
|
|
||||||
{
|
|
||||||
if ((players[consoleplayer].spectator && !NetPacket.packet.newteam) ||
|
|
||||||
(!players[consoleplayer].spectator && NetPacket.packet.newteam == 3))
|
|
||||||
error = true;
|
|
||||||
}
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
else
|
else
|
||||||
I_Error("Invalid gametype after initial checks!");
|
I_Error("Invalid gametype after initial checks!");
|
||||||
|
@ -2615,18 +2620,12 @@ static void Command_Teamchange2_f(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_GametypeHasTeams())
|
if (players[secondarydisplayplayer].spectator)
|
||||||
{
|
error = !(NetPacket.packet.newteam || (players[secondarydisplayplayer].pflags & PF_WANTSTOJOIN));
|
||||||
if (NetPacket.packet.newteam == (unsigned)players[secondarydisplayplayer].ctfteam ||
|
else if (G_GametypeHasTeams())
|
||||||
(players[secondarydisplayplayer].spectator && !NetPacket.packet.newteam))
|
error = (NetPacket.packet.newteam == (unsigned)players[secondarydisplayplayer].ctfteam);
|
||||||
error = true;
|
else if (G_GametypeHasSpectators() && !players[secondarydisplayplayer].spectator)
|
||||||
}
|
error = (NetPacket.packet.newteam == 3);
|
||||||
else if (G_GametypeHasSpectators())
|
|
||||||
{
|
|
||||||
if ((players[secondarydisplayplayer].spectator && !NetPacket.packet.newteam) ||
|
|
||||||
(!players[secondarydisplayplayer].spectator && NetPacket.packet.newteam == 3))
|
|
||||||
error = true;
|
|
||||||
}
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
else
|
else
|
||||||
I_Error("Invalid gametype after initial checks!");
|
I_Error("Invalid gametype after initial checks!");
|
||||||
|
@ -2712,18 +2711,12 @@ static void Command_Teamchange3_f(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_GametypeHasTeams())
|
if (players[thirddisplayplayer].spectator)
|
||||||
{
|
error = !(NetPacket.packet.newteam || (players[thirddisplayplayer].pflags & PF_WANTSTOJOIN));
|
||||||
if (NetPacket.packet.newteam == (unsigned)players[thirddisplayplayer].ctfteam ||
|
else if (G_GametypeHasTeams())
|
||||||
(players[thirddisplayplayer].spectator && !NetPacket.packet.newteam))
|
error = (NetPacket.packet.newteam == (unsigned)players[thirddisplayplayer].ctfteam);
|
||||||
error = true;
|
else if (G_GametypeHasSpectators() && !players[thirddisplayplayer].spectator)
|
||||||
}
|
error = (NetPacket.packet.newteam == 3);
|
||||||
else if (G_GametypeHasSpectators())
|
|
||||||
{
|
|
||||||
if ((players[thirddisplayplayer].spectator && !NetPacket.packet.newteam) ||
|
|
||||||
(!players[thirddisplayplayer].spectator && NetPacket.packet.newteam == 3))
|
|
||||||
error = true;
|
|
||||||
}
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
else
|
else
|
||||||
I_Error("Invalid gametype after initial checks!");
|
I_Error("Invalid gametype after initial checks!");
|
||||||
|
@ -2809,18 +2802,12 @@ static void Command_Teamchange4_f(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_GametypeHasTeams())
|
if (players[fourthdisplayplayer].spectator)
|
||||||
{
|
error = !(NetPacket.packet.newteam || (players[fourthdisplayplayer].pflags & PF_WANTSTOJOIN));
|
||||||
if (NetPacket.packet.newteam == (unsigned)players[fourthdisplayplayer].ctfteam ||
|
else if (G_GametypeHasTeams())
|
||||||
(players[fourthdisplayplayer].spectator && !NetPacket.packet.newteam))
|
error = (NetPacket.packet.newteam == (unsigned)players[fourthdisplayplayer].ctfteam);
|
||||||
error = true;
|
else if (G_GametypeHasSpectators() && !players[fourthdisplayplayer].spectator)
|
||||||
}
|
error = (NetPacket.packet.newteam == 3);
|
||||||
else if (G_GametypeHasSpectators())
|
|
||||||
{
|
|
||||||
if ((players[fourthdisplayplayer].spectator && !NetPacket.packet.newteam) ||
|
|
||||||
(!players[fourthdisplayplayer].spectator && NetPacket.packet.newteam == 3))
|
|
||||||
error = true;
|
|
||||||
}
|
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
else
|
else
|
||||||
I_Error("Invalid gametype after initial checks!");
|
I_Error("Invalid gametype after initial checks!");
|
||||||
|
@ -3020,24 +3007,23 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent multiple changes in one go.
|
// Prevent multiple changes in one go.
|
||||||
if (G_TagGametype())
|
if (players[playernum].spectator && !(players[playernum].pflags & PF_WANTSTOJOIN) && !NetPacket.packet.newteam)
|
||||||
|
return;
|
||||||
|
else if (G_TagGametype())
|
||||||
{
|
{
|
||||||
if (((players[playernum].pflags & PF_TAGIT) && NetPacket.packet.newteam == 1) ||
|
if (((players[playernum].pflags & PF_TAGIT) && NetPacket.packet.newteam == 1) ||
|
||||||
(!(players[playernum].pflags & PF_TAGIT) && NetPacket.packet.newteam == 2) ||
|
(!(players[playernum].pflags & PF_TAGIT) && NetPacket.packet.newteam == 2) ||
|
||||||
(players[playernum].spectator && NetPacket.packet.newteam == 0) ||
|
|
||||||
(!players[playernum].spectator && NetPacket.packet.newteam == 3))
|
(!players[playernum].spectator && NetPacket.packet.newteam == 3))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (G_GametypeHasTeams())
|
else if (G_GametypeHasTeams())
|
||||||
{
|
{
|
||||||
if ((NetPacket.packet.newteam && (NetPacket.packet.newteam == (unsigned)players[playernum].ctfteam)) ||
|
if (NetPacket.packet.newteam && (NetPacket.packet.newteam == (unsigned)players[playernum].ctfteam))
|
||||||
(players[playernum].spectator && !NetPacket.packet.newteam))
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (G_GametypeHasSpectators())
|
else if (G_GametypeHasSpectators())
|
||||||
{
|
{
|
||||||
if ((players[playernum].spectator && !NetPacket.packet.newteam) ||
|
if (!players[playernum].spectator && NetPacket.packet.newteam == 3)
|
||||||
(!players[playernum].spectator && NetPacket.packet.newteam == 3))
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3109,19 +3095,26 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Safety first!
|
//Safety first!
|
||||||
if (players[playernum].mo)
|
// (not respawning spectators here...)
|
||||||
|
if (!players[playernum].spectator)
|
||||||
{
|
{
|
||||||
if (!players[playernum].spectator)
|
if (players[playernum].mo)
|
||||||
P_DamageMobj(players[playernum].mo, NULL, NULL, 10000);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
P_RemoveMobj(players[playernum].mo);
|
//if (!players[playernum].spectator)
|
||||||
players[playernum].mo = NULL;
|
P_DamageMobj(players[playernum].mo, NULL, NULL, 10000);
|
||||||
players[playernum].playerstate = PST_REBORN;
|
/*else
|
||||||
|
{
|
||||||
|
if (players[playernum].mo)
|
||||||
|
{
|
||||||
|
P_RemoveMobj(players[playernum].mo);
|
||||||
|
players[playernum].mo = NULL;
|
||||||
|
}
|
||||||
|
players[playernum].playerstate = PST_REBORN;
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
players[playernum].playerstate = PST_REBORN;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
players[playernum].playerstate = PST_REBORN;
|
|
||||||
|
|
||||||
//Now that we've done our error checking and killed the player
|
//Now that we've done our error checking and killed the player
|
||||||
//if necessary, put the player on the correct team/status.
|
//if necessary, put the player on the correct team/status.
|
||||||
|
@ -3135,7 +3128,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
}
|
}
|
||||||
else if (NetPacket.packet.newteam != 3) // .newteam == 1 or 2.
|
else if (NetPacket.packet.newteam != 3) // .newteam == 1 or 2.
|
||||||
{
|
{
|
||||||
players[playernum].spectator = false;
|
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
||||||
players[playernum].pflags &= ~PF_TAGGED;//Just in case.
|
players[playernum].pflags &= ~PF_TAGGED;//Just in case.
|
||||||
|
|
||||||
if (NetPacket.packet.newteam == 1) //Make the player IT.
|
if (NetPacket.packet.newteam == 1) //Make the player IT.
|
||||||
|
@ -3145,7 +3138,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
}
|
}
|
||||||
else // Just join the game.
|
else // Just join the game.
|
||||||
{
|
{
|
||||||
players[playernum].spectator = false;
|
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
||||||
|
|
||||||
//If joining after hidetime in normal tag, default to being IT.
|
//If joining after hidetime in normal tag, default to being IT.
|
||||||
if (gametype == GT_TAG && (leveltime > (hidetime * TICRATE)))
|
if (gametype == GT_TAG && (leveltime > (hidetime * TICRATE)))
|
||||||
|
@ -3165,7 +3158,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
players[playernum].ctfteam = NetPacket.packet.newteam;
|
players[playernum].ctfteam = NetPacket.packet.newteam;
|
||||||
players[playernum].spectator = false;
|
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (G_GametypeHasSpectators())
|
else if (G_GametypeHasSpectators())
|
||||||
|
@ -3173,7 +3166,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
if (!NetPacket.packet.newteam)
|
if (!NetPacket.packet.newteam)
|
||||||
players[playernum].spectator = true;
|
players[playernum].spectator = true;
|
||||||
else
|
else
|
||||||
players[playernum].spectator = false;
|
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NetPacket.packet.autobalance)
|
if (NetPacket.packet.autobalance)
|
||||||
|
@ -3205,7 +3198,9 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
CONS_Printf(M_GetText("%s switched to the %c%s%c.\n"), player_names[playernum], '\x84', M_GetText("Blue Team"), '\x80');
|
CONS_Printf(M_GetText("%s switched to the %c%s%c.\n"), player_names[playernum], '\x84', M_GetText("Blue Team"), '\x80');
|
||||||
}
|
}
|
||||||
else if (NetPacket.packet.newteam == 3)
|
else if (NetPacket.packet.newteam == 3)
|
||||||
CONS_Printf(M_GetText("%s entered the game.\n"), player_names[playernum]);
|
/*CONS_Printf(M_GetText("%s entered the game.\n"), player_names[playernum])*/;
|
||||||
|
else if (players[playernum].pflags & PF_WANTSTOJOIN)
|
||||||
|
players[playernum].pflags &= ~PF_WANTSTOJOIN;
|
||||||
else
|
else
|
||||||
CONS_Printf(M_GetText("%s became a spectator.\n"), player_names[playernum]);
|
CONS_Printf(M_GetText("%s became a spectator.\n"), player_names[playernum]);
|
||||||
|
|
||||||
|
@ -3228,10 +3223,18 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gamestate != GS_LEVEL)
|
||||||
|
return;
|
||||||
|
|
||||||
// Clear player score and rings if a spectator.
|
// Clear player score and rings if a spectator.
|
||||||
if (players[playernum].spectator)
|
if (players[playernum].spectator)
|
||||||
{
|
{
|
||||||
//players[playernum].score = 0; // SRB2kart
|
if (G_BattleGametype()) // SRB2kart
|
||||||
|
{
|
||||||
|
players[playernum].marescore = 0;
|
||||||
|
if (K_IsPlayerWanted(&players[playernum]))
|
||||||
|
K_CalculateBattleWanted();
|
||||||
|
}
|
||||||
players[playernum].health = 1;
|
players[playernum].health = 1;
|
||||||
if (players[playernum].mo)
|
if (players[playernum].mo)
|
||||||
players[playernum].mo->health = 1;
|
players[playernum].mo->health = 1;
|
||||||
|
@ -3241,7 +3244,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
if (G_TagGametype())
|
if (G_TagGametype())
|
||||||
P_CheckSurvivors();
|
P_CheckSurvivors();
|
||||||
else if (G_BattleGametype())
|
else if (G_BattleGametype())
|
||||||
K_CheckBalloons(); // SRB2Kart
|
K_CheckBumpers(); // SRB2Kart
|
||||||
else if (G_RaceGametype())
|
else if (G_RaceGametype())
|
||||||
P_CheckRacers(); // also SRB2Kart
|
P_CheckRacers(); // also SRB2Kart
|
||||||
}
|
}
|
||||||
|
@ -3886,7 +3889,7 @@ static void Got_RequestAddfilecmd(UINT8 **cp, INT32 playernum)
|
||||||
|
|
||||||
if (ncs != FS_FOUND || toomany)
|
if (ncs != FS_FOUND || toomany)
|
||||||
{
|
{
|
||||||
char message[256];
|
char message[275];
|
||||||
|
|
||||||
if (toomany)
|
if (toomany)
|
||||||
sprintf(message, M_GetText("Too many files loaded to add %s\n"), filename);
|
sprintf(message, M_GetText("Too many files loaded to add %s\n"), filename);
|
||||||
|
@ -4033,27 +4036,12 @@ static void Command_ModDetails_f(void)
|
||||||
//
|
//
|
||||||
static void Command_ShowGametype_f(void)
|
static void Command_ShowGametype_f(void)
|
||||||
{
|
{
|
||||||
INT32 j;
|
if (!(netgame || multiplayer)) // print "Single player" instead of "Race"
|
||||||
const char *gametypestr = NULL;
|
|
||||||
|
|
||||||
if (!(netgame || multiplayer)) // print "Single player" instead of "Co-op"
|
|
||||||
{
|
{
|
||||||
CONS_Printf(M_GetText("Current gametype is %s\n"), M_GetText("Single player"));
|
CONS_Printf(M_GetText("Current gametype is %s\n"), "Single Player");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// find name string for current gametype
|
CONS_Printf(M_GetText("Current gametype is %s\n"), gametype_cons_t[gametype].strvalue);
|
||||||
for (j = 0; gametype_cons_t[j].strvalue; j++)
|
|
||||||
{
|
|
||||||
if (gametype_cons_t[j].value == gametype)
|
|
||||||
{
|
|
||||||
gametypestr = gametype_cons_t[j].strvalue;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (gametypestr)
|
|
||||||
CONS_Printf(M_GetText("Current gametype is %s\n"), gametypestr);
|
|
||||||
else // string for current gametype was not found above (should never happen)
|
|
||||||
CONS_Printf(M_GetText("Unknown gametype set (%d)\n"), gametype);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Plays the intro.
|
/** Plays the intro.
|
||||||
|
@ -4186,20 +4174,9 @@ static void TimeLimit_OnChange(void)
|
||||||
*/
|
*/
|
||||||
void D_GameTypeChanged(INT32 lastgametype)
|
void D_GameTypeChanged(INT32 lastgametype)
|
||||||
{
|
{
|
||||||
if (netgame)
|
if (multiplayer)
|
||||||
{
|
CONS_Printf(M_GetText("Gametype was changed from %s to %s\n"), gametype_cons_t[lastgametype].strvalue, gametype_cons_t[gametype].strvalue);
|
||||||
INT32 j;
|
|
||||||
const char *oldgt = NULL, *newgt = NULL;
|
|
||||||
for (j = 0; gametype_cons_t[j].strvalue; j++)
|
|
||||||
{
|
|
||||||
if (gametype_cons_t[j].value == lastgametype)
|
|
||||||
oldgt = gametype_cons_t[j].strvalue;
|
|
||||||
if (gametype_cons_t[j].value == gametype)
|
|
||||||
newgt = gametype_cons_t[j].strvalue;
|
|
||||||
}
|
|
||||||
if (oldgt && newgt)
|
|
||||||
CONS_Printf(M_GetText("Gametype was changed from %s to %s\n"), oldgt, newgt);
|
|
||||||
}
|
|
||||||
// Only do the following as the server, not as remote admin.
|
// Only do the following as the server, not as remote admin.
|
||||||
// There will always be a server, and this only needs to be done once.
|
// There will always be a server, and this only needs to be done once.
|
||||||
if (server && (multiplayer || netgame))
|
if (server && (multiplayer || netgame))
|
||||||
|
@ -4275,7 +4252,7 @@ void D_GameTypeChanged(INT32 lastgametype)
|
||||||
|
|
||||||
// When swapping to a gametype that supports spectators,
|
// When swapping to a gametype that supports spectators,
|
||||||
// make everyone a spectator initially.
|
// make everyone a spectator initially.
|
||||||
/*if (!splitscreen && (G_GametypeHasSpectators()))
|
/*if (G_GametypeHasSpectators())
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
@ -4603,6 +4580,7 @@ static void Got_ExitLevelcmd(UINT8 **cp, INT32 playernum)
|
||||||
static void Got_SetupVotecmd(UINT8 **cp, INT32 playernum)
|
static void Got_SetupVotecmd(UINT8 **cp, INT32 playernum)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
UINT8 gt, secondgt;
|
||||||
|
|
||||||
if (playernum != serverplayer && !IsPlayerAdmin(playernum))
|
if (playernum != serverplayer && !IsPlayerAdmin(playernum))
|
||||||
{
|
{
|
||||||
|
@ -4618,13 +4596,19 @@ static void Got_SetupVotecmd(UINT8 **cp, INT32 playernum)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
gt = (UINT8)READUINT8(*cp);
|
||||||
|
secondgt = (UINT8)READUINT8(*cp);
|
||||||
|
|
||||||
|
for (i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
votelevels[i] = (INT16)READUINT16(*cp);
|
votelevels[i][0] = (UINT16)READUINT16(*cp);
|
||||||
if (!mapheaderinfo[votelevels[i]])
|
votelevels[i][1] = gt;
|
||||||
P_AllocMapHeader(votelevels[i]);
|
if (!mapheaderinfo[votelevels[i][0]])
|
||||||
|
P_AllocMapHeader(votelevels[i][0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
votelevels[2][1] = secondgt;
|
||||||
|
|
||||||
G_SetGamestate(GS_VOTING);
|
G_SetGamestate(GS_VOTING);
|
||||||
Y_StartVote();
|
Y_StartVote();
|
||||||
}
|
}
|
||||||
|
@ -4749,7 +4733,7 @@ static void Command_RestartAudio_f(void)
|
||||||
|
|
||||||
I_SetSfxVolume(cv_soundvolume.value);
|
I_SetSfxVolume(cv_soundvolume.value);
|
||||||
I_SetDigMusicVolume(cv_digmusicvolume.value);
|
I_SetDigMusicVolume(cv_digmusicvolume.value);
|
||||||
I_SetMIDIMusicVolume(cv_midimusicvolume.value);
|
//I_SetMIDIMusicVolume(cv_midimusicvolume.value);
|
||||||
if (Playing()) // Gotta make sure the player is in a level
|
if (Playing()) // Gotta make sure the player is in a level
|
||||||
P_RestoreMusic(&players[consoleplayer]);
|
P_RestoreMusic(&players[consoleplayer]);
|
||||||
|
|
||||||
|
@ -5214,26 +5198,73 @@ static void Command_ShowTime_f(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SRB2Kart: On change messages
|
// SRB2Kart: On change messages
|
||||||
|
static void BaseNumLaps_OnChange(void)
|
||||||
|
{
|
||||||
|
if (gamestate == GS_LEVEL)
|
||||||
|
{
|
||||||
|
if (cv_basenumlaps.value)
|
||||||
|
CONS_Printf(M_GetText("Number of laps will be changed to %d next round.\n"), cv_basenumlaps.value);
|
||||||
|
else
|
||||||
|
CONS_Printf(M_GetText("Number of laps will be changed to map defaults next round.\n"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void KartFrantic_OnChange(void)
|
static void KartFrantic_OnChange(void)
|
||||||
{
|
{
|
||||||
if (cv_kartfrantic.value != franticitems && gamestate == GS_LEVEL)
|
if ((boolean)cv_kartfrantic.value != franticitems && gamestate == GS_LEVEL && leveltime > starttime)
|
||||||
CONS_Printf(M_GetText("Frantic items will be turned %s next round.\n"), cv_kartfrantic.value ? M_GetText("on") : M_GetText("off"));
|
CONS_Printf(M_GetText("Frantic items will be turned %s next round.\n"), cv_kartfrantic.value ? M_GetText("on") : M_GetText("off"));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CONS_Printf(M_GetText("Frantic items has been turned %s.\n"), cv_kartfrantic.value ? M_GetText("on") : M_GetText("off"));
|
||||||
|
franticitems = (boolean)cv_kartfrantic.value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void KartSpeed_OnChange(void)
|
static void KartSpeed_OnChange(void)
|
||||||
{
|
{
|
||||||
if (cv_kartspeed.value != gamespeed && G_RaceGametype() && gamestate == GS_LEVEL)
|
if (G_RaceGametype())
|
||||||
CONS_Printf(M_GetText("Game speed will be changed to \"%s\" next round.\n"), cv_kartspeed.string);
|
{
|
||||||
|
if ((UINT8)cv_kartspeed.value != gamespeed && gamestate == GS_LEVEL && leveltime > starttime)
|
||||||
|
CONS_Printf(M_GetText("Game speed will be changed to \"%s\" next round.\n"), cv_kartspeed.string);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CONS_Printf(M_GetText("Game speed has been changed to \"%s\".\n"), cv_kartspeed.string);
|
||||||
|
gamespeed = (UINT8)cv_kartspeed.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void KartMirror_OnChange(void)
|
static void KartMirror_OnChange(void)
|
||||||
{
|
{
|
||||||
if (cv_kartmirror.value != mirrormode && G_RaceGametype() && gamestate == GS_LEVEL)
|
if (G_RaceGametype())
|
||||||
CONS_Printf(M_GetText("Mirror Mode will be turned %s next round.\n"), cv_kartmirror.value ? M_GetText("on") : M_GetText("off"));
|
{
|
||||||
|
if ((boolean)cv_kartmirror.value != mirrormode && gamestate == GS_LEVEL /*&& leveltime > starttime*/)
|
||||||
|
CONS_Printf(M_GetText("Mirrored tracks will be turned %s next round.\n"), cv_kartmirror.value ? M_GetText("on") : M_GetText("off"));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CONS_Printf(M_GetText("Mirrored tracks has been turned %s.\n"), cv_kartmirror.value ? M_GetText("on") : M_GetText("off"));
|
||||||
|
mirrormode = (boolean)cv_kartmirror.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void KartComeback_OnChange(void)
|
static void KartComeback_OnChange(void)
|
||||||
{
|
{
|
||||||
if (cv_kartcomeback.value != comeback && G_BattleGametype() && gamestate == GS_LEVEL)
|
if (G_BattleGametype())
|
||||||
CONS_Printf(M_GetText("Karma Comeback will be turned %s next round.\n"), cv_kartcomeback.value ? M_GetText("on") : M_GetText("off"));
|
{
|
||||||
}
|
if ((boolean)cv_kartcomeback.value != comeback && gamestate == GS_LEVEL && leveltime > starttime)
|
||||||
|
CONS_Printf(M_GetText("Karma Comeback will be turned %s next round.\n"), cv_kartcomeback.value ? M_GetText("on") : M_GetText("off"));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CONS_Printf(M_GetText("Karma Comeback has been turned %s.\n"), cv_kartcomeback.value ? M_GetText("on") : M_GetText("off"));
|
||||||
|
comeback = (boolean)cv_kartcomeback.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void KartEliminateLast_OnChange(void)
|
||||||
|
{
|
||||||
|
if (G_RaceGametype() && cv_karteliminatelast.value)
|
||||||
|
P_CheckRacers();
|
||||||
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ extern consvar_t cv_friendlyfire;
|
||||||
extern consvar_t cv_pointlimit;
|
extern consvar_t cv_pointlimit;
|
||||||
extern consvar_t cv_timelimit;
|
extern consvar_t cv_timelimit;
|
||||||
extern consvar_t cv_numlaps;
|
extern consvar_t cv_numlaps;
|
||||||
extern consvar_t cv_usemapnumlaps;
|
extern consvar_t cv_basenumlaps;
|
||||||
extern UINT32 timelimitintics;
|
extern UINT32 timelimitintics;
|
||||||
extern consvar_t cv_allowexitlevel;
|
extern consvar_t cv_allowexitlevel;
|
||||||
|
|
||||||
|
@ -103,31 +103,37 @@ extern consvar_t cv_pause;
|
||||||
|
|
||||||
extern consvar_t cv_restrictskinchange, cv_allowteamchange, cv_respawntime;
|
extern consvar_t cv_restrictskinchange, cv_allowteamchange, cv_respawntime;
|
||||||
|
|
||||||
extern consvar_t cv_teleporters, cv_superring, cv_supersneakers, cv_invincibility;
|
/*extern consvar_t cv_teleporters, cv_superring, cv_supersneakers, cv_invincibility;
|
||||||
extern consvar_t cv_jumpshield, cv_watershield, cv_ringshield, cv_forceshield, cv_bombshield;
|
extern consvar_t cv_jumpshield, cv_watershield, cv_ringshield, cv_forceshield, cv_bombshield;
|
||||||
extern consvar_t cv_1up, cv_eggmanbox;
|
extern consvar_t cv_1up, cv_eggmanbox;
|
||||||
extern consvar_t cv_recycler;
|
extern consvar_t cv_recycler;*/
|
||||||
|
|
||||||
// SRB2kart items
|
// SRB2kart items
|
||||||
extern consvar_t cv_magnet, cv_boo, cv_mushroom, cv_triplemushroom, cv_megashroom;
|
extern consvar_t cv_sneaker, cv_rocketsneaker, cv_invincibility, cv_banana;
|
||||||
extern consvar_t cv_goldshroom, cv_star, cv_triplebanana, cv_fakeitem, cv_banana;
|
extern consvar_t cv_eggmanmonitor, cv_orbinaut, cv_jawz, cv_mine;
|
||||||
extern consvar_t cv_greenshell, cv_redshell, cv_laserwisp, cv_triplegreenshell, cv_bobomb;
|
extern consvar_t cv_ballhog, cv_selfpropelledbomb, cv_grow, cv_shrink;
|
||||||
extern consvar_t cv_blueshell, cv_jaws, cv_fireflower, cv_tripleredshell, cv_lightning;
|
extern consvar_t cv_lightningshield, cv_hyudoro, cv_pogospring;
|
||||||
extern consvar_t cv_feather;
|
|
||||||
|
extern consvar_t cv_triplesneaker, cv_triplebanana, cv_tripleorbinaut, cv_dualjawz;
|
||||||
|
|
||||||
extern consvar_t cv_karthud;
|
extern consvar_t cv_karthud;
|
||||||
extern consvar_t cv_kartminimap;
|
extern consvar_t cv_kartminimap;
|
||||||
extern consvar_t cv_kartcheck;
|
extern consvar_t cv_kartcheck;
|
||||||
extern consvar_t cv_kartstarsfx;
|
extern consvar_t cv_kartinvinsfx;
|
||||||
extern consvar_t cv_kartspeed;
|
extern consvar_t cv_kartspeed;
|
||||||
extern consvar_t cv_kartballoons;
|
extern consvar_t cv_kartbumpers;
|
||||||
extern consvar_t cv_kartfrantic;
|
extern consvar_t cv_kartfrantic;
|
||||||
extern consvar_t cv_kartcomeback;
|
extern consvar_t cv_kartcomeback;
|
||||||
extern consvar_t cv_kartmirror;
|
extern consvar_t cv_kartmirror;
|
||||||
extern consvar_t cv_speedometer;
|
extern consvar_t cv_kartspeedometer;
|
||||||
|
extern consvar_t cv_kartvoices;
|
||||||
|
|
||||||
|
extern consvar_t cv_karteliminatelast;
|
||||||
|
|
||||||
extern consvar_t cv_votetime;
|
extern consvar_t cv_votetime;
|
||||||
|
|
||||||
|
extern consvar_t cv_kartdebugitem, cv_kartdebugamount, cv_kartdebugcheckpoint, cv_kartdebugshrink;
|
||||||
|
|
||||||
extern consvar_t cv_itemfinder;
|
extern consvar_t cv_itemfinder;
|
||||||
|
|
||||||
extern consvar_t cv_inttime, cv_advancemap, cv_playersforexit;
|
extern consvar_t cv_inttime, cv_advancemap, cv_playersforexit;
|
||||||
|
|
126
src/d_player.h
126
src/d_player.h
|
@ -108,8 +108,8 @@ typedef enum
|
||||||
// Did you get a time-over?
|
// Did you get a time-over?
|
||||||
PF_TIMEOVER = 1<<10,
|
PF_TIMEOVER = 1<<10,
|
||||||
|
|
||||||
// Ready for Super?
|
// SRB2Kart: Spectator that wants to join
|
||||||
PF_SUPERREADY = 1<<11,
|
PF_WANTSTOJOIN = 1<<11,
|
||||||
|
|
||||||
// Character action status
|
// Character action status
|
||||||
PF_JUMPED = 1<<12,
|
PF_JUMPED = 1<<12,
|
||||||
|
@ -230,93 +230,105 @@ typedef enum
|
||||||
NUMPOWERS
|
NUMPOWERS
|
||||||
} powertype_t;
|
} powertype_t;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
KITEM_SAD = -1,
|
||||||
|
KITEM_NONE = 0,
|
||||||
|
KITEM_SNEAKER,
|
||||||
|
KITEM_ROCKETSNEAKER,
|
||||||
|
KITEM_INVINCIBILITY,
|
||||||
|
KITEM_BANANA,
|
||||||
|
KITEM_EGGMAN,
|
||||||
|
KITEM_ORBINAUT,
|
||||||
|
KITEM_JAWZ,
|
||||||
|
KITEM_MINE,
|
||||||
|
KITEM_BALLHOG,
|
||||||
|
KITEM_SPB,
|
||||||
|
KITEM_GROW,
|
||||||
|
KITEM_SHRINK,
|
||||||
|
KITEM_LIGHTNINGSHIELD,
|
||||||
|
KITEM_HYUDORO,
|
||||||
|
KITEM_POGOSPRING,
|
||||||
|
KITEM_KITCHENSINK,
|
||||||
|
|
||||||
|
NUMKARTITEMS,
|
||||||
|
|
||||||
|
// Additional roulette numbers, only used for K_KartGetItemResult
|
||||||
|
KRITEM_TRIPLESNEAKER = NUMKARTITEMS,
|
||||||
|
KRITEM_TRIPLEBANANA,
|
||||||
|
KRITEM_TENFOLDBANANA,
|
||||||
|
KRITEM_TRIPLEORBINAUT,
|
||||||
|
KRITEM_DUALJAWZ,
|
||||||
|
|
||||||
|
NUMKARTRESULTS
|
||||||
|
} kartitems_t;
|
||||||
|
|
||||||
//{ SRB2kart - kartstuff
|
//{ SRB2kart - kartstuff
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
// Basic gameplay things
|
// Basic gameplay things
|
||||||
k_position, // Used for Kart positions, mostly for deterministic stuff
|
k_position, // Used for Kart positions, mostly for deterministic stuff
|
||||||
k_oldposition, // Used for taunting when you pass someone
|
k_oldposition, // Used for taunting when you pass someone
|
||||||
k_positiondelay, // Prevents player from taunting continuously if two people were neck-and-neck
|
k_positiondelay, // Used for position number, so it can grow when passing/being passed
|
||||||
k_prevcheck, // Previous checkpoint distance; for p_user.c (was "pw_pcd")
|
k_prevcheck, // Previous checkpoint distance; for p_user.c (was "pw_pcd")
|
||||||
k_nextcheck, // Next checkpoint distance; for p_user.c (was "pw_ncd")
|
k_nextcheck, // Next checkpoint distance; for p_user.c (was "pw_ncd")
|
||||||
k_waypoint, // Waypoints.
|
k_waypoint, // Waypoints.
|
||||||
k_starpostwp, // Temporarily stores player waypoint for... some reason. Used when respawning and finishing.
|
k_starpostwp, // Temporarily stores player waypoint for... some reason. Used when respawning and finishing.
|
||||||
k_lakitu, // Timer for Lakitu to carry and drop the player
|
k_respawn, // Timer for the DEZ laser respawn effect
|
||||||
|
|
||||||
k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
|
k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
|
||||||
k_lapanimation, // Used to make a swoopy lap lakitu, maybe other effects in the future
|
//k_lapanimation, // Used to make a swoopy lap lakitu, maybe other effects in the future
|
||||||
k_cardanimation, // Used to determine the position of some full-screen Battle Mode graphics
|
k_cardanimation, // Used to determine the position of some full-screen Battle Mode graphics
|
||||||
k_voices, // Used to stop the player saying more voices than it should
|
k_voices, // Used to stop the player saying more voices than it should
|
||||||
k_tauntvoices, // Used to specifically stop taunt voice spam
|
k_tauntvoices, // Used to specifically stop taunt voice spam
|
||||||
|
k_instashield, // Instashield no-damage animation timer
|
||||||
|
|
||||||
k_boosting, // Determines if you're currently shroom-boosting
|
k_floorboost, // Prevents Sneaker sounds for a breif duration when triggered by a floor panel
|
||||||
k_floorboost, // Prevents Mushroom sounds for a breif duration when triggered by a floor panel
|
|
||||||
k_spinout, // Separate confirmation to prevent endless wipeout loops
|
|
||||||
k_spinouttype, // Determines whether to thrust forward or not while spinning out; 0 = move forwards, 1 = stay still
|
k_spinouttype, // Determines whether to thrust forward or not while spinning out; 0 = move forwards, 1 = stay still
|
||||||
|
|
||||||
k_drift, // Drifting Left or Right, plus a bigger counter = sharper turn
|
k_drift, // Drifting Left or Right, plus a bigger counter = sharper turn
|
||||||
k_driftend, // Drift has ended, used to adjust character angle after drift
|
k_driftend, // Drift has ended, used to adjust character angle after drift
|
||||||
k_driftcharge, // Charge your drift so you can release a burst of speed
|
k_driftcharge, // Charge your drift so you can release a burst of speed
|
||||||
k_driftboost, // Boost you get from drifting
|
k_driftboost, // Boost you get from drifting
|
||||||
k_boostcharge, // Charge-up for boosting at the start of the race, or when Lakitu drops you
|
k_boostcharge, // Charge-up for boosting at the start of the race, or when dropping from respawn
|
||||||
k_jmp, // In Mario Kart, letting go of the jump button stops the drift
|
k_jmp, // In Mario Kart, letting go of the jump button stops the drift
|
||||||
k_offroad, // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
|
k_offroad, // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
|
||||||
|
k_pogospring, // Pogo spring bounce effect
|
||||||
k_brakestop, // Wait until you've made a complete stop for a few tics before letting brake go in reverse.
|
k_brakestop, // Wait until you've made a complete stop for a few tics before letting brake go in reverse.
|
||||||
|
k_waterskip, // Water skipping counter
|
||||||
|
|
||||||
k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
|
k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
|
||||||
k_roulettetype, // Used for the roulette, for deciding type (currently only used for Battle, to give you better items from Karma items)
|
k_roulettetype, // Used for the roulette, for deciding type (currently only used for Battle, to give you better items from Karma items)
|
||||||
k_itemclose, // Used to animate the item window closing (was "pw_psychic")
|
|
||||||
|
// Item held stuff
|
||||||
|
k_itemtype, // KITEM_ constant for item number
|
||||||
|
k_itemamount, // Amount of said item
|
||||||
|
k_itemheld, // Are you holding an item?
|
||||||
|
|
||||||
// Some items use timers for their duration or effects
|
// Some items use timers for their duration or effects
|
||||||
k_magnettimer, // Duration of Magnet's item-break and item box pull
|
k_attractiontimer, // Duration of Lightning Shield's item-break and item box pull
|
||||||
k_bootimer, // Duration of the boo offroad effect itself
|
k_hyudorotimer, // Duration of the Hyudoro offroad effect itself
|
||||||
k_bootaketimer, // You are stealing an item, this is your timer
|
k_stealingtimer, // You are stealing an item, this is your timer
|
||||||
k_boostolentimer, // You are being stolen from, this is your timer
|
k_stolentimer, // You are being stolen from, this is your timer
|
||||||
k_mushroomtimer, // Duration of the Mushroom Boost itself
|
k_sneakertimer, // Duration of the Sneaker Boost itself
|
||||||
k_growshrinktimer, // > 0 = Big, < 0 = small
|
k_growshrinktimer, // > 0 = Big, < 0 = small
|
||||||
k_squishedtimer, // Squished frame timer
|
k_squishedtimer, // Squished frame timer
|
||||||
k_goldshroomtimer, // Gold Mushroom duration timer
|
k_rocketsneakertimer, // Rocket Sneaker duration timer
|
||||||
k_startimer, // Invincibility timer
|
k_invincibilitytimer, // Invincibility timer
|
||||||
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
k_deathsentence, // 30 seconds to live... (SPB murder timer (not actually 30 sec, I just couldn't help the FF reference :p))
|
||||||
k_laserwisptimer, // The duration and relative angle of the laser
|
k_eggmanheld, // Eggman monitor held, separate from k_itemheld so it doesn't stop you from getting items
|
||||||
k_justbumped, // Prevent players from endlessly bumping into each other
|
k_bananadrag, // After a second of holding a banana behind you, you start to slow down
|
||||||
k_deathsentence, // 30 seconds to live... (Blue Shell murder timer (not actually 30 sec, I just couldn't help the FF reference :p))
|
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
||||||
k_poweritemtimer, // Battle mode, how long before you're allowed another power item (Star, Megashroom)
|
k_wipeoutslow, // Timer before you slowdown when getting wiped out
|
||||||
k_comebacktimer, // Battle mode, how long before you become a bomb after death
|
k_justbumped, // Prevent players from endlessly bumping into each other
|
||||||
|
k_comebacktimer, // Battle mode, how long before you become a bomb after death
|
||||||
// Each item needs its own power slot, for the HUD and held use
|
k_sadtimer, // How long you've been sad
|
||||||
// *** ADDING A NEW ITEM? ADD IT TO K_DoBooSteal PLEASE!! -Salt ***
|
|
||||||
k_magnet, // 0x1 = Magnet in inventory
|
|
||||||
k_boo, // 0x1 = Boo in inventory
|
|
||||||
k_mushroom, // 0x1 = 1 Mushroom in inventory, 0x2 = 2 Mushrooms in inventory
|
|
||||||
// 0x4 = 3 Mushrooms in inventory
|
|
||||||
k_megashroom, // 0x1 = Mega Mushroom in inventory
|
|
||||||
k_goldshroom, // 0x1 = Gold Mushroom in inventory
|
|
||||||
k_star, // 0x1 = Star in inventory
|
|
||||||
k_triplebanana, // 0x1 = 1 Banana following, 0x2 = 2 Bananas following
|
|
||||||
// 0x4 = 3 Bananas following, 0x8 = Triple Banana in inventory
|
|
||||||
k_fakeitem, // 0x1 = Fake Item being held, 0x2 = Fake Item in inventory
|
|
||||||
k_banana, // 0x1 = Banana being held, 0x2 = Banana in inventory
|
|
||||||
k_greenshell, // 0x1 = Green Shell being held, 0x2 = Green Shell in inventory
|
|
||||||
k_redshell, // 0x1 = Red Shell being held, 0x2 = Red Shell in inventory
|
|
||||||
k_laserwisp, // 0x1 = Laser Wisp in inventory
|
|
||||||
k_triplegreenshell, // 0x1 = 1 Green Shell orbiting, 0x2 = 2 Green Shells orbiting
|
|
||||||
// 0x4 = 3 Green Shells orbiting, 0x8 = Triple Green Shell in inventory
|
|
||||||
k_bobomb, // 0x1 = Bob-omb being held, 0x2 = Bob-omb in inventory
|
|
||||||
k_blueshell, // 0x1 = Blue Shell in inventory
|
|
||||||
k_jaws, // 0x1 = 1 Jaws orbiting, 0x2 = 2 Jaws orbiting,
|
|
||||||
// 0x4 = 2x Jaws in inventory
|
|
||||||
k_fireflower, // 0x1 = Fire Flower in inventory
|
|
||||||
k_tripleredshell, // 0x1 = 1 Red Shell orbiting, 0x2 = 2 Red Shells orbiting
|
|
||||||
// 0x4 = 3 Red Shells orbiting, 0x8 = Triple Red Shell in inventory
|
|
||||||
k_lightning, // 0x1 = Lightning in inventory
|
|
||||||
k_feather, // 0x1 = Feather in inventory, 0x2 = Player is feather jumping
|
|
||||||
k_kitchensink, // 0x1 = Sink in inventory
|
|
||||||
|
|
||||||
// Battle Mode vars
|
// Battle Mode vars
|
||||||
k_balloon, // Number of balloons left
|
k_bumper, // Number of bumpers left
|
||||||
k_comebackpoints, // Number of times you've bombed or gave an item to someone; once it's 3 it gets set back to 0 and you're given a balloon
|
k_comebackpoints, // Number of times you've bombed or gave an item to someone; once it's 3 it gets set back to 0 and you're given a bumper
|
||||||
k_comebackmode, // 0 = bomb, 1 = item
|
k_comebackmode, // 0 = bomb, 1 = item
|
||||||
|
k_wanted, // Timer for determining WANTED status, lowers when hitting people, prevents the game turning into Camp Lazlo
|
||||||
|
|
||||||
NUMKARTSTUFF
|
NUMKARTSTUFF
|
||||||
} kartstufftype_t;
|
} kartstufftype_t;
|
||||||
|
@ -511,7 +523,7 @@ typedef struct player_s
|
||||||
tic_t startedtime; // Time which you started this mare with.
|
tic_t startedtime; // Time which you started this mare with.
|
||||||
tic_t finishedtime; // Time it took you to finish the mare (used for display)
|
tic_t finishedtime; // Time it took you to finish the mare (used for display)
|
||||||
INT16 finishedrings; // The rings you had left upon finishing the mare
|
INT16 finishedrings; // The rings you had left upon finishing the mare
|
||||||
UINT32 marescore; // score for this nights stage
|
UINT32 marescore; // SRB2Kart: Battle score
|
||||||
UINT32 lastmarescore; // score for the last mare
|
UINT32 lastmarescore; // score for the last mare
|
||||||
UINT8 lastmare; // previous mare
|
UINT8 lastmare; // previous mare
|
||||||
INT32 maxlink; // maximum link obtained
|
INT32 maxlink; // maximum link obtained
|
||||||
|
|
524
src/dehacked.c
524
src/dehacked.c
|
@ -1824,8 +1824,10 @@ static actionpointer_t actionpointers[] =
|
||||||
{{A_RemoteAction}, "A_REMOTEACTION"},
|
{{A_RemoteAction}, "A_REMOTEACTION"},
|
||||||
{{A_ToggleFlameJet}, "A_TOGGLEFLAMEJET"},
|
{{A_ToggleFlameJet}, "A_TOGGLEFLAMEJET"},
|
||||||
{{A_ItemPop}, "A_ITEMPOP"}, // SRB2kart
|
{{A_ItemPop}, "A_ITEMPOP"}, // SRB2kart
|
||||||
{{A_RedShellChase}, "A_REDSHELLCHASE"}, // SRB2kart
|
{{A_JawzChase}, "A_JAWZCHASE"}, // SRB2kart
|
||||||
{{A_BobombExplode}, "A_BOBOMBEXPLODE"}, // SRB2kart
|
{{A_JawzExplode}, "A_JAWZEXPLODE"}, // SRB2kart
|
||||||
|
{{A_MineExplode}, "A_MINEEXPLODE"}, // SRB2kart
|
||||||
|
{{A_BallhogExplode}, "A_BALLHOGEXPLODE"}, // SRB2kart
|
||||||
{{A_OrbitNights}, "A_ORBITNIGHTS"},
|
{{A_OrbitNights}, "A_ORBITNIGHTS"},
|
||||||
{{A_GhostMe}, "A_GHOSTME"},
|
{{A_GhostMe}, "A_GHOSTME"},
|
||||||
{{A_SetObjectState}, "A_SETOBJECTSTATE"},
|
{{A_SetObjectState}, "A_SETOBJECTSTATE"},
|
||||||
|
@ -3081,10 +3083,11 @@ static void readmaincfg(MYFILE *f)
|
||||||
|
|
||||||
// Also save a time attack folder
|
// Also save a time attack folder
|
||||||
filenamelen = strlen(gamedatafilename)-4; // Strip off the extension
|
filenamelen = strlen(gamedatafilename)-4; // Strip off the extension
|
||||||
strncpy(timeattackfolder, gamedatafilename, min(filenamelen, sizeof (timeattackfolder)));
|
filenamelen = min(filenamelen, sizeof (timeattackfolder));
|
||||||
|
strncpy(timeattackfolder, gamedatafilename, filenamelen);
|
||||||
timeattackfolder[min(filenamelen, sizeof (timeattackfolder) - 1)] = '\0';
|
timeattackfolder[min(filenamelen, sizeof (timeattackfolder) - 1)] = '\0';
|
||||||
|
|
||||||
strncpy(savegamename, timeattackfolder, sizeof (timeattackfolder));
|
strncpy(savegamename, timeattackfolder, filenamelen);
|
||||||
strlcat(savegamename, "%u.ssg", sizeof(savegamename));
|
strlcat(savegamename, "%u.ssg", sizeof(savegamename));
|
||||||
// can't use sprintf since there is %u in savegamename
|
// can't use sprintf since there is %u in savegamename
|
||||||
strcatbf(savegamename, srb2home, PATHSEP);
|
strcatbf(savegamename, srb2home, PATHSEP);
|
||||||
|
@ -3181,6 +3184,14 @@ static void readwipes(MYFILE *f)
|
||||||
else if (fastcmp(pword, "FINAL"))
|
else if (fastcmp(pword, "FINAL"))
|
||||||
wipeoffset = wipe_specinter_final;
|
wipeoffset = wipe_specinter_final;
|
||||||
}
|
}
|
||||||
|
else if (fastncmp(word, "VOTING_", 10))
|
||||||
|
{
|
||||||
|
pword = word + 10;
|
||||||
|
if (fastcmp(pword, "TOBLACK"))
|
||||||
|
wipeoffset = wipe_specinter_toblack;
|
||||||
|
else if (fastcmp(pword, "FINAL"))
|
||||||
|
wipeoffset = wipe_specinter_final;
|
||||||
|
}
|
||||||
else if (fastncmp(word, "MULTINTER_", 10))
|
else if (fastncmp(word, "MULTINTER_", 10))
|
||||||
{
|
{
|
||||||
pword = word + 10;
|
pword = word + 10;
|
||||||
|
@ -5806,15 +5817,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_FIREBALL2",
|
"S_FIREBALL2",
|
||||||
"S_FIREBALL3",
|
"S_FIREBALL3",
|
||||||
"S_FIREBALL4",
|
"S_FIREBALL4",
|
||||||
"S_FIREBALL5",
|
|
||||||
"S_FIREBALL6",
|
|
||||||
"S_FIREBALL7",
|
|
||||||
"S_FIREBALLEXP1",
|
"S_FIREBALLEXP1",
|
||||||
"S_FIREBALLEXP2",
|
"S_FIREBALLEXP2",
|
||||||
"S_FIREBALLEXP3",
|
"S_FIREBALLEXP3",
|
||||||
"S_FIREBALLEXP4",
|
|
||||||
"S_FIREBALLEXP5",
|
|
||||||
"S_FIREBALLEXP6",
|
|
||||||
"S_SHELL",
|
"S_SHELL",
|
||||||
"S_SHELL1",
|
"S_SHELL1",
|
||||||
"S_SHELL2",
|
"S_SHELL2",
|
||||||
|
@ -6242,9 +6247,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_DRIFTDUST3",
|
"S_DRIFTDUST3",
|
||||||
"S_DRIFTDUST4",
|
"S_DRIFTDUST4",
|
||||||
|
|
||||||
// Magnet Burst
|
// Lightning Shield Burst
|
||||||
|
|
||||||
// Mushroom Fire Trail
|
// Sneaker Fire Trail
|
||||||
"S_KARTFIRE1",
|
"S_KARTFIRE1",
|
||||||
"S_KARTFIRE2",
|
"S_KARTFIRE2",
|
||||||
"S_KARTFIRE3",
|
"S_KARTFIRE3",
|
||||||
|
@ -6254,7 +6259,33 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_KARTFIRE7",
|
"S_KARTFIRE7",
|
||||||
"S_KARTFIRE8",
|
"S_KARTFIRE8",
|
||||||
|
|
||||||
//{ Fake Item
|
// Invincibility Sparks
|
||||||
|
"S_KARTINVULN_SMALL1",
|
||||||
|
"S_KARTINVULN_SMALL2",
|
||||||
|
"S_KARTINVULN_SMALL3",
|
||||||
|
"S_KARTINVULN_SMALL4",
|
||||||
|
"S_KARTINVULN_SMALL5",
|
||||||
|
|
||||||
|
"S_KARTINVULN_LARGE1",
|
||||||
|
"S_KARTINVULN_LARGE2",
|
||||||
|
"S_KARTINVULN_LARGE3",
|
||||||
|
"S_KARTINVULN_LARGE4",
|
||||||
|
"S_KARTINVULN_LARGE5",
|
||||||
|
|
||||||
|
// Invincibility flash overlay
|
||||||
|
"S_INVULNFLASH1",
|
||||||
|
"S_INVULNFLASH2",
|
||||||
|
"S_INVULNFLASH3",
|
||||||
|
"S_INVULNFLASH4",
|
||||||
|
|
||||||
|
// Wipeout dust trail
|
||||||
|
"S_WIPEOUTTRAIL1",
|
||||||
|
"S_WIPEOUTTRAIL2",
|
||||||
|
"S_WIPEOUTTRAIL3",
|
||||||
|
"S_WIPEOUTTRAIL4",
|
||||||
|
"S_WIPEOUTTRAIL5",
|
||||||
|
|
||||||
|
//{ Eggman Monitor
|
||||||
"S_FAKEITEM1",
|
"S_FAKEITEM1",
|
||||||
"S_FAKEITEM2",
|
"S_FAKEITEM2",
|
||||||
"S_FAKEITEM3",
|
"S_FAKEITEM3",
|
||||||
|
@ -6283,81 +6314,74 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// Banana
|
// Banana
|
||||||
"S_BANANAITEM",
|
"S_BANANA",
|
||||||
"S_DEADBANANA",
|
"S_BANANA_DEAD",
|
||||||
|
|
||||||
//{ Green Shell
|
//{ Orbinaut
|
||||||
"S_TRIPLEGREENSHIELD1",
|
"S_ORBINAUT1",
|
||||||
"S_TRIPLEGREENSHIELD2",
|
"S_ORBINAUT2",
|
||||||
"S_TRIPLEGREENSHIELD3",
|
"S_ORBINAUT3",
|
||||||
"S_TRIPLEGREENSHIELD4",
|
"S_ORBINAUT4",
|
||||||
"S_TRIPLEGREENSHIELD5",
|
"S_ORBINAUT5",
|
||||||
"S_TRIPLEGREENSHIELD6",
|
"S_ORBINAUT6",
|
||||||
"S_TRIPLEGREENSHIELD7",
|
"S_ORBINAUT_SHIELD",
|
||||||
"S_TRIPLEGREENSHIELD8",
|
"S_ORBINAUT_DEAD",
|
||||||
"S_GREENSHIELD1",
|
"S_ORBINAUT_SHIELDDEAD",
|
||||||
"S_GREENSHIELD2",
|
|
||||||
"S_GREENSHIELD3",
|
|
||||||
"S_GREENSHIELD4",
|
|
||||||
"S_GREENSHIELD5",
|
|
||||||
"S_GREENSHIELD6",
|
|
||||||
"S_GREENSHIELD7",
|
|
||||||
"S_GREENSHIELD8",
|
|
||||||
"S_GREENITEM1",
|
|
||||||
"S_GREENITEM2",
|
|
||||||
"S_GREENITEM3",
|
|
||||||
"S_GREENITEM4",
|
|
||||||
"S_GREENITEM5",
|
|
||||||
"S_GREENITEM6",
|
|
||||||
"S_GREENITEM7",
|
|
||||||
"S_GREENITEM8",
|
|
||||||
"S_DEADGREEN",
|
|
||||||
//}
|
//}
|
||||||
//{ Red Shell
|
//{ Jawz
|
||||||
"S_TRIPLEREDSHIELD1",
|
"S_JAWZ1",
|
||||||
"S_TRIPLEREDSHIELD2",
|
"S_JAWZ2",
|
||||||
"S_TRIPLEREDSHIELD3",
|
"S_JAWZ3",
|
||||||
"S_TRIPLEREDSHIELD4",
|
"S_JAWZ4",
|
||||||
"S_TRIPLEREDSHIELD5",
|
"S_JAWZ5",
|
||||||
"S_TRIPLEREDSHIELD6",
|
"S_JAWZ6",
|
||||||
"S_TRIPLEREDSHIELD7",
|
"S_JAWZ7",
|
||||||
"S_TRIPLEREDSHIELD8",
|
"S_JAWZ8",
|
||||||
"S_REDSHIELD1",
|
"S_JAWZ_DUD1",
|
||||||
"S_REDSHIELD2",
|
"S_JAWZ_DUD2",
|
||||||
"S_REDSHIELD3",
|
"S_JAWZ_DUD3",
|
||||||
"S_REDSHIELD4",
|
"S_JAWZ_DUD4",
|
||||||
"S_REDSHIELD5",
|
"S_JAWZ_DUD5",
|
||||||
"S_REDSHIELD6",
|
"S_JAWZ_DUD6",
|
||||||
"S_REDSHIELD7",
|
"S_JAWZ_DUD7",
|
||||||
"S_REDSHIELD8",
|
"S_JAWZ_DUD8",
|
||||||
"S_REDITEM1",
|
"S_JAWZ_SHIELD1",
|
||||||
"S_REDITEM2",
|
"S_JAWZ_SHIELD2",
|
||||||
"S_REDITEM3",
|
"S_JAWZ_SHIELD3",
|
||||||
"S_REDITEM4",
|
"S_JAWZ_SHIELD4",
|
||||||
"S_REDITEM5",
|
"S_JAWZ_SHIELD5",
|
||||||
"S_REDITEM6",
|
"S_JAWZ_SHIELD6",
|
||||||
"S_REDITEM7",
|
"S_JAWZ_SHIELD7",
|
||||||
"S_REDITEM8",
|
"S_JAWZ_SHIELD8",
|
||||||
"S_DEADRED",
|
"S_JAWZ_DEAD1",
|
||||||
|
"S_JAWZ_DEAD2",
|
||||||
//}
|
//}
|
||||||
|
|
||||||
"S_FIRETRAIL1",
|
// Special Stage Mine
|
||||||
"S_FIRETRAIL2",
|
"S_SSMINE1",
|
||||||
"S_FIRETRAIL3",
|
"S_SSMINE2",
|
||||||
"S_FIRETRAIL4",
|
"S_SSMINE3",
|
||||||
"S_FIRETRAIL5",
|
"S_SSMINE4",
|
||||||
"S_FIRETRAIL6",
|
"S_SSMINE_SHIELD1",
|
||||||
"S_FIRETRAIL7",
|
"S_SSMINE_SHIELD2",
|
||||||
"S_FIRETRAIL8",
|
"S_SSMINE_AIR1",
|
||||||
"S_FIRETRAIL9",
|
"S_SSMINE_AIR2",
|
||||||
|
"S_SSMINE_DEPLOY1",
|
||||||
// Bob-omb
|
"S_SSMINE_DEPLOY2",
|
||||||
"S_BOMBSHIELD",
|
"S_SSMINE_DEPLOY3",
|
||||||
"S_BOMBITEM",
|
"S_SSMINE_DEPLOY4",
|
||||||
"S_BOMBAIR",
|
"S_SSMINE_DEPLOY5",
|
||||||
"S_BOMBEXPLODE",
|
"S_SSMINE_DEPLOY6",
|
||||||
"S_BOMBEXPLOSION1",
|
"S_SSMINE_DEPLOY7",
|
||||||
"S_BOMBEXPLOSION2",
|
"S_SSMINE_DEPLOY8",
|
||||||
|
"S_SSMINE_DEPLOY9",
|
||||||
|
"S_SSMINE_DEPLOY10",
|
||||||
|
"S_SSMINE_DEPLOY11",
|
||||||
|
"S_SSMINE_DEPLOY12",
|
||||||
|
"S_SSMINE_DEPLOY13",
|
||||||
|
"S_SSMINE_EXPLODE",
|
||||||
|
"S_MINEEXPLOSION1",
|
||||||
|
"S_MINEEXPLOSION2",
|
||||||
|
|
||||||
// New explosion
|
// New explosion
|
||||||
"S_QUICKBOOM1",
|
"S_QUICKBOOM1",
|
||||||
|
@ -6382,14 +6406,41 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_SLOWBOOM9",
|
"S_SLOWBOOM9",
|
||||||
"S_SLOWBOOM10",
|
"S_SLOWBOOM10",
|
||||||
|
|
||||||
// Blue Shell - Blue Lightning for now...
|
// Ballhog
|
||||||
|
"S_BALLHOG1",
|
||||||
|
"S_BALLHOG2",
|
||||||
|
"S_BALLHOG3",
|
||||||
|
"S_BALLHOG4",
|
||||||
|
"S_BALLHOG5",
|
||||||
|
"S_BALLHOG6",
|
||||||
|
"S_BALLHOG7",
|
||||||
|
"S_BALLHOG8",
|
||||||
|
"S_BALLHOG_DEAD",
|
||||||
|
"S_BALLHOGBOOM1",
|
||||||
|
"S_BALLHOGBOOM2",
|
||||||
|
"S_BALLHOGBOOM3",
|
||||||
|
"S_BALLHOGBOOM4",
|
||||||
|
"S_BALLHOGBOOM5",
|
||||||
|
"S_BALLHOGBOOM6",
|
||||||
|
"S_BALLHOGBOOM7",
|
||||||
|
"S_BALLHOGBOOM8",
|
||||||
|
"S_BALLHOGBOOM9",
|
||||||
|
"S_BALLHOGBOOM10",
|
||||||
|
"S_BALLHOGBOOM11",
|
||||||
|
"S_BALLHOGBOOM12",
|
||||||
|
"S_BALLHOGBOOM13",
|
||||||
|
"S_BALLHOGBOOM14",
|
||||||
|
"S_BALLHOGBOOM15",
|
||||||
|
"S_BALLHOGBOOM16",
|
||||||
|
|
||||||
|
// Self-Propelled Bomb - just an explosion for now...
|
||||||
"S_BLUELIGHTNING1",
|
"S_BLUELIGHTNING1",
|
||||||
"S_BLUELIGHTNING2",
|
"S_BLUELIGHTNING2",
|
||||||
"S_BLUELIGHTNING3",
|
"S_BLUELIGHTNING3",
|
||||||
"S_BLUELIGHTNING4",
|
"S_BLUELIGHTNING4",
|
||||||
"S_BLUEEXPLODE",
|
"S_BLUEEXPLODE",
|
||||||
|
|
||||||
// Lightning
|
// Grow/shrink beams
|
||||||
"S_LIGHTNING1",
|
"S_LIGHTNING1",
|
||||||
"S_LIGHTNING2",
|
"S_LIGHTNING2",
|
||||||
"S_LIGHTNING3",
|
"S_LIGHTNING3",
|
||||||
|
@ -6401,14 +6452,13 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_SINKTRAIL2",
|
"S_SINKTRAIL2",
|
||||||
"S_SINKTRAIL3",
|
"S_SINKTRAIL3",
|
||||||
|
|
||||||
// Battle Mode balloon
|
// Battle Mode bumper
|
||||||
"S_BATTLEBALLOON1",
|
"S_BATTLEBUMPER1",
|
||||||
"S_BATTLEBALLOON2",
|
"S_BATTLEBUMPER2",
|
||||||
"S_BATTLEBALLOON3",
|
"S_BATTLEBUMPER3",
|
||||||
|
|
||||||
// Lakitu
|
// DEZ respawn laser
|
||||||
"S_LAKITU1",
|
"S_DEZLASER",
|
||||||
"S_LAKITU2",
|
|
||||||
|
|
||||||
// Pokey
|
// Pokey
|
||||||
"S_POKEY1",
|
"S_POKEY1",
|
||||||
|
@ -6488,15 +6538,22 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_DOOD_BOX4",
|
"S_DOOD_BOX4",
|
||||||
"S_DOOD_BOX5",
|
"S_DOOD_BOX5",
|
||||||
|
|
||||||
// D00Dkart - Diddy Kong Racing Balloon
|
// D00Dkart - Diddy Kong Racing Bumper
|
||||||
"S_DOOD_BALLOON",
|
"S_DOOD_BALLOON",
|
||||||
|
|
||||||
// D00Dkart - Big Ring
|
// Chaotix Big Ring
|
||||||
"S_DOOD_RING1",
|
"S_BIGRING01",
|
||||||
"S_DOOD_RING2",
|
"S_BIGRING02",
|
||||||
"S_DOOD_RING3",
|
"S_BIGRING03",
|
||||||
"S_DOOD_RING4",
|
"S_BIGRING04",
|
||||||
"S_DOOD_RING5",
|
"S_BIGRING05",
|
||||||
|
"S_BIGRING06",
|
||||||
|
"S_BIGRING07",
|
||||||
|
"S_BIGRING08",
|
||||||
|
"S_BIGRING09",
|
||||||
|
"S_BIGRING10",
|
||||||
|
"S_BIGRING11",
|
||||||
|
"S_BIGRING12",
|
||||||
|
|
||||||
// SNES Objects
|
// SNES Objects
|
||||||
"S_SNES_DONUTBUSH1",
|
"S_SNES_DONUTBUSH1",
|
||||||
|
@ -6568,28 +6625,38 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_FIREDITEM3",
|
"S_FIREDITEM3",
|
||||||
"S_FIREDITEM4",
|
"S_FIREDITEM4",
|
||||||
|
|
||||||
|
"S_INSTASHIELDA1", // No damage instashield effect
|
||||||
|
"S_INSTASHIELDA2",
|
||||||
|
"S_INSTASHIELDA3",
|
||||||
|
"S_INSTASHIELDA4",
|
||||||
|
"S_INSTASHIELDA5",
|
||||||
|
"S_INSTASHIELDA6",
|
||||||
|
"S_INSTASHIELDA7",
|
||||||
|
"S_INSTASHIELDB1",
|
||||||
|
"S_INSTASHIELDB2",
|
||||||
|
"S_INSTASHIELDB3",
|
||||||
|
"S_INSTASHIELDB4",
|
||||||
|
"S_INSTASHIELDB5",
|
||||||
|
"S_INSTASHIELDB6",
|
||||||
|
"S_INSTASHIELDB7",
|
||||||
|
|
||||||
"S_PLAYERARROW", // Above player arrow
|
"S_PLAYERARROW", // Above player arrow
|
||||||
"S_PLAYERARROW_MUSHROOM",
|
"S_PLAYERARROW_BOX",
|
||||||
"S_PLAYERARROW_GREENSHELL",
|
"S_PLAYERARROW_ITEM",
|
||||||
"S_PLAYERARROW_BANANA",
|
"S_PLAYERARROW_NUMBER",
|
||||||
"S_PLAYERARROW_FAKEITEM",
|
"S_PLAYERARROW_X",
|
||||||
"S_PLAYERARROW_BOO",
|
"S_PLAYERARROW_WANTED1",
|
||||||
"S_PLAYERARROW_FEATHER",
|
"S_PLAYERARROW_WANTED2",
|
||||||
"S_PLAYERARROW_REDSHELL",
|
"S_PLAYERARROW_WANTED3",
|
||||||
"S_PLAYERARROW_BOBOMB",
|
"S_PLAYERARROW_WANTED4",
|
||||||
"S_PLAYERARROW_FIREFLOWER",
|
"S_PLAYERARROW_WANTED5",
|
||||||
"S_PLAYERARROW_TRIPLEGREENSHELL",
|
"S_PLAYERARROW_WANTED6",
|
||||||
"S_PLAYERARROW_TRIPLEBANANA",
|
"S_PLAYERARROW_WANTED7",
|
||||||
"S_PLAYERARROW_TRIPLEREDSHELL",
|
|
||||||
"S_PLAYERARROW_STAR",
|
|
||||||
"S_PLAYERARROW_MEGASHROOM",
|
|
||||||
"S_PLAYERARROW_KITCHENSINK",
|
|
||||||
"S_PLAYERARROW_EMPTY",
|
|
||||||
"S_PLAYERARROW_ROULETTE",
|
|
||||||
|
|
||||||
"S_PLAYERBOMB", // Player bomb overlay
|
"S_PLAYERBOMB", // Player bomb overlay
|
||||||
"S_PLAYERITEM", // Player item overlay
|
"S_PLAYERITEM", // Player item overlay
|
||||||
"S_PLAYERBOMB_WHEEL",
|
|
||||||
|
"S_KARMAWHEEL", // Karma player wheels
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
"S_NAMECHECK",
|
"S_NAMECHECK",
|
||||||
|
@ -7108,52 +7175,48 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
"MT_RANDOMITEM",
|
"MT_RANDOMITEM",
|
||||||
"MT_RANDOMITEMPOP",
|
"MT_RANDOMITEMPOP",
|
||||||
|
|
||||||
"MT_MUSHROOMTRAIL",
|
"MT_SNEAKERTRAIL",
|
||||||
|
"MT_SPARKLETRAIL",
|
||||||
|
"MT_INVULNFLASH",
|
||||||
|
"MT_WIPEOUTTRAIL",
|
||||||
"MT_DRIFT",
|
"MT_DRIFT",
|
||||||
"MT_DRIFTDUST",
|
"MT_DRIFTDUST",
|
||||||
|
|
||||||
"MT_FAKESHIELD",
|
"MT_FAKESHIELD",
|
||||||
"MT_FAKEITEM",
|
"MT_FAKEITEM",
|
||||||
|
|
||||||
"MT_TRIPLEBANANASHIELD1", // Banana Stuff
|
"MT_BANANA",
|
||||||
"MT_TRIPLEBANANASHIELD2",
|
"MT_BANANA_SHIELD", // Banana Stuff
|
||||||
"MT_TRIPLEBANANASHIELD3",
|
|
||||||
"MT_BANANASHIELD",
|
|
||||||
"MT_BANANAITEM",
|
|
||||||
|
|
||||||
"MT_TRIPLEGREENSHIELD1", // Green shell stuff
|
"MT_ORBINAUT", // Orbinaut stuff
|
||||||
"MT_TRIPLEGREENSHIELD2",
|
"MT_ORBINAUT_SHIELD",
|
||||||
"MT_TRIPLEGREENSHIELD3",
|
|
||||||
"MT_GREENSHIELD",
|
|
||||||
"MT_GREENITEM",
|
|
||||||
"MT_FIRETRAIL",
|
|
||||||
|
|
||||||
"MT_TRIPLEREDSHIELD1", // Red shell stuff
|
"MT_JAWZ", // Jawz stuff
|
||||||
"MT_TRIPLEREDSHIELD2",
|
"MT_JAWZ_DUD",
|
||||||
"MT_TRIPLEREDSHIELD3",
|
"MT_JAWZ_SHIELD",
|
||||||
"MT_REDSHIELD",
|
|
||||||
"MT_REDITEM",
|
|
||||||
"MT_REDITEMDUD",
|
|
||||||
|
|
||||||
"MT_BOMBSHIELD", // Bob-omb stuff
|
"MT_SSMINE_SHIELD", // Special Stage Mine stuff
|
||||||
"MT_BOMBITEM",
|
"MT_SSMINE",
|
||||||
"MT_BOMBEXPLOSION",
|
"MT_MINEEXPLOSION",
|
||||||
"MT_BOMBEXPLOSIONSOUND",
|
"MT_MINEEXPLOSIONSOUND",
|
||||||
|
|
||||||
"MT_SMOLDERING", // New explosion
|
"MT_SMOLDERING", // New explosion
|
||||||
"MT_BOOMEXPLODE",
|
"MT_BOOMEXPLODE",
|
||||||
"MT_BOOMPARTICLE",
|
"MT_BOOMPARTICLE",
|
||||||
|
|
||||||
"MT_BLUELIGHTNING", // Lightning stuff
|
"MT_BALLHOG", // Ballhog
|
||||||
|
"MT_BALLHOGBOOM",
|
||||||
|
|
||||||
|
"MT_BLUELIGHTNING", // Grow/shrink stuff
|
||||||
"MT_BLUEEXPLOSION",
|
"MT_BLUEEXPLOSION",
|
||||||
"MT_LIGHTNING",
|
"MT_LIGHTNING",
|
||||||
|
|
||||||
"MT_SINK", // Kitchen Sink Stuff
|
"MT_SINK", // Kitchen Sink Stuff
|
||||||
"MT_SINKTRAIL",
|
"MT_SINKTRAIL",
|
||||||
|
|
||||||
"MT_BATTLEBALLOON", // Battle Mode balloon
|
"MT_BATTLEBUMPER", // Battle Mode bumper
|
||||||
|
|
||||||
"MT_LAKITU",
|
"MT_DEZLASER",
|
||||||
|
|
||||||
"MT_POKEY", // Huh, thought this was a default asset for some reason, guess not.
|
"MT_POKEY", // Huh, thought this was a default asset for some reason, guess not.
|
||||||
|
|
||||||
|
@ -7189,7 +7252,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
"MT_DOOD_FLOWER4",
|
"MT_DOOD_FLOWER4",
|
||||||
"MT_DOOD_BOX",
|
"MT_DOOD_BOX",
|
||||||
"MT_DOOD_BALLOON",
|
"MT_DOOD_BALLOON",
|
||||||
"MT_DOOD_RING",
|
"MT_BIGRING",
|
||||||
|
|
||||||
"MT_SNES_DONUTBUSH1",
|
"MT_SNES_DONUTBUSH1",
|
||||||
"MT_SNES_DONUTBUSH2",
|
"MT_SNES_DONUTBUSH2",
|
||||||
|
@ -7224,7 +7287,14 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
|
|
||||||
"MT_FIREDITEM",
|
"MT_FIREDITEM",
|
||||||
|
|
||||||
|
"MT_INSTASHIELDA",
|
||||||
|
"MT_INSTASHIELDB",
|
||||||
|
|
||||||
"MT_PLAYERARROW",
|
"MT_PLAYERARROW",
|
||||||
|
"MT_PLAYERWANTED",
|
||||||
|
|
||||||
|
"MT_KARMAHITBOX",
|
||||||
|
"MT_KARMAWHEEL",
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
"MT_NAMECHECK",
|
"MT_NAMECHECK",
|
||||||
|
@ -7349,8 +7419,8 @@ static const char *const PLAYERFLAG_LIST[] = {
|
||||||
// Did you get a time-over?
|
// Did you get a time-over?
|
||||||
"TIMEOVER",
|
"TIMEOVER",
|
||||||
|
|
||||||
// Ready for Super?
|
// SRB2Kart: spectator that wants to join
|
||||||
"SUPERREADY",
|
"WANTSTOJOIN",
|
||||||
|
|
||||||
// Character action status
|
// Character action status
|
||||||
"JUMPED",
|
"JUMPED",
|
||||||
|
@ -7428,64 +7498,64 @@ static const char *COLOR_ENUMS[] = { // Rejigged for Kart.
|
||||||
"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
|
"NICKEL", // 06 // SKINCOLOR_NICKEL
|
||||||
"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
|
"ROSE", // 10 // SKINCOLOR_ROSE
|
||||||
"SHINYRED", // 11 // SKINCOLOR_SHINYRED
|
"RASPBERRY", // 11 // SKINCOLOR_RASPBERRY
|
||||||
"RED", // 12 // SKINCOLOR_RED
|
"RED", // 12 // SKINCOLOR_RED
|
||||||
"DARKPINK", // 13 // SKINCOLOR_DARKPINK
|
"RUBY", // 13 // SKINCOLOR_RUBY
|
||||||
"DARKRED", // 14 // SKINCOLOR_DARKRED
|
"CRIMSON", // 14 // SKINCOLOR_CRIMSON
|
||||||
"DAWN", // 15 // SKINCOLOR_DAWN
|
"DAWN", // 15 // SKINCOLOR_DAWN
|
||||||
"ORANGE", // 16 // SKINCOLOR_ORANGE
|
"CREAMSICLE", // 16 // SKINCOLOR_CREAMSICLE
|
||||||
"SHINYORANGE", // 17 // SKINCOLOR_SHINYORANGE
|
"ORANGE", // 17 // SKINCOLOR_ORANGE
|
||||||
"DARKORANGE", // 18 // SKINCOLOR_DARKORANGE
|
"PUMPKIN", // 18 // SKINCOLOR_PUMPKIN
|
||||||
"GOLDENBROWN", // 19 // SKINCOLOR_GOLDENBROWN
|
"ROSEWOOD", // 19 // SKINCOLOR_ROSEWOOD
|
||||||
"ROSEWOOD", // 20 // SKINCOLOR_ROSEWOOD
|
"BURGUNDY", // 20 // SKINCOLOR_BURGUNDY
|
||||||
"DARKROSEWOOD", // 21 // SKINCOLOR_DARKROSEWOOD
|
"BRONZE", // 21 // SKINCOLOR_BRONZE
|
||||||
"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
|
"PEACH", // 26 // SKINCOLOR_PEACH
|
||||||
"PEACH", // 27 // SKINCOLOR_PEACH
|
"CARAMEL", // 27 // SKINCOLOR_CARAMEL
|
||||||
"LIGHTORANGE", // 28 // SKINCOLOR_LIGHTORANGE
|
"TANGERINE", // 28 // SKINCOLOR_TANGERINE
|
||||||
"CARAMEL", // 29 // SKINCOLOR_CARAMEL
|
"GOLD", // 29 // SKINCOLOR_GOLD
|
||||||
"GOLD", // 30 // SKINCOLOR_GOLD
|
"VOMIT", // 30 // SKINCOLOR_VOMIT
|
||||||
"SHINYCARAMEL", // 31 // SKINCOLOR_SHINYCARAMEL
|
"YELLOW", // 31 // SKINCOLOR_YELLOW
|
||||||
"VOMIT", // 32 // SKINCOLOR_VOMIT
|
"CANARY", // 32 // SKINCOLOR_CANARY
|
||||||
"GARDEN", // 33 // SKINCOLOR_GARDEN
|
"OLIVE", // 33 // SKINCOLOR_OLIVE
|
||||||
"LIGHTARMY", // 34 // SKINCOLOR_LIGHTARMY
|
"GARDEN", // 34 // SKINCOLOR_GARDEN
|
||||||
"ARMY", // 35 // SKINCOLOR_ARMY
|
"LIME", // 35 // SKINCOLOR_LIME
|
||||||
"PISTACHIO", // 36 // SKINCOLOR_PISTACHIO
|
"TEA", // 36 // SKINCOLOR_TEA
|
||||||
"ROBOHOOD", // 37 // SKINCOLOR_ROBOHOOD
|
"ARMY", // 37 // SKINCOLOR_ARMY
|
||||||
"OLIVE", // 38 // SKINCOLOR_OLIVE
|
"PISTACHIO", // 38 // SKINCOLOR_PISTACHIO
|
||||||
"DARKARMY", // 39 // SKINCOLOR_DARKARMY
|
"MOSS", // 39 // SKINCOLOR_MOSS
|
||||||
"LIGHTGREEN", // 40 // SKINCOLOR_LIGHTGREEN
|
"MINT", // 40 // SKINCOLOR_MINT
|
||||||
"UGLYGREEN", // 41 // SKINCOLOR_UGLYGREEN
|
"GREEN", // 41 // SKINCOLOR_GREEN
|
||||||
"NEONGREEN", // 42 // SKINCOLOR_NEONGREEN
|
"ROBOHOOD", // 42 // SKINCOLOR_ROBOHOOD
|
||||||
"GREEN", // 43 // SKINCOLOR_GREEN
|
"PINETREE", // 43 // SKINCOLOR_PINETREE
|
||||||
"DARKGREEN", // 44 // SKINCOLOR_DARKGREEN
|
"EMERALD", // 44 // SKINCOLOR_EMERALD
|
||||||
"SWAMP", // 45 // SKINCOLOR_SWAMP
|
"SWAMP", // 45 // SKINCOLOR_SWAMP
|
||||||
"FROST", // 46 // SKINCOLOR_FROST
|
"AQUA", // 46 // SKINCOLOR_AQUA
|
||||||
"SLATE", // 47 // SKINCOLOR_SLATE
|
"TEAL", // 47 // SKINCOLOR_TEAL
|
||||||
"LIGHTBLUE", // 48 // SKINCOLOR_LIGHTBLUE
|
"CYAN", // 48 // SKINCOLOR_CYAN
|
||||||
"CYAN", // 49 // SKINCOLOR_CYAN
|
"CERULEAN", // 49 // SKINCOLOR_CERULEAN
|
||||||
"CERULEAN", // 50 // SKINCOLOR_CERULEAN
|
"SLATE", // 50 // SKINCOLOR_SLATE
|
||||||
"TURQUOISE", // 51 // SKINCOLOR_TURQUOISE
|
"STEEL", // 51 // SKINCOLOR_STEEL
|
||||||
"TEAL", // 52 // SKINCOLOR_TEAL
|
"PERIWINKLE", // 52 // SKINCOLOR_PERIWINKLE
|
||||||
"STEELBLUE", // 53 // SKINCOLOR_STEELBLUE
|
"BLUE", // 53 // SKINCOLOR_BLUE
|
||||||
"BLUE", // 54 // SKINCOLOR_BLUE
|
"SAPPHIRE", // 54 // SKINCOLOR_SAPPHIRE
|
||||||
"SHINYBLUE", // 55 // SKINCOLOR_SHINYBLUE
|
"BLUEBERRY", // 55 // SKINCOLOR_BLUEBERRY
|
||||||
"NAVY", // 56 // SKINCOLOR_NAVY
|
"NAVY", // 56 // SKINCOLOR_NAVY
|
||||||
"DARKBLUE", // 57 // SKINCOLOR_DARKBLUE
|
"JET", // 57 // SKINCOLOR_JET
|
||||||
"JETBLACK", // 58 // SKINCOLOR_JETBLACK
|
"DUSK", // 58 // SKINCOLOR_DUSK
|
||||||
"LILAC", // 59 // SKINCOLOR_LILAC
|
"PURPLE", // 59 // SKINCOLOR_PURPLE
|
||||||
"PURPLE", // 60 // SKINCOLOR_PURPLE
|
"LAVENDER", // 60 // SKINCOLOR_LAVENDER
|
||||||
"LAVENDER", // 61 // SKINCOLOR_LAVENDER
|
"INDIGO", // 61 // SKINCOLOR_INDIGO
|
||||||
"BYZANTIUM", // 62 // SKINCOLOR_BYZANTIUM
|
"BYZANTIUM", // 62 // SKINCOLOR_BYZANTIUM
|
||||||
"INDIGO", // 63 // SKINCOLOR_INDIGO
|
"LILAC", // 63 // SKINCOLOR_LILAC
|
||||||
|
|
||||||
// Super special awesome Super flashing colors!
|
// Super special awesome Super flashing colors!
|
||||||
"SUPER1", // SKINCOLOR_SUPER1
|
"SUPER1", // SKINCOLOR_SUPER1
|
||||||
|
@ -7550,17 +7620,16 @@ static const char *const KARTSTUFF_LIST[] = {
|
||||||
"NEXTCHECK",
|
"NEXTCHECK",
|
||||||
"WAYPOINT",
|
"WAYPOINT",
|
||||||
"STARPOSTWP",
|
"STARPOSTWP",
|
||||||
"LAKITU",
|
"RESPAWN",
|
||||||
|
|
||||||
"THROWDIR",
|
"THROWDIR",
|
||||||
"LAPANIMATION",
|
//"LAPANIMATION",
|
||||||
"CARDANIMATION",
|
"CARDANIMATION",
|
||||||
"VOICES",
|
"VOICES",
|
||||||
"TAUNTVOICES",
|
"TAUNTVOICES",
|
||||||
|
"INSTASHIELD",
|
||||||
|
|
||||||
"BOOSTING",
|
|
||||||
"FLOORBOOST",
|
"FLOORBOOST",
|
||||||
"SPINOUT",
|
|
||||||
"SPINOUTTYPE",
|
"SPINOUTTYPE",
|
||||||
|
|
||||||
"DRIFT",
|
"DRIFT",
|
||||||
|
@ -7570,53 +7639,42 @@ static const char *const KARTSTUFF_LIST[] = {
|
||||||
"BOOSTCHARGE",
|
"BOOSTCHARGE",
|
||||||
"JMP",
|
"JMP",
|
||||||
"OFFROAD",
|
"OFFROAD",
|
||||||
|
"POGOSPRING",
|
||||||
"BRAKESTOP",
|
"BRAKESTOP",
|
||||||
|
"WATERSKIP",
|
||||||
|
|
||||||
"ITEMROULETTE",
|
"ITEMROULETTE",
|
||||||
"ROULETTETYPE",
|
"ROULETTETYPE",
|
||||||
"ITEMCLOSE",
|
|
||||||
|
|
||||||
"MAGNETTIMER",
|
// Item held stuff
|
||||||
"BOOTIMER",
|
"ITEMTYPE",
|
||||||
"BOOTAKETIMER",
|
"ITEMAMOUNT",
|
||||||
"BOOSTOLENTIMER",
|
"ITEMHELD",
|
||||||
"MUSHROOMTIMER",
|
|
||||||
|
// Some items use timers for their duration or effects
|
||||||
|
"ATTRACTIONTIMER",
|
||||||
|
"HYUDOROTIMER",
|
||||||
|
"STEALINGTIMER",
|
||||||
|
"STOLENTIMER",
|
||||||
|
"SNEAKERTIMER",
|
||||||
"GROWSHRINKTIMER",
|
"GROWSHRINKTIMER",
|
||||||
"SQUISHEDTIMER",
|
"SQUISHEDTIMER",
|
||||||
"GOLDSHROOMTIMER",
|
"ROCKETSNEAKERTIMER",
|
||||||
"STARTIMER",
|
"INVINCIBILITYTIMER",
|
||||||
"SPINOUTTIMER",
|
|
||||||
"LASERWISPTIMER",
|
|
||||||
"JUSTBUMPED",
|
|
||||||
"DEATHSENTENCE",
|
"DEATHSENTENCE",
|
||||||
"POWERITEMTIMER",
|
"EGGMANHELD",
|
||||||
|
"BANANADRAG",
|
||||||
|
"SPINOUTTIMER",
|
||||||
|
"WIPEOUTSLOW",
|
||||||
|
"JUSTBUMPED",
|
||||||
"COMEBACKTIMER",
|
"COMEBACKTIMER",
|
||||||
|
"SADTIMER",
|
||||||
|
|
||||||
"MAGNET",
|
// Battle Mode vars
|
||||||
"BOO",
|
"BUMPER",
|
||||||
"MUSHROOM",
|
|
||||||
"MEGASHROOM",
|
|
||||||
"GOLDSHROOM",
|
|
||||||
"STAR",
|
|
||||||
"TRIPLEBANANA",
|
|
||||||
"FAKEITEM",
|
|
||||||
"BANANA",
|
|
||||||
"GREENSHELL",
|
|
||||||
"REDSHELL",
|
|
||||||
"LASERWISP",
|
|
||||||
"TRIPLEGREENSHELL",
|
|
||||||
"BOBOMB",
|
|
||||||
"BLUESHELL",
|
|
||||||
"JAWS",
|
|
||||||
"FIREFLOWER",
|
|
||||||
"TRIPLEREDSHELL",
|
|
||||||
"LIGHTNING",
|
|
||||||
"FEATHER",
|
|
||||||
"KITCHENSINK",
|
|
||||||
|
|
||||||
"BALLOON",
|
|
||||||
"COMEBACKPOINTS",
|
"COMEBACKPOINTS",
|
||||||
"COMEBACKMODE"
|
"COMEBACKMODE",
|
||||||
|
"WANTED",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *const HUDITEMS_LIST[] = {
|
static const char *const HUDITEMS_LIST[] = {
|
||||||
|
@ -8494,7 +8552,7 @@ fixed_t get_number(const char *word)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void FUNCMATH DEH_Check(void)
|
void DEH_Check(void)
|
||||||
{
|
{
|
||||||
#if defined(_DEBUG) || defined(PARANOIA)
|
#if defined(_DEBUG) || defined(PARANOIA)
|
||||||
const size_t dehstates = sizeof(STATE_LIST)/sizeof(const char*);
|
const size_t dehstates = sizeof(STATE_LIST)/sizeof(const char*);
|
||||||
|
|
|
@ -207,8 +207,8 @@ typedef struct
|
||||||
|
|
||||||
#define ZSHIFT 4
|
#define ZSHIFT 4
|
||||||
|
|
||||||
extern const char *Color_Names[MAXSKINCOLORS];
|
//extern const char *Color_Names[MAXSKINCOLORS];
|
||||||
extern const UINT8 Color_Opposite[MAXSKINCOLORS*2];
|
//extern const UINT8 Color_Opposite[MAXSKINCOLORS*2];
|
||||||
|
|
||||||
#define NUMMAPS 1035
|
#define NUMMAPS 1035
|
||||||
|
|
||||||
|
|
|
@ -161,6 +161,9 @@ extern FILE *logstream;
|
||||||
// Comment or uncomment this as necessary.
|
// Comment or uncomment this as necessary.
|
||||||
//#define USE_PATCH_DTA
|
//#define USE_PATCH_DTA
|
||||||
|
|
||||||
|
// Kart has it's own, as well.
|
||||||
|
#define USE_PATCH_KART
|
||||||
|
|
||||||
// Modification options
|
// Modification options
|
||||||
// If you want to take advantage of the Master Server's ability to force clients to update
|
// If you want to take advantage of the Master Server's ability to force clients to update
|
||||||
// to the latest version, fill these out. Otherwise, just comment out UPDATE_ALERT and leave
|
// to the latest version, fill these out. Otherwise, just comment out UPDATE_ALERT and leave
|
||||||
|
@ -234,64 +237,64 @@ typedef enum
|
||||||
SKINCOLOR_SILVER,
|
SKINCOLOR_SILVER,
|
||||||
SKINCOLOR_CLOUDY,
|
SKINCOLOR_CLOUDY,
|
||||||
SKINCOLOR_GREY,
|
SKINCOLOR_GREY,
|
||||||
SKINCOLOR_DARKGREY,
|
SKINCOLOR_NICKEL,
|
||||||
SKINCOLOR_BLACK,
|
SKINCOLOR_BLACK,
|
||||||
SKINCOLOR_SALMON,
|
SKINCOLOR_SALMON,
|
||||||
SKINCOLOR_PINK,
|
SKINCOLOR_PINK,
|
||||||
SKINCOLOR_LIGHTRED,
|
SKINCOLOR_ROSE,
|
||||||
SKINCOLOR_SHINYRED,
|
SKINCOLOR_RASPBERRY,
|
||||||
SKINCOLOR_RED,
|
SKINCOLOR_RED,
|
||||||
SKINCOLOR_DARKPINK,
|
SKINCOLOR_RUBY,
|
||||||
SKINCOLOR_DARKRED,
|
SKINCOLOR_CRIMSON,
|
||||||
SKINCOLOR_DAWN,
|
SKINCOLOR_DAWN,
|
||||||
|
SKINCOLOR_CREAMSICLE,
|
||||||
SKINCOLOR_ORANGE,
|
SKINCOLOR_ORANGE,
|
||||||
SKINCOLOR_SHINYORANGE,
|
SKINCOLOR_PUMPKIN,
|
||||||
SKINCOLOR_DARKORANGE,
|
|
||||||
SKINCOLOR_GOLDENBROWN,
|
|
||||||
SKINCOLOR_ROSEWOOD,
|
SKINCOLOR_ROSEWOOD,
|
||||||
SKINCOLOR_DARKROSEWOOD,
|
SKINCOLOR_BURGUNDY,
|
||||||
|
SKINCOLOR_BRONZE,
|
||||||
SKINCOLOR_SEPIA,
|
SKINCOLOR_SEPIA,
|
||||||
SKINCOLOR_BEIGE,
|
SKINCOLOR_BEIGE,
|
||||||
SKINCOLOR_BROWN,
|
SKINCOLOR_BROWN,
|
||||||
SKINCOLOR_LEATHER,
|
SKINCOLOR_LEATHER,
|
||||||
SKINCOLOR_YELLOW,
|
|
||||||
SKINCOLOR_PEACH,
|
SKINCOLOR_PEACH,
|
||||||
SKINCOLOR_LIGHTORANGE,
|
|
||||||
SKINCOLOR_CARAMEL,
|
SKINCOLOR_CARAMEL,
|
||||||
|
SKINCOLOR_TANGERINE,
|
||||||
SKINCOLOR_GOLD,
|
SKINCOLOR_GOLD,
|
||||||
SKINCOLOR_SHINYCARAMEL,
|
|
||||||
SKINCOLOR_VOMIT,
|
SKINCOLOR_VOMIT,
|
||||||
|
SKINCOLOR_YELLOW,
|
||||||
|
SKINCOLOR_CANARY,
|
||||||
|
SKINCOLOR_OLIVE,
|
||||||
SKINCOLOR_GARDEN,
|
SKINCOLOR_GARDEN,
|
||||||
SKINCOLOR_LIGHTARMY,
|
SKINCOLOR_LIME,
|
||||||
|
SKINCOLOR_TEA,
|
||||||
SKINCOLOR_ARMY,
|
SKINCOLOR_ARMY,
|
||||||
SKINCOLOR_PISTACHIO,
|
SKINCOLOR_PISTACHIO,
|
||||||
SKINCOLOR_ROBOHOOD,
|
SKINCOLOR_MOSS,
|
||||||
SKINCOLOR_OLIVE,
|
SKINCOLOR_MINT,
|
||||||
SKINCOLOR_DARKARMY,
|
|
||||||
SKINCOLOR_LIGHTGREEN,
|
|
||||||
SKINCOLOR_UGLYGREEN,
|
|
||||||
SKINCOLOR_NEONGREEN,
|
|
||||||
SKINCOLOR_GREEN,
|
SKINCOLOR_GREEN,
|
||||||
SKINCOLOR_DARKGREEN,
|
SKINCOLOR_ROBOHOOD,
|
||||||
|
SKINCOLOR_PINETREE,
|
||||||
|
SKINCOLOR_EMERALD,
|
||||||
SKINCOLOR_SWAMP,
|
SKINCOLOR_SWAMP,
|
||||||
SKINCOLOR_FROST,
|
SKINCOLOR_AQUA,
|
||||||
SKINCOLOR_SLATE,
|
SKINCOLOR_TEAL,
|
||||||
SKINCOLOR_LIGHTBLUE,
|
|
||||||
SKINCOLOR_CYAN,
|
SKINCOLOR_CYAN,
|
||||||
SKINCOLOR_CERULEAN,
|
SKINCOLOR_CERULEAN,
|
||||||
SKINCOLOR_TURQUOISE,
|
SKINCOLOR_SLATE,
|
||||||
SKINCOLOR_TEAL,
|
SKINCOLOR_STEEL,
|
||||||
SKINCOLOR_STEELBLUE,
|
SKINCOLOR_PERIWINKLE,
|
||||||
SKINCOLOR_BLUE,
|
SKINCOLOR_BLUE,
|
||||||
SKINCOLOR_SHINYBLUE,
|
SKINCOLOR_SAPPHIRE, // sweet mother, i cannot weave – slender aphrodite has overcome me with longing for a girl
|
||||||
|
SKINCOLOR_BLUEBERRY,
|
||||||
SKINCOLOR_NAVY,
|
SKINCOLOR_NAVY,
|
||||||
SKINCOLOR_DARKBLUE,
|
SKINCOLOR_JET,
|
||||||
SKINCOLOR_JETBLACK,
|
SKINCOLOR_DUSK,
|
||||||
SKINCOLOR_LILAC,
|
|
||||||
SKINCOLOR_PURPLE,
|
SKINCOLOR_PURPLE,
|
||||||
SKINCOLOR_LAVENDER,
|
SKINCOLOR_LAVENDER,
|
||||||
SKINCOLOR_BYZANTIUM,
|
|
||||||
SKINCOLOR_INDIGO,
|
SKINCOLOR_INDIGO,
|
||||||
|
SKINCOLOR_BYZANTIUM,
|
||||||
|
SKINCOLOR_LILAC,
|
||||||
|
|
||||||
// Careful! MAXSKINCOLORS cannot be greater than 0x40 -- Which it is now.
|
// Careful! MAXSKINCOLORS cannot be greater than 0x40 -- Which it is now.
|
||||||
MAXSKINCOLORS,
|
MAXSKINCOLORS,
|
||||||
|
@ -541,4 +544,8 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||||
/// \note Required for proper collision with moving sloped surfaces that have sector specials on them.
|
/// \note Required for proper collision with moving sloped surfaces that have sector specials on them.
|
||||||
#define SECTORSPECIALSAFTERTHINK
|
#define SECTORSPECIALSAFTERTHINK
|
||||||
|
|
||||||
|
/// SRB2Kart: Camera always has noclip.
|
||||||
|
/// \note Kind of problematic. If we decide to keep this on, we'll need serious map changes.
|
||||||
|
//#define NOCLIPCAM
|
||||||
|
|
||||||
#endif // __DOOMDEF__
|
#endif // __DOOMDEF__
|
||||||
|
|
|
@ -80,6 +80,7 @@ extern INT16 gametype;
|
||||||
extern UINT8 splitscreen;
|
extern UINT8 splitscreen;
|
||||||
extern boolean circuitmap; // Does this level have 'circuit mode'?
|
extern boolean circuitmap; // Does this level have 'circuit mode'?
|
||||||
extern boolean fromlevelselect;
|
extern boolean fromlevelselect;
|
||||||
|
extern boolean forceresetplayers;
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// Internal parameters for sound rendering.
|
// Internal parameters for sound rendering.
|
||||||
|
@ -303,21 +304,19 @@ enum TypeOfLevel
|
||||||
};
|
};
|
||||||
|
|
||||||
// Gametypes
|
// Gametypes
|
||||||
enum GameType
|
enum GameType // SRB2Kart
|
||||||
{
|
{
|
||||||
GT_COOP = 0, // also used in single player
|
GT_RACE = 0, // also used in record attack
|
||||||
GT_COMPETITION, // Classic "Race"
|
GT_MATCH, // battle, but renaming would be silly
|
||||||
GT_RACE,
|
NUMGAMETYPES,
|
||||||
|
|
||||||
GT_MATCH,
|
// the following have been left in on account of just not wanting to deal with removing all the checks for them
|
||||||
|
GT_COOP,
|
||||||
|
GT_COMPETITION,
|
||||||
GT_TEAMMATCH,
|
GT_TEAMMATCH,
|
||||||
|
|
||||||
GT_TAG,
|
GT_TAG,
|
||||||
GT_HIDEANDSEEK,
|
GT_HIDEANDSEEK,
|
||||||
|
GT_CTF
|
||||||
GT_CTF, // capture the flag
|
|
||||||
|
|
||||||
NUMGAMETYPES
|
|
||||||
};
|
};
|
||||||
// If you alter this list, update gametype_cons_t in m_menu.c
|
// If you alter this list, update gametype_cons_t in m_menu.c
|
||||||
|
|
||||||
|
@ -409,12 +408,17 @@ extern UINT16 spacetimetics;
|
||||||
extern UINT16 extralifetics;
|
extern UINT16 extralifetics;
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
extern INT32 bootime;
|
extern tic_t introtime;
|
||||||
extern INT32 boostealtime;
|
extern tic_t starttime;
|
||||||
extern INT32 mushroomtime;
|
extern INT32 hyudorotime;
|
||||||
|
extern INT32 stealtime;
|
||||||
|
extern INT32 sneakertime;
|
||||||
extern INT32 itemtime;
|
extern INT32 itemtime;
|
||||||
extern INT32 comebacktime;
|
extern INT32 comebacktime;
|
||||||
extern INT32 bumptime;
|
extern INT32 bumptime;
|
||||||
|
extern INT32 wipeoutslowtime;
|
||||||
|
extern INT32 wantedreduce;
|
||||||
|
extern INT32 wantedfrequency;
|
||||||
|
|
||||||
extern UINT8 introtoplay;
|
extern UINT8 introtoplay;
|
||||||
extern UINT8 creditscutscene;
|
extern UINT8 creditscutscene;
|
||||||
|
@ -445,15 +449,18 @@ extern boolean franticitems;
|
||||||
extern boolean mirrormode;
|
extern boolean mirrormode;
|
||||||
extern boolean comeback;
|
extern boolean comeback;
|
||||||
|
|
||||||
extern tic_t lightningcooldown;
|
extern SINT8 battlewanted[4];
|
||||||
extern tic_t blueshellincoming;
|
extern tic_t wantedcalcdelay;
|
||||||
extern UINT8 blueshellplayer;
|
extern tic_t indirectitemcooldown;
|
||||||
|
extern tic_t spbincoming;
|
||||||
|
extern UINT8 spbplayer;
|
||||||
|
extern tic_t mapreset;
|
||||||
|
|
||||||
extern boolean legitimateexit;
|
extern boolean legitimateexit;
|
||||||
extern boolean comebackshowninfo;
|
extern boolean comebackshowninfo;
|
||||||
extern tic_t curlap, bestlap;
|
extern tic_t curlap, bestlap;
|
||||||
|
|
||||||
extern INT16 votelevels[4];
|
extern INT16 votelevels[5][2];
|
||||||
extern SINT8 votes[MAXPLAYERS];
|
extern SINT8 votes[MAXPLAYERS];
|
||||||
extern SINT8 pickedvote;
|
extern SINT8 pickedvote;
|
||||||
|
|
||||||
|
|
130
src/f_finale.c
130
src/f_finale.c
|
@ -58,6 +58,9 @@ static patch_t *ttkart; // *vroom* KART
|
||||||
static patch_t *ttcheckers; // *vroom* KART
|
static patch_t *ttcheckers; // *vroom* KART
|
||||||
static patch_t *ttkflash; // flash screen
|
static patch_t *ttkflash; // flash screen
|
||||||
|
|
||||||
|
static patch_t *driver[2]; // Driving character on the waiting screen
|
||||||
|
static UINT8 *waitcolormap; // colormap for the spinning character
|
||||||
|
|
||||||
static void F_SkyScroll(INT32 scrollspeed);
|
static void F_SkyScroll(INT32 scrollspeed);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -525,6 +528,7 @@ static const char *credits[] = {
|
||||||
"\"Nev3r\"",
|
"\"Nev3r\"",
|
||||||
"\"Ritz\"",
|
"\"Ritz\"",
|
||||||
"\"Spherallic\"",
|
"\"Spherallic\"",
|
||||||
|
"\"DirkTheHusky\"",
|
||||||
"",
|
"",
|
||||||
"\1Produced By",
|
"\1Produced By",
|
||||||
"Kart Krew",
|
"Kart Krew",
|
||||||
|
@ -590,7 +594,7 @@ void F_CreditDrawer(void)
|
||||||
UINT16 i;
|
UINT16 i;
|
||||||
fixed_t y = (80<<FRACBITS) - 5*(animtimer<<FRACBITS)/8;
|
fixed_t y = (80<<FRACBITS) - 5*(animtimer<<FRACBITS)/8;
|
||||||
|
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
//V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
|
|
||||||
// Draw background
|
// Draw background
|
||||||
V_DrawSciencePatch(0, 0 - FixedMul(32<<FRACBITS, FixedDiv(credbgtimer%TICRATE, TICRATE)), V_SNAPTOTOP, W_CachePatchName("CREDTILE", PU_CACHE), FRACUNIT);
|
V_DrawSciencePatch(0, 0 - FixedMul(32<<FRACBITS, FixedDiv(credbgtimer%TICRATE, TICRATE)), V_SNAPTOTOP, W_CachePatchName("CREDTILE", PU_CACHE), FRACUNIT);
|
||||||
|
@ -621,7 +625,7 @@ void F_CreditDrawer(void)
|
||||||
y += 12<<FRACBITS;
|
y += 12<<FRACBITS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (FixedMul(y,vid.dupy) > vid.height)
|
if (((y>>FRACBITS) * vid.dupy) > vid.height)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -682,13 +686,20 @@ boolean F_CreditResponder(event_t *event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (!(timesBeaten) && !(netgame || multiplayer))
|
|
||||||
return false;*/
|
|
||||||
|
|
||||||
if (event->type != ev_keydown)
|
if (event->type != ev_keydown)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (key != KEY_ESCAPE && key != KEY_ENTER && key != KEY_SPACE && key != KEY_BACKSPACE)
|
if (key == KEY_DOWNARROW || key == KEY_SPACE)
|
||||||
|
{
|
||||||
|
if (!timetonext && !finalecount)
|
||||||
|
animtimer += 7;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if (!(timesBeaten) && !(netgame || multiplayer))
|
||||||
|
return false;*/
|
||||||
|
|
||||||
|
if (key != KEY_ESCAPE && key != KEY_ENTER && key != KEY_BACKSPACE)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (keypressed)
|
if (keypressed)
|
||||||
|
@ -903,36 +914,52 @@ void F_TitleScreenDrawer(void)
|
||||||
if (modeattacking)
|
if (modeattacking)
|
||||||
return; // We likely came here from retrying. Don't do a damn thing.
|
return; // We likely came here from retrying. Don't do a damn thing.
|
||||||
|
|
||||||
if (finalecount < 50)
|
// Don't draw outside of the title screen, or if the patch isn't there.
|
||||||
V_DrawFill(0, 0, 320, 200, 31);
|
|
||||||
else
|
|
||||||
// Draw that sky!
|
|
||||||
F_SkyScroll(titlescrollspeed);
|
|
||||||
|
|
||||||
// Don't draw outside of the title screewn, or if the patch isn't there.
|
|
||||||
if (!ttbanner || (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS))
|
if (!ttbanner || (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS))
|
||||||
return;
|
|
||||||
|
|
||||||
V_DrawSmallScaledPatch(84, 36, 0, ttbanner);
|
|
||||||
|
|
||||||
if (finalecount < 20)
|
|
||||||
{
|
{
|
||||||
if (finalecount >= 10)
|
F_SkyScroll(titlescrollspeed);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (finalecount < 50)
|
||||||
|
{
|
||||||
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
|
|
||||||
|
V_DrawSmallScaledPatch(84, 36, 0, ttbanner);
|
||||||
|
|
||||||
|
if (finalecount >= 20)
|
||||||
|
V_DrawSmallScaledPatch(84, 87, 0, ttkart);
|
||||||
|
else if (finalecount >= 10)
|
||||||
V_DrawSciencePatch((84<<FRACBITS) - FixedDiv(180<<FRACBITS, 10<<FRACBITS)*(20-finalecount), (87<<FRACBITS), 0, ttkart, FRACUNIT/2);
|
V_DrawSciencePatch((84<<FRACBITS) - FixedDiv(180<<FRACBITS, 10<<FRACBITS)*(20-finalecount), (87<<FRACBITS), 0, ttkart, FRACUNIT/2);
|
||||||
}
|
}
|
||||||
|
else if (finalecount < 52)
|
||||||
|
{
|
||||||
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120);
|
||||||
|
V_DrawSmallScaledPatch(84, 36, 0, ttkflash);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
V_DrawSmallScaledPatch(84, 87, 0, ttkart);
|
INT32 transval = 0;
|
||||||
|
|
||||||
|
if (finalecount <= (50+(9<<1)))
|
||||||
|
transval = (finalecount - 50)>>1;
|
||||||
|
|
||||||
|
F_SkyScroll(titlescrollspeed);
|
||||||
|
|
||||||
// Checkers, only need to be drawn after the whiteout, but we can do it here because it won't be seen before anyway
|
|
||||||
V_DrawSciencePatch(0, 0 - FixedMul(40<<FRACBITS, FixedDiv(finalecount%70, 70)), V_SNAPTOTOP|V_SNAPTOLEFT, ttcheckers, FRACUNIT);
|
V_DrawSciencePatch(0, 0 - FixedMul(40<<FRACBITS, FixedDiv(finalecount%70, 70)), V_SNAPTOTOP|V_SNAPTOLEFT, ttcheckers, FRACUNIT);
|
||||||
V_DrawSciencePatch(280<<FRACBITS, -(40<<FRACBITS) + FixedMul(40<<FRACBITS, FixedDiv(finalecount%70, 70)), V_SNAPTOTOP|V_SNAPTORIGHT, ttcheckers, FRACUNIT);
|
V_DrawSciencePatch(280<<FRACBITS, -(40<<FRACBITS) + FixedMul(40<<FRACBITS, FixedDiv(finalecount%70, 70)), V_SNAPTOTOP|V_SNAPTORIGHT, ttcheckers, FRACUNIT);
|
||||||
}
|
|
||||||
|
|
||||||
if (finalecount >= 50 && finalecount < 55)
|
if (transval)
|
||||||
{
|
V_DrawFadeScreen(120, 10 - transval);
|
||||||
V_DrawFill(0, 0, 320, 200, 120);
|
|
||||||
V_DrawSmallScaledPatch(84, 36, 0, ttkflash);
|
V_DrawSmallScaledPatch(84, 36, 0, ttbanner);
|
||||||
|
|
||||||
|
V_DrawSmallScaledPatch(84, 87, 0, ttkart);
|
||||||
|
|
||||||
|
if (!transval)
|
||||||
|
return;
|
||||||
|
|
||||||
|
V_DrawSmallScaledPatch(84, 36, transval<<V_ALPHASHIFT, ttkflash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1015,6 +1042,53 @@ void F_TitleDemoTicker(void)
|
||||||
keypressed = false;
|
keypressed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ================
|
||||||
|
// WAITINGPLAYERS
|
||||||
|
// ================
|
||||||
|
|
||||||
|
void F_StartWaitingPlayers(void)
|
||||||
|
{
|
||||||
|
INT32 i;
|
||||||
|
INT32 randskin;
|
||||||
|
spriteframe_t *sprframe;
|
||||||
|
|
||||||
|
wipegamestate = GS_TITLESCREEN; // technically wiping from title screen
|
||||||
|
finalecount = 0;
|
||||||
|
|
||||||
|
randskin = M_RandomKey(numskins);
|
||||||
|
waitcolormap = R_GetTranslationColormap(randskin, skins[randskin].prefcolor, 0);
|
||||||
|
|
||||||
|
for (i = 0; i < 2; i++)
|
||||||
|
{
|
||||||
|
sprframe = &skins[randskin].spritedef.spriteframes[(6+i) & FF_FRAMEMASK];
|
||||||
|
driver[i] = W_CachePatchNum(sprframe->lumppat[1], PU_LEVEL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void F_WaitingPlayersTicker(void)
|
||||||
|
{
|
||||||
|
if (paused)
|
||||||
|
return;
|
||||||
|
|
||||||
|
finalecount++;
|
||||||
|
|
||||||
|
// dumb hack, only start the music on the 1st tick so if you instantly go into the map you aren't hearing a tic of music
|
||||||
|
if (finalecount == 2)
|
||||||
|
S_ChangeMusicInternal("WAIT2J", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void F_WaitingPlayersDrawer(void)
|
||||||
|
{
|
||||||
|
UINT32 frame = (finalecount % 8) / 4; // The game only tics every other frame while waitingplayers
|
||||||
|
INT32 flags = V_FLIP;
|
||||||
|
const char *waittext1 = "You will join";
|
||||||
|
const char *waittext2 = "the next race...";
|
||||||
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
|
V_DrawCreditString((160 - (V_CreditStringWidth(waittext1)>>1))<<FRACBITS, 48<<FRACBITS, 0, waittext1);
|
||||||
|
V_DrawCreditString((160 - (V_CreditStringWidth(waittext2)>>1))<<FRACBITS, 64<<FRACBITS, 0, waittext2);
|
||||||
|
V_DrawFixedPatch((160<<FRACBITS) - driver[frame]->width / 2, 150<<FRACBITS, 1<<FRACBITS, flags, driver[frame], waitcolormap);
|
||||||
|
}
|
||||||
|
|
||||||
// ==========
|
// ==========
|
||||||
// CONTINUE
|
// CONTINUE
|
||||||
// ==========
|
// ==========
|
||||||
|
@ -1248,7 +1322,7 @@ void F_CutsceneDrawer(void)
|
||||||
// Fade to any palette color you want.
|
// Fade to any palette color you want.
|
||||||
if (cutscenes[cutnum]->scene[scenenum].fadecolor)
|
if (cutscenes[cutnum]->scene[scenenum].fadecolor)
|
||||||
{
|
{
|
||||||
V_DrawFill(0,0,BASEVIDWIDTH,BASEVIDHEIGHT,cutscenes[cutnum]->scene[scenenum].fadecolor);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, cutscenes[cutnum]->scene[scenenum].fadecolor);
|
||||||
|
|
||||||
F_WipeEndScreen();
|
F_WipeEndScreen();
|
||||||
F_RunWipe(cutscenes[cutnum]->scene[scenenum].fadeinid, true);
|
F_RunWipe(cutscenes[cutnum]->scene[scenenum].fadeinid, true);
|
||||||
|
@ -1256,7 +1330,7 @@ void F_CutsceneDrawer(void)
|
||||||
F_WipeStartScreen();
|
F_WipeStartScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
V_DrawFill(0,0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
|
|
||||||
if (cutscenes[cutnum]->scene[scenenum].picname[picnum][0] != '\0')
|
if (cutscenes[cutnum]->scene[scenenum].picname[picnum][0] != '\0')
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,10 +35,14 @@ void F_CutsceneTicker(void);
|
||||||
void F_TitleDemoTicker(void);
|
void F_TitleDemoTicker(void);
|
||||||
|
|
||||||
// Called by main loop.
|
// Called by main loop.
|
||||||
FUNCMATH void F_GameEndDrawer(void);
|
void F_GameEndDrawer(void);
|
||||||
void F_IntroDrawer(void);
|
void F_IntroDrawer(void);
|
||||||
void F_TitleScreenDrawer(void);
|
void F_TitleScreenDrawer(void);
|
||||||
|
|
||||||
|
void F_StartWaitingPlayers(void);
|
||||||
|
void F_WaitingPlayersTicker(void);
|
||||||
|
void F_WaitingPlayersDrawer(void);
|
||||||
|
|
||||||
void F_GameEvaluationDrawer(void);
|
void F_GameEvaluationDrawer(void);
|
||||||
void F_StartGameEvaluation(void);
|
void F_StartGameEvaluation(void);
|
||||||
void F_GameEvaluationTicker(void);
|
void F_GameEvaluationTicker(void);
|
||||||
|
@ -78,6 +82,7 @@ enum
|
||||||
|
|
||||||
wipe_level_toblack,
|
wipe_level_toblack,
|
||||||
wipe_intermission_toblack,
|
wipe_intermission_toblack,
|
||||||
|
wipe_voting_toblack,
|
||||||
wipe_continuing_toblack,
|
wipe_continuing_toblack,
|
||||||
wipe_titlescreen_toblack,
|
wipe_titlescreen_toblack,
|
||||||
wipe_timeattack_toblack,
|
wipe_timeattack_toblack,
|
||||||
|
@ -94,6 +99,7 @@ enum
|
||||||
|
|
||||||
wipe_level_final,
|
wipe_level_final,
|
||||||
wipe_intermission_final,
|
wipe_intermission_final,
|
||||||
|
wipe_voting_final,
|
||||||
wipe_continuing_final,
|
wipe_continuing_final,
|
||||||
wipe_titlescreen_final,
|
wipe_titlescreen_final,
|
||||||
wipe_timeattack_final,
|
wipe_timeattack_final,
|
||||||
|
@ -107,9 +113,10 @@ enum
|
||||||
wipe_specinter_final,
|
wipe_specinter_final,
|
||||||
wipe_multinter_final,
|
wipe_multinter_final,
|
||||||
|
|
||||||
NUMWIPEDEFS
|
NUMWIPEDEFS,
|
||||||
|
WIPEFINALSHIFT = wipe_level_final - wipe_level_toblack
|
||||||
};
|
};
|
||||||
#define WIPEFINALSHIFT 13
|
|
||||||
extern UINT8 wipedefs[NUMWIPEDEFS];
|
extern UINT8 wipedefs[NUMWIPEDEFS];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
14
src/f_wipe.c
14
src/f_wipe.c
|
@ -46,8 +46,9 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
||||||
99, // wipe_credits_intermediate (0)
|
99, // wipe_credits_intermediate (0)
|
||||||
|
|
||||||
0, // wipe_level_toblack
|
0, // wipe_level_toblack
|
||||||
UINT8_MAX, // wipe_intermission_toblack
|
UINT8_MAX, // wipe_intermission_toblack
|
||||||
UINT8_MAX, // wipe_continuing_toblack
|
0, // wipe_voting_toblack,
|
||||||
|
UINT8_MAX, // wipe_continuing_toblack
|
||||||
3, // wipe_titlescreen_toblack
|
3, // wipe_titlescreen_toblack
|
||||||
0, // wipe_timeattack_toblack
|
0, // wipe_timeattack_toblack
|
||||||
99, // wipe_credits_toblack
|
99, // wipe_credits_toblack
|
||||||
|
@ -56,12 +57,13 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
||||||
UINT8_MAX, // wipe_intro_toblack (hardcoded)
|
UINT8_MAX, // wipe_intro_toblack (hardcoded)
|
||||||
UINT8_MAX, // wipe_cutscene_toblack (hardcoded)
|
UINT8_MAX, // wipe_cutscene_toblack (hardcoded)
|
||||||
|
|
||||||
0, // wipe_specinter_toblack
|
UINT8_MAX, // wipe_specinter_toblack
|
||||||
0, // wipe_multinter_toblack
|
UINT8_MAX, // wipe_multinter_toblack
|
||||||
0, // wipe_speclevel_towhite
|
99, // wipe_speclevel_towhite
|
||||||
|
|
||||||
0, // wipe_level_final
|
3, // wipe_level_final
|
||||||
0, // wipe_intermission_final
|
0, // wipe_intermission_final
|
||||||
|
0, // wipe_voting_final
|
||||||
0, // wipe_continuing_final
|
0, // wipe_continuing_final
|
||||||
3, // wipe_titlescreen_final
|
3, // wipe_titlescreen_final
|
||||||
0, // wipe_timeattack_final
|
0, // wipe_timeattack_final
|
||||||
|
|
365
src/g_game.c
365
src/g_game.c
|
@ -95,7 +95,7 @@ boolean imcontinuing = false;
|
||||||
boolean runemeraldmanager = false;
|
boolean runemeraldmanager = false;
|
||||||
|
|
||||||
// menu demo things
|
// menu demo things
|
||||||
UINT8 numDemos = 3;
|
UINT8 numDemos = 0; //3; -- i'm FED UP of losing my skincolour to a broken demo. change this back when we make new ones
|
||||||
UINT32 demoDelayTime = 15*TICRATE;
|
UINT32 demoDelayTime = 15*TICRATE;
|
||||||
UINT32 demoIdleTime = 3*TICRATE;
|
UINT32 demoIdleTime = 3*TICRATE;
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ boolean useNightsSS = false;
|
||||||
UINT8 skincolor_redteam = SKINCOLOR_RED;
|
UINT8 skincolor_redteam = SKINCOLOR_RED;
|
||||||
UINT8 skincolor_blueteam = SKINCOLOR_BLUE;
|
UINT8 skincolor_blueteam = SKINCOLOR_BLUE;
|
||||||
UINT8 skincolor_redring = SKINCOLOR_RED;
|
UINT8 skincolor_redring = SKINCOLOR_RED;
|
||||||
UINT8 skincolor_bluering = SKINCOLOR_STEELBLUE;
|
UINT8 skincolor_bluering = SKINCOLOR_STEEL;
|
||||||
|
|
||||||
tic_t countdowntimer = 0;
|
tic_t countdowntimer = 0;
|
||||||
boolean countdowntimeup = false;
|
boolean countdowntimeup = false;
|
||||||
|
@ -207,12 +207,17 @@ UINT16 spacetimetics = 11*TICRATE + (TICRATE/2);
|
||||||
UINT16 extralifetics = 4*TICRATE;
|
UINT16 extralifetics = 4*TICRATE;
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
INT32 bootime = 7*TICRATE;
|
tic_t introtime = 108+5; // plus 5 for white fade
|
||||||
INT32 boostealtime = TICRATE/2;
|
tic_t starttime = 6*TICRATE + (3*TICRATE/4);
|
||||||
INT32 mushroomtime = TICRATE + (TICRATE/3);
|
INT32 hyudorotime = 7*TICRATE;
|
||||||
|
INT32 stealtime = TICRATE/2;
|
||||||
|
INT32 sneakertime = TICRATE + (TICRATE/3);
|
||||||
INT32 itemtime = 8*TICRATE;
|
INT32 itemtime = 8*TICRATE;
|
||||||
INT32 comebacktime = 10*TICRATE;
|
INT32 comebacktime = 10*TICRATE;
|
||||||
INT32 bumptime = 6;
|
INT32 bumptime = 6;
|
||||||
|
INT32 wipeoutslowtime = 20;
|
||||||
|
INT32 wantedreduce = 5*TICRATE;
|
||||||
|
INT32 wantedfrequency = 10*TICRATE;
|
||||||
|
|
||||||
INT32 gameovertics = 15*TICRATE;
|
INT32 gameovertics = 15*TICRATE;
|
||||||
|
|
||||||
|
@ -248,21 +253,24 @@ boolean franticitems; // Frantic items currently enabled?
|
||||||
boolean comeback; // Battle Mode's karma comeback is on/off
|
boolean comeback; // Battle Mode's karma comeback is on/off
|
||||||
|
|
||||||
// Voting system
|
// Voting system
|
||||||
INT16 votelevels[4]; // Levels that were rolled by the host
|
INT16 votelevels[5][2]; // Levels that were rolled by the host
|
||||||
SINT8 votes[MAXPLAYERS]; // Each player's vote
|
SINT8 votes[MAXPLAYERS]; // Each player's vote
|
||||||
SINT8 pickedvote; // What vote the host rolls
|
SINT8 pickedvote; // What vote the host rolls
|
||||||
|
|
||||||
// Server-sided variables
|
// Server-sided, synched variables
|
||||||
tic_t lightningcooldown; // Cooldown before any more lightning/blue shell is awarded
|
SINT8 battlewanted[4]; // WANTED players in battle, worth x2 points
|
||||||
tic_t blueshellincoming; // Timer before blue shell hits, can switch targets at this point
|
tic_t wantedcalcdelay; // Time before it recalculates WANTED
|
||||||
UINT8 blueshellplayer; // Player num that used the last blue shell
|
tic_t indirectitemcooldown; // Cooldown before any more Shrink, SPB, or any other item that works indirectly is awarded
|
||||||
|
tic_t spbincoming; // Timer before SPB hits, can switch targets at this point
|
||||||
|
UINT8 spbplayer; // Player num that used the last SPB
|
||||||
|
tic_t mapreset; // Map reset delay when enough players have joined an empty game
|
||||||
|
|
||||||
// Client-sided variables (NEVER use in anything that needs to be synced with other players)
|
// Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players)
|
||||||
boolean legitimateexit; // Did this client actually finish the match?
|
boolean legitimateexit; // Did this client actually finish the match?
|
||||||
boolean comebackshowninfo; // Have you already seen the "ATTACK OR PROTECT" message?
|
boolean comebackshowninfo; // Have you already seen the "ATTACK OR PROTECT" message?
|
||||||
tic_t curlap; // Current lap time
|
tic_t curlap; // Current lap time
|
||||||
tic_t bestlap; // Best lap time
|
tic_t bestlap; // Best lap time
|
||||||
static INT16 randmapbuffer[NUMMAPS]; // Buffer for maps RandMap is allowed to roll
|
static INT16 randmapbuffer[NUMMAPS+1]; // Buffer for maps RandMap is allowed to roll
|
||||||
|
|
||||||
tic_t hidetime;
|
tic_t hidetime;
|
||||||
|
|
||||||
|
@ -307,13 +315,6 @@ static struct {
|
||||||
|
|
||||||
// Your naming conventions are stupid and useless.
|
// Your naming conventions are stupid and useless.
|
||||||
// There is no conflict here.
|
// There is no conflict here.
|
||||||
typedef struct demoghost {
|
|
||||||
UINT8 checksum[16];
|
|
||||||
UINT8 *buffer, *p, color;
|
|
||||||
UINT16 version;
|
|
||||||
mobj_t oldmo, *mo;
|
|
||||||
struct demoghost *next;
|
|
||||||
} demoghost;
|
|
||||||
demoghost *ghosts = NULL;
|
demoghost *ghosts = NULL;
|
||||||
|
|
||||||
boolean precache = true; // if true, load all graphics at start
|
boolean precache = true; // if true, load all graphics at start
|
||||||
|
@ -1189,7 +1190,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
INT32 laim, th, tspeed, forward, side, axis; //i
|
INT32 laim, th, tspeed, forward, side, axis; //i
|
||||||
const INT32 speed = 1;
|
const INT32 speed = 1;
|
||||||
// these ones used for multiple conditions
|
// these ones used for multiple conditions
|
||||||
boolean turnleft, turnright, invertmouse, mouseaiming, lookaxis, analogjoystickmove, gamepadjoystickmove, kbl, rd;
|
boolean turnleft, turnright, invertmouse, mouseaiming, lookaxis, usejoystick, analogjoystickmove, gamepadjoystickmove, kbl, rd;
|
||||||
player_t *player;
|
player_t *player;
|
||||||
camera_t *thiscam;
|
camera_t *thiscam;
|
||||||
angle_t lang;
|
angle_t lang;
|
||||||
|
@ -1286,6 +1287,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usejoystick = (analogjoystickmove || gamepadjoystickmove);
|
||||||
turnright = InputDown(gc_turnright, ssplayer);
|
turnright = InputDown(gc_turnright, ssplayer);
|
||||||
turnleft = InputDown(gc_turnleft, ssplayer);
|
turnleft = InputDown(gc_turnleft, ssplayer);
|
||||||
|
|
||||||
|
@ -1346,8 +1348,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
cmd->driftturn = (INT16)(cmd->driftturn - (mousex*(mirrormode ? -1 : 1)*8));
|
cmd->driftturn = (INT16)(cmd->driftturn - (mousex*(mirrormode ? -1 : 1)*8));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bounce pad strafing
|
// Speed bump strafing
|
||||||
if (!demoplayback && ((player->pflags & PF_FORCESTRAFE) || (player->kartstuff[k_feather] & 2)))
|
if (!demoplayback && ((player->pflags & PF_FORCESTRAFE) || (player->kartstuff[k_pogospring])))
|
||||||
{
|
{
|
||||||
if (turnright)
|
if (turnright)
|
||||||
side += sidemove[1];
|
side += sidemove[1];
|
||||||
|
@ -1360,42 +1362,23 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//{ SRB2kart - Drift support
|
|
||||||
// limit turning to angleturn[1] to stop mouselook letting you look too fast
|
|
||||||
if (cmd->angleturn > angleturn[1])
|
|
||||||
cmd->angleturn = angleturn[1];
|
|
||||||
else if (cmd->angleturn < -angleturn[1])
|
|
||||||
cmd->angleturn = -angleturn[1];
|
|
||||||
|
|
||||||
if (cmd->driftturn > angleturn[1])
|
|
||||||
cmd->driftturn = angleturn[1];
|
|
||||||
else if (cmd->driftturn < -angleturn[1])
|
|
||||||
cmd->driftturn = -angleturn[1];
|
|
||||||
|
|
||||||
if (player->mo)
|
|
||||||
cmd->angleturn = K_GetKartTurnValue(player, cmd->angleturn);
|
|
||||||
|
|
||||||
// SRB2kart - no additional angle if not moving
|
|
||||||
if ((player->mo && player->speed > 0) || (leveltime > 140 && cmd->buttons & BT_ACCELERATE && cmd->buttons & BT_BRAKE) || (player->spectator || objectplacing))
|
|
||||||
lang += (cmd->angleturn<<16);
|
|
||||||
|
|
||||||
if (player->spectator || objectplacing) // SRB2Kart: spectators need special controls
|
if (player->spectator || objectplacing) // SRB2Kart: spectators need special controls
|
||||||
{
|
{
|
||||||
if (InputDown(gc_accelerate, ssplayer) || (cv_usejoystick.value && axis > 0))
|
if (InputDown(gc_accelerate, ssplayer) || (usejoystick && axis > 0))
|
||||||
cmd->buttons |= BT_ACCELERATE;
|
cmd->buttons |= BT_ACCELERATE;
|
||||||
if (InputDown(gc_brake, ssplayer) || (cv_usejoystick.value && axis > 0))
|
if (InputDown(gc_brake, ssplayer) || (usejoystick && axis > 0))
|
||||||
cmd->buttons |= BT_BRAKE;
|
cmd->buttons |= BT_BRAKE;
|
||||||
axis = JoyAxis(AXISAIM, ssplayer);
|
axis = JoyAxis(AXISAIM, ssplayer);
|
||||||
if (InputDown(gc_aimforward, ssplayer) || (gamepadjoystickmove && axis < 0) || (analogjoystickmove && axis < 0))
|
if (InputDown(gc_aimforward, ssplayer) || (usejoystick && axis < 0))
|
||||||
forward += forwardmove[1];
|
forward += forwardmove[1];
|
||||||
if (InputDown(gc_aimbackward, ssplayer) || (gamepadjoystickmove && axis > 0) || (analogjoystickmove && axis > 0))
|
if (InputDown(gc_aimbackward, ssplayer) || (usejoystick && axis > 0))
|
||||||
forward -= forwardmove[1];
|
forward -= forwardmove[1];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// forward with key or button // SRB2kart - we use an accel/brake instead of forward/backward.
|
// forward with key or button // SRB2kart - we use an accel/brake instead of forward/backward.
|
||||||
axis = JoyAxis(AXISMOVE, ssplayer);
|
axis = JoyAxis(AXISMOVE, ssplayer);
|
||||||
if (InputDown(gc_accelerate, ssplayer) || (gamepadjoystickmove && axis > 0) || player->kartstuff[k_mushroomtimer])
|
if (InputDown(gc_accelerate, ssplayer) || (gamepadjoystickmove && axis > 0) || player->kartstuff[k_sneakertimer])
|
||||||
{
|
{
|
||||||
cmd->buttons |= BT_ACCELERATE;
|
cmd->buttons |= BT_ACCELERATE;
|
||||||
forward = forwardmove[1]; // 50
|
forward = forwardmove[1]; // 50
|
||||||
|
@ -1424,20 +1407,20 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
|
|
||||||
// But forward/backward IS used for aiming.
|
// But forward/backward IS used for aiming.
|
||||||
axis = JoyAxis(AXISAIM, ssplayer);
|
axis = JoyAxis(AXISAIM, ssplayer);
|
||||||
if (InputDown(gc_aimforward, ssplayer) || (cv_usejoystick.value && axis < 0))
|
if (InputDown(gc_aimforward, ssplayer) || (usejoystick && axis < 0))
|
||||||
cmd->buttons |= BT_FORWARD;
|
cmd->buttons |= BT_FORWARD;
|
||||||
if (InputDown(gc_aimbackward, ssplayer) || (cv_usejoystick.value && axis > 0))
|
if (InputDown(gc_aimbackward, ssplayer) || (usejoystick && axis > 0))
|
||||||
cmd->buttons |= BT_BACKWARD;
|
cmd->buttons |= BT_BACKWARD;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fire with any button/key
|
// fire with any button/key
|
||||||
axis = JoyAxis(AXISFIRE, ssplayer);
|
axis = JoyAxis(AXISFIRE, ssplayer);
|
||||||
if (InputDown(gc_fire, ssplayer) || (cv_usejoystick.value && axis > 0))
|
if (InputDown(gc_fire, ssplayer) || (usejoystick && axis > 0))
|
||||||
cmd->buttons |= BT_ATTACK;
|
cmd->buttons |= BT_ATTACK;
|
||||||
|
|
||||||
// drift with any button/key
|
// drift with any button/key
|
||||||
axis = JoyAxis(AXISDRIFT, ssplayer);
|
axis = JoyAxis(AXISDRIFT, ssplayer);
|
||||||
if (InputDown(gc_drift, ssplayer) || (cv_usejoystick.value && axis > 0))
|
if (InputDown(gc_drift, ssplayer) || (usejoystick && axis > 0))
|
||||||
cmd->buttons |= BT_DRIFT;
|
cmd->buttons |= BT_DRIFT;
|
||||||
|
|
||||||
// Lua scriptable buttons
|
// Lua scriptable buttons
|
||||||
|
@ -1534,6 +1517,29 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
cmd->sidemove = (SINT8)(cmd->sidemove + side);
|
cmd->sidemove = (SINT8)(cmd->sidemove + side);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//{ SRB2kart - Drift support
|
||||||
|
// Not grouped with the rest of turn stuff because it needs to know what buttons you're pressing for rubber-burn turn
|
||||||
|
// limit turning to angleturn[1] to stop mouselook letting you look too fast
|
||||||
|
if (cmd->angleturn > angleturn[1])
|
||||||
|
cmd->angleturn = angleturn[1];
|
||||||
|
else if (cmd->angleturn < -angleturn[1])
|
||||||
|
cmd->angleturn = -angleturn[1];
|
||||||
|
|
||||||
|
if (cmd->driftturn > angleturn[1])
|
||||||
|
cmd->driftturn = angleturn[1];
|
||||||
|
else if (cmd->driftturn < -angleturn[1])
|
||||||
|
cmd->driftturn = -angleturn[1];
|
||||||
|
|
||||||
|
if (player->mo)
|
||||||
|
cmd->angleturn = K_GetKartTurnValue(player, cmd->angleturn);
|
||||||
|
|
||||||
|
// SRB2kart - no additional angle if not moving
|
||||||
|
if (((player->mo && player->speed > 0) // Moving
|
||||||
|
|| (leveltime > starttime && (cmd->buttons & BT_ACCELERATE && cmd->buttons & BT_BRAKE)) // Rubber-burn turn
|
||||||
|
|| (player->spectator || objectplacing)) // Not a physical player
|
||||||
|
&& !(player->kartstuff[k_spinouttimer] && player->kartstuff[k_sneakertimer])) // Spinning and boosting cancels out spinout
|
||||||
|
lang += (cmd->angleturn<<16);
|
||||||
|
|
||||||
cmd->angleturn = (INT16)(lang >> 16);
|
cmd->angleturn = (INT16)(lang >> 16);
|
||||||
|
|
||||||
if (!hu_stopped)
|
if (!hu_stopped)
|
||||||
|
@ -1837,7 +1843,7 @@ boolean G_Responder(event_t *ev)
|
||||||
// SRB2Kart: Ehhh, who cares, Mario Kart's designed around screen-cheating anyway
|
// SRB2Kart: Ehhh, who cares, Mario Kart's designed around screen-cheating anyway
|
||||||
/*if (gametype != GT_RACE)
|
/*if (gametype != GT_RACE)
|
||||||
{
|
{
|
||||||
if (players[consoleplayer].kartstuff[k_balloon] > 0)
|
if (players[consoleplayer].kartstuff[k_bumper] > 0)
|
||||||
continue;
|
continue;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
@ -1928,7 +1934,7 @@ boolean G_Responder(event_t *ev)
|
||||||
else if (gamestate == GS_GAMEEND || gamestate == GS_EVALUATION || gamestate == GS_CREDITS)
|
else if (gamestate == GS_GAMEEND || gamestate == GS_EVALUATION || gamestate == GS_CREDITS)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
else if (gamestate == GS_INTERMISSION || gamestate == GS_VOTING)
|
else if (gamestate == GS_INTERMISSION || gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS)
|
||||||
if (HU_Responder(ev))
|
if (HU_Responder(ev))
|
||||||
return true; // chat ate the event
|
return true; // chat ate the event
|
||||||
|
|
||||||
|
@ -2181,9 +2187,13 @@ void G_Ticker(boolean run)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GS_TITLESCREEN:
|
case GS_TITLESCREEN:
|
||||||
case GS_WAITINGPLAYERS:
|
|
||||||
F_TitleScreenTicker(run);
|
F_TitleScreenTicker(run);
|
||||||
break;
|
break;
|
||||||
|
case GS_WAITINGPLAYERS:
|
||||||
|
if (netgame)
|
||||||
|
F_WaitingPlayersTicker();
|
||||||
|
HU_Ticker();
|
||||||
|
break;
|
||||||
|
|
||||||
case GS_DEDICATEDSERVER:
|
case GS_DEDICATEDSERVER:
|
||||||
case GS_NULL:
|
case GS_NULL:
|
||||||
|
@ -2192,6 +2202,11 @@ void G_Ticker(boolean run)
|
||||||
|
|
||||||
if (run)
|
if (run)
|
||||||
{
|
{
|
||||||
|
if (G_GametypeHasSpectators()
|
||||||
|
&& (gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING // definitely good
|
||||||
|
|| gamestate == GS_WAITINGPLAYERS)) // definitely a problem if we don't do it at all in this gamestate, but might need more protection?
|
||||||
|
K_CheckSpectateStatus();
|
||||||
|
|
||||||
if (pausedelay)
|
if (pausedelay)
|
||||||
pausedelay--;
|
pausedelay--;
|
||||||
|
|
||||||
|
@ -2244,19 +2259,33 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
||||||
p->starpostnum = 0;
|
p->starpostnum = 0;
|
||||||
p->starpostcount = 0;
|
p->starpostcount = 0;
|
||||||
|
|
||||||
if (rendermode == render_soft)
|
|
||||||
V_SetPaletteLump(GetPalette()); // Reset the palette
|
|
||||||
|
|
||||||
// SRB2kart: Increment the "matches played" counter.
|
// SRB2kart: Increment the "matches played" counter.
|
||||||
if (player == consoleplayer)
|
if (player == consoleplayer)
|
||||||
{
|
{
|
||||||
if (legitimateexit && !demoplayback) // (yes you're allowed to unlock stuff this way when the game is modified)
|
if (legitimateexit && !demoplayback && !mapreset) // (yes you're allowed to unlock stuff this way when the game is modified)
|
||||||
{
|
{
|
||||||
matchesplayed++;
|
UINT8 i = 0;
|
||||||
if (M_UpdateUnlockablesAndExtraEmblems(true))
|
|
||||||
|
if (netgame)
|
||||||
{
|
{
|
||||||
S_StartSound(NULL, sfx_ncitem);
|
// check to see if there's anyone else at all
|
||||||
G_SaveGameData(true); // only save if unlocked something
|
for (; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (i == consoleplayer)
|
||||||
|
continue;
|
||||||
|
if (playeringame[i] && !stplyr->spectator)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i != MAXPLAYERS) // Not FREE PLAY
|
||||||
|
{
|
||||||
|
matchesplayed++;
|
||||||
|
if (M_UpdateUnlockablesAndExtraEmblems(true))
|
||||||
|
{
|
||||||
|
S_StartSound(NULL, sfx_ncitem);
|
||||||
|
G_SaveGameData(true); // only save if unlocked something
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2271,7 +2300,7 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
||||||
void G_PlayerReborn(INT32 player)
|
void G_PlayerReborn(INT32 player)
|
||||||
{
|
{
|
||||||
player_t *p;
|
player_t *p;
|
||||||
INT32 score;
|
INT32 score, marescore;
|
||||||
INT32 lives;
|
INT32 lives;
|
||||||
INT32 continues;
|
INT32 continues;
|
||||||
UINT8 charability;
|
UINT8 charability;
|
||||||
|
@ -2316,11 +2345,12 @@ void G_PlayerReborn(INT32 player)
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
INT32 starpostwp;
|
INT32 starpostwp;
|
||||||
INT32 offroad;
|
INT32 bumper;
|
||||||
INT32 balloon;
|
|
||||||
INT32 comebackpoints;
|
INT32 comebackpoints;
|
||||||
|
INT32 wanted;
|
||||||
|
|
||||||
score = players[player].score;
|
score = players[player].score;
|
||||||
|
marescore = players[player].marescore;
|
||||||
lives = players[player].lives;
|
lives = players[player].lives;
|
||||||
continues = players[player].continues;
|
continues = players[player].continues;
|
||||||
ctfteam = players[player].ctfteam;
|
ctfteam = players[player].ctfteam;
|
||||||
|
@ -2373,14 +2403,15 @@ void G_PlayerReborn(INT32 player)
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
starpostwp = players[player].kartstuff[k_starpostwp];
|
starpostwp = players[player].kartstuff[k_starpostwp];
|
||||||
offroad = players[player].kartstuff[k_offroad];
|
bumper = players[player].kartstuff[k_bumper];
|
||||||
balloon = players[player].kartstuff[k_balloon];
|
|
||||||
comebackpoints = players[player].kartstuff[k_comebackpoints];
|
comebackpoints = players[player].kartstuff[k_comebackpoints];
|
||||||
|
wanted = players[player].kartstuff[k_wanted];
|
||||||
|
|
||||||
p = &players[player];
|
p = &players[player];
|
||||||
memset(p, 0, sizeof (*p));
|
memset(p, 0, sizeof (*p));
|
||||||
|
|
||||||
p->score = score;
|
p->score = score;
|
||||||
|
p->marescore = marescore;
|
||||||
p->lives = lives;
|
p->lives = lives;
|
||||||
p->continues = continues;
|
p->continues = continues;
|
||||||
p->pflags = pflags;
|
p->pflags = pflags;
|
||||||
|
@ -2431,11 +2462,10 @@ void G_PlayerReborn(INT32 player)
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
p->kartstuff[k_starpostwp] = starpostwp; // TODO: get these out of kartstuff, it causes desync
|
p->kartstuff[k_starpostwp] = starpostwp; // TODO: get these out of kartstuff, it causes desync
|
||||||
p->kartstuff[k_offroad] = offroad;
|
p->kartstuff[k_bumper] = bumper;
|
||||||
|
|
||||||
p->kartstuff[k_balloon] = balloon;
|
|
||||||
p->kartstuff[k_comebackpoints] = comebackpoints;
|
p->kartstuff[k_comebackpoints] = comebackpoints;
|
||||||
p->kartstuff[k_comebacktimer] = comebacktime;
|
p->kartstuff[k_comebacktimer] = comebacktime;
|
||||||
|
p->kartstuff[k_wanted] = wanted;
|
||||||
|
|
||||||
// Don't do anything immediately
|
// Don't do anything immediately
|
||||||
p->pflags |= PF_USEDOWN;
|
p->pflags |= PF_USEDOWN;
|
||||||
|
@ -2461,14 +2491,14 @@ void G_PlayerReborn(INT32 player)
|
||||||
|
|
||||||
P_RestoreMusic(p);
|
P_RestoreMusic(p);
|
||||||
|
|
||||||
if (leveltime > 157 && !p->spectator)
|
if (leveltime > (starttime + (TICRATE/2)) && !p->spectator)
|
||||||
p->kartstuff[k_lakitu] = 48; // Lakitu Spawner
|
p->kartstuff[k_respawn] = 48; // Respawn effect
|
||||||
|
|
||||||
if (gametype == GT_COOP)
|
if (gametype == GT_COOP)
|
||||||
P_FindEmerald(); // scan for emeralds to hunt for
|
P_FindEmerald(); // scan for emeralds to hunt for
|
||||||
|
|
||||||
// Reset Nights score and max link to 0 on death
|
// Reset Nights score and max link to 0 on death
|
||||||
p->marescore = p->maxlink = 0;
|
p->maxlink = 0;
|
||||||
|
|
||||||
// If NiGHTS, find lowest mare to start with.
|
// If NiGHTS, find lowest mare to start with.
|
||||||
p->mare = P_FindLowestMare();
|
p->mare = P_FindLowestMare();
|
||||||
|
@ -2980,7 +3010,7 @@ void G_ExitLevel(void)
|
||||||
CV_SetValue(&cv_teamscramble, cv_scrambleonchange.value);
|
CV_SetValue(&cv_teamscramble, cv_scrambleonchange.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gametype != GT_COOP)
|
if (netgame || multiplayer)
|
||||||
CONS_Printf(M_GetText("The round has ended.\n"));
|
CONS_Printf(M_GetText("The round has ended.\n"));
|
||||||
|
|
||||||
// Remove CEcho text on round end.
|
// Remove CEcho text on round end.
|
||||||
|
@ -2997,10 +3027,11 @@ void G_ExitLevel(void)
|
||||||
boolean G_IsSpecialStage(INT32 mapnum)
|
boolean G_IsSpecialStage(INT32 mapnum)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
if (gametype == GT_COOP && modeattacking != ATTACKING_RECORD && mapnum >= sstage_start && mapnum <= sstage_end)
|
return (gametype == GT_COOP && modeattacking != ATTACKING_RECORD && mapnum >= sstage_start && mapnum <= sstage_end);
|
||||||
return true;
|
#else
|
||||||
#endif
|
(void)mapnum;
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -3048,7 +3079,7 @@ boolean G_GametypeHasSpectators(void)
|
||||||
#if 0
|
#if 0
|
||||||
return (gametype != GT_COOP && gametype != GT_COMPETITION && gametype != GT_RACE);
|
return (gametype != GT_COOP && gametype != GT_COMPETITION && gametype != GT_RACE);
|
||||||
#else
|
#else
|
||||||
return true;
|
return (!splitscreen);//true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3062,6 +3093,42 @@ boolean G_BattleGametype(void)
|
||||||
return (gametype == GT_MATCH);
|
return (gametype == GT_MATCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// G_SometimesGetDifferentGametype
|
||||||
|
//
|
||||||
|
// I pity the fool who adds more gametypes later, because it'll require some element of randomisation which needs to be synched...
|
||||||
|
// Although given this only gets called for the host, you could probably get away with M_Random.
|
||||||
|
//
|
||||||
|
INT16 G_SometimesGetDifferentGametype(void)
|
||||||
|
{
|
||||||
|
if (randmapbuffer[NUMMAPS] != -1)
|
||||||
|
return gametype;
|
||||||
|
|
||||||
|
randmapbuffer[NUMMAPS] = gametype;
|
||||||
|
|
||||||
|
if (gametype == GT_MATCH)
|
||||||
|
return GT_RACE;
|
||||||
|
return GT_MATCH;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// G_GetGametypeColor
|
||||||
|
//
|
||||||
|
// Pretty and consistent ^u^
|
||||||
|
// See also M_GetGametypeColor.
|
||||||
|
//
|
||||||
|
UINT8 G_GetGametypeColor(INT16 gt)
|
||||||
|
{
|
||||||
|
if (modeattacking // == ATTACKING_RECORD
|
||||||
|
|| gamestate == GS_TIMEATTACK)
|
||||||
|
return orangemap[120];
|
||||||
|
if (gt == GT_MATCH)
|
||||||
|
return redmap[120];
|
||||||
|
if (gt == GT_RACE)
|
||||||
|
return skymap[120];
|
||||||
|
return 247; // FALLBACK
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// G_RaceGametype
|
// G_RaceGametype
|
||||||
//
|
//
|
||||||
|
@ -3131,12 +3198,15 @@ static INT32 TOLMaps(INT16 tolflags)
|
||||||
* has those flags.
|
* has those flags.
|
||||||
* \author Graue <graue@oceanbase.org>
|
* \author Graue <graue@oceanbase.org>
|
||||||
*/
|
*/
|
||||||
INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignorebuffer)
|
static INT16 *okmaps = NULL;
|
||||||
|
INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignorebuffer, UINT8 maphell, boolean callagainsoon)
|
||||||
{
|
{
|
||||||
INT16 *okmaps = Z_Malloc(NUMMAPS * sizeof(INT16), PU_STATIC, NULL);
|
|
||||||
INT32 numokmaps = 0;
|
INT32 numokmaps = 0;
|
||||||
INT16 ix, bufx;
|
INT16 ix, bufx;
|
||||||
|
|
||||||
|
if (!okmaps)
|
||||||
|
okmaps = Z_Malloc(NUMMAPS * sizeof(INT16), PU_STATIC, NULL);
|
||||||
|
|
||||||
// Find all the maps that are ok and and put them in an array.
|
// Find all the maps that are ok and and put them in an array.
|
||||||
for (ix = 0; ix < NUMMAPS; ix++)
|
for (ix = 0; ix < NUMMAPS; ix++)
|
||||||
{
|
{
|
||||||
|
@ -3147,7 +3217,9 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
|
||||||
|
|
||||||
if ((mapheaderinfo[ix]->typeoflevel & tolflags) != tolflags
|
if ((mapheaderinfo[ix]->typeoflevel & tolflags) != tolflags
|
||||||
|| ix == pprevmap
|
|| ix == pprevmap
|
||||||
|| (M_MapLocked(ix+1) && !dedicated))
|
|| (!dedicated && M_MapLocked(ix+1))
|
||||||
|
|| (!maphell && (mapheaderinfo[ix]->menuflags & LF2_HIDEINMENU)) // this is bad
|
||||||
|
|| ((maphell == 2) && !(mapheaderinfo[ix]->menuflags & LF2_HIDEINMENU))) // gasp
|
||||||
isokmap = false;
|
isokmap = false;
|
||||||
|
|
||||||
if (!ignorebuffer)
|
if (!ignorebuffer)
|
||||||
|
@ -3171,10 +3243,12 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
|
||||||
if (numokmaps == 0)
|
if (numokmaps == 0)
|
||||||
{
|
{
|
||||||
if (!ignorebuffer)
|
if (!ignorebuffer)
|
||||||
return G_RandMap(tolflags, pprevmap, dontadd, true); // If there's no matches, (An incredibly silly function chain, buuut... :V)
|
return G_RandMap(tolflags, pprevmap, dontadd, true, maphell, callagainsoon); // If there's no matches, (An incredibly silly function chain, buuut... :V)
|
||||||
|
if (maphell)
|
||||||
|
return G_RandMap(tolflags, pprevmap, dontadd, true, maphell-1, callagainsoon);
|
||||||
|
|
||||||
ix = 0; // Sorry, none match. You get MAP01.
|
ix = 0; // Sorry, none match. You get MAP01.
|
||||||
for (bufx = 0; bufx < NUMMAPS; bufx++)
|
for (bufx = 0; bufx < NUMMAPS+1; bufx++)
|
||||||
randmapbuffer[bufx] = -1; // if we're having trouble finding a map we should probably clear it
|
randmapbuffer[bufx] = -1; // if we're having trouble finding a map we should probably clear it
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3182,13 +3256,17 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
|
||||||
ix = okmaps[M_RandomKey(numokmaps)];
|
ix = okmaps[M_RandomKey(numokmaps)];
|
||||||
if (!dontadd)
|
if (!dontadd)
|
||||||
{
|
{
|
||||||
for (bufx = NUMMAPS; bufx > 0; bufx--)
|
for (bufx = NUMMAPS-1; bufx > 0; bufx--)
|
||||||
randmapbuffer[bufx] = randmapbuffer[bufx-1];
|
randmapbuffer[bufx] = randmapbuffer[bufx-1];
|
||||||
randmapbuffer[0] = ix;
|
randmapbuffer[0] = ix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Z_Free(okmaps);
|
if (!callagainsoon)
|
||||||
|
{
|
||||||
|
Z_Free(okmaps);
|
||||||
|
okmaps = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return ix;
|
return ix;
|
||||||
}
|
}
|
||||||
|
@ -3198,7 +3276,7 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
|
||||||
//
|
//
|
||||||
static void G_DoCompleted(void)
|
static void G_DoCompleted(void)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i, j = 0;
|
||||||
boolean gottoken = false;
|
boolean gottoken = false;
|
||||||
|
|
||||||
tokenlist = 0; // Reset the list
|
tokenlist = 0; // Reset the list
|
||||||
|
@ -3212,7 +3290,20 @@ static void G_DoCompleted(void)
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
if (playeringame[i])
|
if (playeringame[i])
|
||||||
|
{
|
||||||
|
// SRB2Kart: exitlevel shouldn't get you the points
|
||||||
|
if (!players[i].exiting && !(players[i].pflags & PF_TIMEOVER))
|
||||||
|
{
|
||||||
|
players[i].pflags |= PF_TIMEOVER;
|
||||||
|
if (P_IsLocalPlayer(&players[i]))
|
||||||
|
j++;
|
||||||
|
}
|
||||||
G_PlayerFinishLevel(i); // take away cards and stuff
|
G_PlayerFinishLevel(i); // take away cards and stuff
|
||||||
|
}
|
||||||
|
|
||||||
|
// play some generic music if there's no win/cool/lose music going on (for exitlevel commands)
|
||||||
|
if (G_RaceGametype() && j == splitscreen+1)
|
||||||
|
S_ChangeMusicInternal("racent", true);
|
||||||
|
|
||||||
if (automapactive)
|
if (automapactive)
|
||||||
AM_Stop();
|
AM_Stop();
|
||||||
|
@ -3253,6 +3344,9 @@ static void G_DoCompleted(void)
|
||||||
else
|
else
|
||||||
cm = (INT16)(mapheaderinfo[cm]->nextlevel-1);
|
cm = (INT16)(mapheaderinfo[cm]->nextlevel-1);
|
||||||
|
|
||||||
|
if (cm == 1100-1) // !!! WHENEVER WE GET GRAND PRIX, GO TO AWARDS MAP INSTEAD !!!
|
||||||
|
cm = cm+1;
|
||||||
|
|
||||||
if (cm >= NUMMAPS || cm < 0) // out of range (either 1100-1102 or error)
|
if (cm >= NUMMAPS || cm < 0) // out of range (either 1100-1102 or error)
|
||||||
{
|
{
|
||||||
cm = nextmap; //Start the loop again so that the error checking below is executed.
|
cm = nextmap; //Start the loop again so that the error checking below is executed.
|
||||||
|
@ -3315,7 +3409,7 @@ static void G_DoCompleted(void)
|
||||||
|
|
||||||
if (randmapbuffer[TOLMaps(G_TOLFlag(gametype))-4] != -1) // we're getting pretty full, so lets clear it
|
if (randmapbuffer[TOLMaps(G_TOLFlag(gametype))-4] != -1) // we're getting pretty full, so lets clear it
|
||||||
{
|
{
|
||||||
for (i = 0; i < NUMMAPS; i++)
|
for (i = 0; i < NUMMAPS+1; i++)
|
||||||
randmapbuffer[i] = -1;
|
randmapbuffer[i] = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3324,7 +3418,7 @@ static void G_DoCompleted(void)
|
||||||
if (cv_advancemap.value == 0) // Stay on same map.
|
if (cv_advancemap.value == 0) // Stay on same map.
|
||||||
nextmap = prevmap;
|
nextmap = prevmap;
|
||||||
else if (cv_advancemap.value == 2) // Go to random map.
|
else if (cv_advancemap.value == 2) // Go to random map.
|
||||||
nextmap = G_RandMap(G_TOLFlag(gametype), prevmap, false, false);
|
nextmap = G_RandMap(G_TOLFlag(gametype), prevmap, false, false, 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We are committed to this map now.
|
// We are committed to this map now.
|
||||||
|
@ -3366,19 +3460,44 @@ void G_AfterIntermission(void)
|
||||||
//
|
//
|
||||||
void G_NextLevel(void)
|
void G_NextLevel(void)
|
||||||
{
|
{
|
||||||
|
boolean dovote = false;
|
||||||
|
|
||||||
if ((cv_advancemap.value == 3 && gamestate != GS_VOTING)
|
if ((cv_advancemap.value == 3 && gamestate != GS_VOTING)
|
||||||
&& !modeattacking && !skipstats && (multiplayer || netgame))
|
&& !modeattacking && !skipstats && (multiplayer || netgame))
|
||||||
|
{
|
||||||
|
UINT8 i;
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (playeringame[i] && !players[i].spectator)
|
||||||
|
{
|
||||||
|
dovote = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dovote)
|
||||||
gameaction = ga_startvote;
|
gameaction = ga_startvote;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (gamestate != GS_VOTING)
|
||||||
|
forceresetplayers = false;
|
||||||
gameaction = ga_worlddone;
|
gameaction = ga_worlddone;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void G_DoWorldDone(void)
|
static void G_DoWorldDone(void)
|
||||||
{
|
{
|
||||||
if (server)
|
if (server)
|
||||||
{
|
{
|
||||||
// SRB2kart: don't reset player between maps
|
// SRB2Kart
|
||||||
D_MapChange(nextmap+1, gametype, ultimatemode, false, 0, false, false);
|
D_MapChange(nextmap+1,
|
||||||
|
gametype,
|
||||||
|
ultimatemode,
|
||||||
|
forceresetplayers,
|
||||||
|
0,
|
||||||
|
false,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
gameaction = ga_nothing;
|
gameaction = ga_nothing;
|
||||||
|
@ -3410,6 +3529,7 @@ static void G_DoStartContinue(void)
|
||||||
{
|
{
|
||||||
I_Assert(!netgame && !multiplayer);
|
I_Assert(!netgame && !multiplayer);
|
||||||
|
|
||||||
|
legitimateexit = false;
|
||||||
G_PlayerFinishLevel(consoleplayer); // take away cards and stuff
|
G_PlayerFinishLevel(consoleplayer); // take away cards and stuff
|
||||||
|
|
||||||
F_StartContinue();
|
F_StartContinue();
|
||||||
|
@ -3656,7 +3776,7 @@ void G_SaveGameData(boolean force)
|
||||||
|
|
||||||
if (force) // SRB2Kart: for enabling unlocks online, even if the game is modified
|
if (force) // SRB2Kart: for enabling unlocks online, even if the game is modified
|
||||||
modifiedgame = savemoddata; // L-let's just sort of... hack around the cheat protection, because I'm too worried about just removing it @@;
|
modifiedgame = savemoddata; // L-let's just sort of... hack around the cheat protection, because I'm too worried about just removing it @@;
|
||||||
else if (modifiedgame && !savemoddata)
|
else if (modifiedgame && !savemoddata)
|
||||||
{
|
{
|
||||||
free(savebuffer);
|
free(savebuffer);
|
||||||
save_p = savebuffer = NULL;
|
save_p = savebuffer = NULL;
|
||||||
|
@ -3967,9 +4087,16 @@ void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar, U
|
||||||
|
|
||||||
if (demoplayback)
|
if (demoplayback)
|
||||||
COM_BufAddText("stopdemo\n");
|
COM_BufAddText("stopdemo\n");
|
||||||
|
|
||||||
|
while (ghosts)
|
||||||
|
{
|
||||||
|
demoghost *next = ghosts->next;
|
||||||
|
Z_Free(ghosts);
|
||||||
|
ghosts = next;
|
||||||
|
}
|
||||||
ghosts = NULL;
|
ghosts = NULL;
|
||||||
|
|
||||||
for (i = 0; i < NUMMAPS; i++)
|
for (i = 0; i < NUMMAPS+1; i++)
|
||||||
randmapbuffer[i] = -1;
|
randmapbuffer[i] = -1;
|
||||||
|
|
||||||
// this leave the actual game if needed
|
// this leave the actual game if needed
|
||||||
|
@ -4023,11 +4150,12 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
|
||||||
if (!demoplayback && !netgame) // Netgame sets random seed elsewhere, demo playback sets seed just before us!
|
if (!demoplayback && !netgame) // Netgame sets random seed elsewhere, demo playback sets seed just before us!
|
||||||
P_SetRandSeed(M_RandomizedSeed()); // Use a more "Random" random seed
|
P_SetRandSeed(M_RandomizedSeed()); // Use a more "Random" random seed
|
||||||
|
|
||||||
if (resetplayer)
|
//SRB2Kart - Score is literally the only thing you SHOULDN'T reset at all times
|
||||||
|
//if (resetplayer)
|
||||||
{
|
{
|
||||||
// Clear a bunch of variables
|
// Clear a bunch of variables
|
||||||
tokenlist = token = sstimer = redscore = bluescore = lastmap = 0;
|
tokenlist = token = sstimer = redscore = bluescore = lastmap = 0;
|
||||||
countdown = countdown2 = 0;
|
countdown = countdown2 = mapreset = 0;
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
@ -4036,6 +4164,7 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
|
||||||
players[i].starpostx = players[i].starposty = players[i].starpostz = 0;
|
players[i].starpostx = players[i].starposty = players[i].starpostz = 0;
|
||||||
players[i].starpostcount = 0; // srb2kart
|
players[i].starpostcount = 0; // srb2kart
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (netgame || multiplayer)
|
if (netgame || multiplayer)
|
||||||
{
|
{
|
||||||
players[i].lives = cv_startinglives.value;
|
players[i].lives = cv_startinglives.value;
|
||||||
|
@ -4052,13 +4181,23 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
|
||||||
players[i].continues = 1;
|
players[i].continues = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
players[i].xtralife = 0;
|
||||||
|
#else
|
||||||
|
players[i].lives = 1; // SRB2Kart
|
||||||
|
#endif
|
||||||
|
|
||||||
// The latter two should clear by themselves, but just in case
|
// The latter two should clear by themselves, but just in case
|
||||||
players[i].pflags &= ~(PF_TAGIT|PF_TAGGED|PF_FULLSTASIS);
|
players[i].pflags &= ~(PF_TAGIT|PF_TAGGED|PF_FULLSTASIS);
|
||||||
|
|
||||||
// Clear cheatcodes too, just in case.
|
// Clear cheatcodes too, just in case.
|
||||||
players[i].pflags &= ~(PF_GODMODE|PF_NOCLIP|PF_INVIS);
|
players[i].pflags &= ~(PF_GODMODE|PF_NOCLIP|PF_INVIS);
|
||||||
|
|
||||||
players[i].score = players[i].xtralife = 0;
|
players[i].marescore = 0;
|
||||||
|
|
||||||
|
if (resetplayer) // SRB2Kart
|
||||||
|
{
|
||||||
|
players[i].score = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset unlockable triggers
|
// Reset unlockable triggers
|
||||||
|
@ -4860,6 +4999,7 @@ void G_GhostTicker(void)
|
||||||
p->next = g->next;
|
p->next = g->next;
|
||||||
else
|
else
|
||||||
ghosts = g->next;
|
ghosts = g->next;
|
||||||
|
Z_Free(g);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
p = g;
|
p = g;
|
||||||
|
@ -5592,8 +5732,7 @@ 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), false, true); // resetplayer needs to be false to retain score
|
G_InitNew(false, G_BuildMapName(gamemap), true, true); // Doesn't matter whether you reset or not here, given changes to resetplayer.
|
||||||
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);
|
||||||
|
@ -5803,29 +5942,28 @@ void G_AddGhost(char *defdemoname)
|
||||||
mthing = playerstarts[0];
|
mthing = playerstarts[0];
|
||||||
I_Assert(mthing);
|
I_Assert(mthing);
|
||||||
{ // A bit more complex than P_SpawnPlayer because ghosts aren't solid and won't just push themselves out of the ceiling.
|
{ // A bit more complex than P_SpawnPlayer because ghosts aren't solid and won't just push themselves out of the ceiling.
|
||||||
fixed_t x,y,z;
|
fixed_t z,f,c;
|
||||||
sector_t *sector;
|
gh->mo = P_SpawnMobj(mthing->x << FRACBITS, mthing->y << FRACBITS, 0, MT_GHOST);
|
||||||
x = mthing->x << FRACBITS;
|
gh->mo->angle = FixedAngle(mthing->angle*FRACUNIT);
|
||||||
y = mthing->y << FRACBITS;
|
f = gh->mo->floorz;
|
||||||
sector = R_PointInSubsector(x, y)->sector;
|
c = gh->mo->ceilingz - mobjinfo[MT_PLAYER].height;
|
||||||
if (!!(mthing->options & MTF_AMBUSH) ^ !!(mthing->options & MTF_OBJECTFLIP))
|
if (!!(mthing->options & MTF_AMBUSH) ^ !!(mthing->options & MTF_OBJECTFLIP))
|
||||||
{
|
{
|
||||||
z = sector->ceilingheight - mobjinfo[MT_PLAYER].height;
|
z = c;
|
||||||
if (mthing->options >> ZSHIFT)
|
if (mthing->options >> ZSHIFT)
|
||||||
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||||
if (z < sector->floorheight)
|
if (z < f)
|
||||||
z = sector->floorheight;
|
z = f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
z = sector->floorheight;
|
z = f;
|
||||||
if (mthing->options >> ZSHIFT)
|
if (mthing->options >> ZSHIFT)
|
||||||
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||||
if (z > sector->ceilingheight - mobjinfo[MT_PLAYER].height)
|
if (z > c)
|
||||||
z = sector->ceilingheight - mobjinfo[MT_PLAYER].height;
|
z = c;
|
||||||
}
|
}
|
||||||
gh->mo = P_SpawnMobj(x, y, z, MT_GHOST);
|
gh->mo->z = z;
|
||||||
gh->mo->angle = FixedAngle(mthing->angle*FRACUNIT);
|
|
||||||
}
|
}
|
||||||
gh->mo->state = states+S_KART_STND1; // SRB2kart - was S_PLAY_STND
|
gh->mo->state = states+S_KART_STND1; // SRB2kart - was S_PLAY_STND
|
||||||
gh->mo->sprite = gh->mo->state->sprite;
|
gh->mo->sprite = gh->mo->state->sprite;
|
||||||
|
@ -6023,8 +6161,13 @@ boolean G_CheckDemoStatus(void)
|
||||||
{
|
{
|
||||||
boolean saved;
|
boolean saved;
|
||||||
|
|
||||||
if(ghosts) // ... ... ...
|
while (ghosts)
|
||||||
ghosts = NULL; // :)
|
{
|
||||||
|
demoghost *next = ghosts->next;
|
||||||
|
Z_Free(ghosts);
|
||||||
|
ghosts = next;
|
||||||
|
}
|
||||||
|
ghosts = NULL;
|
||||||
|
|
||||||
// DO NOT end metal sonic demos here
|
// DO NOT end metal sonic demos here
|
||||||
|
|
||||||
|
|
15
src/g_game.h
15
src/g_game.h
|
@ -168,6 +168,17 @@ void G_WriteMetalTic(mobj_t *metal);
|
||||||
void G_SaveMetal(UINT8 **buffer);
|
void G_SaveMetal(UINT8 **buffer);
|
||||||
void G_LoadMetal(UINT8 **buffer);
|
void G_LoadMetal(UINT8 **buffer);
|
||||||
|
|
||||||
|
// Your naming conventions are stupid and useless.
|
||||||
|
// There is no conflict here.
|
||||||
|
typedef struct demoghost {
|
||||||
|
UINT8 checksum[16];
|
||||||
|
UINT8 *buffer, *p, color;
|
||||||
|
UINT16 version;
|
||||||
|
mobj_t oldmo, *mo;
|
||||||
|
struct demoghost *next;
|
||||||
|
} demoghost;
|
||||||
|
extern demoghost *ghosts;
|
||||||
|
|
||||||
void G_DoPlayDemo(char *defdemoname);
|
void G_DoPlayDemo(char *defdemoname);
|
||||||
void G_TimeDemo(const char *name);
|
void G_TimeDemo(const char *name);
|
||||||
void G_AddGhost(char *defdemoname);
|
void G_AddGhost(char *defdemoname);
|
||||||
|
@ -184,6 +195,8 @@ boolean G_GametypeUsesLives(void);
|
||||||
boolean G_GametypeHasTeams(void);
|
boolean G_GametypeHasTeams(void);
|
||||||
boolean G_GametypeHasSpectators(void);
|
boolean G_GametypeHasSpectators(void);
|
||||||
boolean G_BattleGametype(void);
|
boolean G_BattleGametype(void);
|
||||||
|
INT16 G_SometimesGetDifferentGametype(void);
|
||||||
|
UINT8 G_GetGametypeColor(INT16 gt);
|
||||||
boolean G_RaceGametype(void);
|
boolean G_RaceGametype(void);
|
||||||
boolean G_TagGametype(void);
|
boolean G_TagGametype(void);
|
||||||
void G_ExitLevel(void);
|
void G_ExitLevel(void);
|
||||||
|
@ -237,6 +250,6 @@ FUNCMATH INT32 G_TicsToMilliseconds(tic_t tics);
|
||||||
// Don't split up TOL handling
|
// Don't split up TOL handling
|
||||||
INT16 G_TOLFlag(INT32 pgametype);
|
INT16 G_TOLFlag(INT32 pgametype);
|
||||||
|
|
||||||
INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignorebuffer);
|
INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignorebuffer, UINT8 maphell, boolean callagainsoon);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -209,7 +209,7 @@ void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
|
||||||
// if it's meant to cover the whole screen, black out the rest
|
// if it's meant to cover the whole screen, black out the rest
|
||||||
// cx and cy are possibly *slightly* off from float maths
|
// cx and cy are possibly *slightly* off from float maths
|
||||||
// This is done before here compared to software because we directly alter cx and cy to centre
|
// This is done before here compared to software because we directly alter cx and cy to centre
|
||||||
if (cx >= -0.1f && cx <= 0.1f && SHORT(gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && SHORT(gpatch->height) == BASEVIDHEIGHT)
|
/*if (cx >= -0.1f && cx <= 0.1f && SHORT(gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && SHORT(gpatch->height) == BASEVIDHEIGHT)
|
||||||
{
|
{
|
||||||
// Need to temporarily cache the real patch to get the colour of the top left pixel
|
// Need to temporarily cache the real patch to get the colour of the top left pixel
|
||||||
patch_t *realpatch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
patch_t *realpatch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||||
|
@ -217,7 +217,7 @@ void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
|
||||||
const UINT8 *source = (const UINT8 *)(column) + 3;
|
const UINT8 *source = (const UINT8 *)(column) + 3;
|
||||||
HWR_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
HWR_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
||||||
Z_Free(realpatch);
|
Z_Free(realpatch);
|
||||||
}
|
}*/
|
||||||
// centre screen
|
// centre screen
|
||||||
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
||||||
{
|
{
|
||||||
|
@ -292,9 +292,9 @@ void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
|
||||||
{
|
{
|
||||||
FSurfaceInfo Surf;
|
FSurfaceInfo Surf;
|
||||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||||
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[cv_translucenthud.value];
|
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[hudtrans];
|
||||||
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[cv_translucenthud.value];
|
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[hudtrans];
|
||||||
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[cv_translucenthud.value];
|
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[hudtrans];
|
||||||
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
||||||
flags |= PF_Modulated;
|
flags |= PF_Modulated;
|
||||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||||
|
@ -357,7 +357,7 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
||||||
// if it's meant to cover the whole screen, black out the rest
|
// if it's meant to cover the whole screen, black out the rest
|
||||||
// cx and cy are possibly *slightly* off from float maths
|
// cx and cy are possibly *slightly* off from float maths
|
||||||
// This is done before here compared to software because we directly alter cx and cy to centre
|
// This is done before here compared to software because we directly alter cx and cy to centre
|
||||||
if (cx >= -0.1f && cx <= 0.1f && SHORT(gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && SHORT(gpatch->height) == BASEVIDHEIGHT)
|
/*if (cx >= -0.1f && cx <= 0.1f && SHORT(gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && SHORT(gpatch->height) == BASEVIDHEIGHT)
|
||||||
{
|
{
|
||||||
// Need to temporarily cache the real patch to get the colour of the top left pixel
|
// Need to temporarily cache the real patch to get the colour of the top left pixel
|
||||||
patch_t *realpatch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
patch_t *realpatch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||||
|
@ -365,7 +365,7 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
||||||
const UINT8 *source = (const UINT8 *)(column) + 3;
|
const UINT8 *source = (const UINT8 *)(column) + 3;
|
||||||
HWR_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
HWR_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
||||||
Z_Free(realpatch);
|
Z_Free(realpatch);
|
||||||
}
|
}*/
|
||||||
// centre screen
|
// centre screen
|
||||||
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
||||||
{
|
{
|
||||||
|
@ -446,9 +446,9 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
||||||
{
|
{
|
||||||
FSurfaceInfo Surf;
|
FSurfaceInfo Surf;
|
||||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||||
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[cv_translucenthud.value];
|
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[hudtrans];
|
||||||
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[cv_translucenthud.value];
|
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[hudtrans];
|
||||||
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[cv_translucenthud.value];
|
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[hudtrans];
|
||||||
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
||||||
flags |= PF_Modulated;
|
flags |= PF_Modulated;
|
||||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||||
|
@ -576,29 +576,33 @@ void HWR_DrawFlatFill (INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatlumpnum
|
||||||
// | /|
|
// | /|
|
||||||
// |/ |
|
// |/ |
|
||||||
// 0--1
|
// 0--1
|
||||||
void HWR_FadeScreenMenuBack(UINT32 color, INT32 height)
|
void HWR_FadeScreenMenuBack(UINT16 color, UINT8 strength)
|
||||||
{
|
{
|
||||||
FOutVector v[4];
|
FOutVector v[4];
|
||||||
FSurfaceInfo Surf;
|
FSurfaceInfo Surf;
|
||||||
|
|
||||||
// setup some neat-o translucency effect
|
v[0].x = v[3].x = -1.0f;
|
||||||
if (!height) //cool hack 0 height is full height
|
v[2].x = v[1].x = 1.0f;
|
||||||
height = vid.height;
|
v[0].y = v[1].y = -1.0f;
|
||||||
|
v[2].y = v[3].y = 1.0f;
|
||||||
|
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
||||||
|
|
||||||
v[0].x = v[3].x = -1.0f;
|
v[0].sow = v[3].sow = 0.0f;
|
||||||
v[2].x = v[1].x = 1.0f;
|
v[2].sow = v[1].sow = 1.0f;
|
||||||
v[0].y = v[1].y = 1.0f-((height<<1)/(float)vid.height);
|
v[0].tow = v[1].tow = 1.0f;
|
||||||
v[2].y = v[3].y = 1.0f;
|
v[2].tow = v[3].tow = 0.0f;
|
||||||
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
|
||||||
|
|
||||||
v[0].sow = v[3].sow = 0.0f;
|
if (color & 0xFF00) // Do COLORMAP fade.
|
||||||
v[2].sow = v[1].sow = 1.0f;
|
{
|
||||||
v[0].tow = v[1].tow = 1.0f;
|
Surf.FlatColor.rgba = UINT2RGBA(0x01010160);
|
||||||
v[2].tow = v[3].tow = 0.0f;
|
Surf.FlatColor.s.alpha = (strength*8);
|
||||||
|
}
|
||||||
Surf.FlatColor.rgba = UINT2RGBA(color);
|
else // Do TRANSMAP** fade.
|
||||||
Surf.FlatColor.s.alpha = (UINT8)((0xff/2) * ((float)height / vid.height)); //calum: varies console alpha
|
{
|
||||||
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
|
Surf.FlatColor.rgba = pLocalPalette[color].rgba;
|
||||||
|
Surf.FlatColor.s.alpha = (UINT8)(strength*25.5f);
|
||||||
|
}
|
||||||
|
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the console background with translucency support
|
// Draw the console background with translucency support
|
||||||
|
@ -900,6 +904,7 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
||||||
PF_Modulated|PF_NoTexture|PF_NoDepthTest);
|
PF_Modulated|PF_NoTexture|PF_NoDepthTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// -------------------+
|
// -------------------+
|
||||||
// HWR_DrawConsoleFill : draw flat coloured transparent rectangle because that's cool, and hw sucks less than sw for that.
|
// HWR_DrawConsoleFill : draw flat coloured transparent rectangle because that's cool, and hw sucks less than sw for that.
|
||||||
// -------------------+
|
// -------------------+
|
||||||
|
@ -1005,6 +1010,104 @@ void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color, INT32
|
||||||
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
|
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -----------------+
|
||||||
|
// HWR_DrawDiag : draw flat coloured rectangle, with no texture
|
||||||
|
// -----------------+
|
||||||
|
void HWR_DrawDiag(INT32 x, INT32 y, INT32 wh, INT32 color)
|
||||||
|
{
|
||||||
|
FOutVector v[4];
|
||||||
|
FSurfaceInfo Surf;
|
||||||
|
float fx, fy, fw, fh, fwait = 0;
|
||||||
|
|
||||||
|
if (wh < 0)
|
||||||
|
return; // consistency w/ software
|
||||||
|
|
||||||
|
// 3--2
|
||||||
|
// | /|
|
||||||
|
// |/ |
|
||||||
|
// 0--1
|
||||||
|
|
||||||
|
fx = (float)x;
|
||||||
|
fy = (float)y;
|
||||||
|
fw = fh = (float)wh;
|
||||||
|
|
||||||
|
if (!(color & V_NOSCALESTART))
|
||||||
|
{
|
||||||
|
float dupx = (float)vid.dupx, dupy = (float)vid.dupy;
|
||||||
|
|
||||||
|
fx *= dupx;
|
||||||
|
fy *= dupy;
|
||||||
|
fw *= dupx;
|
||||||
|
fh *= dupy;
|
||||||
|
|
||||||
|
if (vid.width != BASEVIDWIDTH * vid.dupx)
|
||||||
|
{
|
||||||
|
if (color & V_SNAPTORIGHT)
|
||||||
|
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
|
||||||
|
else if (!(color & V_SNAPTOLEFT))
|
||||||
|
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2;
|
||||||
|
}
|
||||||
|
if (vid.height != BASEVIDHEIGHT * dupy)
|
||||||
|
{
|
||||||
|
// same thing here
|
||||||
|
if (color & V_SNAPTOBOTTOM)
|
||||||
|
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy));
|
||||||
|
else if (!(color & V_SNAPTOTOP))
|
||||||
|
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fx >= vid.width || fy >= vid.height)
|
||||||
|
return;
|
||||||
|
if (fx < 0)
|
||||||
|
{
|
||||||
|
fw += fx;
|
||||||
|
fx = 0;
|
||||||
|
}
|
||||||
|
if (fy < 0)
|
||||||
|
{
|
||||||
|
fh += fy;
|
||||||
|
fy = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fw <= 0 || fh <= 0)
|
||||||
|
return;
|
||||||
|
if (fx + fw > vid.width)
|
||||||
|
{
|
||||||
|
fwait = fw - ((float)vid.width - fx);
|
||||||
|
fw = (float)vid.width - fx;
|
||||||
|
}
|
||||||
|
if (fy + fh > vid.height)
|
||||||
|
fh = (float)vid.height - fy;
|
||||||
|
|
||||||
|
fx = -1 + fx / (vid.width / 2);
|
||||||
|
fy = 1 - fy / (vid.height / 2);
|
||||||
|
fw = fw / (vid.width / 2);
|
||||||
|
fh = fh / (vid.height / 2);
|
||||||
|
|
||||||
|
v[0].x = v[3].x = fx;
|
||||||
|
v[2].x = v[1].x = fx + fw;
|
||||||
|
v[0].y = v[1].y = fy;
|
||||||
|
v[3].y = fy - fh;
|
||||||
|
v[2].y = fy - fwait;
|
||||||
|
|
||||||
|
//Hurdler: do we still use this argb color? if not, we should remove it
|
||||||
|
v[0].argb = v[1].argb = v[2].argb = v[3].argb = 0xff00ff00; //;
|
||||||
|
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
||||||
|
|
||||||
|
v[0].sow = v[3].sow = 0.0f;
|
||||||
|
v[2].sow = v[1].sow = 1.0f;
|
||||||
|
v[0].tow = v[1].tow = 0.0f;
|
||||||
|
v[2].tow = v[3].tow = 1.0f;
|
||||||
|
|
||||||
|
Surf.FlatColor = V_GetColor(color);
|
||||||
|
|
||||||
|
HWD.pfnDrawPolygon(&Surf, v, 4,
|
||||||
|
PF_Modulated|PF_NoTexture|PF_NoDepthTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_PNG
|
#ifdef HAVE_PNG
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
|
|
@ -499,23 +499,46 @@ light_t *t_lspr[NUMSPRITES] =
|
||||||
|
|
||||||
&lspr[NOLIGHT], //"SPRG",
|
&lspr[NOLIGHT], //"SPRG",
|
||||||
&lspr[NOLIGHT], //"BSPR",
|
&lspr[NOLIGHT], //"BSPR",
|
||||||
|
|
||||||
&lspr[NOLIGHT], //"RNDM",
|
&lspr[NOLIGHT], //"RNDM",
|
||||||
&lspr[NOLIGHT], //"SPRK",
|
|
||||||
&lspr[NOLIGHT], //"KFRE",
|
&lspr[NOLIGHT], //"KFRE",
|
||||||
&lspr[NOLIGHT], //"DRIF",
|
&lspr[NOLIGHT], //"DRIF",
|
||||||
&lspr[NOLIGHT], //"FAKE",
|
&lspr[NOLIGHT], //"DSMO",
|
||||||
&lspr[NOLIGHT], //"DFAK",
|
|
||||||
|
&lspr[NOLIGHT], //"FITM",
|
||||||
&lspr[NOLIGHT], //"BANA",
|
&lspr[NOLIGHT], //"BANA",
|
||||||
&lspr[NOLIGHT], //"DBAN",
|
|
||||||
&lspr[NOLIGHT], //"GSHE",
|
&lspr[NOLIGHT], //"GSHE",
|
||||||
&lspr[NOLIGHT], //"GSTR",
|
|
||||||
&lspr[NOLIGHT], //"DGSH",
|
|
||||||
&lspr[NOLIGHT], //"RSHE",
|
&lspr[NOLIGHT], //"RSHE",
|
||||||
&lspr[NOLIGHT], //"RSTR",
|
&lspr[NOLIGHT], //"SSMN",
|
||||||
&lspr[NOLIGHT], //"DRSH",
|
|
||||||
&lspr[NOLIGHT], //"BOMB",
|
|
||||||
&lspr[NOLIGHT], //"BLIG",
|
&lspr[NOLIGHT], //"BLIG",
|
||||||
&lspr[NOLIGHT], //"LIGH"
|
&lspr[NOLIGHT], //"LIGH",
|
||||||
|
&lspr[NOLIGHT], //"SINK",
|
||||||
|
&lspr[NOLIGHT], //"SITR",
|
||||||
|
&lspr[NOLIGHT], //"KBLN",
|
||||||
|
|
||||||
|
&lspr[NOLIGHT], //"LAKI",
|
||||||
|
|
||||||
|
&lspr[NOLIGHT], //"POKE",
|
||||||
|
&lspr[NOLIGHT], //"AUDI",
|
||||||
|
&lspr[NOLIGHT], //"DECO",
|
||||||
|
&lspr[NOLIGHT], //"DOOD",
|
||||||
|
&lspr[NOLIGHT], //"SNES",
|
||||||
|
&lspr[NOLIGHT], //"GBAS",
|
||||||
|
&lspr[NOLIGHT], //"SPRS",
|
||||||
|
&lspr[NOLIGHT], //"BUZB",
|
||||||
|
&lspr[NOLIGHT], //"CHOM",
|
||||||
|
&lspr[NOLIGHT], //"SACO",
|
||||||
|
&lspr[NOLIGHT], //"CRAB",
|
||||||
|
&lspr[NOLIGHT], //"SHAD",
|
||||||
|
|
||||||
|
&lspr[NOLIGHT], //"BUMP",
|
||||||
|
&lspr[NOLIGHT], //"FLEN",
|
||||||
|
&lspr[NOLIGHT], //"CLAS",
|
||||||
|
&lspr[NOLIGHT], //"PSHW",
|
||||||
|
|
||||||
|
&lspr[NOLIGHT], //"ARRO",
|
||||||
|
|
||||||
|
&lspr[NOLIGHT], //"PBOM"
|
||||||
|
|
||||||
// Free slots
|
// Free slots
|
||||||
&lspr[NOLIGHT],
|
&lspr[NOLIGHT],
|
||||||
|
|
|
@ -59,7 +59,7 @@ struct hwdriver_s hwdriver;
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
|
|
||||||
static void HWR_AddSprites(sector_t *sec);
|
static void HWR_AddSprites(sector_t *sec, UINT8 ssplayer);
|
||||||
static void HWR_ProjectSprite(mobj_t *thing);
|
static void HWR_ProjectSprite(mobj_t *thing);
|
||||||
#ifdef HWPRECIP
|
#ifdef HWPRECIP
|
||||||
static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing);
|
static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing);
|
||||||
|
@ -582,7 +582,7 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, boolean is
|
||||||
if (nrPlaneVerts < 3) //not even a triangle ?
|
if (nrPlaneVerts < 3) //not even a triangle ?
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (nrPlaneVerts > UINT16_MAX) // FIXME: exceeds plVerts size
|
if ((UINT32)nrPlaneVerts > UINT16_MAX) // FIXME: exceeds plVerts size
|
||||||
{
|
{
|
||||||
CONS_Debug(DBG_RENDER, "polygon size of %d exceeds max value of %d vertices\n", nrPlaneVerts, UINT16_MAX);
|
CONS_Debug(DBG_RENDER, "polygon size of %d exceeds max value of %d vertices\n", nrPlaneVerts, UINT16_MAX);
|
||||||
return;
|
return;
|
||||||
|
@ -3234,7 +3234,7 @@ static void HWR_AddPolyObjectPlanes(void)
|
||||||
// : Draw one or more line segments.
|
// : Draw one or more line segments.
|
||||||
// Notes : Sets gr_cursectorlight to the light of the parent sector, to modulate wall textures
|
// Notes : Sets gr_cursectorlight to the light of the parent sector, to modulate wall textures
|
||||||
// -----------------+
|
// -----------------+
|
||||||
static void HWR_Subsector(size_t num)
|
static void HWR_Subsector(size_t num, UINT8 ssplayer)
|
||||||
{
|
{
|
||||||
INT16 count;
|
INT16 count;
|
||||||
seg_t *line;
|
seg_t *line;
|
||||||
|
@ -3602,7 +3602,7 @@ static void HWR_Subsector(size_t num)
|
||||||
{
|
{
|
||||||
// draw sprites first, coz they are clipped to the solidsegs of
|
// draw sprites first, coz they are clipped to the solidsegs of
|
||||||
// subsectors more 'in front'
|
// subsectors more 'in front'
|
||||||
HWR_AddSprites(gr_frontsector);
|
HWR_AddSprites(gr_frontsector, ssplayer);
|
||||||
|
|
||||||
//Hurdler: at this point validcount must be the same, but is not because
|
//Hurdler: at this point validcount must be the same, but is not because
|
||||||
// gr_frontsector doesn't point anymore to sub->sector due to
|
// gr_frontsector doesn't point anymore to sub->sector due to
|
||||||
|
@ -3654,7 +3654,7 @@ static boolean HWR_CheckHackBBox(fixed_t *bb)
|
||||||
// BP: big hack for a test in lighning ref : 1249753487AB
|
// BP: big hack for a test in lighning ref : 1249753487AB
|
||||||
fixed_t *hwbbox;
|
fixed_t *hwbbox;
|
||||||
|
|
||||||
static void HWR_RenderBSPNode(INT32 bspnum)
|
static void HWR_RenderBSPNode(INT32 bspnum, UINT8 ssplayer)
|
||||||
{
|
{
|
||||||
/*//GZDoom code
|
/*//GZDoom code
|
||||||
if(bspnum == -1)
|
if(bspnum == -1)
|
||||||
|
@ -3694,12 +3694,12 @@ static void HWR_RenderBSPNode(INT32 bspnum)
|
||||||
if (bspnum == -1)
|
if (bspnum == -1)
|
||||||
{
|
{
|
||||||
//*(gr_drawsubsector_p++) = 0;
|
//*(gr_drawsubsector_p++) = 0;
|
||||||
HWR_Subsector(0);
|
HWR_Subsector(0, ssplayer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//*(gr_drawsubsector_p++) = bspnum&(~NF_SUBSECTOR);
|
//*(gr_drawsubsector_p++) = bspnum&(~NF_SUBSECTOR);
|
||||||
HWR_Subsector(bspnum&(~NF_SUBSECTOR));
|
HWR_Subsector(bspnum&(~NF_SUBSECTOR), ssplayer);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3711,14 +3711,14 @@ static void HWR_RenderBSPNode(INT32 bspnum)
|
||||||
hwbbox = bsp->bbox[side];
|
hwbbox = bsp->bbox[side];
|
||||||
|
|
||||||
// Recursively divide front space.
|
// Recursively divide front space.
|
||||||
HWR_RenderBSPNode(bsp->children[side]);
|
HWR_RenderBSPNode(bsp->children[side], ssplayer);
|
||||||
|
|
||||||
// Possibly divide back space.
|
// Possibly divide back space.
|
||||||
if (HWR_CheckBBox(bsp->bbox[side^1]))
|
if (HWR_CheckBBox(bsp->bbox[side^1]))
|
||||||
{
|
{
|
||||||
// BP: big hack for a test in lighning ref : 1249753487AB
|
// BP: big hack for a test in lighning ref : 1249753487AB
|
||||||
hwbbox = bsp->bbox[side^1];
|
hwbbox = bsp->bbox[side^1];
|
||||||
HWR_RenderBSPNode(bsp->children[side^1]);
|
HWR_RenderBSPNode(bsp->children[side^1], ssplayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5110,7 +5110,7 @@ static void HWR_DrawSprites(void)
|
||||||
// During BSP traversal, this adds sprites by sector.
|
// During BSP traversal, this adds sprites by sector.
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
static UINT8 sectorlight;
|
static UINT8 sectorlight;
|
||||||
static void HWR_AddSprites(sector_t *sec)
|
static void HWR_AddSprites(sector_t *sec, UINT8 ssplayer)
|
||||||
{
|
{
|
||||||
mobj_t *thing;
|
mobj_t *thing;
|
||||||
#ifdef HWPRECIP
|
#ifdef HWPRECIP
|
||||||
|
@ -5140,6 +5140,25 @@ static void HWR_AddSprites(sector_t *sec)
|
||||||
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW)
|
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (splitscreen)
|
||||||
|
{
|
||||||
|
if (thing->eflags & MFE_DRAWONLYFORP1)
|
||||||
|
if (ssplayer != 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (thing->eflags & MFE_DRAWONLYFORP2)
|
||||||
|
if (ssplayer != 2)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (thing->eflags & MFE_DRAWONLYFORP3 && splitscreen > 1)
|
||||||
|
if (ssplayer != 3)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (thing->eflags & MFE_DRAWONLYFORP4 && splitscreen > 2)
|
||||||
|
if (ssplayer != 4)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
approx_dist = P_AproxDistance(viewx-thing->x, viewy-thing->y);
|
approx_dist = P_AproxDistance(viewx-thing->x, viewy-thing->y);
|
||||||
|
|
||||||
if (approx_dist <= limit_dist)
|
if (approx_dist <= limit_dist)
|
||||||
|
@ -5150,8 +5169,31 @@ static void HWR_AddSprites(sector_t *sec)
|
||||||
{
|
{
|
||||||
// Draw everything in sector, no checks
|
// Draw everything in sector, no checks
|
||||||
for (thing = sec->thinglist; thing; thing = thing->snext)
|
for (thing = sec->thinglist; thing; thing = thing->snext)
|
||||||
if (!(thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW))
|
{
|
||||||
HWR_ProjectSprite(thing);
|
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (splitscreen)
|
||||||
|
{
|
||||||
|
if (thing->eflags & MFE_DRAWONLYFORP1)
|
||||||
|
if (ssplayer != 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (thing->eflags & MFE_DRAWONLYFORP2)
|
||||||
|
if (ssplayer != 2)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (thing->eflags & MFE_DRAWONLYFORP3 && splitscreen > 1)
|
||||||
|
if (ssplayer != 3)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (thing->eflags & MFE_DRAWONLYFORP4 && splitscreen > 2)
|
||||||
|
if (ssplayer != 4)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
HWR_ProjectSprite(thing);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HWPRECIP
|
#ifdef HWPRECIP
|
||||||
|
@ -5388,23 +5430,15 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
else if (thing->color)
|
else if (thing->color)
|
||||||
{
|
{
|
||||||
// New colormap stuff for skins Tails 06-07-2002
|
// New colormap stuff for skins Tails 06-07-2002
|
||||||
if (thing->skin && thing->sprite == SPR_PLAY) // This thing is a player!
|
if (thing->colorized)
|
||||||
|
vis->colormap = R_GetTranslationColormap(TC_RAINBOW, thing->color, GTC_CACHE);
|
||||||
|
else if (thing->skin && thing->sprite == SPR_PLAY) // This thing is a player!
|
||||||
{
|
{
|
||||||
if (thing->colorized)
|
size_t skinnum = (skin_t*)thing->skin-skins;
|
||||||
vis->colormap = R_GetTranslationColormap(TC_STARMAN, thing->color, GTC_CACHE);
|
vis->colormap = R_GetTranslationColormap((INT32)skinnum, thing->color, GTC_CACHE);
|
||||||
else
|
|
||||||
{
|
|
||||||
size_t skinnum = (skin_t*)thing->skin-skins;
|
|
||||||
vis->colormap = R_GetTranslationColormap((INT32)skinnum, thing->color, GTC_CACHE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
vis->colormap = R_GetTranslationColormap(TC_DEFAULT, thing->color, GTC_CACHE);
|
||||||
if (vis->mobj && vis->mobj->colorized)
|
|
||||||
vis->colormap = R_GetTranslationColormap(TC_STARMAN, vis->mobj->color ? vis->mobj->color : SKINCOLOR_CYAN, GTC_CACHE);
|
|
||||||
else
|
|
||||||
vis->colormap = R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color ? vis->mobj->color : SKINCOLOR_CYAN, GTC_CACHE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vis->colormap = colormaps;
|
vis->colormap = colormaps;
|
||||||
|
@ -5666,13 +5700,31 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
|
||||||
{
|
{
|
||||||
const float fpov = FIXED_TO_FLOAT(cv_grfov.value+player->fovadd);
|
const float fpov = FIXED_TO_FLOAT(cv_grfov.value+player->fovadd);
|
||||||
postimg_t *type;
|
postimg_t *type;
|
||||||
|
UINT8 ssplayer = 0;
|
||||||
|
|
||||||
if (splitscreen && player == &players[secondarydisplayplayer])
|
if (splitscreen)
|
||||||
type = &postimgtype2;
|
{
|
||||||
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
if (player == &players[secondarydisplayplayer])
|
||||||
type = &postimgtype3;
|
{
|
||||||
else if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
type = &postimgtype2;
|
||||||
type = &postimgtype4;
|
ssplayer = 2;
|
||||||
|
}
|
||||||
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
|
{
|
||||||
|
type = &postimgtype3;
|
||||||
|
ssplayer = 3;
|
||||||
|
}
|
||||||
|
else if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
|
{
|
||||||
|
type = &postimgtype4;
|
||||||
|
ssplayer = 4;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
type = &postimgtype;
|
||||||
|
ssplayer = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
type = &postimgtype;
|
type = &postimgtype;
|
||||||
|
|
||||||
|
@ -5789,7 +5841,7 @@ if (0)
|
||||||
|
|
||||||
validcount++;
|
validcount++;
|
||||||
|
|
||||||
HWR_RenderBSPNode((INT32)numnodes-1);
|
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer);
|
||||||
|
|
||||||
// Make a viewangle int so we can render things based on mouselook
|
// Make a viewangle int so we can render things based on mouselook
|
||||||
if (player == &players[consoleplayer])
|
if (player == &players[consoleplayer])
|
||||||
|
@ -5806,18 +5858,18 @@ if (0)
|
||||||
{
|
{
|
||||||
dup_viewangle += ANGLE_90;
|
dup_viewangle += ANGLE_90;
|
||||||
HWR_ClearClipSegs();
|
HWR_ClearClipSegs();
|
||||||
HWR_RenderBSPNode((INT32)numnodes-1); //left
|
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //left
|
||||||
|
|
||||||
dup_viewangle += ANGLE_90;
|
dup_viewangle += ANGLE_90;
|
||||||
if (((INT32)aimingangle > ANGLE_45 || (INT32)aimingangle<-ANGLE_45))
|
if (((INT32)aimingangle > ANGLE_45 || (INT32)aimingangle<-ANGLE_45))
|
||||||
{
|
{
|
||||||
HWR_ClearClipSegs();
|
HWR_ClearClipSegs();
|
||||||
HWR_RenderBSPNode((INT32)numnodes-1); //back
|
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //back
|
||||||
}
|
}
|
||||||
|
|
||||||
dup_viewangle += ANGLE_90;
|
dup_viewangle += ANGLE_90;
|
||||||
HWR_ClearClipSegs();
|
HWR_ClearClipSegs();
|
||||||
HWR_RenderBSPNode((INT32)numnodes-1); //right
|
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //right
|
||||||
|
|
||||||
dup_viewangle += ANGLE_90;
|
dup_viewangle += ANGLE_90;
|
||||||
}
|
}
|
||||||
|
@ -5881,17 +5933,35 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
||||||
{
|
{
|
||||||
const float fpov = FIXED_TO_FLOAT(cv_grfov.value+player->fovadd);
|
const float fpov = FIXED_TO_FLOAT(cv_grfov.value+player->fovadd);
|
||||||
postimg_t *type;
|
postimg_t *type;
|
||||||
|
UINT8 ssplayer = 0;
|
||||||
|
|
||||||
const boolean skybox = (skyboxmo[0] && cv_skybox.value); // True if there's a skybox object and skyboxes are on
|
const boolean skybox = (skyboxmo[0] && cv_skybox.value); // True if there's a skybox object and skyboxes are on
|
||||||
|
|
||||||
FRGBAFloat ClearColor;
|
FRGBAFloat ClearColor;
|
||||||
|
|
||||||
if (splitscreen && player == &players[secondarydisplayplayer])
|
if (splitscreen)
|
||||||
type = &postimgtype2;
|
{
|
||||||
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
if (player == &players[secondarydisplayplayer])
|
||||||
type = &postimgtype3;
|
{
|
||||||
else if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
type = &postimgtype2;
|
||||||
type = &postimgtype4;
|
ssplayer = 2;
|
||||||
|
}
|
||||||
|
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||||
|
{
|
||||||
|
type = &postimgtype3;
|
||||||
|
ssplayer = 3;
|
||||||
|
}
|
||||||
|
else if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
|
{
|
||||||
|
type = &postimgtype4;
|
||||||
|
ssplayer = 4;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
type = &postimgtype;
|
||||||
|
ssplayer = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
type = &postimgtype;
|
type = &postimgtype;
|
||||||
|
|
||||||
|
@ -6019,7 +6089,7 @@ if (0)
|
||||||
|
|
||||||
validcount++;
|
validcount++;
|
||||||
|
|
||||||
HWR_RenderBSPNode((INT32)numnodes-1);
|
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer);
|
||||||
|
|
||||||
// Make a viewangle int so we can render things based on mouselook
|
// Make a viewangle int so we can render things based on mouselook
|
||||||
if (player == &players[consoleplayer])
|
if (player == &players[consoleplayer])
|
||||||
|
@ -6036,18 +6106,18 @@ if (0)
|
||||||
{
|
{
|
||||||
dup_viewangle += ANGLE_90;
|
dup_viewangle += ANGLE_90;
|
||||||
HWR_ClearClipSegs();
|
HWR_ClearClipSegs();
|
||||||
HWR_RenderBSPNode((INT32)numnodes-1); //left
|
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //left
|
||||||
|
|
||||||
dup_viewangle += ANGLE_90;
|
dup_viewangle += ANGLE_90;
|
||||||
if (((INT32)aimingangle > ANGLE_45 || (INT32)aimingangle<-ANGLE_45))
|
if (((INT32)aimingangle > ANGLE_45 || (INT32)aimingangle<-ANGLE_45))
|
||||||
{
|
{
|
||||||
HWR_ClearClipSegs();
|
HWR_ClearClipSegs();
|
||||||
HWR_RenderBSPNode((INT32)numnodes-1); //back
|
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //back
|
||||||
}
|
}
|
||||||
|
|
||||||
dup_viewangle += ANGLE_90;
|
dup_viewangle += ANGLE_90;
|
||||||
HWR_ClearClipSegs();
|
HWR_ClearClipSegs();
|
||||||
HWR_RenderBSPNode((INT32)numnodes-1); //right
|
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //right
|
||||||
|
|
||||||
dup_viewangle += ANGLE_90;
|
dup_viewangle += ANGLE_90;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ void HWR_Shutdown(void);
|
||||||
|
|
||||||
void HWR_clearAutomap(void);
|
void HWR_clearAutomap(void);
|
||||||
void HWR_drawAMline(const fline_t *fl, INT32 color);
|
void HWR_drawAMline(const fline_t *fl, INT32 color);
|
||||||
void HWR_FadeScreenMenuBack(UINT32 color, INT32 height);
|
void HWR_FadeScreenMenuBack(UINT16 color, UINT8 strength);
|
||||||
void HWR_DrawConsoleBack(UINT32 color, INT32 height);
|
void HWR_DrawConsoleBack(UINT32 color, INT32 height);
|
||||||
void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player);
|
void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player);
|
||||||
void HWR_RenderPlayerView(INT32 viewnumber, player_t *player);
|
void HWR_RenderPlayerView(INT32 viewnumber, player_t *player);
|
||||||
|
@ -46,13 +46,13 @@ void HWR_SetViewSize(void);
|
||||||
void HWR_DrawPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option);
|
void HWR_DrawPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option);
|
||||||
void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t scale, INT32 option, const UINT8 *colormap);
|
void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t scale, INT32 option, const UINT8 *colormap);
|
||||||
void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t scale, INT32 option, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h);
|
void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t scale, INT32 option, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h);
|
||||||
void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, INT32 option, fixed_t scale, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h);
|
|
||||||
void HWR_MakePatch (const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, boolean makebitmap);
|
void HWR_MakePatch (const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, boolean makebitmap);
|
||||||
void HWR_CreatePlanePolygons(INT32 bspnum);
|
void HWR_CreatePlanePolygons(INT32 bspnum);
|
||||||
void HWR_CreateStaticLightmaps(INT32 bspnum);
|
void HWR_CreateStaticLightmaps(INT32 bspnum);
|
||||||
void HWR_PrepLevelCache(size_t pnumtextures);
|
void HWR_PrepLevelCache(size_t pnumtextures);
|
||||||
void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color);
|
void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color);
|
||||||
void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color, INT32 options); // Lat: separate flags from color since color needs to be an uint to work right.
|
void HWR_DrawConsoleFill(INT32 x, INT32 y, INT32 w, INT32 h, UINT32 color, INT32 options); // Lat: separate flags from color since color needs to be an uint to work right.
|
||||||
|
void HWR_DrawDiag(INT32 x, INT32 y, INT32 wh, INT32 color);
|
||||||
void HWR_DrawPic(INT32 x,INT32 y,lumpnum_t lumpnum);
|
void HWR_DrawPic(INT32 x,INT32 y,lumpnum_t lumpnum);
|
||||||
|
|
||||||
void HWR_AddCommands(void);
|
void HWR_AddCommands(void);
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include "../r_things.h"
|
#include "../r_things.h"
|
||||||
#include "../r_draw.h"
|
#include "../r_draw.h"
|
||||||
#include "../p_tick.h"
|
#include "../p_tick.h"
|
||||||
|
#include "../k_kart.h" // colortranslations
|
||||||
|
|
||||||
#include "hw_main.h"
|
#include "hw_main.h"
|
||||||
#include "../v_video.h"
|
#include "../v_video.h"
|
||||||
|
@ -938,6 +939,7 @@ spritemd2found:
|
||||||
|
|
||||||
static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, GLMipmap_t *grmip, INT32 skinnum, skincolors_t color)
|
static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, GLMipmap_t *grmip, INT32 skinnum, skincolors_t color)
|
||||||
{
|
{
|
||||||
|
UINT8 i;
|
||||||
UINT16 w = gpatch->width, h = gpatch->height;
|
UINT16 w = gpatch->width, h = gpatch->height;
|
||||||
UINT32 size = w*h;
|
UINT32 size = w*h;
|
||||||
RGBA_t *image, *blendimage, *cur, blendcolor;
|
RGBA_t *image, *blendimage, *cur, blendcolor;
|
||||||
|
@ -963,252 +965,46 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch,
|
||||||
image = gpatch->mipmap.grInfo.data;
|
image = gpatch->mipmap.grInfo.data;
|
||||||
blendimage = blendgpatch->mipmap.grInfo.data;
|
blendimage = blendgpatch->mipmap.grInfo.data;
|
||||||
|
|
||||||
switch (color)
|
// Average all of the translation's colors
|
||||||
{
|
{
|
||||||
case SKINCOLOR_IVORY:
|
UINT16 r, g, b;
|
||||||
blendcolor = V_GetColor(0);
|
UINT8 div = 0;
|
||||||
break;
|
|
||||||
case SKINCOLOR_WHITE:
|
|
||||||
blendcolor = V_GetColor(3);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SILVER:
|
|
||||||
blendcolor = V_GetColor(7);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_CLOUDY:
|
|
||||||
blendcolor = V_GetColor(13);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_GREY:
|
|
||||||
blendcolor = V_GetColor(15);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_DARKGREY:
|
|
||||||
blendcolor = V_GetColor(23);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_BLACK:
|
|
||||||
blendcolor = V_GetColor(27);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SALMON:
|
|
||||||
blendcolor = V_GetColor(123);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_PINK:
|
|
||||||
blendcolor = V_GetColor(147);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_LIGHTRED:
|
|
||||||
blendcolor = V_GetColor(127);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SHINYRED:
|
|
||||||
blendcolor = V_GetColor(130);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_RED:
|
|
||||||
blendcolor = V_GetColor(132);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_DARKPINK:
|
|
||||||
blendcolor = V_GetColor(151);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_DARKRED:
|
|
||||||
blendcolor = V_GetColor(139);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_DAWN:
|
|
||||||
blendcolor = V_GetColor(89);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_ORANGE:
|
|
||||||
blendcolor = V_GetColor(87);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SHINYORANGE:
|
|
||||||
blendcolor = V_GetColor(91);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_DARKORANGE:
|
|
||||||
blendcolor = V_GetColor(95);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_GOLDENBROWN:
|
|
||||||
blendcolor = V_GetColor(119);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_ROSEWOOD:
|
|
||||||
blendcolor = V_GetColor(155);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_DARKROSEWOOD:
|
|
||||||
blendcolor = V_GetColor(159);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SEPIA:
|
|
||||||
blendcolor = V_GetColor(37);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_BEIGE:
|
|
||||||
blendcolor = V_GetColor(39);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_BROWN:
|
|
||||||
blendcolor = V_GetColor(55);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_LEATHER:
|
|
||||||
blendcolor = V_GetColor(61);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_YELLOW:
|
|
||||||
blendcolor = V_GetColor(104);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_PEACH:
|
|
||||||
blendcolor = V_GetColor(71);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_LIGHTORANGE:
|
|
||||||
blendcolor = V_GetColor(83);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_CARAMEL:
|
|
||||||
blendcolor = V_GetColor(79);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_GOLD:
|
|
||||||
blendcolor = V_GetColor(115);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SHINYCARAMEL:
|
|
||||||
blendcolor = V_GetColor(78);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_VOMIT:
|
|
||||||
blendcolor = V_GetColor(114);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_GARDEN:
|
|
||||||
blendcolor = V_GetColor(179);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_LIGHTARMY:
|
|
||||||
blendcolor = V_GetColor(177);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_ARMY:
|
|
||||||
blendcolor = V_GetColor(179);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_PISTACHIO:
|
|
||||||
blendcolor = V_GetColor(166);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_ROBOHOOD:
|
|
||||||
blendcolor = V_GetColor(182);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_OLIVE:
|
|
||||||
blendcolor = V_GetColor(108);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_DARKARMY:
|
|
||||||
blendcolor = V_GetColor(183);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_LIGHTGREEN:
|
|
||||||
blendcolor = V_GetColor(163);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_UGLYGREEN:
|
|
||||||
blendcolor = V_GetColor(185);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_NEONGREEN:
|
|
||||||
blendcolor = V_GetColor(187);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_GREEN:
|
|
||||||
blendcolor = V_GetColor(167);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_DARKGREEN:
|
|
||||||
blendcolor = V_GetColor(171);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SWAMP:
|
|
||||||
blendcolor = V_GetColor(190);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_FROST:
|
|
||||||
blendcolor = V_GetColor(215);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SLATE:
|
|
||||||
blendcolor = V_GetColor(201);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_LIGHTBLUE:
|
|
||||||
blendcolor = V_GetColor(227);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_CYAN:
|
|
||||||
blendcolor = V_GetColor(213);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_CERULEAN:
|
|
||||||
blendcolor = V_GetColor(217);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_TURQUOISE:
|
|
||||||
blendcolor = V_GetColor(220);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_TEAL:
|
|
||||||
blendcolor = V_GetColor(221);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_STEELBLUE:
|
|
||||||
blendcolor = V_GetColor(203);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_BLUE:
|
|
||||||
blendcolor = V_GetColor(231);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SHINYBLUE:
|
|
||||||
blendcolor = V_GetColor(234);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_NAVY:
|
|
||||||
blendcolor = V_GetColor(206);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_DARKBLUE:
|
|
||||||
blendcolor = V_GetColor(238);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_JETBLACK:
|
|
||||||
blendcolor = V_GetColor(207);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_LILAC:
|
|
||||||
blendcolor = V_GetColor(123);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_PURPLE:
|
|
||||||
blendcolor = V_GetColor(195);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_LAVENDER:
|
|
||||||
blendcolor = V_GetColor(251);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_BYZANTIUM:
|
|
||||||
blendcolor = V_GetColor(254);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_INDIGO:
|
|
||||||
blendcolor = V_GetColor(199);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_SUPER1:
|
blendcolor = V_GetColor(colortranslations[color][0]);
|
||||||
blendcolor = V_GetColor(97);
|
r = (UINT16)blendcolor.s.red;
|
||||||
break;
|
g = (UINT16)blendcolor.s.green;
|
||||||
case SKINCOLOR_SUPER2:
|
b = (UINT16)blendcolor.s.blue;
|
||||||
blendcolor = V_GetColor(100);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SUPER3:
|
|
||||||
blendcolor = V_GetColor(103);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SUPER4:
|
|
||||||
blendcolor = V_GetColor(113);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_SUPER5:
|
|
||||||
blendcolor = V_GetColor(116);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SKINCOLOR_TSUPER1:
|
for (i = 1; i < 16; i++)
|
||||||
blendcolor = V_GetColor(81);
|
{
|
||||||
break;
|
RGBA_t nextcolor = V_GetColor(colortranslations[color][i]);
|
||||||
case SKINCOLOR_TSUPER2:
|
UINT8 mul = 1;
|
||||||
blendcolor = V_GetColor(82);
|
// Weight these shades more. Indices 1-9 weren't randomly picked, they are commonly used on sprites and are generally what the colors "look" like
|
||||||
break;
|
if (i >= 1 && i <= 9)
|
||||||
case SKINCOLOR_TSUPER3:
|
mul++;
|
||||||
blendcolor = V_GetColor(84);
|
// The mid & dark tons on the minimap icons get weighted even harder
|
||||||
break;
|
if (i == 4 || i == 6)
|
||||||
case SKINCOLOR_TSUPER4:
|
mul += 2;
|
||||||
blendcolor = V_GetColor(85);
|
// And the shade between them, why not
|
||||||
break;
|
if (i == 5)
|
||||||
case SKINCOLOR_TSUPER5:
|
mul++;
|
||||||
blendcolor = V_GetColor(87);
|
r += (UINT16)(nextcolor.s.red)*mul;
|
||||||
break;
|
g += (UINT16)(nextcolor.s.green)*mul;
|
||||||
|
b += (UINT16)(nextcolor.s.blue)*mul;
|
||||||
|
div += mul;
|
||||||
|
}
|
||||||
|
|
||||||
case SKINCOLOR_KSUPER1:
|
// This shouldn't happen.
|
||||||
blendcolor = V_GetColor(122);
|
if (div < 1)
|
||||||
break;
|
div = 1;
|
||||||
case SKINCOLOR_KSUPER2:
|
|
||||||
blendcolor = V_GetColor(123);
|
blendcolor.s.red = (UINT8)(r/div);
|
||||||
break;
|
blendcolor.s.green = (UINT8)(g/div);
|
||||||
case SKINCOLOR_KSUPER3:
|
blendcolor.s.blue = (UINT8)(b/div);
|
||||||
blendcolor = V_GetColor(124);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_KSUPER4:
|
|
||||||
blendcolor = V_GetColor(125);
|
|
||||||
break;
|
|
||||||
case SKINCOLOR_KSUPER5:
|
|
||||||
blendcolor = V_GetColor(126);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
blendcolor = V_GetColor(247);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// starman support, could theoretically support boss ones too
|
// rainbow support, could theoretically support boss ones too
|
||||||
if (skinnum == TC_STARMAN)
|
if (skinnum == TC_RAINBOW)
|
||||||
{
|
{
|
||||||
while (size--)
|
while (size--)
|
||||||
{
|
{
|
||||||
|
@ -1228,13 +1024,13 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch,
|
||||||
colorbright = (blendcolor.s.red+blendcolor.s.green+blendcolor.s.blue)/3;
|
colorbright = (blendcolor.s.red+blendcolor.s.green+blendcolor.s.blue)/3;
|
||||||
|
|
||||||
tempcolor = (finalbright*blendcolor.s.red)/colorbright;
|
tempcolor = (finalbright*blendcolor.s.red)/colorbright;
|
||||||
tempcolor = min(255, max(0, tempcolor));
|
tempcolor = min(255, tempcolor);
|
||||||
cur->s.red = (UINT8)tempcolor;
|
cur->s.red = (UINT8)tempcolor;
|
||||||
tempcolor = (finalbright*blendcolor.s.green)/colorbright;
|
tempcolor = (finalbright*blendcolor.s.green)/colorbright;
|
||||||
tempcolor = min(255, max(0, tempcolor));
|
tempcolor = min(255, tempcolor);
|
||||||
cur->s.green = (UINT8)tempcolor;
|
cur->s.green = (UINT8)tempcolor;
|
||||||
tempcolor = (finalbright*blendcolor.s.blue)/colorbright;
|
tempcolor = (finalbright*blendcolor.s.blue)/colorbright;
|
||||||
tempcolor = min(255, max(0, tempcolor));
|
tempcolor = min(255, tempcolor);
|
||||||
cur->s.blue = (UINT8)tempcolor;
|
cur->s.blue = (UINT8)tempcolor;
|
||||||
cur->s.alpha = image->s.alpha;
|
cur->s.alpha = image->s.alpha;
|
||||||
}
|
}
|
||||||
|
@ -1490,7 +1286,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
|
||||||
if (spr->mobj->skin && spr->mobj->sprite == SPR_PLAY)
|
if (spr->mobj->skin && spr->mobj->sprite == SPR_PLAY)
|
||||||
{
|
{
|
||||||
if (spr->mobj->colorized)
|
if (spr->mobj->colorized)
|
||||||
skinnum = TC_STARMAN;
|
skinnum = TC_RAINBOW;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
skinnum = (INT32)((skin_t*)spr->mobj->skin-skins);
|
skinnum = (INT32)((skin_t*)spr->mobj->skin-skins);
|
||||||
|
|
294
src/hu_stuff.c
294
src/hu_stuff.c
|
@ -1846,23 +1846,6 @@ static void HU_DrawCEcho(void)
|
||||||
--cechotimer;
|
--cechotimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HU_drawGametype(void)
|
|
||||||
{
|
|
||||||
INT32 i = 0;
|
|
||||||
|
|
||||||
for (i = 0; gametype_cons_t[i].strvalue; i++)
|
|
||||||
{
|
|
||||||
if (gametype_cons_t[i].value == gametype)
|
|
||||||
{
|
|
||||||
if (splitscreen)
|
|
||||||
V_DrawString(4, 184, 0, gametype_cons_t[i].strvalue);
|
|
||||||
else
|
|
||||||
V_DrawString(4, 192, 0, gametype_cons_t[i].strvalue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// demo info stuff
|
// demo info stuff
|
||||||
//
|
//
|
||||||
|
@ -1950,7 +1933,7 @@ void HU_Drawer(void)
|
||||||
|| gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE
|
|| gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE
|
||||||
|| gamestate == GS_CREDITS || gamestate == GS_EVALUATION
|
|| gamestate == GS_CREDITS || gamestate == GS_EVALUATION
|
||||||
|| gamestate == GS_GAMEEND
|
|| gamestate == GS_GAMEEND
|
||||||
|| gamestate == GS_VOTING) // SRB2kart
|
|| gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS) // SRB2kart
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// draw multiplayer rankings
|
// draw multiplayer rankings
|
||||||
|
@ -2119,19 +2102,25 @@ void HU_drawPing(INT32 x, INT32 y, INT32 ping, boolean notext)
|
||||||
//
|
//
|
||||||
// HU_DrawTabRankings
|
// HU_DrawTabRankings
|
||||||
//
|
//
|
||||||
void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer)
|
void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer, INT32 hilicol)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i, j, rightoffset = 240;
|
||||||
const UINT8 *colormap;
|
const UINT8 *colormap;
|
||||||
|
|
||||||
//this function is designed for 9 or less score lines only
|
//this function is designed for 9 or less score lines only
|
||||||
I_Assert(scorelines <= 9);
|
I_Assert(scorelines <= 9);
|
||||||
|
|
||||||
V_DrawFill(1, 26, 318, 1, 0); //Draw a horizontal line because it looks nice!
|
V_DrawFill(1, 26, 318, 1, 0); // Draw a horizontal line because it looks nice!
|
||||||
|
if (scorelines > 9)
|
||||||
|
{
|
||||||
|
V_DrawFill(160, 26, 1, 154, 0); // Draw a vertical line to separate the two sides.
|
||||||
|
V_DrawFill(1, 180, 318, 1, 0); // And a horizontal line near the bottom.
|
||||||
|
rightoffset = 156;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < scorelines; i++)
|
for (i = 0; i < scorelines; i++)
|
||||||
{
|
{
|
||||||
if (players[tab[i].num].spectator)
|
if (players[tab[i].num].spectator || !players[tab[i].num].mo)
|
||||||
continue; //ignore them.
|
continue; //ignore them.
|
||||||
|
|
||||||
if (!splitscreen) // don't draw it on splitscreen,
|
if (!splitscreen) // don't draw it on splitscreen,
|
||||||
|
@ -2141,94 +2130,70 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawString(x + 20, y,
|
V_DrawString(x + 20, y,
|
||||||
((tab[i].num == whiteplayer) ? V_YELLOWMAP : 0)
|
((tab[i].num == whiteplayer)
|
||||||
| ((players[tab[i].num].health > 0) ? 0 : V_60TRANS)
|
? hilicol|V_ALLOWLOWERCASE
|
||||||
| V_ALLOWLOWERCASE, tab[i].name);
|
: V_ALLOWLOWERCASE),
|
||||||
|
tab[i].name);
|
||||||
|
|
||||||
// Draw emeralds
|
if (players[tab[i].num].mo->color)
|
||||||
if (!players[tab[i].num].powers[pw_super]
|
|
||||||
|| ((leveltime/7) & 1))
|
|
||||||
{
|
{
|
||||||
HU_DrawEmeralds(x-12,y+2,tab[i].emeralds);
|
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo->color, GTC_CACHE);
|
||||||
}
|
if (players[tab[i].num].mo->colorized)
|
||||||
|
colormap = R_GetTranslationColormap(TC_RAINBOW, players[tab[i].num].mo->color, GTC_CACHE);
|
||||||
if (players[tab[i].num].health <= 0)
|
|
||||||
V_DrawSmallTranslucentPatch (x, y-4, V_80TRANS, livesback);
|
|
||||||
else
|
|
||||||
V_DrawSmallScaledPatch (x, y-4, 0, livesback);
|
|
||||||
|
|
||||||
if (tab[i].color == 0)
|
|
||||||
{
|
|
||||||
colormap = colormaps;
|
|
||||||
if (players[tab[i].num].powers[pw_super])
|
|
||||||
V_DrawSmallScaledPatch(x, y-4, 0, superprefix[players[tab[i].num].skin]);
|
|
||||||
else
|
else
|
||||||
|
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo->color, GTC_CACHE);
|
||||||
|
|
||||||
|
V_DrawSmallMappedPatch(x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
|
||||||
|
if (G_BattleGametype() && players[tab[i].num].kartstuff[k_bumper] > 0)
|
||||||
{
|
{
|
||||||
if (players[tab[i].num].health <= 0)
|
INT32 bumperx = x-5;
|
||||||
V_DrawSmallTranslucentPatch(x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin]);
|
for (j = 0; j < players[tab[i].num].kartstuff[k_bumper]; j++)
|
||||||
else
|
{
|
||||||
V_DrawSmallScaledPatch(x, y-4, 0, faceprefix[players[tab[i].num].skin]);
|
bumperx -= 3;
|
||||||
}
|
V_DrawSmallMappedPatch(bumperx, y+6, 0, W_CachePatchName("K_BLNICO", PU_CACHE), colormap);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (players[tab[i].num].powers[pw_super])
|
|
||||||
{
|
|
||||||
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
|
|
||||||
V_DrawSmallMappedPatch (x, y-4, 0, superprefix[players[tab[i].num].skin], colormap);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
|
|
||||||
if (players[tab[i].num].health <= 0)
|
|
||||||
V_DrawSmallTranslucentMappedPatch (x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin], colormap);
|
|
||||||
else
|
|
||||||
V_DrawSmallMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_GametypeUsesLives()) //show lives
|
if (G_BattleGametype() && players[tab[i].num].kartstuff[k_bumper] <= 0)
|
||||||
V_DrawRightAlignedString(x, y+4, V_ALLOWLOWERCASE|((players[tab[i].num].health > 0) ? 0 : V_60TRANS), va("%dx", players[tab[i].num].lives));
|
V_DrawSmallScaledPatch(x-2, y-4, 0, W_CachePatchName("K_NOBLNS", PU_CACHE));
|
||||||
else if (G_TagGametype() && players[tab[i].num].pflags & PF_TAGIT)
|
|
||||||
{
|
|
||||||
if (players[tab[i].num].health <= 0)
|
|
||||||
V_DrawSmallTranslucentPatch(x-32, y-4, V_60TRANS, tagico);
|
|
||||||
else
|
|
||||||
V_DrawSmallScaledPatch(x-32, y-4, 0, tagico);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (G_RaceGametype())
|
if (G_RaceGametype())
|
||||||
{
|
{
|
||||||
if (circuitmap)
|
#define timestring(time) va("%i:%02i.%02i", G_TicsToMinutes(time, true), G_TicsToSeconds(time), G_TicsToCentiseconds(time))
|
||||||
|
if (players[tab[i].num].exiting)
|
||||||
{
|
{
|
||||||
if (players[tab[i].num].exiting)
|
V_DrawRightAlignedString(x, y-4, hilicol, "FIN");
|
||||||
V_DrawRightAlignedString(x+240, y, V_YELLOWMAP, va("%d:%02d.%02d",
|
V_DrawRightAlignedString(x+rightoffset, y, hilicol, timestring(players[tab[i].num].realtime));
|
||||||
players[tab[i].num].realtime/(60*TICRATE),
|
}
|
||||||
players[tab[i].num].realtime/TICRATE % 60,
|
else if (players[tab[i].num].pflags & PF_TIMEOVER)
|
||||||
players[tab[i].num].realtime % TICRATE));
|
V_DrawRightAlignedThinString(x+rightoffset, y-1, 0, "TIME OVER...");
|
||||||
//V_DrawRightAlignedString(x+240, y, 0, va("%i:%02i.%02i", G_TicsToMinutes(players[tab[i].num].realtime,true), G_TicsToSeconds(players[tab[i].num].realtime), G_TicsToCentiseconds(players[tab[i].num].realtime)));
|
else if (circuitmap)
|
||||||
else
|
{
|
||||||
V_DrawRightAlignedString(x+240, y, 0, va("(CP%02d) %d:%02d.%02d",
|
V_DrawRightAlignedString(x, y-4, 0, "Lap");
|
||||||
tab[i].count,
|
V_DrawRightAlignedString(x, y+4, 0, va("%d", tab[i].count));
|
||||||
players[tab[i].num].starposttime/(60*TICRATE),
|
V_DrawRightAlignedString(x+rightoffset, y, 0, timestring(players[tab[i].num].starposttime));
|
||||||
players[tab[i].num].starposttime/TICRATE % 60,
|
|
||||||
(int)((players[tab[i].num].starposttime % TICRATE) * (100.00f/TICRATE))));
|
|
||||||
//V_DrawRightAlignedString(x+240, y, ((players[tab[i].num].health > 0) ? 0 : V_60TRANS), va("%u", tab[i].count));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
V_DrawRightAlignedString(x+240, y, ((players[tab[i].num].health > 0) ? 0 : V_60TRANS), va("%i:%02i.%02i", G_TicsToMinutes(tab[i].count,true), G_TicsToSeconds(tab[i].count), G_TicsToCentiseconds(tab[i].count)));
|
V_DrawRightAlignedString(x+rightoffset, y, 0, timestring(tab[i].count));
|
||||||
|
#undef timestring
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
V_DrawRightAlignedString(x+240, y, ((players[tab[i].num].health > 0) ? 0 : V_60TRANS), va("%u", tab[i].count));
|
V_DrawRightAlignedString(x+rightoffset, y, 0, va("%u", tab[i].count));
|
||||||
|
|
||||||
y += 16;
|
y += 16;
|
||||||
|
if (i == 9)
|
||||||
|
{
|
||||||
|
y = 32;
|
||||||
|
x += BASEVIDWIDTH/2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// HU_DrawTeamTabRankings
|
// HU_DrawTeamTabRankings
|
||||||
//
|
//
|
||||||
void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer)
|
/*void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer)
|
||||||
{
|
{
|
||||||
INT32 i,x,y;
|
INT32 i,x,y;
|
||||||
INT32 redplayers = 0, blueplayers = 0;
|
INT32 redplayers = 0, blueplayers = 0;
|
||||||
|
@ -2396,7 +2361,7 @@ void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scoreline
|
||||||
x += BASEVIDWIDTH/2;
|
x += BASEVIDWIDTH/2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//
|
//
|
||||||
// HU_DrawEmeralds
|
// HU_DrawEmeralds
|
||||||
|
@ -2492,12 +2457,22 @@ static void HU_DrawRankings(void)
|
||||||
{
|
{
|
||||||
patch_t *p;
|
patch_t *p;
|
||||||
playersort_t tab[MAXPLAYERS];
|
playersort_t tab[MAXPLAYERS];
|
||||||
INT32 i, j, scorelines;
|
INT32 i, j, scorelines, hilicol, numplayersingame = 0;
|
||||||
boolean completed[MAXPLAYERS];
|
boolean completed[MAXPLAYERS];
|
||||||
UINT32 whiteplayer;
|
UINT32 whiteplayer = MAXPLAYERS;
|
||||||
|
|
||||||
|
if (cons_menuhighlight.value)
|
||||||
|
hilicol = cons_menuhighlight.value;
|
||||||
|
else if (modeattacking)
|
||||||
|
hilicol = V_ORANGEMAP;
|
||||||
|
else
|
||||||
|
hilicol = ((gametype == GT_RACE) ? V_SKYMAP : V_REDMAP);
|
||||||
|
|
||||||
// draw the current gametype in the lower right
|
// draw the current gametype in the lower right
|
||||||
HU_drawGametype();
|
if (modeattacking)
|
||||||
|
V_DrawString(4, 188, hilicol, "Record Attack");
|
||||||
|
else
|
||||||
|
V_DrawString(4, 188, hilicol, gametype_cons_t[gametype].strvalue);
|
||||||
|
|
||||||
if (G_GametypeHasTeams())
|
if (G_GametypeHasTeams())
|
||||||
{
|
{
|
||||||
|
@ -2522,29 +2497,32 @@ static void HU_DrawRankings(void)
|
||||||
{
|
{
|
||||||
if (cv_timelimit.value && timelimitintics > 0)
|
if (cv_timelimit.value && timelimitintics > 0)
|
||||||
{
|
{
|
||||||
INT32 timeval = (timelimitintics+1-leveltime)/TICRATE;
|
UINT32 timeval = (timelimitintics + starttime + 1 - leveltime);
|
||||||
|
if (timeval > timelimitintics+1)
|
||||||
|
timeval = timelimitintics;
|
||||||
|
timeval /= TICRATE;
|
||||||
|
|
||||||
if (leveltime <= timelimitintics)
|
if (leveltime <= (timelimitintics + starttime))
|
||||||
{
|
{
|
||||||
V_DrawCenteredString(64, 8, 0, "TIME LEFT");
|
V_DrawCenteredString(64, 8, 0, "TIME LEFT");
|
||||||
V_DrawCenteredString(64, 16, 0, va("%u", timeval));
|
V_DrawCenteredString(64, 16, hilicol, va("%u", timeval));
|
||||||
}
|
}
|
||||||
|
|
||||||
// overtime
|
// overtime
|
||||||
if ((leveltime > (timelimitintics + TICRATE/2)) && cv_overtime.value)
|
if (!players[consoleplayer].exiting && (leveltime > (timelimitintics + starttime + TICRATE/2)) && cv_overtime.value)
|
||||||
{
|
{
|
||||||
V_DrawCenteredString(64, 8, 0, "TIME LEFT");
|
V_DrawCenteredString(64, 8, 0, "TIME LEFT");
|
||||||
V_DrawCenteredString(64, 16, 0, "OVERTIME");
|
V_DrawCenteredString(64, 16, hilicol, "OVERTIME");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_pointlimit.value > 0)
|
if (cv_pointlimit.value > 0)
|
||||||
{
|
{
|
||||||
V_DrawCenteredString(256, 8, 0, "POINT LIMIT");
|
V_DrawCenteredString(256, 8, 0, "POINT LIMIT");
|
||||||
V_DrawCenteredString(256, 16, 0, va("%d", cv_pointlimit.value));
|
V_DrawCenteredString(256, 16, hilicol, va("%d", cv_pointlimit.value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gametype == GT_COOP)
|
/*else if (gametype == GT_COOP)
|
||||||
{
|
{
|
||||||
INT32 totalscore = 0;
|
INT32 totalscore = 0;
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
@ -2555,19 +2533,23 @@ static void HU_DrawRankings(void)
|
||||||
|
|
||||||
V_DrawCenteredString(256, 8, 0, "TOTAL SCORE");
|
V_DrawCenteredString(256, 8, 0, "TOTAL SCORE");
|
||||||
V_DrawCenteredString(256, 16, 0, va("%u", totalscore));
|
V_DrawCenteredString(256, 16, 0, va("%u", totalscore));
|
||||||
}
|
}*/
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (circuitmap)
|
if (circuitmap)
|
||||||
{
|
{
|
||||||
V_DrawCenteredString(64, 8, 0, "NUMBER OF LAPS");
|
V_DrawCenteredString(64, 8, 0, "LAP COUNT");
|
||||||
V_DrawCenteredString(64, 16, 0, va("%d", cv_numlaps.value));
|
V_DrawCenteredString(64, 16, hilicol, va("%d", cv_numlaps.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
V_DrawCenteredString(256, 8, 0, "GAME SPEED");
|
||||||
|
V_DrawCenteredString(256, 16, hilicol, cv_kartspeed.string);
|
||||||
}
|
}
|
||||||
|
|
||||||
// When you play, you quickly see your score because your name is displayed in white.
|
// When you play, you quickly see your score because your name is displayed in white.
|
||||||
// When playing back a demo, you quickly see who's the view.
|
// When playing back a demo, you quickly see who's the view.
|
||||||
whiteplayer = demoplayback ? displayplayer : consoleplayer;
|
if (!splitscreen)
|
||||||
|
whiteplayer = demoplayback ? displayplayer : consoleplayer;
|
||||||
|
|
||||||
scorelines = 0;
|
scorelines = 0;
|
||||||
memset(completed, 0, sizeof (completed));
|
memset(completed, 0, sizeof (completed));
|
||||||
|
@ -2576,83 +2558,61 @@ static void HU_DrawRankings(void)
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
tab[i].num = -1;
|
tab[i].num = -1;
|
||||||
tab[i].name = 0;
|
tab[i].name = NULL;
|
||||||
|
tab[i].count = INT32_MAX;
|
||||||
|
|
||||||
if (G_RaceGametype() && !circuitmap)
|
if (!playeringame[i] || players[i].spectator)
|
||||||
tab[i].count = INT32_MAX;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (j = 0; j < MAXPLAYERS; j++)
|
|
||||||
{
|
|
||||||
if (!playeringame[j] || players[j].spectator)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
numplayersingame++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (netgame && numplayersingame <= 1)
|
||||||
|
K_drawKartFreePlay(leveltime);
|
||||||
|
|
||||||
|
for (j = 0; j < numplayersingame; j++)
|
||||||
|
{
|
||||||
|
UINT8 lowestposition = MAXPLAYERS;
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (playeringame[i] && !players[i].spectator)
|
if (!playeringame[i] || players[i].spectator || completed[i])
|
||||||
{
|
continue;
|
||||||
if (G_RaceGametype())
|
|
||||||
{
|
if (players[i].kartstuff[k_position] >= lowestposition)
|
||||||
if (circuitmap)
|
continue;
|
||||||
{
|
|
||||||
if ((unsigned)players[i].laps+1 >= tab[scorelines].count && completed[i] == false)
|
tab[scorelines].num = i;
|
||||||
{
|
lowestposition = players[i].kartstuff[k_position];
|
||||||
tab[scorelines].count = players[i].laps+1;
|
|
||||||
tab[scorelines].num = i;
|
|
||||||
tab[scorelines].color = players[i].skincolor;
|
|
||||||
tab[scorelines].name = player_names[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (players[i].realtime <= tab[scorelines].count && completed[i] == false)
|
|
||||||
{
|
|
||||||
tab[scorelines].count = players[i].realtime;
|
|
||||||
tab[scorelines].num = i;
|
|
||||||
tab[scorelines].color = players[i].skincolor;
|
|
||||||
tab[scorelines].name = player_names[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (gametype == GT_COMPETITION)
|
|
||||||
{
|
|
||||||
// todo put something more fitting for the gametype here, such as current
|
|
||||||
// number of categories led
|
|
||||||
if (players[i].score >= tab[scorelines].count && completed[i] == false)
|
|
||||||
{
|
|
||||||
tab[scorelines].count = players[i].score;
|
|
||||||
tab[scorelines].num = i;
|
|
||||||
tab[scorelines].color = players[i].skincolor;
|
|
||||||
tab[scorelines].name = player_names[i];
|
|
||||||
tab[scorelines].emeralds = players[i].powers[pw_emeralds];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (players[i].score >= tab[scorelines].count && completed[i] == false)
|
|
||||||
{
|
|
||||||
tab[scorelines].count = players[i].score;
|
|
||||||
tab[scorelines].num = i;
|
|
||||||
tab[scorelines].color = players[i].skincolor;
|
|
||||||
tab[scorelines].name = player_names[i];
|
|
||||||
tab[scorelines].emeralds = players[i].powers[pw_emeralds];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
completed[tab[scorelines].num] = true;
|
|
||||||
|
i = tab[scorelines].num;
|
||||||
|
|
||||||
|
completed[i] = true;
|
||||||
|
|
||||||
|
tab[scorelines].name = player_names[i];
|
||||||
|
|
||||||
|
if (G_RaceGametype())
|
||||||
|
{
|
||||||
|
if (circuitmap)
|
||||||
|
tab[scorelines].count = players[i].laps+1;
|
||||||
|
else
|
||||||
|
tab[scorelines].count = players[i].realtime;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
tab[scorelines].count = players[i].marescore;
|
||||||
|
|
||||||
scorelines++;
|
scorelines++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scorelines > 20)
|
if (scorelines > 20)
|
||||||
scorelines = 20; //dont draw past bottom of screen, show the best only
|
scorelines = 20; //dont draw past bottom of screen, show the best only
|
||||||
|
|
||||||
if (G_GametypeHasTeams())
|
/*if (G_GametypeHasTeams())
|
||||||
HU_DrawTeamTabRankings(tab, whiteplayer); //separate function for Spazzo's silly request
|
HU_DrawTeamTabRankings(tab, whiteplayer); //separate function for Spazzo's silly request -- gotta fix this up later
|
||||||
else if (scorelines <= 9)
|
else if (scorelines > 10)*/
|
||||||
HU_DrawTabRankings(40, 32, tab, scorelines, whiteplayer);
|
HU_DrawTabRankings(((scorelines > 9) ? 32 : 40), 32, tab, scorelines, whiteplayer, hilicol);
|
||||||
else
|
/*else
|
||||||
HU_DrawDualTabRankings(32, 32, tab, scorelines, whiteplayer);
|
HU_DrawDualTabRankings(32, 32, tab, scorelines, whiteplayer);*/
|
||||||
|
|
||||||
// draw spectators in a ticker across the bottom
|
// draw spectators in a ticker across the bottom
|
||||||
if (!splitscreen && G_GametypeHasSpectators())
|
if (!splitscreen && G_GametypeHasSpectators())
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
//------------------------------------
|
//------------------------------------
|
||||||
// heads up font
|
// heads up font
|
||||||
//------------------------------------
|
//------------------------------------
|
||||||
#define HU_FONTSTART '\x1E' // the first font character
|
#define HU_FONTSTART '\x19' // the first font character
|
||||||
#define HU_FONTEND '~'
|
#define HU_FONTEND '~'
|
||||||
|
|
||||||
#define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1)
|
#define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1)
|
||||||
|
@ -55,8 +55,6 @@ typedef struct
|
||||||
{
|
{
|
||||||
UINT32 count;
|
UINT32 count;
|
||||||
INT32 num;
|
INT32 num;
|
||||||
INT32 color;
|
|
||||||
INT32 emeralds;
|
|
||||||
const char *name;
|
const char *name;
|
||||||
} playersort_t;
|
} playersort_t;
|
||||||
|
|
||||||
|
@ -100,7 +98,7 @@ void HU_Init(void);
|
||||||
void HU_LoadGraphics(void);
|
void HU_LoadGraphics(void);
|
||||||
|
|
||||||
// reset heads up when consoleplayer respawns.
|
// reset heads up when consoleplayer respawns.
|
||||||
FUNCMATH void HU_Start(void);
|
void HU_Start(void);
|
||||||
|
|
||||||
boolean HU_Responder(event_t *ev);
|
boolean HU_Responder(event_t *ev);
|
||||||
|
|
||||||
|
@ -109,10 +107,12 @@ void HU_Drawer(void);
|
||||||
char HU_dequeueChatChar(void);
|
char HU_dequeueChatChar(void);
|
||||||
void HU_Erase(void);
|
void HU_Erase(void);
|
||||||
void HU_clearChatChars(void);
|
void HU_clearChatChars(void);
|
||||||
void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer);
|
|
||||||
void HU_drawPing(INT32 x, INT32 y, INT32 ping, boolean notext); // Lat': Ping drawer for scoreboard.
|
void HU_drawPing(INT32 x, INT32 y, INT32 ping, boolean notext); // Lat': Ping drawer for scoreboard.
|
||||||
void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer);
|
void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer);
|
||||||
void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer);
|
void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer);
|
||||||
|
void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer, INT32 hilicol);
|
||||||
|
//void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer);
|
||||||
|
//void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer);
|
||||||
void HU_DrawEmeralds(INT32 x, INT32 y, INT32 pemeralds);
|
void HU_DrawEmeralds(INT32 x, INT32 y, INT32 pemeralds);
|
||||||
|
|
||||||
INT32 HU_CreateTeamScoresTbl(playersort_t *tab, UINT32 dmtotals[]);
|
INT32 HU_CreateTeamScoresTbl(playersort_t *tab, UINT32 dmtotals[]);
|
||||||
|
|
|
@ -86,10 +86,10 @@ static HMODULE WS_getfunctions(HMODULE tmp)
|
||||||
{
|
{
|
||||||
if (tmp != NULL)
|
if (tmp != NULL)
|
||||||
{
|
{
|
||||||
WS_getaddrinfo = (p_getaddrinfo)GetProcAddress(tmp, "getaddrinfo");
|
WS_getaddrinfo = (p_getaddrinfo)((void *)GetProcAddress(tmp, "getaddrinfo"));
|
||||||
if (WS_getaddrinfo == NULL)
|
if (WS_getaddrinfo == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
WS_freeaddrinfo = (p_freeaddrinfo)GetProcAddress(tmp, "freeaddrinfo");
|
WS_freeaddrinfo = (p_freeaddrinfo)((void *)GetProcAddress(tmp, "freeaddrinfo"));
|
||||||
if (WS_freeaddrinfo == NULL)
|
if (WS_freeaddrinfo == NULL)
|
||||||
{
|
{
|
||||||
WS_getaddrinfo = NULL;
|
WS_getaddrinfo = NULL;
|
||||||
|
|
|
@ -50,7 +50,7 @@ struct JoyType_s
|
||||||
};
|
};
|
||||||
typedef struct JoyType_s JoyType_t;
|
typedef struct JoyType_s JoyType_t;
|
||||||
/** \brief Joystick info
|
/** \brief Joystick info
|
||||||
for palyer 1 and 2's joystick/gamepad
|
for palyer[sic] 1-4's joystick/gamepad
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern JoyType_t Joystick, Joystick2, Joystick3, Joystick4;
|
extern JoyType_t Joystick, Joystick2, Joystick3, Joystick4;
|
||||||
|
|
1188
src/info.c
1188
src/info.c
File diff suppressed because it is too large
Load Diff
381
src/info.h
381
src/info.h
|
@ -164,8 +164,10 @@ void A_DualAction();
|
||||||
void A_RemoteAction();
|
void A_RemoteAction();
|
||||||
void A_ToggleFlameJet();
|
void A_ToggleFlameJet();
|
||||||
void A_ItemPop(); // SRB2kart
|
void A_ItemPop(); // SRB2kart
|
||||||
void A_RedShellChase(); // SRB2kart
|
void A_JawzChase(); // SRB2kart
|
||||||
void A_BobombExplode(); // SRB2kart
|
void A_JawzExplode(); // SRB2kart
|
||||||
|
void A_MineExplode(); // SRB2kart
|
||||||
|
void A_BallhogExplode(); // SRB2kart
|
||||||
void A_OrbitNights();
|
void A_OrbitNights();
|
||||||
void A_GhostMe();
|
void A_GhostMe();
|
||||||
void A_SetObjectState();
|
void A_SetObjectState();
|
||||||
|
@ -580,28 +582,29 @@ typedef enum sprite
|
||||||
|
|
||||||
SPR_RNDM, // Random Item Box
|
SPR_RNDM, // Random Item Box
|
||||||
SPR_RPOP, // Random Item Box Pop
|
SPR_RPOP, // Random Item Box Pop
|
||||||
SPR_KFRE, // Mushroom fire trail
|
SPR_KFRE, // Sneaker fire trail
|
||||||
|
SPR_KINV, // Invincibility sparkle trail
|
||||||
|
SPR_KINF, // Invincibility flash
|
||||||
|
SPR_WIPD, // Wipeout dust trail
|
||||||
SPR_DRIF, // Drift Sparks
|
SPR_DRIF, // Drift Sparks
|
||||||
SPR_DUST, // Drift Dust
|
SPR_DUST, // Drift Dust
|
||||||
|
|
||||||
// Kart Items
|
// Kart Items
|
||||||
SPR_FITM, // Fake Item box
|
SPR_FITM, // Eggman Monitor
|
||||||
SPR_DFAK, // Dead Fake Item
|
|
||||||
SPR_BANA, // Banana Peel
|
SPR_BANA, // Banana Peel
|
||||||
SPR_DBAN, // Dead Banana Peel
|
SPR_ORBN, // Orbinaut
|
||||||
SPR_GSHE, // Green Shell
|
SPR_JAWZ, // Jawz
|
||||||
SPR_DGSH, // Dead Green Shell
|
SPR_SSMN, // SS Mine
|
||||||
SPR_RSHE, // Red Shell
|
SPR_KRBM, // SS Mine BOOM
|
||||||
SPR_DRSH, // Dead Red Shell
|
SPR_BHOG, // Ballhog
|
||||||
SPR_BOMB, // Bob-omb
|
SPR_BHBM, // Ballhog BOOM
|
||||||
SPR_KRBM,
|
SPR_BLIG, // Self-Propelled Bomb
|
||||||
SPR_BLIG, // Blue Lightning
|
SPR_LIGH, // Grow/shrink beams (Metallic Maddness)
|
||||||
SPR_LIGH, // Lightning
|
|
||||||
SPR_SINK, // Kitchen Sink
|
SPR_SINK, // Kitchen Sink
|
||||||
SPR_SITR, // Kitchen Sink Trail
|
SPR_SITR, // Kitchen Sink Trail
|
||||||
SPR_KBLN, // Battle Mode Balloon
|
SPR_KBLN, // Battle Mode Bumper
|
||||||
|
|
||||||
SPR_LAKI, // Lakitu
|
SPR_DEZL, // DEZ Laser respawn
|
||||||
|
|
||||||
// Additional Kart Objects
|
// Additional Kart Objects
|
||||||
SPR_POKE, // Pokey
|
SPR_POKE, // Pokey
|
||||||
|
@ -616,16 +619,25 @@ typedef enum sprite
|
||||||
SPR_SACO, // Sapphire Coast Fauna
|
SPR_SACO, // Sapphire Coast Fauna
|
||||||
SPR_CRAB, // Crystal Abyss mobs
|
SPR_CRAB, // Crystal Abyss mobs
|
||||||
SPR_SHAD, // TD shadows
|
SPR_SHAD, // TD shadows
|
||||||
|
SPR_BRNG, // Chaotix Big Ring
|
||||||
|
|
||||||
SPR_BUMP, // Player/shell bump
|
SPR_BUMP, // Player/shell bump
|
||||||
SPR_FLEN, // Shell hit graphics stuff
|
SPR_FLEN, // Shell hit graphics stuff
|
||||||
SPR_CLAS, // items clash
|
SPR_CLAS, // items clash
|
||||||
SPR_PSHW, // thrown indicator
|
SPR_PSHW, // thrown indicator
|
||||||
|
SPR_ISTA, // instashield layer A
|
||||||
|
SPR_ISTB, // instashield layer B
|
||||||
|
|
||||||
SPR_ARRO, // player arrows
|
SPR_ARRO, // player arrows
|
||||||
|
SPR_ITEM,
|
||||||
|
SPR_ITMI,
|
||||||
|
SPR_ITMN,
|
||||||
|
SPR_WANT,
|
||||||
|
|
||||||
SPR_PBOM, // player bomb
|
SPR_PBOM, // player bomb
|
||||||
|
|
||||||
|
SPR_VIEW, // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw!
|
||||||
|
|
||||||
SPR_FIRSTFREESLOT,
|
SPR_FIRSTFREESLOT,
|
||||||
SPR_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1,
|
SPR_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1,
|
||||||
NUMSPRITES
|
NUMSPRITES
|
||||||
|
@ -2647,15 +2659,9 @@ typedef enum state
|
||||||
S_FIREBALL2,
|
S_FIREBALL2,
|
||||||
S_FIREBALL3,
|
S_FIREBALL3,
|
||||||
S_FIREBALL4,
|
S_FIREBALL4,
|
||||||
S_FIREBALL5,
|
|
||||||
S_FIREBALL6,
|
|
||||||
S_FIREBALL7,
|
|
||||||
S_FIREBALLEXP1,
|
S_FIREBALLEXP1,
|
||||||
S_FIREBALLEXP2,
|
S_FIREBALLEXP2,
|
||||||
S_FIREBALLEXP3,
|
S_FIREBALLEXP3,
|
||||||
S_FIREBALLEXP4,
|
|
||||||
S_FIREBALLEXP5,
|
|
||||||
S_FIREBALLEXP6,
|
|
||||||
S_SHELL,
|
S_SHELL,
|
||||||
S_SHELL1,
|
S_SHELL1,
|
||||||
S_SHELL2,
|
S_SHELL2,
|
||||||
|
@ -3085,7 +3091,7 @@ typedef enum state
|
||||||
|
|
||||||
// Magnet Burst
|
// Magnet Burst
|
||||||
|
|
||||||
// Mushroom Fire Trail
|
// Sneaker Fire Trail
|
||||||
S_KARTFIRE1,
|
S_KARTFIRE1,
|
||||||
S_KARTFIRE2,
|
S_KARTFIRE2,
|
||||||
S_KARTFIRE3,
|
S_KARTFIRE3,
|
||||||
|
@ -3095,7 +3101,33 @@ typedef enum state
|
||||||
S_KARTFIRE7,
|
S_KARTFIRE7,
|
||||||
S_KARTFIRE8,
|
S_KARTFIRE8,
|
||||||
|
|
||||||
//{ Fake Item
|
// Invincibility Sparks
|
||||||
|
S_KARTINVULN_SMALL1,
|
||||||
|
S_KARTINVULN_SMALL2,
|
||||||
|
S_KARTINVULN_SMALL3,
|
||||||
|
S_KARTINVULN_SMALL4,
|
||||||
|
S_KARTINVULN_SMALL5,
|
||||||
|
|
||||||
|
S_KARTINVULN_LARGE1,
|
||||||
|
S_KARTINVULN_LARGE2,
|
||||||
|
S_KARTINVULN_LARGE3,
|
||||||
|
S_KARTINVULN_LARGE4,
|
||||||
|
S_KARTINVULN_LARGE5,
|
||||||
|
|
||||||
|
// Invincibility flash
|
||||||
|
S_INVULNFLASH1,
|
||||||
|
S_INVULNFLASH2,
|
||||||
|
S_INVULNFLASH3,
|
||||||
|
S_INVULNFLASH4,
|
||||||
|
|
||||||
|
// Wipeout dust trail
|
||||||
|
S_WIPEOUTTRAIL1,
|
||||||
|
S_WIPEOUTTRAIL2,
|
||||||
|
S_WIPEOUTTRAIL3,
|
||||||
|
S_WIPEOUTTRAIL4,
|
||||||
|
S_WIPEOUTTRAIL5,
|
||||||
|
|
||||||
|
//{ Eggman Monitor
|
||||||
S_FAKEITEM1,
|
S_FAKEITEM1,
|
||||||
S_FAKEITEM2,
|
S_FAKEITEM2,
|
||||||
S_FAKEITEM3,
|
S_FAKEITEM3,
|
||||||
|
@ -3124,81 +3156,74 @@ typedef enum state
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// Banana
|
// Banana
|
||||||
S_BANANAITEM,
|
S_BANANA,
|
||||||
S_DEADBANANA,
|
S_BANANA_DEAD,
|
||||||
|
|
||||||
//{ Green Shell
|
//{ Orbinaut
|
||||||
S_TRIPLEGREENSHIELD1,
|
S_ORBINAUT1,
|
||||||
S_TRIPLEGREENSHIELD2,
|
S_ORBINAUT2,
|
||||||
S_TRIPLEGREENSHIELD3,
|
S_ORBINAUT3,
|
||||||
S_TRIPLEGREENSHIELD4,
|
S_ORBINAUT4,
|
||||||
S_TRIPLEGREENSHIELD5,
|
S_ORBINAUT5,
|
||||||
S_TRIPLEGREENSHIELD6,
|
S_ORBINAUT6,
|
||||||
S_TRIPLEGREENSHIELD7,
|
S_ORBINAUT_SHIELD,
|
||||||
S_TRIPLEGREENSHIELD8,
|
S_ORBINAUT_DEAD,
|
||||||
S_GREENSHIELD1,
|
S_ORBINAUT_SHIELDDEAD,
|
||||||
S_GREENSHIELD2,
|
|
||||||
S_GREENSHIELD3,
|
|
||||||
S_GREENSHIELD4,
|
|
||||||
S_GREENSHIELD5,
|
|
||||||
S_GREENSHIELD6,
|
|
||||||
S_GREENSHIELD7,
|
|
||||||
S_GREENSHIELD8,
|
|
||||||
S_GREENITEM1,
|
|
||||||
S_GREENITEM2,
|
|
||||||
S_GREENITEM3,
|
|
||||||
S_GREENITEM4,
|
|
||||||
S_GREENITEM5,
|
|
||||||
S_GREENITEM6,
|
|
||||||
S_GREENITEM7,
|
|
||||||
S_GREENITEM8,
|
|
||||||
S_DEADGREEN,
|
|
||||||
//}
|
//}
|
||||||
//{ Red Shell
|
//{ Jawz
|
||||||
S_TRIPLEREDSHIELD1,
|
S_JAWZ1,
|
||||||
S_TRIPLEREDSHIELD2,
|
S_JAWZ2,
|
||||||
S_TRIPLEREDSHIELD3,
|
S_JAWZ3,
|
||||||
S_TRIPLEREDSHIELD4,
|
S_JAWZ4,
|
||||||
S_TRIPLEREDSHIELD5,
|
S_JAWZ5,
|
||||||
S_TRIPLEREDSHIELD6,
|
S_JAWZ6,
|
||||||
S_TRIPLEREDSHIELD7,
|
S_JAWZ7,
|
||||||
S_TRIPLEREDSHIELD8,
|
S_JAWZ8,
|
||||||
S_REDSHIELD1,
|
S_JAWZ_DUD1,
|
||||||
S_REDSHIELD2,
|
S_JAWZ_DUD2,
|
||||||
S_REDSHIELD3,
|
S_JAWZ_DUD3,
|
||||||
S_REDSHIELD4,
|
S_JAWZ_DUD4,
|
||||||
S_REDSHIELD5,
|
S_JAWZ_DUD5,
|
||||||
S_REDSHIELD6,
|
S_JAWZ_DUD6,
|
||||||
S_REDSHIELD7,
|
S_JAWZ_DUD7,
|
||||||
S_REDSHIELD8,
|
S_JAWZ_DUD8,
|
||||||
S_REDITEM1,
|
S_JAWZ_SHIELD1,
|
||||||
S_REDITEM2,
|
S_JAWZ_SHIELD2,
|
||||||
S_REDITEM3,
|
S_JAWZ_SHIELD3,
|
||||||
S_REDITEM4,
|
S_JAWZ_SHIELD4,
|
||||||
S_REDITEM5,
|
S_JAWZ_SHIELD5,
|
||||||
S_REDITEM6,
|
S_JAWZ_SHIELD6,
|
||||||
S_REDITEM7,
|
S_JAWZ_SHIELD7,
|
||||||
S_REDITEM8,
|
S_JAWZ_SHIELD8,
|
||||||
S_DEADRED,
|
S_JAWZ_DEAD1,
|
||||||
|
S_JAWZ_DEAD2,
|
||||||
//}
|
//}
|
||||||
|
|
||||||
S_FIRETRAIL1,
|
// Special Stage Mine
|
||||||
S_FIRETRAIL2,
|
S_SSMINE1,
|
||||||
S_FIRETRAIL3,
|
S_SSMINE2,
|
||||||
S_FIRETRAIL4,
|
S_SSMINE3,
|
||||||
S_FIRETRAIL5,
|
S_SSMINE4,
|
||||||
S_FIRETRAIL6,
|
S_SSMINE_SHIELD1,
|
||||||
S_FIRETRAIL7,
|
S_SSMINE_SHIELD2,
|
||||||
S_FIRETRAIL8,
|
S_SSMINE_AIR1,
|
||||||
S_FIRETRAIL9,
|
S_SSMINE_AIR2,
|
||||||
|
S_SSMINE_DEPLOY1,
|
||||||
// Bob-omb
|
S_SSMINE_DEPLOY2,
|
||||||
S_BOMBSHIELD,
|
S_SSMINE_DEPLOY3,
|
||||||
S_BOMBITEM,
|
S_SSMINE_DEPLOY4,
|
||||||
S_BOMBAIR,
|
S_SSMINE_DEPLOY5,
|
||||||
S_BOMBEXPLODE,
|
S_SSMINE_DEPLOY6,
|
||||||
S_BOMBEXPLOSION1,
|
S_SSMINE_DEPLOY7,
|
||||||
S_BOMBEXPLOSION2,
|
S_SSMINE_DEPLOY8,
|
||||||
|
S_SSMINE_DEPLOY9,
|
||||||
|
S_SSMINE_DEPLOY10,
|
||||||
|
S_SSMINE_DEPLOY11,
|
||||||
|
S_SSMINE_DEPLOY12,
|
||||||
|
S_SSMINE_DEPLOY13,
|
||||||
|
S_SSMINE_EXPLODE,
|
||||||
|
S_MINEEXPLOSION1,
|
||||||
|
S_MINEEXPLOSION2,
|
||||||
|
|
||||||
// New explosion
|
// New explosion
|
||||||
S_QUICKBOOM1,
|
S_QUICKBOOM1,
|
||||||
|
@ -3223,14 +3248,41 @@ typedef enum state
|
||||||
S_SLOWBOOM9,
|
S_SLOWBOOM9,
|
||||||
S_SLOWBOOM10,
|
S_SLOWBOOM10,
|
||||||
|
|
||||||
// Blue Shell - Blue Lightning for now...
|
// Ballhog
|
||||||
|
S_BALLHOG1,
|
||||||
|
S_BALLHOG2,
|
||||||
|
S_BALLHOG3,
|
||||||
|
S_BALLHOG4,
|
||||||
|
S_BALLHOG5,
|
||||||
|
S_BALLHOG6,
|
||||||
|
S_BALLHOG7,
|
||||||
|
S_BALLHOG8,
|
||||||
|
S_BALLHOG_DEAD,
|
||||||
|
S_BALLHOGBOOM1,
|
||||||
|
S_BALLHOGBOOM2,
|
||||||
|
S_BALLHOGBOOM3,
|
||||||
|
S_BALLHOGBOOM4,
|
||||||
|
S_BALLHOGBOOM5,
|
||||||
|
S_BALLHOGBOOM6,
|
||||||
|
S_BALLHOGBOOM7,
|
||||||
|
S_BALLHOGBOOM8,
|
||||||
|
S_BALLHOGBOOM9,
|
||||||
|
S_BALLHOGBOOM10,
|
||||||
|
S_BALLHOGBOOM11,
|
||||||
|
S_BALLHOGBOOM12,
|
||||||
|
S_BALLHOGBOOM13,
|
||||||
|
S_BALLHOGBOOM14,
|
||||||
|
S_BALLHOGBOOM15,
|
||||||
|
S_BALLHOGBOOM16,
|
||||||
|
|
||||||
|
// Self-Propelled Bomb - just an explosion for now...
|
||||||
S_BLUELIGHTNING1,
|
S_BLUELIGHTNING1,
|
||||||
S_BLUELIGHTNING2,
|
S_BLUELIGHTNING2,
|
||||||
S_BLUELIGHTNING3,
|
S_BLUELIGHTNING3,
|
||||||
S_BLUELIGHTNING4,
|
S_BLUELIGHTNING4,
|
||||||
S_BLUEEXPLODE,
|
S_BLUEEXPLODE,
|
||||||
|
|
||||||
// Lightning
|
// Size-Down
|
||||||
S_LIGHTNING1,
|
S_LIGHTNING1,
|
||||||
S_LIGHTNING2,
|
S_LIGHTNING2,
|
||||||
S_LIGHTNING3,
|
S_LIGHTNING3,
|
||||||
|
@ -3242,14 +3294,13 @@ typedef enum state
|
||||||
S_SINKTRAIL2,
|
S_SINKTRAIL2,
|
||||||
S_SINKTRAIL3,
|
S_SINKTRAIL3,
|
||||||
|
|
||||||
// Battle Mode balloons
|
// Battle Mode bumpers
|
||||||
S_BATTLEBALLOON1,
|
S_BATTLEBUMPER1,
|
||||||
S_BATTLEBALLOON2,
|
S_BATTLEBUMPER2,
|
||||||
S_BATTLEBALLOON3,
|
S_BATTLEBUMPER3,
|
||||||
|
|
||||||
// Lakitu
|
// DEZ Laser respawn
|
||||||
S_LAKITU1,
|
S_DEZLASER,
|
||||||
S_LAKITU2,
|
|
||||||
|
|
||||||
// Pokey
|
// Pokey
|
||||||
S_POKEY1,
|
S_POKEY1,
|
||||||
|
@ -3329,15 +3380,22 @@ typedef enum state
|
||||||
S_DOOD_BOX4,
|
S_DOOD_BOX4,
|
||||||
S_DOOD_BOX5,
|
S_DOOD_BOX5,
|
||||||
|
|
||||||
// D00Dkart - Diddy Kong Racing Balloon
|
// D00Dkart - Diddy Kong Racing Bumper
|
||||||
S_DOOD_BALLOON,
|
S_DOOD_BALLOON,
|
||||||
|
|
||||||
// D00Dkart - Big Ring
|
// Chaotix Big Ring
|
||||||
S_DOOD_RING1,
|
S_BIGRING01,
|
||||||
S_DOOD_RING2,
|
S_BIGRING02,
|
||||||
S_DOOD_RING3,
|
S_BIGRING03,
|
||||||
S_DOOD_RING4,
|
S_BIGRING04,
|
||||||
S_DOOD_RING5,
|
S_BIGRING05,
|
||||||
|
S_BIGRING06,
|
||||||
|
S_BIGRING07,
|
||||||
|
S_BIGRING08,
|
||||||
|
S_BIGRING09,
|
||||||
|
S_BIGRING10,
|
||||||
|
S_BIGRING11,
|
||||||
|
S_BIGRING12,
|
||||||
|
|
||||||
// SNES Objects
|
// SNES Objects
|
||||||
S_SNES_DONUTBUSH1,
|
S_SNES_DONUTBUSH1,
|
||||||
|
@ -3409,28 +3467,38 @@ typedef enum state
|
||||||
S_FIREDITEM3,
|
S_FIREDITEM3,
|
||||||
S_FIREDITEM4,
|
S_FIREDITEM4,
|
||||||
|
|
||||||
|
S_INSTASHIELDA1, // No damage instashield effect
|
||||||
|
S_INSTASHIELDA2,
|
||||||
|
S_INSTASHIELDA3,
|
||||||
|
S_INSTASHIELDA4,
|
||||||
|
S_INSTASHIELDA5,
|
||||||
|
S_INSTASHIELDA6,
|
||||||
|
S_INSTASHIELDA7,
|
||||||
|
S_INSTASHIELDB1,
|
||||||
|
S_INSTASHIELDB2,
|
||||||
|
S_INSTASHIELDB3,
|
||||||
|
S_INSTASHIELDB4,
|
||||||
|
S_INSTASHIELDB5,
|
||||||
|
S_INSTASHIELDB6,
|
||||||
|
S_INSTASHIELDB7,
|
||||||
|
|
||||||
S_PLAYERARROW, // Above player arrow
|
S_PLAYERARROW, // Above player arrow
|
||||||
S_PLAYERARROW_MUSHROOM,
|
S_PLAYERARROW_BOX,
|
||||||
S_PLAYERARROW_GREENSHELL,
|
S_PLAYERARROW_ITEM,
|
||||||
S_PLAYERARROW_BANANA,
|
S_PLAYERARROW_NUMBER,
|
||||||
S_PLAYERARROW_FAKEITEM,
|
S_PLAYERARROW_X,
|
||||||
S_PLAYERARROW_BOO,
|
S_PLAYERARROW_WANTED1,
|
||||||
S_PLAYERARROW_FEATHER,
|
S_PLAYERARROW_WANTED2,
|
||||||
S_PLAYERARROW_REDSHELL,
|
S_PLAYERARROW_WANTED3,
|
||||||
S_PLAYERARROW_BOBOMB,
|
S_PLAYERARROW_WANTED4,
|
||||||
S_PLAYERARROW_FIREFLOWER,
|
S_PLAYERARROW_WANTED5,
|
||||||
S_PLAYERARROW_TRIPLEGREENSHELL,
|
S_PLAYERARROW_WANTED6,
|
||||||
S_PLAYERARROW_TRIPLEBANANA,
|
S_PLAYERARROW_WANTED7,
|
||||||
S_PLAYERARROW_TRIPLEREDSHELL,
|
|
||||||
S_PLAYERARROW_STAR,
|
|
||||||
S_PLAYERARROW_MEGASHROOM,
|
|
||||||
S_PLAYERARROW_KITCHENSINK,
|
|
||||||
S_PLAYERARROW_EMPTY,
|
|
||||||
S_PLAYERARROW_ROULETTE,
|
|
||||||
|
|
||||||
S_PLAYERBOMB,
|
S_PLAYERBOMB,
|
||||||
S_PLAYERITEM,
|
S_PLAYERITEM,
|
||||||
S_PLAYERWHEEL,
|
|
||||||
|
S_KARMAWHEEL,
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
S_NAMECHECK,
|
S_NAMECHECK,
|
||||||
|
@ -3966,52 +4034,48 @@ typedef enum mobj_type
|
||||||
MT_RANDOMITEM,
|
MT_RANDOMITEM,
|
||||||
MT_RANDOMITEMPOP,
|
MT_RANDOMITEMPOP,
|
||||||
|
|
||||||
MT_MUSHROOMTRAIL,
|
MT_SNEAKERTRAIL,
|
||||||
|
MT_SPARKLETRAIL,
|
||||||
|
MT_INVULNFLASH,
|
||||||
|
MT_WIPEOUTTRAIL,
|
||||||
MT_DRIFT,
|
MT_DRIFT,
|
||||||
MT_DRIFTDUST,
|
MT_DRIFTDUST,
|
||||||
|
|
||||||
MT_FAKESHIELD,
|
MT_FAKESHIELD,
|
||||||
MT_FAKEITEM,
|
MT_FAKEITEM,
|
||||||
|
|
||||||
MT_TRIPLEBANANASHIELD1, // Banana Stuff
|
MT_BANANA, // Banana Stuff
|
||||||
MT_TRIPLEBANANASHIELD2,
|
MT_BANANA_SHIELD,
|
||||||
MT_TRIPLEBANANASHIELD3,
|
|
||||||
MT_BANANASHIELD,
|
|
||||||
MT_BANANAITEM,
|
|
||||||
|
|
||||||
MT_TRIPLEGREENSHIELD1, // Green shell stuff
|
MT_ORBINAUT, // Orbinaut stuff
|
||||||
MT_TRIPLEGREENSHIELD2,
|
MT_ORBINAUT_SHIELD,
|
||||||
MT_TRIPLEGREENSHIELD3,
|
|
||||||
MT_GREENSHIELD,
|
|
||||||
MT_GREENITEM,
|
|
||||||
MT_FIRETRAIL,
|
|
||||||
|
|
||||||
MT_TRIPLEREDSHIELD1, // Red shell stuff
|
MT_JAWZ, // Jawz stuff
|
||||||
MT_TRIPLEREDSHIELD2,
|
MT_JAWZ_DUD,
|
||||||
MT_TRIPLEREDSHIELD3,
|
MT_JAWZ_SHIELD,
|
||||||
MT_REDSHIELD,
|
|
||||||
MT_REDITEM,
|
|
||||||
MT_REDITEMDUD,
|
|
||||||
|
|
||||||
MT_BOMBSHIELD, // Bob-omb stuff
|
MT_SSMINE, // Mine stuff
|
||||||
MT_BOMBITEM,
|
MT_SSMINE_SHIELD,
|
||||||
MT_BOMBEXPLOSION,
|
MT_MINEEXPLOSION,
|
||||||
MT_BOMBEXPLOSIONSOUND,
|
MT_MINEEXPLOSIONSOUND,
|
||||||
|
|
||||||
MT_SMOLDERING, // New explosion
|
MT_SMOLDERING, // New explosion
|
||||||
MT_BOOMEXPLODE,
|
MT_BOOMEXPLODE,
|
||||||
MT_BOOMPARTICLE,
|
MT_BOOMPARTICLE,
|
||||||
|
|
||||||
MT_BLUELIGHTNING, // Lightning stuff
|
MT_BALLHOG, // Ballhog
|
||||||
|
MT_BALLHOGBOOM,
|
||||||
|
|
||||||
|
MT_BLUELIGHTNING, // Grow/shrink stuff
|
||||||
MT_BLUEEXPLOSION,
|
MT_BLUEEXPLOSION,
|
||||||
MT_LIGHTNING,
|
MT_LIGHTNING,
|
||||||
|
|
||||||
MT_SINK, // Kitchen Sink Stuff
|
MT_SINK, // Kitchen Sink Stuff
|
||||||
MT_SINKTRAIL,
|
MT_SINKTRAIL,
|
||||||
|
|
||||||
MT_BATTLEBALLOON, // Battle Mode balloons
|
MT_BATTLEBUMPER, // Battle Mode bumpers
|
||||||
|
|
||||||
MT_LAKITU,
|
MT_DEZLASER,
|
||||||
|
|
||||||
MT_POKEY, // Huh, thought this was a default asset for some reason, guess not.
|
MT_POKEY, // Huh, thought this was a default asset for some reason, guess not.
|
||||||
|
|
||||||
|
@ -4047,7 +4111,7 @@ typedef enum mobj_type
|
||||||
MT_DOOD_FLOWER4,
|
MT_DOOD_FLOWER4,
|
||||||
MT_DOOD_BOX,
|
MT_DOOD_BOX,
|
||||||
MT_DOOD_BALLOON,
|
MT_DOOD_BALLOON,
|
||||||
MT_DOOD_RING,
|
MT_BIGRING,
|
||||||
|
|
||||||
MT_SNES_DONUTBUSH1,
|
MT_SNES_DONUTBUSH1,
|
||||||
MT_SNES_DONUTBUSH2,
|
MT_SNES_DONUTBUSH2,
|
||||||
|
@ -4082,7 +4146,14 @@ typedef enum mobj_type
|
||||||
|
|
||||||
MT_FIREDITEM,
|
MT_FIREDITEM,
|
||||||
|
|
||||||
|
MT_INSTASHIELDA,
|
||||||
|
MT_INSTASHIELDB,
|
||||||
|
|
||||||
MT_PLAYERARROW,
|
MT_PLAYERARROW,
|
||||||
|
MT_PLAYERWANTED,
|
||||||
|
|
||||||
|
MT_KARMAHITBOX,
|
||||||
|
MT_KARMAWHEEL,
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
MT_NAMECHECK,
|
MT_NAMECHECK,
|
||||||
|
|
5524
src/k_kart.c
5524
src/k_kart.c
File diff suppressed because it is too large
Load Diff
28
src/k_kart.h
28
src/k_kart.h
|
@ -11,42 +11,54 @@
|
||||||
|
|
||||||
UINT8 colortranslations[MAXSKINCOLORS][16];
|
UINT8 colortranslations[MAXSKINCOLORS][16];
|
||||||
extern const char *KartColor_Names[MAXSKINCOLORS];
|
extern const char *KartColor_Names[MAXSKINCOLORS];
|
||||||
void K_StarmanColormap(UINT8 *dest_colormap, UINT8 skincolor);
|
extern const UINT8 KartColor_Opposite[MAXSKINCOLORS*2];
|
||||||
|
void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor);
|
||||||
void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color);
|
void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color);
|
||||||
UINT8 K_GetKartColorByName(const char *name);
|
UINT8 K_GetKartColorByName(const char *name);
|
||||||
|
|
||||||
void K_RegisterKartStuff(void);
|
void K_RegisterKartStuff(void);
|
||||||
|
|
||||||
boolean K_IsPlayerLosing(player_t *player);
|
boolean K_IsPlayerLosing(player_t *player);
|
||||||
|
boolean K_IsPlayerWanted(player_t *player);
|
||||||
void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid);
|
void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid);
|
||||||
void K_LakituChecker(player_t *player);
|
void K_RespawnChecker(player_t *player);
|
||||||
void K_KartMoveAnimation(player_t *player);
|
void K_KartMoveAnimation(player_t *player);
|
||||||
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
|
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
|
||||||
void K_KartPlayerAfterThink(player_t *player);
|
void K_KartPlayerAfterThink(player_t *player);
|
||||||
void K_SpinPlayer(player_t *player, mobj_t *source);
|
void K_DoInstashield(player_t *player);
|
||||||
|
void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem);
|
||||||
void K_SquishPlayer(player_t *player, mobj_t *source);
|
void K_SquishPlayer(player_t *player, mobj_t *source);
|
||||||
void K_ExplodePlayer(player_t *player, mobj_t *source);
|
void K_ExplodePlayer(player_t *player, mobj_t *source);
|
||||||
void K_StealBalloon(player_t *player, player_t *victim, boolean force);
|
void K_StealBumper(player_t *player, player_t *victim, boolean force);
|
||||||
void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 number, mobjtype_t type, angle_t rotangle, boolean spawncenter, boolean ghostit, mobj_t *source);
|
void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 number, mobjtype_t type, angle_t rotangle, boolean spawncenter, boolean ghostit, mobj_t *source);
|
||||||
void K_SpawnBobombExplosion(mobj_t *source, UINT8 color);
|
void K_SpawnMineExplosion(mobj_t *source, UINT8 color);
|
||||||
void K_SpawnBoostTrail(player_t *player);
|
void K_SpawnBoostTrail(player_t *player);
|
||||||
|
void K_SpawnSparkleTrail(mobj_t *mo);
|
||||||
|
void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent);
|
||||||
void K_DriftDustHandling(mobj_t *spawner);
|
void K_DriftDustHandling(mobj_t *spawner);
|
||||||
void K_DoMushroom(player_t *player, boolean doPFlag);
|
void K_DoSneaker(player_t *player, boolean doPFlag);
|
||||||
void K_DoBouncePad(mobj_t *mo, fixed_t vertispeed);
|
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, boolean mute);
|
||||||
|
void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source);
|
||||||
|
void K_RepairOrbitChain(mobj_t *orbit);
|
||||||
boolean K_CheckPlayersRespawnColliding(INT32 playernum, fixed_t x, fixed_t y);
|
boolean K_CheckPlayersRespawnColliding(INT32 playernum, fixed_t x, fixed_t y);
|
||||||
INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue);
|
INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue);
|
||||||
|
fixed_t K_GetKartDriftSparkValue(player_t *player);
|
||||||
|
void K_StripItems(player_t *player);
|
||||||
void K_MomentumToFacing(player_t *player);
|
void K_MomentumToFacing(player_t *player);
|
||||||
fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower);
|
fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower);
|
||||||
fixed_t K_GetKartAccel(player_t *player);
|
fixed_t K_GetKartAccel(player_t *player);
|
||||||
UINT16 K_GetKartFlashing(void);
|
UINT16 K_GetKartFlashing(void);
|
||||||
fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove);
|
fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove);
|
||||||
void K_MoveKartPlayer(player_t *player, boolean onground);
|
void K_MoveKartPlayer(player_t *player, boolean onground);
|
||||||
void K_CheckBalloons(void);
|
void K_CalculateBattleWanted(void);
|
||||||
|
void K_CheckBumpers(void);
|
||||||
|
void K_CheckSpectateStatus(void);
|
||||||
|
|
||||||
INT32 K_calcSplitFlags(INT32 snapflags);
|
INT32 K_calcSplitFlags(INT32 snapflags);
|
||||||
void K_LoadKartHUDGraphics(void);
|
void K_LoadKartHUDGraphics(void);
|
||||||
fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my);
|
fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my);
|
||||||
void K_drawKartHUD(void);
|
void K_drawKartHUD(void);
|
||||||
|
void K_drawKartFreePlay(UINT32 flashtime);
|
||||||
void K_LoadIconGraphics(char *facestr, INT32 skinnum);
|
void K_LoadIconGraphics(char *facestr, INT32 skinnum);
|
||||||
void K_ReloadSkinIconGraphics(void);
|
void K_ReloadSkinIconGraphics(void);
|
||||||
|
|
||||||
|
|
|
@ -628,6 +628,16 @@ static int lib_pCanRunOnWater(lua_State *L)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_pSpawnShadowMobj(lua_State *L)
|
||||||
|
{
|
||||||
|
mobj_t *caster = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
NOHUD
|
||||||
|
if (!caster)
|
||||||
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
|
P_SpawnShadowMobj(caster);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// P_USER
|
// P_USER
|
||||||
////////////
|
////////////
|
||||||
|
|
||||||
|
@ -932,7 +942,7 @@ static int lib_pHomingAttack(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lib_pSuperReady(lua_State *L)
|
/*static int lib_pSuperReady(lua_State *L)
|
||||||
{
|
{
|
||||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
//HUDSAFE
|
//HUDSAFE
|
||||||
|
@ -940,7 +950,7 @@ static int lib_pSuperReady(lua_State *L)
|
||||||
return LUA_ErrInvalid(L, "player_t");
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
lua_pushboolean(L, P_SuperReady(player));
|
lua_pushboolean(L, P_SuperReady(player));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
static int lib_pDoJump(lua_State *L)
|
static int lib_pDoJump(lua_State *L)
|
||||||
{
|
{
|
||||||
|
@ -2038,6 +2048,26 @@ static int lib_kGetKartColorByName(lua_State *L)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_kIsPlayerLosing(lua_State *L)
|
||||||
|
{
|
||||||
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
|
//HUDSAFE
|
||||||
|
if (!player)
|
||||||
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
|
K_IsPlayerLosing(player);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int lib_kIsPlayerWanted(lua_State *L)
|
||||||
|
{
|
||||||
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
|
//HUDSAFE
|
||||||
|
if (!player)
|
||||||
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
|
K_IsPlayerWanted(player);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int lib_kKartBouncing(lua_State *L)
|
static int lib_kKartBouncing(lua_State *L)
|
||||||
{
|
{
|
||||||
mobj_t *mobj1 = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
mobj_t *mobj1 = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
@ -2053,16 +2083,28 @@ static int lib_kKartBouncing(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_kDoInstashield(lua_State *L)
|
||||||
|
{
|
||||||
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
|
NOHUD
|
||||||
|
if (!player)
|
||||||
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
|
K_DoInstashield(player);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int lib_kSpinPlayer(lua_State *L)
|
static int lib_kSpinPlayer(lua_State *L)
|
||||||
{
|
{
|
||||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
|
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
|
||||||
|
INT32 type = (INT32)luaL_checkinteger(L, 3);
|
||||||
|
boolean trapitem = luaL_checkboolean(L, 4);
|
||||||
NOHUD
|
NOHUD
|
||||||
if (!player)
|
if (!player)
|
||||||
return LUA_ErrInvalid(L, "player_t");
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
if (!source)
|
if (!source)
|
||||||
return LUA_ErrInvalid(L, "mobj_t");
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
K_SpinPlayer(player, source);
|
K_SpinPlayer(player, source, type, trapitem);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2092,7 +2134,7 @@ static int lib_kExplodePlayer(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lib_kStealBalloon(lua_State *L)
|
static int lib_kStealBumper(lua_State *L)
|
||||||
{
|
{
|
||||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
player_t *victim = *((player_t **)luaL_checkudata(L, 2, META_PLAYER));
|
player_t *victim = *((player_t **)luaL_checkudata(L, 2, META_PLAYER));
|
||||||
|
@ -2102,7 +2144,7 @@ static int lib_kStealBalloon(lua_State *L)
|
||||||
return LUA_ErrInvalid(L, "player_t");
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
if (!victim)
|
if (!victim)
|
||||||
return LUA_ErrInvalid(L, "player_t");
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
K_StealBalloon(player, victim, force);
|
K_StealBumper(player, victim, force);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2125,7 +2167,7 @@ static int lib_kSpawnKartExplosion(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lib_kSpawnDriftTrail(lua_State *L)
|
static int lib_kSpawnBoostTrail(lua_State *L)
|
||||||
{
|
{
|
||||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
NOHUD
|
NOHUD
|
||||||
|
@ -2135,6 +2177,27 @@ static int lib_kSpawnDriftTrail(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_kSpawnSparkleTrail(lua_State *L)
|
||||||
|
{
|
||||||
|
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
NOHUD
|
||||||
|
if (!mo)
|
||||||
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
|
K_SpawnSparkleTrail(mo);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int lib_kSpawnWipeoutTrail(lua_State *L)
|
||||||
|
{
|
||||||
|
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
boolean translucent = luaL_checkboolean(L, 2);
|
||||||
|
NOHUD
|
||||||
|
if (!mo)
|
||||||
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
|
K_SpawnWipeoutTrail(mo, translucent);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int lib_kDriftDustHandling(lua_State *L)
|
static int lib_kDriftDustHandling(lua_State *L)
|
||||||
{
|
{
|
||||||
mobj_t *spawner = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
mobj_t *spawner = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
@ -2145,25 +2208,52 @@ static int lib_kDriftDustHandling(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lib_kDoMushroom(lua_State *L)
|
static int lib_kDoSneaker(lua_State *L)
|
||||||
{
|
{
|
||||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
boolean doPFlag = luaL_checkboolean(L, 2);
|
boolean doPFlag = luaL_checkboolean(L, 2);
|
||||||
NOHUD
|
NOHUD
|
||||||
if (!player)
|
if (!player)
|
||||||
return LUA_ErrInvalid(L, "player_t");
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
K_DoMushroom(player, doPFlag);
|
K_DoSneaker(player, doPFlag);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lib_kDoBouncePad(lua_State *L)
|
static int lib_kDoPogoSpring(lua_State *L)
|
||||||
{
|
{
|
||||||
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
fixed_t vertispeed = luaL_checkfixed(L, 2);
|
fixed_t vertispeed = luaL_checkfixed(L, 2);
|
||||||
|
boolean mute = luaL_checkboolean(L, 3);
|
||||||
NOHUD
|
NOHUD
|
||||||
if (!mo)
|
if (!mo)
|
||||||
return LUA_ErrInvalid(L, "mobj_t");
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
K_DoBouncePad(mo, vertispeed);
|
K_DoPogoSpring(mo, vertispeed, mute);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int lib_kKillBananaChain(lua_State *L)
|
||||||
|
{
|
||||||
|
mobj_t *banana = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
mobj_t *inflictor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
NOHUD
|
||||||
|
if (!banana)
|
||||||
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
|
if (!inflictor)
|
||||||
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
|
if (!source)
|
||||||
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
|
K_KillBananaChain(banana, inflictor, source);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int lib_kRepairOrbitChain(lua_State *L)
|
||||||
|
{
|
||||||
|
mobj_t *orbit = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||||
|
NOHUD
|
||||||
|
if (!orbit)
|
||||||
|
return LUA_ErrInvalid(L, "mobj_t");
|
||||||
|
K_RepairOrbitChain(orbit);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2260,6 +2350,7 @@ static luaL_Reg lib[] = {
|
||||||
{"P_CheckDeathPitCollide",lib_pCheckDeathPitCollide},
|
{"P_CheckDeathPitCollide",lib_pCheckDeathPitCollide},
|
||||||
{"P_CheckSolidLava",lib_pCheckSolidLava},
|
{"P_CheckSolidLava",lib_pCheckSolidLava},
|
||||||
{"P_CanRunOnWater",lib_pCanRunOnWater},
|
{"P_CanRunOnWater",lib_pCanRunOnWater},
|
||||||
|
{"P_SpawnShadowMobj",lib_pSpawnShadowMobj},
|
||||||
|
|
||||||
// p_user
|
// p_user
|
||||||
{"P_GetPlayerHeight",lib_pGetPlayerHeight},
|
{"P_GetPlayerHeight",lib_pGetPlayerHeight},
|
||||||
|
@ -2290,7 +2381,7 @@ static luaL_Reg lib[] = {
|
||||||
{"P_LookForEnemies",lib_pLookForEnemies},
|
{"P_LookForEnemies",lib_pLookForEnemies},
|
||||||
{"P_NukeEnemies",lib_pNukeEnemies},
|
{"P_NukeEnemies",lib_pNukeEnemies},
|
||||||
{"P_HomingAttack",lib_pHomingAttack},
|
{"P_HomingAttack",lib_pHomingAttack},
|
||||||
{"P_SuperReady",lib_pSuperReady},
|
//{"P_SuperReady",lib_pSuperReady},
|
||||||
{"P_DoJump",lib_pDoJump},
|
{"P_DoJump",lib_pDoJump},
|
||||||
{"P_SpawnThokMobj",lib_pSpawnThokMobj},
|
{"P_SpawnThokMobj",lib_pSpawnThokMobj},
|
||||||
{"P_SpawnSpinMobj",lib_pSpawnSpinMobj},
|
{"P_SpawnSpinMobj",lib_pSpawnSpinMobj},
|
||||||
|
@ -2385,16 +2476,23 @@ static luaL_Reg lib[] = {
|
||||||
|
|
||||||
// k_kart
|
// k_kart
|
||||||
{"K_GetKartColorByName",lib_kGetKartColorByName},
|
{"K_GetKartColorByName",lib_kGetKartColorByName},
|
||||||
|
{"K_IsPlayerLosing",lib_kIsPlayerLosing},
|
||||||
|
{"K_IsPlayerWanted",lib_kIsPlayerWanted},
|
||||||
{"K_KartBouncing",lib_kKartBouncing},
|
{"K_KartBouncing",lib_kKartBouncing},
|
||||||
|
{"K_DoInstashield",lib_kDoInstashield},
|
||||||
{"K_SpinPlayer",lib_kSpinPlayer},
|
{"K_SpinPlayer",lib_kSpinPlayer},
|
||||||
{"K_SquishPlayer",lib_kSquishPlayer},
|
{"K_SquishPlayer",lib_kSquishPlayer},
|
||||||
{"K_ExplodePlayer",lib_kExplodePlayer},
|
{"K_ExplodePlayer",lib_kExplodePlayer},
|
||||||
{"K_StealBalloon",lib_kStealBalloon},
|
{"K_StealBumper",lib_kStealBumper},
|
||||||
{"K_SpawnKartExplosion",lib_kSpawnKartExplosion},
|
{"K_SpawnKartExplosion",lib_kSpawnKartExplosion},
|
||||||
{"K_SpawnBoostTrail",lib_kSpawnDriftTrail},
|
{"K_SpawnBoostTrail",lib_kSpawnBoostTrail},
|
||||||
|
{"K_SpawnSparkleTrail",lib_kSpawnSparkleTrail},
|
||||||
|
{"K_SpawnWipeoutTrail",lib_kSpawnWipeoutTrail},
|
||||||
{"K_DriftDustHandling",lib_kDriftDustHandling},
|
{"K_DriftDustHandling",lib_kDriftDustHandling},
|
||||||
{"K_DoMushroom",lib_kDoMushroom},
|
{"K_DoSneaker",lib_kDoSneaker},
|
||||||
{"K_DoBouncePad",lib_kDoBouncePad},
|
{"K_DoPogoSpring",lib_kDoPogoSpring},
|
||||||
|
{"K_KillBananaChain",lib_kKillBananaChain},
|
||||||
|
{"K_RepairOrbitChain",lib_kRepairOrbitChain},
|
||||||
{"K_MomentumToFacing",lib_kMomentumToFacing},
|
{"K_MomentumToFacing",lib_kMomentumToFacing},
|
||||||
{"K_GetKartSpeed",lib_kGetKartSpeed},
|
{"K_GetKartSpeed",lib_kGetKartSpeed},
|
||||||
{"K_GetKartAccel",lib_kGetKartAccel},
|
{"K_GetKartAccel",lib_kGetKartAccel},
|
||||||
|
|
|
@ -424,6 +424,30 @@ static int libd_drawFill(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int libd_fadeScreen(lua_State *L)
|
||||||
|
{
|
||||||
|
UINT16 color = luaL_checkinteger(L, 1);
|
||||||
|
UINT8 strength = luaL_checkinteger(L, 2);
|
||||||
|
const UINT8 maxstrength = ((color & 0xFF00) ? 32 : 10);
|
||||||
|
|
||||||
|
HUDONLY
|
||||||
|
|
||||||
|
if (!strength)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (strength > maxstrength)
|
||||||
|
return luaL_error(L, "%s fade strength %d out of range (0 - %d)", ((color & 0xFF00) ? "COLORMAP" : "TRANSMAP"), strength, maxstrength);
|
||||||
|
|
||||||
|
if (strength == maxstrength) // Allow as a shortcut for drawfill...
|
||||||
|
{
|
||||||
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, ((color & 0xFF00) ? 31 : color));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
V_DrawFadeScreen(color, strength);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int libd_drawString(lua_State *L)
|
static int libd_drawString(lua_State *L)
|
||||||
{
|
{
|
||||||
fixed_t x = luaL_checkinteger(L, 1);
|
fixed_t x = luaL_checkinteger(L, 1);
|
||||||
|
@ -568,6 +592,7 @@ static luaL_Reg lib_draw[] = {
|
||||||
{"drawNum", libd_drawNum},
|
{"drawNum", libd_drawNum},
|
||||||
{"drawPaddedNum", libd_drawPaddedNum},
|
{"drawPaddedNum", libd_drawPaddedNum},
|
||||||
{"drawFill", libd_drawFill},
|
{"drawFill", libd_drawFill},
|
||||||
|
{"fadeScreen", libd_fadeScreen},
|
||||||
{"drawString", libd_drawString},
|
{"drawString", libd_drawString},
|
||||||
{"stringWidth", libd_stringWidth},
|
{"stringWidth", libd_stringWidth},
|
||||||
{"getColormap", libd_getColormap},
|
{"getColormap", libd_getColormap},
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "tables.h"
|
#include "tables.h"
|
||||||
#include "p_local.h"
|
#include "p_local.h"
|
||||||
#include "doomstat.h" // for ALL7EMERALDS
|
#include "doomstat.h" // for ALL7EMERALDS
|
||||||
|
#include "k_kart.h" // KartColor_Opposite
|
||||||
|
|
||||||
#include "lua_script.h"
|
#include "lua_script.h"
|
||||||
#include "lua_libs.h"
|
#include "lua_libs.h"
|
||||||
|
@ -191,8 +192,8 @@ static int lib_coloropposite(lua_State *L)
|
||||||
UINT8 colornum = (UINT8)luaL_checkinteger(L, 1);
|
UINT8 colornum = (UINT8)luaL_checkinteger(L, 1);
|
||||||
if (colornum >= MAXSKINCOLORS)
|
if (colornum >= MAXSKINCOLORS)
|
||||||
return luaL_error(L, "skincolor %d out of range (0 - %d).", colornum, MAXSKINCOLORS-1);
|
return luaL_error(L, "skincolor %d out of range (0 - %d).", colornum, MAXSKINCOLORS-1);
|
||||||
lua_pushinteger(L, Color_Opposite[colornum*2]); // push color
|
lua_pushinteger(L, KartColor_Opposite[colornum*2]); // push color
|
||||||
lua_pushinteger(L, Color_Opposite[colornum*2+1]); // push frame
|
lua_pushinteger(L, KartColor_Opposite[colornum*2+1]); // push frame
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -530,10 +530,22 @@ static int mobj_set(lua_State *L)
|
||||||
case mobj_bprev:
|
case mobj_bprev:
|
||||||
return UNIMPLEMENTED;
|
return UNIMPLEMENTED;
|
||||||
case mobj_hnext:
|
case mobj_hnext:
|
||||||
mo->hnext = luaL_checkudata(L, 3, META_MOBJ);
|
if (lua_isnil(L, 3))
|
||||||
|
P_SetTarget(&mo->hnext, NULL);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mobj_t *hnext = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ));
|
||||||
|
P_SetTarget(&mo->hnext, hnext);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case mobj_hprev:
|
case mobj_hprev:
|
||||||
mo->hprev = luaL_checkudata(L, 3, META_MOBJ);
|
if (lua_isnil(L, 3))
|
||||||
|
P_SetTarget(&mo->hprev, NULL);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mobj_t *hprev = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ));
|
||||||
|
P_SetTarget(&mo->hprev, hprev);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case mobj_type: // yeah sure, we'll let you change the mobj's type.
|
case mobj_type: // yeah sure, we'll let you change the mobj's type.
|
||||||
{
|
{
|
||||||
|
|
|
@ -962,13 +962,16 @@ void LUA_Archive(void)
|
||||||
ArchiveExtVars(&players[i], "player");
|
ArchiveExtVars(&players[i], "player");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
if (gamestate == GS_LEVEL)
|
||||||
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
|
{
|
||||||
{
|
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||||
// archive function will determine when to skip mobjs,
|
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
|
||||||
// and write mobjnum in otherwise.
|
{
|
||||||
ArchiveExtVars(th, "mobj");
|
// archive function will determine when to skip mobjs,
|
||||||
}
|
// and write mobjnum in otherwise.
|
||||||
|
ArchiveExtVars(th, "mobj");
|
||||||
|
}
|
||||||
|
}
|
||||||
WRITEUINT32(save_p, UINT32_MAX); // end of mobjs marker, replaces mobjnum.
|
WRITEUINT32(save_p, UINT32_MAX); // end of mobjs marker, replaces mobjnum.
|
||||||
|
|
||||||
LUAh_NetArchiveHook(NetArchive); // call the NetArchive hook in archive mode
|
LUAh_NetArchiveHook(NetArchive); // call the NetArchive hook in archive mode
|
||||||
|
|
|
@ -1149,7 +1149,7 @@ void OP_ObjectplaceMovement(player_t *player)
|
||||||
|
|
||||||
// make sure viewz follows player if in 1st person mode
|
// make sure viewz follows player if in 1st person mode
|
||||||
//player->deltaviewheight = 0;
|
//player->deltaviewheight = 0;
|
||||||
player->viewheight = FixedMul(cv_viewheight.value << FRACBITS, player->mo->scale);
|
player->viewheight = FixedMul(32 << FRACBITS, player->mo->scale);
|
||||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||||
player->viewz = player->mo->z + player->mo->height - player->viewheight;
|
player->viewz = player->mo->z + player->mo->height - player->viewheight;
|
||||||
else
|
else
|
||||||
|
|
2342
src/m_menu.c
2342
src/m_menu.c
File diff suppressed because it is too large
Load Diff
|
@ -267,7 +267,7 @@ void Screenshot_option_Onchange(void);
|
||||||
prev,\
|
prev,\
|
||||||
source,\
|
source,\
|
||||||
M_DrawServerMenu,\
|
M_DrawServerMenu,\
|
||||||
27,40,\
|
24,40,\
|
||||||
0,\
|
0,\
|
||||||
NULL\
|
NULL\
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ void Screenshot_option_Onchange(void);
|
||||||
prev,\
|
prev,\
|
||||||
source,\
|
source,\
|
||||||
M_DrawControl,\
|
M_DrawControl,\
|
||||||
24, 40,\
|
26, 40,\
|
||||||
0,\
|
0,\
|
||||||
NULL\
|
NULL\
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,9 @@ typedef off_t off64_t;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (_WIN32)
|
#if defined(__MINGW32__) && ((__GNUC__ > 7) || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3))
|
||||||
|
#define PRIdS "u"
|
||||||
|
#elif defined (_WIN32)
|
||||||
#define PRIdS "Iu"
|
#define PRIdS "Iu"
|
||||||
#elif defined (_PSP) || defined (_arch_dreamcast) || defined (DJGPP) || defined (_WII) || defined (_NDS) || defined (_PS3)
|
#elif defined (_PSP) || defined (_arch_dreamcast) || defined (DJGPP) || defined (_WII) || defined (_NDS) || defined (_PS3)
|
||||||
#define PRIdS "u"
|
#define PRIdS "u"
|
||||||
|
|
131
src/p_enemy.c
131
src/p_enemy.c
|
@ -187,9 +187,11 @@ void A_RandomStateRange(mobj_t *actor);
|
||||||
void A_DualAction(mobj_t *actor);
|
void A_DualAction(mobj_t *actor);
|
||||||
void A_RemoteAction(mobj_t *actor);
|
void A_RemoteAction(mobj_t *actor);
|
||||||
void A_ToggleFlameJet(mobj_t *actor);
|
void A_ToggleFlameJet(mobj_t *actor);
|
||||||
void A_ItemPop(mobj_t *actor); // SRB2kart
|
void A_ItemPop(mobj_t *actor); // SRB2kart
|
||||||
void A_RedShellChase(mobj_t *actor); // SRB2kart
|
void A_JawzChase(mobj_t *actor); // SRB2kart
|
||||||
void A_BobombExplode(mobj_t *actor); // SRB2kart
|
void A_JawzExplode(mobj_t *actor); // SRB2kart
|
||||||
|
void A_MineExplode(mobj_t *actor); // SRB2kart
|
||||||
|
void A_BallhogExplode(mobj_t *actor); // SRB2kart
|
||||||
void A_OrbitNights(mobj_t *actor);
|
void A_OrbitNights(mobj_t *actor);
|
||||||
void A_GhostMe(mobj_t *actor);
|
void A_GhostMe(mobj_t *actor);
|
||||||
void A_SetObjectState(mobj_t *actor);
|
void A_SetObjectState(mobj_t *actor);
|
||||||
|
@ -849,7 +851,7 @@ void A_Look(mobj_t *actor)
|
||||||
if (!P_LookForPlayers(actor, locvar1 & 65535, false , FixedMul((locvar1 >> 16)*FRACUNIT, actor->scale)))
|
if (!P_LookForPlayers(actor, locvar1 & 65535, false , FixedMul((locvar1 >> 16)*FRACUNIT, actor->scale)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (leveltime < 4*TICRATE) // SRB2kart - no looking before race starts
|
if (leveltime < starttime) // SRB2kart - no looking before race starts
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// go into chase state
|
// go into chase state
|
||||||
|
@ -2549,7 +2551,7 @@ void A_MonitorPop(mobj_t *actor)
|
||||||
mobj_t *remains;
|
mobj_t *remains;
|
||||||
mobjtype_t explode;
|
mobjtype_t explode;
|
||||||
mobjtype_t item = 0;
|
mobjtype_t item = 0;
|
||||||
mobjtype_t newbox;
|
//mobjtype_t newbox;
|
||||||
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_CallAction("A_MonitorPop", actor))
|
if (LUA_CallAction("A_MonitorPop", actor))
|
||||||
|
@ -2601,7 +2603,7 @@ void A_MonitorPop(mobj_t *actor)
|
||||||
|
|
||||||
switch (actor->type)
|
switch (actor->type)
|
||||||
{
|
{
|
||||||
case MT_QUESTIONBOX: // Random!
|
/*case MT_QUESTIONBOX: // Random!
|
||||||
{
|
{
|
||||||
mobjtype_t spawnchance[256];
|
mobjtype_t spawnchance[256];
|
||||||
INT32 numchoices = 0, i = 0;
|
INT32 numchoices = 0, i = 0;
|
||||||
|
@ -2635,7 +2637,7 @@ for (i = cvar.value; i; --i) spawnchance[numchoices++] = type
|
||||||
|
|
||||||
remains->flags2 &= ~MF2_AMBUSH;
|
remains->flags2 &= ~MF2_AMBUSH;
|
||||||
break;
|
break;
|
||||||
}
|
}*/
|
||||||
default:
|
default:
|
||||||
item = actor->info->damage;
|
item = actor->info->damage;
|
||||||
break;
|
break;
|
||||||
|
@ -3238,8 +3240,10 @@ void A_WaterShield(mobj_t *actor)
|
||||||
P_SpawnShieldOrb(player);
|
P_SpawnShieldOrb(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* // SRB2kart - Can't drown.
|
||||||
if (player->powers[pw_underwater] && player->powers[pw_underwater] <= 12*TICRATE + 1)
|
if (player->powers[pw_underwater] && player->powers[pw_underwater] <= 12*TICRATE + 1)
|
||||||
P_RestoreMusic(player);
|
P_RestoreMusic(player);
|
||||||
|
*/
|
||||||
|
|
||||||
player->powers[pw_underwater] = 0;
|
player->powers[pw_underwater] = 0;
|
||||||
|
|
||||||
|
@ -3825,7 +3829,7 @@ void A_ThrownRing(mobj_t *actor)
|
||||||
P_SetTarget(&actor->tracer, NULL);
|
P_SetTarget(&actor->tracer, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor->tracer && (actor->tracer->health)) // SRB2kart - red shells always follow
|
if (actor->tracer && (actor->tracer->health)) // SRB2kart - jawz always follow
|
||||||
//&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT)// Already found someone to follow.
|
//&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT)// Already found someone to follow.
|
||||||
{
|
{
|
||||||
const INT32 temp = actor->threshold;
|
const INT32 temp = actor->threshold;
|
||||||
|
@ -3877,7 +3881,7 @@ void A_ThrownRing(mobj_t *actor)
|
||||||
&& actor->target->player->ctfteam == player->ctfteam)
|
&& actor->target->player->ctfteam == player->ctfteam)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (actor->target->player->kartstuff[k_position] < player->kartstuff[k_position]) // SRB2kart - Red Shells only go after people ahead of you
|
if (actor->target->player->kartstuff[k_position] < player->kartstuff[k_position]) // SRB2kart - Jawz only go after people ahead of you
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3920,8 +3924,8 @@ static inline boolean PIT_GrenadeRing(mobj_t *thing)
|
||||||
if (thing == grenade->target && grenade->threshold != 0) // Don't blow up at your owner.
|
if (thing == grenade->target && grenade->threshold != 0) // Don't blow up at your owner.
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (thing->player && (thing->player->kartstuff[k_bootimer]
|
if (thing->player && (thing->player->kartstuff[k_hyudorotimer]
|
||||||
|| (G_BattleGametype() && thing->player && thing->player->kartstuff[k_balloon] <= 0 && thing->player->kartstuff[k_comebacktimer])))
|
|| (G_BattleGametype() && thing->player && thing->player->kartstuff[k_bumper] <= 0 && thing->player->kartstuff[k_comebacktimer])))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ((gametype == GT_CTF || gametype == GT_TEAMMATCH)
|
if ((gametype == GT_CTF || gametype == GT_TEAMMATCH)
|
||||||
|
@ -3990,15 +3994,19 @@ void A_SetSolidSteam(mobj_t *actor)
|
||||||
#endif
|
#endif
|
||||||
actor->flags &= ~MF_NOCLIP;
|
actor->flags &= ~MF_NOCLIP;
|
||||||
actor->flags |= MF_SOLID;
|
actor->flags |= MF_SOLID;
|
||||||
if (P_RandomChance(FRACUNIT/8))
|
|
||||||
|
if (!(actor->flags2 & MF2_AMBUSH)) // Don't be so obnoxious.
|
||||||
{
|
{
|
||||||
if (actor->info->deathsound)
|
if (P_RandomChance(FRACUNIT/8))
|
||||||
S_StartSound(actor, actor->info->deathsound); // Hiss!
|
{
|
||||||
}
|
if (actor->info->deathsound)
|
||||||
else
|
S_StartSound(actor, actor->info->deathsound); // Hiss!
|
||||||
{
|
}
|
||||||
if (actor->info->painsound)
|
else
|
||||||
S_StartSound(actor, actor->info->painsound);
|
{
|
||||||
|
if (actor->info->painsound)
|
||||||
|
S_StartSound(actor, actor->info->painsound);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
P_SetObjectMomZ (actor, 1, true);
|
P_SetObjectMomZ (actor, 1, true);
|
||||||
|
@ -4042,8 +4050,8 @@ void A_SignPlayer(mobj_t *actor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Set the sign to be an appropriate background color for this player's skincolor.
|
// Set the sign to be an appropriate background color for this player's skincolor.
|
||||||
actor->color = Color_Opposite[actor->target->player->skincolor*2];
|
actor->color = KartColor_Opposite[actor->target->player->skincolor*2];
|
||||||
actor->frame += Color_Opposite[actor->target->player->skincolor*2+1];
|
actor->frame += KartColor_Opposite[actor->target->player->skincolor*2+1];
|
||||||
|
|
||||||
// spawn an overlay of the player's face.
|
// spawn an overlay of the player's face.
|
||||||
ov = P_SpawnMobj(actor->x, actor->y, actor->z, MT_OVERLAY);
|
ov = P_SpawnMobj(actor->x, actor->y, actor->z, MT_OVERLAY);
|
||||||
|
@ -8085,7 +8093,7 @@ void A_ToggleFlameJet(mobj_t* actor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//{ SRB2kart - A_ItemPop, A_RedShellChase and A_BobombExplode
|
//{ SRB2kart - A_ItemPop, A_JawzChase, A_JawzExplode, A_MineExplode, and A_BallhogExplode
|
||||||
void A_ItemPop(mobj_t *actor)
|
void A_ItemPop(mobj_t *actor)
|
||||||
{
|
{
|
||||||
mobj_t *remains;
|
mobj_t *remains;
|
||||||
|
@ -8143,7 +8151,7 @@ void A_ItemPop(mobj_t *actor)
|
||||||
if (actor->info->deathsound)
|
if (actor->info->deathsound)
|
||||||
S_StartSound(remains, actor->info->deathsound);
|
S_StartSound(remains, actor->info->deathsound);
|
||||||
|
|
||||||
if (!(G_BattleGametype() && actor->target->player->kartstuff[k_balloon] <= 0))
|
if (!(G_BattleGametype() && actor->target->player->kartstuff[k_bumper] <= 0))
|
||||||
actor->target->player->kartstuff[k_itemroulette] = 1;
|
actor->target->player->kartstuff[k_itemroulette] = 1;
|
||||||
|
|
||||||
remains->flags2 &= ~MF2_AMBUSH;
|
remains->flags2 &= ~MF2_AMBUSH;
|
||||||
|
@ -8154,14 +8162,14 @@ void A_ItemPop(mobj_t *actor)
|
||||||
P_RemoveMobj(actor);
|
P_RemoveMobj(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void A_RedShellChase(mobj_t *actor)
|
void A_JawzChase(mobj_t *actor)
|
||||||
{
|
{
|
||||||
|
|
||||||
INT32 c = 0;
|
INT32 c = 0;
|
||||||
INT32 stop;
|
INT32 stop;
|
||||||
player_t *player;
|
player_t *player;
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_CallAction("A_RedShellChase", actor))
|
if (LUA_CallAction("A_JawzChase", actor))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -8221,13 +8229,13 @@ void A_RedShellChase(mobj_t *actor)
|
||||||
if (G_RaceGametype()) // Only in races, in match and CTF you should go after any nearby players
|
if (G_RaceGametype()) // Only in races, in match and CTF you should go after any nearby players
|
||||||
{
|
{
|
||||||
// USER TARGET
|
// USER TARGET
|
||||||
if (actor->target->player->kartstuff[k_position] != (player->kartstuff[k_position] + 1)) // Red Shells only go after the person directly ahead of you -Sryder
|
if (actor->target->player->kartstuff[k_position] != (player->kartstuff[k_position] + 1)) // Jawz only go after the person directly ahead of you -Sryder
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_BattleGametype())
|
if (G_BattleGametype())
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_balloon] <= 0)
|
if (player->kartstuff[k_bumper] <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (P_AproxDistance(P_AproxDistance(player->mo->x-actor->x,
|
if (P_AproxDistance(P_AproxDistance(player->mo->x-actor->x,
|
||||||
|
@ -8239,7 +8247,7 @@ void A_RedShellChase(mobj_t *actor)
|
||||||
if ((G_RaceGametype()) || (G_BattleGametype() // If in match etc. only home in when you get close enough, in race etc. home in all the time
|
if ((G_RaceGametype()) || (G_BattleGametype() // If in match etc. only home in when you get close enough, in race etc. home in all the time
|
||||||
&& P_AproxDistance(P_AproxDistance(player->mo->x-actor->x,
|
&& P_AproxDistance(P_AproxDistance(player->mo->x-actor->x,
|
||||||
player->mo->y-actor->y), player->mo->z-actor->z) < RING_DIST
|
player->mo->y-actor->y), player->mo->z-actor->z) < RING_DIST
|
||||||
&& player->kartstuff[k_balloon] > 0))
|
&& player->kartstuff[k_bumper] > 0))
|
||||||
P_SetTarget(&actor->tracer, player->mo);
|
P_SetTarget(&actor->tracer, player->mo);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -8258,7 +8266,45 @@ void A_RedShellChase(mobj_t *actor)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void A_BobombExplode(mobj_t *actor)
|
void A_JawzExplode(mobj_t *actor)
|
||||||
|
{
|
||||||
|
INT32 shrapnel = 2;
|
||||||
|
mobj_t *truc;
|
||||||
|
|
||||||
|
#ifdef HAVE_BLUA
|
||||||
|
if (LUA_CallAction("A_JawzExplode", actor))
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
truc = P_SpawnMobj(actor->x, actor->y, actor->z, MT_BOOMEXPLODE);
|
||||||
|
truc->scale = actor->scale*2;
|
||||||
|
truc->color = SKINCOLOR_RED;
|
||||||
|
|
||||||
|
while (shrapnel)
|
||||||
|
{
|
||||||
|
INT32 speed, speed2;
|
||||||
|
|
||||||
|
truc = P_SpawnMobj(actor->x + P_RandomRange(-8, 8)*FRACUNIT, actor->y + P_RandomRange(-8, 8)*FRACUNIT,
|
||||||
|
actor->z + P_RandomRange(0, 8)*FRACUNIT, MT_BOOMPARTICLE);
|
||||||
|
truc->scale = actor->scale*2;
|
||||||
|
|
||||||
|
speed = FixedMul(7*FRACUNIT, actor->scale)>>FRACBITS;
|
||||||
|
truc->momx = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||||
|
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
|
||||||
|
|
||||||
|
speed = FixedMul(5*FRACUNIT, actor->scale)>>FRACBITS;
|
||||||
|
speed2 = FixedMul(15*FRACUNIT, actor->scale)>>FRACBITS;
|
||||||
|
truc->momz = P_RandomRange(speed, speed2)*FRACUNIT;
|
||||||
|
truc->tics = TICRATE*2;
|
||||||
|
truc->color = SKINCOLOR_RED;
|
||||||
|
|
||||||
|
shrapnel--;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void A_MineExplode(mobj_t *actor)
|
||||||
{
|
{
|
||||||
mobj_t *mo2;
|
mobj_t *mo2;
|
||||||
thinker_t *th;
|
thinker_t *th;
|
||||||
|
@ -8266,7 +8312,7 @@ void A_BobombExplode(mobj_t *actor)
|
||||||
INT32 locvar1 = var1;
|
INT32 locvar1 = var1;
|
||||||
mobjtype_t type;
|
mobjtype_t type;
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_CallAction("A_BobombExplode", actor))
|
if (LUA_CallAction("A_MineExplode", actor))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -8282,10 +8328,10 @@ void A_BobombExplode(mobj_t *actor)
|
||||||
|
|
||||||
mo2 = (mobj_t *)th;
|
mo2 = (mobj_t *)th;
|
||||||
|
|
||||||
if (mo2 == actor || mo2->type == MT_BOMBEXPLOSIONSOUND) // Don't explode yourself! Endless loop!
|
if (mo2 == actor || mo2->type == MT_MINEEXPLOSIONSOUND) // Don't explode yourself! Endless loop!
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (G_BattleGametype() && actor->target && actor->target->player && actor->target->player->kartstuff[k_balloon] <= 0 && mo2 == actor->target)
|
if (G_BattleGametype() && actor->target && actor->target->player && actor->target->player->kartstuff[k_bumper] <= 0 && mo2 == actor->target)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (P_AproxDistance(P_AproxDistance(mo2->x - actor->x, mo2->y - actor->y), mo2->z - actor->z) > actor->info->painchance)
|
if (P_AproxDistance(P_AproxDistance(mo2->x - actor->x, mo2->y - actor->y), mo2->z - actor->z) > actor->info->painchance)
|
||||||
|
@ -8308,14 +8354,29 @@ void A_BobombExplode(mobj_t *actor)
|
||||||
K_SpawnKartExplosion(actor->x, actor->y, actor->z, actor->info->painchance + 32*FRACUNIT, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64
|
K_SpawnKartExplosion(actor->x, actor->y, actor->z, actor->info->painchance + 32*FRACUNIT, 32, type, d*(ANGLE_45/4), true, false, actor->target); // 32 <-> 64
|
||||||
|
|
||||||
if (actor->target && actor->target->player)
|
if (actor->target && actor->target->player)
|
||||||
K_SpawnBobombExplosion(actor, actor->target->player->skincolor);
|
K_SpawnMineExplosion(actor, actor->target->player->skincolor);
|
||||||
else
|
else
|
||||||
K_SpawnBobombExplosion(actor, SKINCOLOR_RED);
|
K_SpawnMineExplosion(actor, SKINCOLOR_RED);
|
||||||
|
|
||||||
P_SpawnMobj(actor->x, actor->y, actor->z, MT_BOMBEXPLOSIONSOUND);
|
P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void A_BallhogExplode(mobj_t *actor)
|
||||||
|
{
|
||||||
|
mobj_t *mo2;
|
||||||
|
#ifdef HAVE_BLUA
|
||||||
|
if (LUA_CallAction("A_BallhogExplode", actor))
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
mo2 = P_SpawnMobj(actor->x, actor->y, actor->z, MT_BALLHOGBOOM);
|
||||||
|
P_SetScale(mo2, actor->scale*2);
|
||||||
|
mo2->destscale = mo2->scale;
|
||||||
|
S_StartSound(mo2, actor->info->deathsound);
|
||||||
|
return;
|
||||||
|
}
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// Function: A_OrbitNights
|
// Function: A_OrbitNights
|
||||||
|
|
|
@ -237,7 +237,7 @@ result_e T_MovePlane(sector_t *sector, fixed_t speed, fixed_t dest, boolean crus
|
||||||
{
|
{
|
||||||
case MT_GOOP: // Egg Slimer's goop objects
|
case MT_GOOP: // Egg Slimer's goop objects
|
||||||
case MT_SPINFIRE: // Elemental Shield flame balls
|
case MT_SPINFIRE: // Elemental Shield flame balls
|
||||||
case MT_MUSHROOMTRAIL:
|
case MT_SNEAKERTRAIL:
|
||||||
case MT_SPIKE: // Floor Spike
|
case MT_SPIKE: // Floor Spike
|
||||||
// Is the object hang from the ceiling?
|
// Is the object hang from the ceiling?
|
||||||
// In that case, swap the planes used.
|
// In that case, swap the planes used.
|
||||||
|
|
387
src/p_inter.c
387
src/p_inter.c
|
@ -152,25 +152,21 @@ void P_ResetStarposts(void)
|
||||||
//
|
//
|
||||||
boolean P_CanPickupItem(player_t *player, boolean weapon)
|
boolean P_CanPickupItem(player_t *player, boolean weapon)
|
||||||
{
|
{
|
||||||
/*if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0) // No balloons in Match
|
if (player->exiting || mapreset)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/*if (G_BattleGametype() && player->kartstuff[k_bumper] <= 0) // No bumpers in Match
|
||||||
return false;*/
|
return false;*/
|
||||||
|
|
||||||
if (weapon)
|
if (weapon)
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_bootaketimer] || player->kartstuff[k_boostolentimer]
|
if (player->kartstuff[k_stealingtimer] || player->kartstuff[k_stolentimer]
|
||||||
|| player->kartstuff[k_growshrinktimer] > 1 || player->kartstuff[k_goldshroomtimer]) // Item-specific timer going off
|
|| player->kartstuff[k_growshrinktimer] != 0 || player->kartstuff[k_rocketsneakertimer]) // Item-specific timer going off
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (player->kartstuff[k_itemroulette]
|
if (player->kartstuff[k_itemroulette]
|
||||||
|| player->kartstuff[k_greenshell] || player->kartstuff[k_triplegreenshell]
|
|| player->kartstuff[k_itemamount]
|
||||||
|| player->kartstuff[k_redshell] || player->kartstuff[k_tripleredshell]
|
|| player->kartstuff[k_itemheld]) // Item slot already taken up
|
||||||
|| player->kartstuff[k_banana] || player->kartstuff[k_triplebanana]
|
|
||||||
|| player->kartstuff[k_fakeitem] & 2 || player->kartstuff[k_magnet]
|
|
||||||
|| player->kartstuff[k_bobomb] || player->kartstuff[k_blueshell]
|
|
||||||
|| player->kartstuff[k_mushroom] || player->kartstuff[k_fireflower]
|
|
||||||
|| player->kartstuff[k_star] || player->kartstuff[k_goldshroom]
|
|
||||||
|| player->kartstuff[k_lightning] || player->kartstuff[k_megashroom]
|
|
||||||
|| player->kartstuff[k_boo] || player->kartstuff[k_feather] & 1) // Item slot already taken up
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,7 +410,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
if (!P_CanPickupItem(player, true))
|
if (!P_CanPickupItem(player, true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0)
|
if (G_BattleGametype() && player->kartstuff[k_bumper] <= 0)
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_comebackmode] == 1 || player->kartstuff[k_comebacktimer])
|
if (player->kartstuff[k_comebackmode] == 1 || player->kartstuff[k_comebacktimer])
|
||||||
return;
|
return;
|
||||||
|
@ -426,6 +422,67 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
P_SetTarget(&special->target, toucher);
|
P_SetTarget(&special->target, toucher);
|
||||||
P_KillMobj(special, toucher, toucher);
|
P_KillMobj(special, toucher, toucher);
|
||||||
break;
|
break;
|
||||||
|
case MT_KARMAHITBOX:
|
||||||
|
if (!special->target->player)
|
||||||
|
return;
|
||||||
|
if (player == special->target->player)
|
||||||
|
return;
|
||||||
|
if (player->kartstuff[k_bumper] <= 0)
|
||||||
|
return;
|
||||||
|
if (special->target->player->exiting || player->exiting)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (special->target->player->kartstuff[k_comebacktimer]
|
||||||
|
|| special->target->player->kartstuff[k_spinouttimer]
|
||||||
|
|| special->target->player->kartstuff[k_squishedtimer])
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (special->target->player->kartstuff[k_comebackmode] == 0)
|
||||||
|
{
|
||||||
|
if (player->kartstuff[k_growshrinktimer] || player->kartstuff[k_squishedtimer]
|
||||||
|
|| player->kartstuff[k_hyudorotimer] || player->kartstuff[k_spinouttimer]
|
||||||
|
|| player->kartstuff[k_invincibilitytimer] || player->powers[pw_flashing])
|
||||||
|
return;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mobj_t *boom = P_SpawnMobj(special->target->x, special->target->y, special->target->z, MT_BOOMEXPLODE);
|
||||||
|
boom->scale = special->target->scale;
|
||||||
|
boom->destscale = special->target->scale;
|
||||||
|
boom->momz = 5*FRACUNIT;
|
||||||
|
if (special->target->color)
|
||||||
|
boom->color = special->target->color;
|
||||||
|
else
|
||||||
|
boom->color = SKINCOLOR_RED;
|
||||||
|
S_StartSound(boom, special->info->attacksound);
|
||||||
|
|
||||||
|
special->target->player->kartstuff[k_comebackpoints] += 2 * (K_IsPlayerWanted(player) ? 2 : 1);
|
||||||
|
if (netgame && cv_hazardlog.value)
|
||||||
|
CONS_Printf(M_GetText("%s bombed %s!\n"), player_names[special->target->player-players], player_names[player-players]);
|
||||||
|
if (special->target->player->kartstuff[k_comebackpoints] >= 3)
|
||||||
|
K_StealBumper(special->target->player, player, true);
|
||||||
|
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||||
|
|
||||||
|
K_ExplodePlayer(player, special->target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (special->target->player->kartstuff[k_comebackmode] == 1 && P_CanPickupItem(player, true))
|
||||||
|
{
|
||||||
|
mobj_t *poof = P_SpawnMobj(tmthing->x, tmthing->y, tmthing->z, MT_EXPLODE);
|
||||||
|
S_StartSound(poof, special->info->seesound);
|
||||||
|
|
||||||
|
special->target->player->kartstuff[k_comebackmode] = 0;
|
||||||
|
special->target->player->kartstuff[k_comebackpoints]++;
|
||||||
|
|
||||||
|
if (netgame && cv_hazardlog.value)
|
||||||
|
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[special->target->player-players], player_names[player-players]);
|
||||||
|
if (special->target->player->kartstuff[k_comebackpoints] >= 3)
|
||||||
|
K_StealBumper(special->target->player, player, true);
|
||||||
|
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
|
||||||
|
|
||||||
|
player->kartstuff[k_itemroulette] = 1;
|
||||||
|
player->kartstuff[k_roulettetype] = 1;
|
||||||
|
}
|
||||||
|
return;
|
||||||
// ***************************************** //
|
// ***************************************** //
|
||||||
// Rings, coins, spheres, weapon panels, etc //
|
// Rings, coins, spheres, weapon panels, etc //
|
||||||
// ***************************************** //
|
// ***************************************** //
|
||||||
|
@ -1490,12 +1547,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
|| special->z > toucher->z + (toucher->height*2/3))
|
|| special->z > toucher->z + (toucher->height*2/3))
|
||||||
return; // Only go in the mouth
|
return; // Only go in the mouth
|
||||||
|
|
||||||
|
/* // SRB2kart - Can't drown.
|
||||||
// Eaten by player!
|
// Eaten by player!
|
||||||
if (player->powers[pw_underwater] && player->powers[pw_underwater] <= 12*TICRATE + 1)
|
if (player->powers[pw_underwater] && player->powers[pw_underwater] <= 12*TICRATE + 1)
|
||||||
P_RestoreMusic(player);
|
P_RestoreMusic(player);
|
||||||
|
|
||||||
if (player->powers[pw_underwater] < underwatertics + 1)
|
if (player->powers[pw_underwater] < underwatertics + 1)
|
||||||
player->powers[pw_underwater] = underwatertics + 1;
|
player->powers[pw_underwater] = underwatertics + 1;
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (!player->climbing)
|
if (!player->climbing)
|
||||||
|
@ -1612,7 +1671,7 @@ static void P_HitDeathMessages(player_t *player, mobj_t *inflictor, mobj_t *sour
|
||||||
str = M_GetText("%s%s's tagging hand %s %s.\n");
|
str = M_GetText("%s%s's tagging hand %s %s.\n");
|
||||||
break;
|
break;
|
||||||
case MT_SPINFIRE:
|
case MT_SPINFIRE:
|
||||||
case MT_MUSHROOMTRAIL:
|
case MT_SNEAKERTRAIL:
|
||||||
str = M_GetText("%s%s's elemental fire trail %s %s.\n");
|
str = M_GetText("%s%s's elemental fire trail %s %s.\n");
|
||||||
break;
|
break;
|
||||||
case MT_THROWNBOUNCE:
|
case MT_THROWNBOUNCE:
|
||||||
|
@ -1749,7 +1808,7 @@ void P_CheckTimeLimit(void)
|
||||||
if (G_RaceGametype())
|
if (G_RaceGametype())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (leveltime < timelimitintics)
|
if (leveltime < (timelimitintics + starttime))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (gameaction == ga_completed)
|
if (gameaction == ga_completed)
|
||||||
|
@ -1771,9 +1830,6 @@ void P_CheckTimeLimit(void)
|
||||||
P_AddPlayerScore(&players[i], players[i].score);
|
P_AddPlayerScore(&players[i], players[i].score);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server)
|
|
||||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Optional tie-breaker for Match/CTF
|
//Optional tie-breaker for Match/CTF
|
||||||
|
@ -1787,6 +1843,8 @@ void P_CheckTimeLimit(void)
|
||||||
//Figure out if we have enough participating players to care.
|
//Figure out if we have enough participating players to care.
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
if (players[i].exiting)
|
||||||
|
return;
|
||||||
if (playeringame[i] && players[i].spectator)
|
if (playeringame[i] && players[i].spectator)
|
||||||
spectators++;
|
spectators++;
|
||||||
}
|
}
|
||||||
|
@ -1815,7 +1873,7 @@ void P_CheckTimeLimit(void)
|
||||||
{
|
{
|
||||||
for (k = i; k < playercount; k++)
|
for (k = i; k < playercount; k++)
|
||||||
{
|
{
|
||||||
if (players[playerarray[i-1]].score < players[playerarray[k]].score)
|
if (players[playerarray[i-1]].marescore < players[playerarray[k]].marescore)
|
||||||
{
|
{
|
||||||
tempplayer = playerarray[i-1];
|
tempplayer = playerarray[i-1];
|
||||||
playerarray[i-1] = playerarray[k];
|
playerarray[i-1] = playerarray[k];
|
||||||
|
@ -1825,7 +1883,7 @@ void P_CheckTimeLimit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
//End the round if the top players aren't tied.
|
//End the round if the top players aren't tied.
|
||||||
if (players[playerarray[0]].score == players[playerarray[1]].score)
|
if (players[playerarray[0]].marescore == players[playerarray[1]].marescore)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1835,12 +1893,19 @@ void P_CheckTimeLimit(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (server)
|
|
||||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
{
|
||||||
|
if (!playeringame[i] || players[i].spectator)
|
||||||
|
continue;
|
||||||
|
if (players[i].exiting)
|
||||||
|
return;
|
||||||
|
P_DoPlayerExit(&players[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if (server)
|
||||||
|
SendNetXCmd(XD_EXITLEVEL, NULL, 0);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Checks if a player's score is over the pointlimit and the round should end.
|
/** Checks if a player's score is over the pointlimit and the round should end.
|
||||||
|
@ -1863,7 +1928,7 @@ void P_CheckPointLimit(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// pointlimit is nonzero, check if it's been reached by this player
|
// pointlimit is nonzero, check if it's been reached by this player
|
||||||
if (G_GametypeHasTeams())
|
/*if (G_GametypeHasTeams())
|
||||||
{
|
{
|
||||||
// Just check both teams
|
// Just check both teams
|
||||||
if ((UINT32)cv_pointlimit.value <= redscore || (UINT32)cv_pointlimit.value <= bluescore)
|
if ((UINT32)cv_pointlimit.value <= redscore || (UINT32)cv_pointlimit.value <= bluescore)
|
||||||
|
@ -1872,18 +1937,27 @@ void P_CheckPointLimit(void)
|
||||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else*/
|
||||||
{
|
{
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (!playeringame[i] || players[i].spectator)
|
if (!playeringame[i] || players[i].spectator)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((UINT32)cv_pointlimit.value <= players[i].score)
|
if ((UINT32)cv_pointlimit.value <= players[i].marescore)
|
||||||
{
|
{
|
||||||
if (server)
|
for (i = 0; i < MAXPLAYERS; i++) // AAAAA nested loop using the same iteration variable ;;
|
||||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
{
|
||||||
return;
|
if (!playeringame[i] || players[i].spectator)
|
||||||
|
continue;
|
||||||
|
if (players[i].exiting)
|
||||||
|
return;
|
||||||
|
P_DoPlayerExit(&players[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if (server)
|
||||||
|
SendNetXCmd(XD_EXITLEVEL, NULL, 0);*/
|
||||||
|
return; // good thing we're leaving the function immediately instead of letting the loop get mangled!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1977,13 +2051,15 @@ void P_CheckSurvivors(void)
|
||||||
// Checks whether or not to end a race netgame.
|
// Checks whether or not to end a race netgame.
|
||||||
boolean P_CheckRacers(void)
|
boolean P_CheckRacers(void)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i, j, numplayersingame = 0;
|
||||||
|
|
||||||
// Check if all the players in the race have finished. If so, end the level.
|
// Check if all the players in the race have finished. If so, end the level.
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (playeringame[i] && !players[i].spectator && !players[i].exiting && players[i].lives > 0)
|
if (!playeringame[i] || players[i].spectator || players[i].exiting || !players[i].lives)
|
||||||
break;
|
continue;
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == MAXPLAYERS) // finished
|
if (i == MAXPLAYERS) // finished
|
||||||
|
@ -1992,6 +2068,35 @@ boolean P_CheckRacers(void)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cv_karteliminatelast.value)
|
||||||
|
{
|
||||||
|
for (j = 0; j < MAXPLAYERS; j++)
|
||||||
|
{
|
||||||
|
if (!playeringame[j] || players[j].spectator)
|
||||||
|
continue;
|
||||||
|
numplayersingame++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numplayersingame > 1) // if there's more than one player in-game, this is safe to do
|
||||||
|
{
|
||||||
|
// check if we just got unlucky and there was only one guy who was a problem
|
||||||
|
for (j = i+1; j < MAXPLAYERS; j++)
|
||||||
|
{
|
||||||
|
if (!playeringame[j] || players[j].spectator || players[j].exiting || !players[j].lives)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (j == MAXPLAYERS) // finish anyways, force a time over
|
||||||
|
{
|
||||||
|
P_DoTimeOver(&players[i]);
|
||||||
|
countdown = countdown2 = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2011,43 +2116,6 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
//if (inflictor && (inflictor->type == MT_SHELL || inflictor->type == MT_FIREBALL))
|
//if (inflictor && (inflictor->type == MT_SHELL || inflictor->type == MT_FIREBALL))
|
||||||
// P_SetTarget(&target->tracer, inflictor);
|
// P_SetTarget(&target->tracer, inflictor);
|
||||||
|
|
||||||
// SRB2kart
|
|
||||||
// I wish I knew a better way to do this
|
|
||||||
if (target->target && target->target->player && target->target->player->mo)
|
|
||||||
{
|
|
||||||
if (target->type == MT_GREENSHIELD && target->target->player->kartstuff[k_greenshell] & 1)
|
|
||||||
target->target->player->kartstuff[k_greenshell] &= ~1;
|
|
||||||
else if (target->type == MT_REDSHIELD && target->target->player->kartstuff[k_redshell] & 1)
|
|
||||||
target->target->player->kartstuff[k_redshell] &= ~1;
|
|
||||||
else if (target->type == MT_BANANASHIELD && target->target->player->kartstuff[k_banana] & 1)
|
|
||||||
target->target->player->kartstuff[k_banana] &= ~1;
|
|
||||||
else if (target->type == MT_FAKESHIELD && target->target->player->kartstuff[k_fakeitem] & 1)
|
|
||||||
target->target->player->kartstuff[k_fakeitem] &= ~1;
|
|
||||||
else if (target->type == MT_BOMBSHIELD && target->target->player->kartstuff[k_bobomb] & 1)
|
|
||||||
target->target->player->kartstuff[k_bobomb] &= ~1;
|
|
||||||
else if (target->type == MT_TRIPLEGREENSHIELD1 && target->target->player->kartstuff[k_triplegreenshell] & 1)
|
|
||||||
target->target->player->kartstuff[k_triplegreenshell] &= ~1;
|
|
||||||
else if (target->type == MT_TRIPLEGREENSHIELD2 && target->target->player->kartstuff[k_triplegreenshell] & 2)
|
|
||||||
target->target->player->kartstuff[k_triplegreenshell] &= ~2;
|
|
||||||
else if (target->type == MT_TRIPLEGREENSHIELD3 && target->target->player->kartstuff[k_triplegreenshell] & 4)
|
|
||||||
target->target->player->kartstuff[k_triplegreenshell] &= ~4;
|
|
||||||
else if (target->type == MT_TRIPLEREDSHIELD1 && target->target->player->kartstuff[k_tripleredshell] & 1)
|
|
||||||
target->target->player->kartstuff[k_tripleredshell] &= ~1;
|
|
||||||
else if (target->type == MT_TRIPLEREDSHIELD2 && target->target->player->kartstuff[k_tripleredshell] & 2)
|
|
||||||
target->target->player->kartstuff[k_tripleredshell] &= ~2;
|
|
||||||
else if (target->type == MT_TRIPLEREDSHIELD3 && target->target->player->kartstuff[k_tripleredshell] & 4)
|
|
||||||
target->target->player->kartstuff[k_tripleredshell] &= ~4;
|
|
||||||
else if (target->type == MT_TRIPLEBANANASHIELD1 && target->target->player->kartstuff[k_triplebanana] & 1)
|
|
||||||
target->target->player->kartstuff[k_triplebanana] &= ~1;
|
|
||||||
else if (target->type == MT_TRIPLEBANANASHIELD2 && target->target->player->kartstuff[k_triplebanana] & 2)
|
|
||||||
target->target->player->kartstuff[k_triplebanana] &= ~2;
|
|
||||||
else if (target->type == MT_TRIPLEBANANASHIELD3 && target->target->player->kartstuff[k_triplebanana] & 4)
|
|
||||||
target->target->player->kartstuff[k_triplebanana] &= ~4;
|
|
||||||
/*else if (target->type == MT_BATTLEBALLOON && target->target->player->kartstuff[k_balloon] > target->threshold-1)
|
|
||||||
target->target->player->kartstuff[k_balloon] = target->threshold-1;*/
|
|
||||||
}
|
|
||||||
//
|
|
||||||
|
|
||||||
if (!useNightsSS && G_IsSpecialStage(gamemap) && target->player && sstimer > 6)
|
if (!useNightsSS && G_IsSpecialStage(gamemap) && target->player && sstimer > 6)
|
||||||
sstimer = 6; // Just let P_Ticker take care of the rest.
|
sstimer = 6; // Just let P_Ticker take care of the rest.
|
||||||
|
|
||||||
|
@ -2056,14 +2124,11 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
|
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
if (target->type != MT_PLAYER && !(target->flags & MF_MONITOR)
|
if (target->type != MT_PLAYER && !(target->flags & MF_MONITOR)
|
||||||
&& !(target->type == MT_GREENITEM || target->type == MT_GREENSHIELD
|
&& !(target->type == MT_ORBINAUT || target->type == MT_ORBINAUT_SHIELD
|
||||||
|| target->type == MT_TRIPLEGREENSHIELD1 || target->type == MT_TRIPLEGREENSHIELD2 || target->type == MT_TRIPLEGREENSHIELD3
|
|| target->type == MT_JAWZ || target->type == MT_JAWZ_DUD || target->type == MT_JAWZ_SHIELD
|
||||||
|| target->type == MT_REDITEM || target->type == MT_REDITEMDUD || target->type == MT_REDSHIELD
|
|| target->type == MT_BANANA || target->type == MT_BANANA_SHIELD
|
||||||
|| target->type == MT_TRIPLEREDSHIELD1 || target->type == MT_TRIPLEREDSHIELD2 || target->type == MT_TRIPLEREDSHIELD3
|
|
||||||
|| target->type == MT_BANANAITEM || target->type == MT_BANANASHIELD
|
|
||||||
|| target->type == MT_TRIPLEBANANASHIELD1 || target->type == MT_TRIPLEBANANASHIELD2 || target->type == MT_TRIPLEBANANASHIELD3
|
|
||||||
|| target->type == MT_FAKEITEM || target->type == MT_FAKESHIELD
|
|| target->type == MT_FAKEITEM || target->type == MT_FAKESHIELD
|
||||||
|| target->type == MT_FIREBALL)) // kart dead items
|
|| target->type == MT_BALLHOG)) // kart dead items
|
||||||
target->flags |= MF_NOGRAVITY; // Don't drop Tails 03-08-2000
|
target->flags |= MF_NOGRAVITY; // Don't drop Tails 03-08-2000
|
||||||
else
|
else
|
||||||
target->flags &= ~MF_NOGRAVITY; // lose it if you for whatever reason have it, I'm looking at you shields
|
target->flags &= ~MF_NOGRAVITY; // lose it if you for whatever reason have it, I'm looking at you shields
|
||||||
|
@ -2082,6 +2147,46 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// SRB2kart
|
||||||
|
// I wish I knew a better way to do this
|
||||||
|
if (target->target && target->target->player && target->target->player->mo)
|
||||||
|
{
|
||||||
|
if (target->target->player->kartstuff[k_eggmanheld] && target->type == MT_FAKESHIELD)
|
||||||
|
target->target->player->kartstuff[k_eggmanheld] = 0;
|
||||||
|
|
||||||
|
if (target->target->player->kartstuff[k_itemheld])
|
||||||
|
{
|
||||||
|
if ((target->type == MT_BANANA_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_BANANA) // trail items
|
||||||
|
|| (target->type == MT_SSMINE_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_MINE))
|
||||||
|
{
|
||||||
|
if (target->lastlook != 0 && target->lastlook < target->target->player->kartstuff[k_itemamount])
|
||||||
|
{
|
||||||
|
if (target->target->hnext)
|
||||||
|
K_KillBananaChain(target->target->hnext, inflictor, source);
|
||||||
|
target->target->player->kartstuff[k_itemamount] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
target->target->player->kartstuff[k_itemamount]--;
|
||||||
|
}
|
||||||
|
else if ((target->type == MT_ORBINAUT_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_ORBINAUT) // orbit items
|
||||||
|
|| (target->type == MT_JAWZ_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_JAWZ))
|
||||||
|
{
|
||||||
|
target->target->player->kartstuff[k_itemamount]--;
|
||||||
|
if (target->lastlook != 0)
|
||||||
|
{
|
||||||
|
K_RepairOrbitChain(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target->target->player->kartstuff[k_itemamount] < 0)
|
||||||
|
target->target->player->kartstuff[k_itemamount] = 0;
|
||||||
|
|
||||||
|
if (!target->target->player->kartstuff[k_itemamount])
|
||||||
|
target->target->player->kartstuff[k_itemheld] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
|
||||||
// Let EVERYONE know what happened to a player! 01-29-2002 Tails
|
// Let EVERYONE know what happened to a player! 01-29-2002 Tails
|
||||||
if (target->player && !target->player->spectator)
|
if (target->player && !target->player->spectator)
|
||||||
{
|
{
|
||||||
|
@ -2197,7 +2302,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
{
|
{
|
||||||
target->flags &= ~(MF_SOLID|MF_SHOOTABLE); // does not block
|
target->flags &= ~(MF_SOLID|MF_SHOOTABLE); // does not block
|
||||||
P_UnsetThingPosition(target);
|
P_UnsetThingPosition(target);
|
||||||
target->flags |= MF_NOBLOCKMAP;
|
target->flags |= MF_NOBLOCKMAP|MF_NOCLIPHEIGHT;
|
||||||
P_SetThingPosition(target);
|
P_SetThingPosition(target);
|
||||||
|
|
||||||
if (!target->player->bot && !G_IsSpecialStage(gamemap)
|
if (!target->player->bot && !G_IsSpecialStage(gamemap)
|
||||||
|
@ -2272,9 +2377,9 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (G_BattleGametype())
|
else if (G_BattleGametype())
|
||||||
{
|
K_CheckBumpers();
|
||||||
K_CheckBalloons();
|
|
||||||
}
|
target->player->kartstuff[k_pogospring] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (source && target && target->player && source->player)
|
if (source && target && target->player && source->player)
|
||||||
|
@ -2773,14 +2878,22 @@ static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage)
|
||||||
|
|
||||||
if (G_BattleGametype())
|
if (G_BattleGametype())
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_balloon] > 0)
|
if (player->kartstuff[k_bumper] > 0)
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_balloon] == 1)
|
if (player->kartstuff[k_bumper] == 1)
|
||||||
CONS_Printf(M_GetText("%s lost all of their balloons!\n"), player_names[player-players]);
|
{
|
||||||
player->kartstuff[k_balloon]--;
|
mobj_t *karmahitbox = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_KARMAHITBOX); // Player hitbox is too small!!
|
||||||
|
P_SetTarget(&karmahitbox->target, player->mo);
|
||||||
|
karmahitbox->destscale = player->mo->scale;
|
||||||
|
P_SetScale(karmahitbox, player->mo->scale);
|
||||||
|
CONS_Printf(M_GetText("%s lost all of their bumpers!\n"), player_names[player-players]);
|
||||||
|
}
|
||||||
|
player->kartstuff[k_bumper]--;
|
||||||
|
if (K_IsPlayerWanted(player))
|
||||||
|
K_CalculateBattleWanted();
|
||||||
}
|
}
|
||||||
|
|
||||||
K_CheckBalloons();
|
K_CheckBumpers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2907,6 +3020,8 @@ static void P_ShieldDamage(player_t *player, mobj_t *inflictor, mobj_t *source,
|
||||||
|
|
||||||
static void P_RingDamage(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 damage)
|
static void P_RingDamage(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 damage)
|
||||||
{
|
{
|
||||||
|
//const UINT8 scoremultiply = ((K_IsWantedPlayer(player) && !trapitem) : 2 ? 1);
|
||||||
|
|
||||||
if (!(inflictor && ((inflictor->flags & MF_MISSILE) || inflictor->player) && player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds])))
|
if (!(inflictor && ((inflictor->flags & MF_MISSILE) || inflictor->player) && player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds])))
|
||||||
{
|
{
|
||||||
P_DoPlayerPain(player, source, inflictor);
|
P_DoPlayerPain(player, source, inflictor);
|
||||||
|
@ -2917,11 +3032,11 @@ static void P_RingDamage(player_t *player, mobj_t *inflictor, mobj_t *source, IN
|
||||||
S_StartSound(player->mo, sfx_spkdth);
|
S_StartSound(player->mo, sfx_spkdth);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (source && source->player && !player->powers[pw_super]) //don't score points against super players
|
/*if (source && source->player && !player->powers[pw_super]) //don't score points against super players
|
||||||
{
|
{
|
||||||
// Award no points when players shoot each other when cv_friendlyfire is on.
|
// Award no points when players shoot each other when cv_friendlyfire is on.
|
||||||
if (!G_GametypeHasTeams() || !(source->player->ctfteam == player->ctfteam && source != player->mo))
|
if (!G_GametypeHasTeams() || !(source->player->ctfteam == player->ctfteam && source != player->mo))
|
||||||
P_AddPlayerScore(source->player, 1);
|
P_AddPlayerScore(source->player, scoremultiply);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gametype == GT_CTF && (player->gotflag & (GF_REDFLAG|GF_BLUEFLAG)))
|
if (gametype == GT_CTF && (player->gotflag & (GF_REDFLAG|GF_BLUEFLAG)))
|
||||||
|
@ -2931,9 +3046,9 @@ static void P_RingDamage(player_t *player, mobj_t *inflictor, mobj_t *source, IN
|
||||||
{
|
{
|
||||||
// Award no points when players shoot each other when cv_friendlyfire is on.
|
// Award no points when players shoot each other when cv_friendlyfire is on.
|
||||||
if (!G_GametypeHasTeams() || !(source->player->ctfteam == player->ctfteam && source != player->mo))
|
if (!G_GametypeHasTeams() || !(source->player->ctfteam == player->ctfteam && source != player->mo))
|
||||||
P_AddPlayerScore(source->player, 1);
|
P_AddPlayerScore(source->player, scoremultiply);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// Ring loss sound plays despite hitting spikes
|
// Ring loss sound plays despite hitting spikes
|
||||||
P_PlayRinglossSound(player->mo); // Ringledingle!
|
P_PlayRinglossSound(player->mo); // Ringledingle!
|
||||||
|
@ -2964,7 +3079,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
#else
|
#else
|
||||||
static const boolean force = false;
|
static const boolean force = false;
|
||||||
#endif
|
#endif
|
||||||
mobj_t *blueexplode;
|
|
||||||
|
|
||||||
if (objectplacing)
|
if (objectplacing)
|
||||||
return false;
|
return false;
|
||||||
|
@ -3124,42 +3238,57 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
|
|
||||||
//{ SRB2kart - special damage sources
|
//{ SRB2kart - special damage sources
|
||||||
|
|
||||||
player->kartstuff[k_mushroomtimer] = 0;
|
// Shrink
|
||||||
|
|
||||||
// Thunder
|
|
||||||
if (damage == 64)
|
if (damage == 64)
|
||||||
{
|
{
|
||||||
if (player == source->player)
|
if (player == source->player)
|
||||||
return false;
|
return false;
|
||||||
// Don't flip out while super!
|
// Don't flip out while super!
|
||||||
if (!player->kartstuff[k_startimer] && player->kartstuff[k_growshrinktimer] <= 0)
|
if (!player->kartstuff[k_invincibilitytimer] && player->kartstuff[k_growshrinktimer] <= 0)
|
||||||
{
|
{
|
||||||
// Start slipping!
|
|
||||||
K_SpinPlayer(player, source);
|
|
||||||
|
|
||||||
// Start shrinking!
|
// Start shrinking!
|
||||||
|
player->mo->scalespeed = FRACUNIT/TICRATE;
|
||||||
player->mo->destscale = 6*(mapheaderinfo[gamemap-1]->mobj_scale)/8;
|
player->mo->destscale = 6*(mapheaderinfo[gamemap-1]->mobj_scale)/8;
|
||||||
player->kartstuff[k_growshrinktimer] -= (100+20*(16-(player->kartstuff[k_position])));
|
if (cv_kartdebugshrink.value && !player->bot)
|
||||||
|
player->mo->destscale = 6*player->mo->destscale/8;
|
||||||
|
|
||||||
|
// Wipeout
|
||||||
|
K_SpinPlayer(player, source, 1, false);
|
||||||
|
damage = player->mo->health - 1;
|
||||||
|
P_RingDamage(player, inflictor, source, damage);
|
||||||
|
P_PlayerRingBurst(player, 5);
|
||||||
|
player->mo->momx = player->mo->momy = 0;
|
||||||
|
if (P_IsLocalPlayer(player))
|
||||||
|
{
|
||||||
|
quake.intensity = 32*FRACUNIT;
|
||||||
|
quake.time = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
K_StripItems(player);
|
||||||
|
player->kartstuff[k_growshrinktimer] -= (200+(40*(16-player->kartstuff[k_position])));
|
||||||
}
|
}
|
||||||
// Mega Mushroom? Let's take that away.
|
// Grow? Let's take that away.
|
||||||
if (player->kartstuff[k_growshrinktimer] > 0)
|
if (player->kartstuff[k_growshrinktimer] > 0)
|
||||||
{
|
{
|
||||||
player->kartstuff[k_growshrinktimer] = 2;
|
player->kartstuff[k_growshrinktimer] = 2;
|
||||||
}
|
}
|
||||||
|
player->kartstuff[k_sneakertimer] = 0;
|
||||||
// Invincible or not, we still need this.
|
// Invincible or not, we still need this.
|
||||||
P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_LIGHTNING);
|
//P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_LIGHTNING);
|
||||||
|
S_StartSound(player->mo, sfx_kc59);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Blue Thunder
|
// Self-Propelled Bomb
|
||||||
if (damage == 65)
|
if (damage == 65)
|
||||||
{
|
{
|
||||||
|
mobj_t *spbexplode;
|
||||||
if (player == source->player)
|
if (player == source->player)
|
||||||
return false;
|
return false;
|
||||||
// Just need to do this now! Being thrown upwards is done by the explosion.
|
// Just need to do this now! Being thrown upwards is done by the explosion.
|
||||||
P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUELIGHTNING);
|
//P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUELIGHTNING);
|
||||||
blueexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUEEXPLOSION);
|
spbexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUEEXPLOSION);
|
||||||
P_SetTarget(&blueexplode->target, source);
|
P_SetTarget(&spbexplode->target, source);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
|
@ -3185,23 +3314,25 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
// Instant-Death
|
// Instant-Death
|
||||||
if (damage == 10000)
|
if (damage == 10000)
|
||||||
P_KillPlayer(player, source, damage);
|
P_KillPlayer(player, source, damage);
|
||||||
else if (player->kartstuff[k_startimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->powers[pw_flashing])
|
else if (player->kartstuff[k_invincibilitytimer] > 0 || player->kartstuff[k_growshrinktimer] > 0 || player->powers[pw_flashing])
|
||||||
|
{
|
||||||
|
K_DoInstashield(player);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (inflictor && (inflictor->type == MT_GREENITEM || inflictor->type == MT_GREENSHIELD
|
if (inflictor && (inflictor->type == MT_ORBINAUT || inflictor->type == MT_ORBINAUT_SHIELD
|
||||||
|| inflictor->type == MT_REDITEM || inflictor->type == MT_REDSHIELD || inflictor->type == MT_REDITEMDUD
|
|| inflictor->type == MT_JAWZ || inflictor->type == MT_JAWZ_SHIELD || inflictor->type == MT_JAWZ_DUD
|
||||||
|| inflictor->type == MT_FAKEITEM || inflictor->type == MT_FAKESHIELD
|
|| inflictor->type == MT_FAKEITEM || inflictor->type == MT_FAKESHIELD
|
||||||
|| inflictor->type == MT_TRIPLEGREENSHIELD1 || inflictor->type == MT_TRIPLEGREENSHIELD2 || inflictor->type == MT_TRIPLEGREENSHIELD3
|
|
||||||
|| inflictor->type == MT_TRIPLEREDSHIELD1 || inflictor->type == MT_TRIPLEREDSHIELD2 || inflictor->type == MT_TRIPLEREDSHIELD3
|
|
||||||
|| inflictor->player))
|
|| inflictor->player))
|
||||||
{
|
{
|
||||||
player->kartstuff[k_spinouttype] = 1;
|
player->kartstuff[k_sneakertimer] = 0;
|
||||||
K_SpinPlayer(player, source);
|
K_SpinPlayer(player, source, 1, (inflictor->type == MT_FAKEITEM || inflictor->type == MT_FAKESHIELD));
|
||||||
damage = player->mo->health - 1;
|
damage = player->mo->health - 1;
|
||||||
P_RingDamage(player, inflictor, source, damage);
|
P_RingDamage(player, inflictor, source, damage);
|
||||||
P_PlayerRingBurst(player, 5);
|
P_PlayerRingBurst(player, 5);
|
||||||
player->mo->momx = player->mo->momy = 0;
|
if (inflictor->type == MT_FAKEITEM || inflictor->type == MT_FAKESHIELD)
|
||||||
|
player->mo->momx = player->mo->momy = 0;
|
||||||
if (P_IsLocalPlayer(player))
|
if (P_IsLocalPlayer(player))
|
||||||
{
|
{
|
||||||
quake.intensity = 32*FRACUNIT;
|
quake.intensity = 32*FRACUNIT;
|
||||||
|
@ -3210,8 +3341,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->kartstuff[k_spinouttype] = -1;
|
K_SpinPlayer(player, source, 0, false);
|
||||||
K_SpinPlayer(player, source);
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3362,22 +3492,25 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
target->reactiontime = 0; // we're awake now...
|
if (!P_MobjWasRemoved(target))
|
||||||
|
|
||||||
if (source && source != target)
|
|
||||||
{
|
{
|
||||||
// if not intent on another player,
|
target->reactiontime = 0; // we're awake now...
|
||||||
// chase after this one
|
|
||||||
P_SetTarget(&target->target, source);
|
if (source && source != target)
|
||||||
if (target->state == &states[target->info->spawnstate] && target->info->seestate != S_NULL)
|
|
||||||
{
|
{
|
||||||
if (player)
|
// if not intent on another player,
|
||||||
|
// chase after this one
|
||||||
|
P_SetTarget(&target->target, source);
|
||||||
|
if (target->state == &states[target->info->spawnstate] && target->info->seestate != S_NULL)
|
||||||
{
|
{
|
||||||
if (!(player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds])))
|
if (player)
|
||||||
P_SetPlayerMobjState(target, target->info->seestate);
|
{
|
||||||
|
if (!(player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds])))
|
||||||
|
P_SetPlayerMobjState(target, target->info->seestate);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
P_SetMobjState(target, target->info->seestate);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
P_SetMobjState(target, target->info->seestate);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#define FLOATSPEED (FRACUNIT*4)
|
#define FLOATSPEED (FRACUNIT*4)
|
||||||
|
|
||||||
#define VIEWHEIGHTS "41"
|
//#define VIEWHEIGHTS "41"
|
||||||
|
|
||||||
// Maximum player score.
|
// Maximum player score.
|
||||||
#define MAXSCORE 999999990
|
#define MAXSCORE 999999990
|
||||||
|
@ -150,6 +150,7 @@ boolean P_InQuicksand(mobj_t *mo);
|
||||||
|
|
||||||
void P_SetObjectMomZ(mobj_t *mo, fixed_t value, boolean relative);
|
void P_SetObjectMomZ(mobj_t *mo, fixed_t value, boolean relative);
|
||||||
void P_RestoreMusic(player_t *player);
|
void P_RestoreMusic(player_t *player);
|
||||||
|
boolean P_EndingMusic(player_t *player);
|
||||||
void P_SpawnShieldOrb(player_t *player);
|
void P_SpawnShieldOrb(player_t *player);
|
||||||
mobj_t *P_SpawnGhostMobj(mobj_t *mobj);
|
mobj_t *P_SpawnGhostMobj(mobj_t *mobj);
|
||||||
void P_GivePlayerRings(player_t *player, INT32 num_rings);
|
void P_GivePlayerRings(player_t *player, INT32 num_rings);
|
||||||
|
@ -167,6 +168,7 @@ void P_ElementalFireTrail(player_t *player);
|
||||||
void P_PlayerThink(player_t *player);
|
void P_PlayerThink(player_t *player);
|
||||||
void P_PlayerAfterThink(player_t *player);
|
void P_PlayerAfterThink(player_t *player);
|
||||||
void P_DoPlayerExit(player_t *player);
|
void P_DoPlayerExit(player_t *player);
|
||||||
|
void P_DoTimeOver(player_t *player);
|
||||||
void P_NightserizePlayer(player_t *player, INT32 ptime);
|
void P_NightserizePlayer(player_t *player, INT32 ptime);
|
||||||
|
|
||||||
void P_InstaThrust(mobj_t *mo, angle_t angle, fixed_t move);
|
void P_InstaThrust(mobj_t *mo, angle_t angle, fixed_t move);
|
||||||
|
@ -177,12 +179,13 @@ void P_InstaThrustEvenIn2D(mobj_t *mo, angle_t angle, fixed_t move);
|
||||||
boolean P_LookForEnemies(player_t *player);
|
boolean P_LookForEnemies(player_t *player);
|
||||||
void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius);
|
void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius);
|
||||||
void P_HomingAttack(mobj_t *source, mobj_t *enemy); /// \todo doesn't belong in p_user
|
void P_HomingAttack(mobj_t *source, mobj_t *enemy); /// \todo doesn't belong in p_user
|
||||||
boolean P_SuperReady(player_t *player);
|
//boolean P_SuperReady(player_t *player);
|
||||||
void P_DoJump(player_t *player, boolean soundandstate);
|
void P_DoJump(player_t *player, boolean soundandstate);
|
||||||
boolean P_AnalogMove(player_t *player);
|
boolean P_AnalogMove(player_t *player);
|
||||||
boolean P_TransferToNextMare(player_t *player);
|
boolean P_TransferToNextMare(player_t *player);
|
||||||
UINT8 P_FindLowestMare(void);
|
UINT8 P_FindLowestMare(void);
|
||||||
UINT8 P_FindLowestLap(void);
|
UINT8 P_FindLowestLap(void);
|
||||||
|
UINT8 P_FindHighestLap(void);
|
||||||
void P_FindEmerald(void);
|
void P_FindEmerald(void);
|
||||||
void P_TransferToAxis(player_t *player, INT32 axisnum);
|
void P_TransferToAxis(player_t *player, INT32 axisnum);
|
||||||
boolean P_PlayerMoving(INT32 pnum);
|
boolean P_PlayerMoving(INT32 pnum);
|
||||||
|
@ -191,9 +194,9 @@ void P_SpawnSpinMobj(player_t *player, mobjtype_t type);
|
||||||
void P_Telekinesis(player_t *player, fixed_t thrust, fixed_t range);
|
void P_Telekinesis(player_t *player, fixed_t thrust, fixed_t range);
|
||||||
|
|
||||||
void P_PlayLivesJingle(player_t *player);
|
void P_PlayLivesJingle(player_t *player);
|
||||||
#define P_PlayRinglossSound(s) S_StartSound(s, (mariomode) ? sfx_mario8 : sfx_altow1 + P_RandomKey(4));
|
void P_PlayRinglossSound(mobj_t *source);
|
||||||
#define P_PlayDeathSound(s) S_StartSound(s, sfx_altdi1 + P_RandomKey(4));
|
void P_PlayDeathSound(mobj_t *source);
|
||||||
#define P_PlayVictorySound(s) S_StartSound(s, sfx_victr1 + P_RandomKey(4));
|
void P_PlayVictorySound(mobj_t *source);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -209,7 +212,7 @@ void P_PlayLivesJingle(player_t *player);
|
||||||
extern mapthing_t *itemrespawnque[ITEMQUESIZE];
|
extern mapthing_t *itemrespawnque[ITEMQUESIZE];
|
||||||
extern tic_t itemrespawntime[ITEMQUESIZE];
|
extern tic_t itemrespawntime[ITEMQUESIZE];
|
||||||
extern size_t iquehead, iquetail;
|
extern size_t iquehead, iquetail;
|
||||||
extern consvar_t cv_gravity, cv_viewheight;
|
extern consvar_t cv_gravity/*, cv_viewheight*/;
|
||||||
|
|
||||||
void P_RespawnSpecials(void);
|
void P_RespawnSpecials(void);
|
||||||
|
|
||||||
|
@ -338,6 +341,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff);
|
||||||
boolean P_Move(mobj_t *actor, fixed_t speed);
|
boolean P_Move(mobj_t *actor, fixed_t speed);
|
||||||
boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z);
|
boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z);
|
||||||
void P_SlideMove(mobj_t *mo, boolean forceslide);
|
void P_SlideMove(mobj_t *mo, boolean forceslide);
|
||||||
|
void P_BouncePlayerMove(mobj_t *mo);
|
||||||
void P_BounceMove(mobj_t *mo);
|
void P_BounceMove(mobj_t *mo);
|
||||||
boolean P_CheckSight(mobj_t *t1, mobj_t *t2);
|
boolean P_CheckSight(mobj_t *t1, mobj_t *t2);
|
||||||
void P_CheckHoopPosition(mobj_t *hoopthing, fixed_t x, fixed_t y, fixed_t z, fixed_t radius);
|
void P_CheckHoopPosition(mobj_t *hoopthing, fixed_t x, fixed_t y, fixed_t z, fixed_t radius);
|
||||||
|
|
505
src/p_map.c
505
src/p_map.c
|
@ -116,6 +116,7 @@ boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z)
|
||||||
boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
||||||
{
|
{
|
||||||
//INT32 pflags;
|
//INT32 pflags;
|
||||||
|
const fixed_t scale = mapheaderinfo[gamemap-1]->mobj_scale + abs(object->scale - mapheaderinfo[gamemap-1]->mobj_scale); //max(mapheaderinfo[gamemap-1]->mobj_scale, object->scale)
|
||||||
fixed_t offx, offy;
|
fixed_t offx, offy;
|
||||||
fixed_t vertispeed = spring->info->mass;
|
fixed_t vertispeed = spring->info->mass;
|
||||||
fixed_t horizspeed = spring->info->damage;
|
fixed_t horizspeed = spring->info->damage;
|
||||||
|
@ -178,12 +179,12 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vertispeed)
|
if (vertispeed)
|
||||||
object->momz = FixedMul(vertispeed,FixedSqrt(FixedMul(object->scale, spring->scale)));
|
object->momz = FixedMul(vertispeed,FixedSqrt(FixedMul(scale, spring->scale)));
|
||||||
|
|
||||||
if (horizspeed)
|
if (horizspeed)
|
||||||
{
|
{
|
||||||
if (!object->player)
|
if (!object->player)
|
||||||
P_InstaThrustEvenIn2D(object, spring->angle, FixedMul(horizspeed,FixedSqrt(FixedMul(object->scale, spring->scale))));
|
P_InstaThrustEvenIn2D(object, spring->angle, FixedMul(horizspeed,FixedSqrt(FixedMul(scale, spring->scale))));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fixed_t finalSpeed = horizspeed;
|
fixed_t finalSpeed = horizspeed;
|
||||||
|
@ -192,7 +193,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
||||||
if (pSpeed > finalSpeed)
|
if (pSpeed > finalSpeed)
|
||||||
finalSpeed = pSpeed;
|
finalSpeed = pSpeed;
|
||||||
|
|
||||||
P_InstaThrustEvenIn2D(object, spring->angle, FixedMul(finalSpeed,FixedSqrt(FixedMul(object->scale, spring->scale))));
|
P_InstaThrustEvenIn2D(object, spring->angle, FixedMul(finalSpeed,FixedSqrt(FixedMul(scale, spring->scale))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,7 +309,17 @@ static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object)
|
||||||
if (spring->state != &states[S_STEAM1]) // Only when it bursts
|
if (spring->state != &states[S_STEAM1]) // Only when it bursts
|
||||||
break;
|
break;
|
||||||
|
|
||||||
object->momz = flipval*FixedMul(speed, FixedSqrt(FixedMul(spring->scale, object->scale))); // scale the speed with both objects' scales, just like with springs!
|
if (spring->spawnpoint && spring->spawnpoint->options & MTF_OBJECTSPECIAL)
|
||||||
|
{
|
||||||
|
if (object->eflags & MFE_SPRUNG)
|
||||||
|
break;
|
||||||
|
if (object->player)
|
||||||
|
object->player->kartstuff[k_pogospring] = 1;
|
||||||
|
K_DoPogoSpring(object, 0, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
object->momz = flipval*FixedMul(speed, FixedSqrt(FixedMul(spring->scale, object->scale))); // scale the speed with both objects' scales, just like with springs!
|
||||||
|
|
||||||
/* // SRB2kart - don't need state change
|
/* // SRB2kart - don't need state change
|
||||||
if (p)
|
if (p)
|
||||||
|
@ -655,10 +666,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
|
|
||||||
if (tmthing->type == MT_RANDOMITEM)
|
if (tmthing->type == MT_RANDOMITEM)
|
||||||
return true;
|
return true;
|
||||||
if (tmthing->type == MT_GREENITEM || tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD ||
|
if (tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD
|
||||||
tmthing->type == MT_GREENSHIELD || tmthing->type == MT_REDSHIELD ||
|
|| tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD)
|
||||||
tmthing->type == MT_TRIPLEGREENSHIELD1 || tmthing->type == MT_TRIPLEGREENSHIELD2 || tmthing->type == MT_TRIPLEGREENSHIELD3 ||
|
|
||||||
tmthing->type == MT_TRIPLEREDSHIELD1 || tmthing->type == MT_TRIPLEREDSHIELD2 || tmthing->type == MT_TRIPLEREDSHIELD3)
|
|
||||||
{
|
{
|
||||||
// see if it went over / under
|
// see if it went over / under
|
||||||
if (tmthing->z > thing->z + thing->height)
|
if (tmthing->z > thing->z + thing->height)
|
||||||
|
@ -672,23 +681,22 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
if (tmthing->health <= 0 || thing->health <= 0)
|
if (tmthing->health <= 0 || thing->health <= 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (((tmthing->type == MT_TRIPLEGREENSHIELD1 || tmthing->type == MT_TRIPLEGREENSHIELD2 || tmthing->type == MT_TRIPLEGREENSHIELD3
|
if ((tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD) && tmthing->lastlook
|
||||||
|| tmthing->type == MT_TRIPLEREDSHIELD1 || tmthing->type == MT_TRIPLEREDSHIELD2 || tmthing->type == MT_TRIPLEREDSHIELD3)
|
&& (thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD) && thing->lastlook
|
||||||
&& (thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
|
||||||
|| thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3))
|
|
||||||
&& (tmthing->target == thing->target)) // Don't hit each other if you have the same target
|
&& (tmthing->target == thing->target)) // Don't hit each other if you have the same target
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (thing->player && thing->player->powers[pw_flashing]
|
if (thing->player && thing->player->powers[pw_flashing]
|
||||||
&& !(tmthing->type == MT_GREENITEM || tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD))
|
&& !(tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (thing->type == MT_PLAYER)
|
if (thing->type == MT_PLAYER)
|
||||||
{
|
{
|
||||||
// Player Damage
|
// Player Damage
|
||||||
P_DamageMobj(thing, tmthing, tmthing->target, 1);
|
P_DamageMobj(thing, tmthing, tmthing->target, 1);
|
||||||
|
K_KartBouncing(thing, tmthing, false, false);
|
||||||
|
|
||||||
if (tmthing->type == MT_GREENITEM || tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD)
|
if (tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD)
|
||||||
S_StartSound(thing, sfx_shelit);
|
S_StartSound(thing, sfx_shelit);
|
||||||
|
|
||||||
// This Item Damage
|
// This Item Damage
|
||||||
|
@ -703,13 +711,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
||||||
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|
else if (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||||
|| thing->type == MT_GREENSHIELD || thing->type == MT_REDSHIELD
|
|| thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD
|
||||||
|| thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
|| thing->type == MT_BANANA || thing->type == MT_BANANA_SHIELD
|
||||||
|| thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3
|
|| thing->type == MT_BALLHOG)
|
||||||
|| thing->type == MT_BANANAITEM || thing->type == MT_BANANASHIELD
|
|
||||||
|| thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|
|
||||||
|| thing->type == MT_FIREBALL)
|
|
||||||
{
|
{
|
||||||
// Other Item Damage
|
// Other Item Damage
|
||||||
if (thing->eflags & MFE_VERTICALFLIP)
|
if (thing->eflags & MFE_VERTICALFLIP)
|
||||||
|
@ -739,9 +744,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
|
else if (thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
|
||||||
{
|
{
|
||||||
if (tmthing->type == MT_GREENSHIELD || tmthing->type == MT_REDSHIELD
|
if (tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD)
|
||||||
|| tmthing->type == MT_TRIPLEGREENSHIELD1 || tmthing->type == MT_TRIPLEGREENSHIELD2 || tmthing->type == MT_TRIPLEGREENSHIELD3
|
|
||||||
|| tmthing->type == MT_TRIPLEREDSHIELD1 || tmthing->type == MT_TRIPLEREDSHIELD2 || tmthing->type == MT_TRIPLEREDSHIELD3)
|
|
||||||
{
|
{
|
||||||
// This Item Damage
|
// This Item Damage
|
||||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||||
|
@ -770,7 +773,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
||||||
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_BOMBSHIELD || thing->type == MT_BOMBITEM)
|
else if (thing->type == MT_SSMINE_SHIELD || thing->type == MT_SSMINE)
|
||||||
{
|
{
|
||||||
// This Item Damage
|
// This Item Damage
|
||||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||||
|
@ -787,12 +790,12 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
// Bomb death
|
// Bomb death
|
||||||
P_KillMobj(thing, tmthing, tmthing);
|
P_KillMobj(thing, tmthing, tmthing);
|
||||||
}
|
}
|
||||||
else if (thing->flags & MF_SPRING && (tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD || tmthing->type == MT_GREENITEM))
|
else if (thing->flags & MF_SPRING && (tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD || tmthing->type == MT_ORBINAUT))
|
||||||
P_DoSpring(thing, tmthing);
|
P_DoSpring(thing, tmthing);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (tmthing->flags & MF_SPRING && (thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD || thing->type == MT_GREENITEM))
|
else if (tmthing->flags & MF_SPRING && (thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD || thing->type == MT_ORBINAUT))
|
||||||
{
|
{
|
||||||
// see if it went over / under
|
// see if it went over / under
|
||||||
if (tmthing->z > thing->z + thing->height)
|
if (tmthing->z > thing->z + thing->height)
|
||||||
|
@ -834,7 +837,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (tmthing->type == MT_BOMBEXPLOSION)
|
else if (tmthing->type == MT_MINEEXPLOSION)
|
||||||
{
|
{
|
||||||
// see if it went over / under
|
// see if it went over / under
|
||||||
if (tmthing->z > thing->z + thing->height)
|
if (tmthing->z > thing->z + thing->height)
|
||||||
|
@ -850,17 +853,16 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
|
|
||||||
if (thing->type == MT_PLAYER && thing->player)
|
if (thing->type == MT_PLAYER && thing->player)
|
||||||
{
|
{
|
||||||
if (tmthing->state == &states[S_BOMBEXPLOSION1])
|
if (tmthing->state == &states[S_MINEEXPLOSION1])
|
||||||
K_ExplodePlayer(thing->player, tmthing->target);
|
K_ExplodePlayer(thing->player, tmthing->target);
|
||||||
else
|
else
|
||||||
K_SpinPlayer(thing->player, tmthing->target);
|
K_SpinPlayer(thing->player, tmthing->target, 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true; // This doesn't collide with anything, but we want it to effect the player anyway.
|
return true; // This doesn't collide with anything, but we want it to effect the player anyway.
|
||||||
}
|
}
|
||||||
else if (tmthing->type == MT_BANANASHIELD || tmthing->type == MT_BANANAITEM
|
else if (tmthing->type == MT_BANANA_SHIELD || tmthing->type == MT_BANANA
|
||||||
|| tmthing->type == MT_TRIPLEBANANASHIELD1 || tmthing->type == MT_TRIPLEBANANASHIELD2 || tmthing->type == MT_TRIPLEBANANASHIELD3
|
|| tmthing->type == MT_BALLHOG)
|
||||||
|| tmthing->type == MT_FIREBALL)
|
|
||||||
{
|
{
|
||||||
// see if it went over / under
|
// see if it went over / under
|
||||||
if (tmthing->z > thing->z + thing->height)
|
if (tmthing->z > thing->z + thing->height)
|
||||||
|
@ -874,13 +876,12 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
if (tmthing->health <= 0 || thing->health <= 0)
|
if (tmthing->health <= 0 || thing->health <= 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (((tmthing->type == MT_BANANASHIELD || tmthing->type == MT_TRIPLEBANANASHIELD1 || tmthing->type == MT_TRIPLEBANANASHIELD2 || tmthing->type == MT_TRIPLEBANANASHIELD3)
|
if (((tmthing->type == MT_BANANA_SHIELD) && (thing->type == MT_BANANA_SHIELD))
|
||||||
&& (thing->type == MT_BANANASHIELD || thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3))
|
|
||||||
&& (tmthing->target == thing->target)) // Don't hit each other if you have the same target
|
&& (tmthing->target == thing->target)) // Don't hit each other if you have the same target
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (tmthing->type == MT_FIREBALL && thing->type == MT_FIREBALL)
|
if (tmthing->type == MT_BALLHOG && thing->type == MT_BALLHOG)
|
||||||
return true; // Fireballs don't collide with eachother
|
return true; // Ballhogs don't collide with eachother
|
||||||
|
|
||||||
if (thing->player && thing->player->powers[pw_flashing])
|
if (thing->player && thing->player->powers[pw_flashing])
|
||||||
return true;
|
return true;
|
||||||
|
@ -888,7 +889,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
if (thing->type == MT_PLAYER)
|
if (thing->type == MT_PLAYER)
|
||||||
{
|
{
|
||||||
// Player Damage
|
// Player Damage
|
||||||
K_SpinPlayer(thing->player, tmthing->target);
|
K_SpinPlayer(thing->player, tmthing->target, 0, (tmthing->type == MT_BANANA || tmthing->type == MT_BANANA_SHIELD));
|
||||||
|
|
||||||
// This Item Damage
|
// This Item Damage
|
||||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||||
|
@ -902,12 +903,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
||||||
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_BANANASHIELD || thing->type == MT_BANANAITEM
|
else if (thing->type == MT_BANANA || thing->type == MT_BANANA_SHIELD
|
||||||
|| thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|
|| thing->type == MT_ORBINAUT || thing->type == MT_ORBINAUT_SHIELD
|
||||||
|| thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|
|| thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD || thing->type == MT_JAWZ_SHIELD
|
||||||
|| thing->type == MT_GREENSHIELD || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
|| thing->type == MT_BALLHOG)
|
||||||
|| thing->type == MT_REDSHIELD || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3
|
|
||||||
|| thing->type == MT_FIREBALL)
|
|
||||||
{
|
{
|
||||||
// Other Item Damage
|
// Other Item Damage
|
||||||
if (thing->eflags & MFE_VERTICALFLIP)
|
if (thing->eflags & MFE_VERTICALFLIP)
|
||||||
|
@ -937,7 +936,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
|
else if (thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
|
||||||
{
|
{
|
||||||
if (tmthing->type == MT_BANANASHIELD || tmthing->type == MT_TRIPLEBANANASHIELD1 || tmthing->type == MT_TRIPLEBANANASHIELD2 || tmthing->type == MT_TRIPLEBANANASHIELD3)
|
if (tmthing->type == MT_BANANA_SHIELD)
|
||||||
{
|
{
|
||||||
// This Item Damage
|
// This Item Damage
|
||||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||||
|
@ -985,10 +984,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
if (thing->player && thing->player->powers[pw_flashing])
|
if (thing->player && thing->player->powers[pw_flashing])
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (thing->type == MT_GREENITEM // When these items collide with the fake item, just the fake item is destroyed
|
if (thing->type == MT_ORBINAUT // When these items collide with the fake item, just the fake item is destroyed
|
||||||
|| thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|
|| thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||||
|| thing->type == MT_BOMBITEM
|
|| thing->type == MT_SSMINE
|
||||||
|| thing->type == MT_BANANAITEM || thing->type == MT_FIREBALL)
|
|| thing->type == MT_BANANA || thing->type == MT_BALLHOG)
|
||||||
{
|
{
|
||||||
// This Item Damage
|
// This Item Damage
|
||||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||||
|
@ -1002,10 +1001,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
||||||
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_GREENSHIELD || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3 // When these items collide with the fake item, both of them are destroyed
|
else if (thing->type == MT_ORBINAUT_SHIELD // When these items collide with the fake item, both of them are destroyed
|
||||||
|| thing->type == MT_REDSHIELD || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3
|
|| thing->type == MT_JAWZ_SHIELD
|
||||||
|| thing->type == MT_BOMBSHIELD
|
|| thing->type == MT_SSMINE_SHIELD
|
||||||
|| thing->type == MT_BANANASHIELD || thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|
|| thing->type == MT_BANANA_SHIELD
|
||||||
|| thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
|
|| thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
|
||||||
{
|
{
|
||||||
// Other Item Damage
|
// Other Item Damage
|
||||||
|
@ -1054,7 +1053,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (tmthing->type == MT_BOMBSHIELD || tmthing->type == MT_BOMBITEM)
|
else if (tmthing->type == MT_SSMINE_SHIELD || tmthing->type == MT_SSMINE)
|
||||||
{
|
{
|
||||||
// see if it went over / under
|
// see if it went over / under
|
||||||
if (tmthing->z > thing->z + thing->height)
|
if (tmthing->z > thing->z + thing->height)
|
||||||
|
@ -1075,9 +1074,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
{
|
{
|
||||||
P_KillMobj(tmthing, thing, thing);
|
P_KillMobj(tmthing, thing, thing);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|
else if (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||||
|| thing->type == MT_GREENSHIELD || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
|| thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD)
|
||||||
|| thing->type == MT_REDSHIELD || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3)
|
|
||||||
{
|
{
|
||||||
P_KillMobj(tmthing, thing, thing);
|
P_KillMobj(tmthing, thing, thing);
|
||||||
|
|
||||||
|
@ -1097,16 +1095,13 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (tmthing->type == MT_PLAYER &&
|
else if (tmthing->type == MT_PLAYER &&
|
||||||
(thing->type == MT_GREENSHIELD || thing->type == MT_GREENITEM
|
(thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_ORBINAUT
|
||||||
|| thing->type == MT_REDSHIELD || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|
|| thing->type == MT_JAWZ_SHIELD || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||||
|| thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
|
||||||
|| thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3
|
|
||||||
|| thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM
|
|| thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM
|
||||||
|| thing->type == MT_BANANASHIELD || thing->type == MT_BANANAITEM
|
|| thing->type == MT_BANANA_SHIELD || thing->type == MT_BANANA
|
||||||
|| thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|
|| thing->type == MT_SSMINE_SHIELD || thing->type == MT_SSMINE
|
||||||
|| thing->type == MT_BOMBSHIELD || thing->type == MT_BOMBITEM
|
|| thing->type == MT_MINEEXPLOSION
|
||||||
|| thing->type == MT_BOMBEXPLOSION
|
|| thing->type == MT_SINK || thing->type == MT_BALLHOG
|
||||||
|| thing->type == MT_SINK || thing->type == MT_FIREBALL
|
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
// see if it went over / under
|
// see if it went over / under
|
||||||
|
@ -1116,12 +1111,11 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
return true; // underneath
|
return true; // underneath
|
||||||
|
|
||||||
if (tmthing->player && tmthing->player->powers[pw_flashing]
|
if (tmthing->player && tmthing->player->powers[pw_flashing]
|
||||||
&& !(thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD))
|
&& !(thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (thing->type == MT_GREENSHIELD || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
if (thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD
|
||||||
|| thing->type == MT_REDSHIELD || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3
|
|| thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||||
|| thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|
|
||||||
|| thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM)
|
|| thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM)
|
||||||
{
|
{
|
||||||
if ((thing->target == tmthing) && (thing->threshold > 0))
|
if ((thing->target == tmthing) && (thing->threshold > 0))
|
||||||
|
@ -1133,7 +1127,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
// Player Damage
|
// Player Damage
|
||||||
P_DamageMobj(tmthing, thing, thing->target, 1);
|
P_DamageMobj(tmthing, thing, thing->target, 1);
|
||||||
|
|
||||||
if (thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD)
|
if (thing->type != MT_FAKESHIELD && thing->type != MT_FAKEITEM)
|
||||||
|
K_KartBouncing(tmthing, thing, false, false);
|
||||||
|
|
||||||
|
if (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD)
|
||||||
S_StartSound(tmthing, sfx_shelit);
|
S_StartSound(tmthing, sfx_shelit);
|
||||||
|
|
||||||
// Other Item Damage
|
// Other Item Damage
|
||||||
|
@ -1148,9 +1145,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
||||||
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_BANANASHIELD || thing->type == MT_BANANAITEM
|
else if (thing->type == MT_BANANA_SHIELD || thing->type == MT_BANANA
|
||||||
|| thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|
|| thing->type == MT_BALLHOG)
|
||||||
|| thing->type == MT_FIREBALL)
|
|
||||||
{
|
{
|
||||||
if ((thing->target == tmthing) && (thing->threshold > 0))
|
if ((thing->target == tmthing) && (thing->threshold > 0))
|
||||||
return true;
|
return true;
|
||||||
|
@ -1159,7 +1155,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Player Damage
|
// Player Damage
|
||||||
K_SpinPlayer(tmthing->player, thing->target);
|
K_SpinPlayer(tmthing->player, thing->target, 0, (thing->type == MT_BANANA || thing->type == MT_BANANA_SHIELD));
|
||||||
|
|
||||||
// Other Item Damage
|
// Other Item Damage
|
||||||
if (thing->eflags & MFE_VERTICALFLIP)
|
if (thing->eflags & MFE_VERTICALFLIP)
|
||||||
|
@ -1173,7 +1169,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
||||||
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_BOMBSHIELD || thing->type == MT_BOMBITEM)
|
else if (thing->type == MT_SSMINE_SHIELD || thing->type == MT_SSMINE)
|
||||||
{
|
{
|
||||||
if ((thing->target == tmthing) && (thing->threshold > 0))
|
if ((thing->target == tmthing) && (thing->threshold > 0))
|
||||||
return true;
|
return true;
|
||||||
|
@ -1183,13 +1179,13 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
|
|
||||||
P_KillMobj(thing, tmthing, tmthing);
|
P_KillMobj(thing, tmthing, tmthing);
|
||||||
}
|
}
|
||||||
else if (thing->type == MT_BOMBEXPLOSION && tmthing->player)
|
else if (thing->type == MT_MINEEXPLOSION && tmthing->player)
|
||||||
{
|
{
|
||||||
// Player Damage
|
// Player Damage
|
||||||
if (thing->state == &states[S_BOMBEXPLOSION1])
|
if (thing->state == &states[S_MINEEXPLOSION1])
|
||||||
K_ExplodePlayer(tmthing->player, thing->target);
|
K_ExplodePlayer(tmthing->player, thing->target);
|
||||||
else
|
else
|
||||||
K_SpinPlayer(tmthing->player, thing->target);
|
K_SpinPlayer(tmthing->player, thing->target, 0, false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1543,21 +1539,15 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
&& !(thing->z + thing->height < tmthing->z || thing->z > tmthing->z + tmthing->height))
|
&& !(thing->z + thing->height < tmthing->z || thing->z > tmthing->z + tmthing->height))
|
||||||
{
|
{
|
||||||
// SRB2kart - Squish!
|
// SRB2kart - Squish!
|
||||||
if ((tmthing->player->kartstuff[k_growshrinktimer] > 0 && thing->player->kartstuff[k_growshrinktimer] <= 0)
|
if (tmthing->scale > thing->scale + (FRACUNIT/8))
|
||||||
|| (tmthing->player->kartstuff[k_growshrinktimer] == 0 && thing->player->kartstuff[k_growshrinktimer] < 0))
|
|
||||||
{
|
|
||||||
K_SquishPlayer(thing->player, tmthing);
|
K_SquishPlayer(thing->player, tmthing);
|
||||||
}
|
else if (thing->scale > tmthing->scale + (FRACUNIT/8))
|
||||||
else if ((thing->player->kartstuff[k_growshrinktimer] > 0 && tmthing->player->kartstuff[k_growshrinktimer] <= 0)
|
|
||||||
|| (thing->player->kartstuff[k_growshrinktimer] == 0 && tmthing->player->kartstuff[k_growshrinktimer] < 0))
|
|
||||||
{
|
|
||||||
K_SquishPlayer(tmthing->player, thing);
|
K_SquishPlayer(tmthing->player, thing);
|
||||||
}
|
|
||||||
|
|
||||||
// SRB2kart - Starpower!
|
// SRB2kart - Starpower!
|
||||||
if (tmthing->player->kartstuff[k_startimer] && !thing->player->kartstuff[k_startimer])
|
if (tmthing->player->kartstuff[k_invincibilitytimer] && !thing->player->kartstuff[k_invincibilitytimer])
|
||||||
P_DamageMobj(thing, tmthing, tmthing, 1);
|
P_DamageMobj(thing, tmthing, tmthing, 1);
|
||||||
else if (thing->player->kartstuff[k_startimer] && !tmthing->player->kartstuff[k_startimer])
|
else if (thing->player->kartstuff[k_invincibilitytimer] && !tmthing->player->kartstuff[k_invincibilitytimer])
|
||||||
P_DamageMobj(tmthing, thing, thing, 1);
|
P_DamageMobj(tmthing, thing, thing, 1);
|
||||||
|
|
||||||
if (G_BattleGametype() && (!G_GametypeHasTeams() || tmthing->player->ctfteam != thing->player->ctfteam))
|
if (G_BattleGametype() && (!G_GametypeHasTeams() || tmthing->player->ctfteam != thing->player->ctfteam))
|
||||||
|
@ -1649,107 +1639,32 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
if (tmthing->z + tmthing->height < thing->z)
|
if (tmthing->z + tmthing->height < thing->z)
|
||||||
return true; // underneath
|
return true; // underneath
|
||||||
|
|
||||||
if (thing->player->kartstuff[k_growshrinktimer] || thing->player->kartstuff[k_squishedtimer]
|
if (thing->player->kartstuff[k_squishedtimer] || thing->player->kartstuff[k_hyudorotimer]
|
||||||
|| thing->player->kartstuff[k_bootimer] || thing->player->kartstuff[k_spinouttimer]
|
|| thing->player->kartstuff[k_justbumped] || thing->scale > tmthing->scale + (FRACUNIT/8)
|
||||||
|| thing->player->kartstuff[k_startimer] || thing->player->kartstuff[k_justbumped]
|
|| (G_BattleGametype() && thing->player->kartstuff[k_bumper] <= 0)
|
||||||
|| (G_BattleGametype() && (thing->player->kartstuff[k_balloon] <= 0
|
|| tmthing->player->kartstuff[k_squishedtimer] || tmthing->player->kartstuff[k_hyudorotimer]
|
||||||
&& (thing->player->kartstuff[k_comebacktimer])))
|
|| tmthing->player->kartstuff[k_justbumped] || tmthing->scale > thing->scale + (FRACUNIT/8)
|
||||||
|| tmthing->player->kartstuff[k_growshrinktimer] || tmthing->player->kartstuff[k_squishedtimer]
|
|| (G_BattleGametype() && tmthing->player->kartstuff[k_bumper] <= 0))
|
||||||
|| tmthing->player->kartstuff[k_bootimer] || tmthing->player->kartstuff[k_spinouttimer]
|
|
||||||
|| tmthing->player->kartstuff[k_startimer] || tmthing->player->kartstuff[k_justbumped]
|
|
||||||
|| (G_BattleGametype() && (tmthing->player->kartstuff[k_balloon] <= 0
|
|
||||||
&& (tmthing->player->kartstuff[k_comebacktimer]))))
|
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G_BattleGametype())
|
|
||||||
{
|
|
||||||
if (thing->player->kartstuff[k_balloon] <= 0 || tmthing->player->kartstuff[k_balloon] <= 0)
|
|
||||||
{
|
|
||||||
if (thing->player->kartstuff[k_comebackmode] == 0
|
|
||||||
&& (tmthing->player->kartstuff[k_balloon] > 0
|
|
||||||
&& !tmthing->player->powers[pw_flashing]))
|
|
||||||
{
|
|
||||||
mobj_t *boom = P_SpawnMobj(thing->x, thing->y, thing->z, MT_BOOMPARTICLE);
|
|
||||||
boom->scale = thing->scale;
|
|
||||||
boom->destscale = thing->scale;
|
|
||||||
boom->momz = 5*FRACUNIT;
|
|
||||||
if (thing->player->skincolor)
|
|
||||||
boom->color = thing->player->skincolor;
|
|
||||||
else
|
|
||||||
boom->color = SKINCOLOR_RED;
|
|
||||||
S_StartSound(boom, sfx_s3k4e);
|
|
||||||
K_ExplodePlayer(tmthing->player, thing);
|
|
||||||
thing->player->kartstuff[k_comebacktimer] = comebacktime;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (tmthing->player->kartstuff[k_comebackmode] == 0
|
|
||||||
&& (thing->player->kartstuff[k_balloon] > 0
|
|
||||||
&& !thing->player->powers[pw_flashing]))
|
|
||||||
{
|
|
||||||
mobj_t *boom = P_SpawnMobj(tmthing->x, tmthing->y, tmthing->z, MT_BOOMPARTICLE);
|
|
||||||
boom->scale = tmthing->scale;
|
|
||||||
boom->destscale = tmthing->scale;
|
|
||||||
boom->momz = 5*FRACUNIT;
|
|
||||||
if (tmthing->player->skincolor)
|
|
||||||
boom->color = tmthing->player->skincolor;
|
|
||||||
else
|
|
||||||
boom->color = SKINCOLOR_RED;
|
|
||||||
S_StartSound(boom, sfx_s3k4e);
|
|
||||||
K_ExplodePlayer(thing->player, tmthing);
|
|
||||||
tmthing->player->kartstuff[k_comebacktimer] = comebacktime;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (thing->player->kartstuff[k_comebackmode] == 1
|
|
||||||
&& (tmthing->player->kartstuff[k_balloon] > 0
|
|
||||||
&& P_CanPickupItem(tmthing->player, true)))
|
|
||||||
{
|
|
||||||
thing->player->kartstuff[k_comebackmode] = 0;
|
|
||||||
thing->player->kartstuff[k_comebackpoints]++;
|
|
||||||
if (netgame && cv_hazardlog.value)
|
|
||||||
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[thing->player-players], player_names[tmthing->player-players]);
|
|
||||||
tmthing->player->kartstuff[k_itemroulette] = 1;
|
|
||||||
tmthing->player->kartstuff[k_roulettetype] = 1;
|
|
||||||
if (thing->player->kartstuff[k_comebackpoints] >= 3)
|
|
||||||
K_StealBalloon(thing->player, tmthing->player, true);
|
|
||||||
thing->player->kartstuff[k_comebacktimer] = comebacktime;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (tmthing->player->kartstuff[k_comebackmode] == 1
|
|
||||||
&& (thing->player->kartstuff[k_balloon] > 0
|
|
||||||
&& P_CanPickupItem(thing->player, true)))
|
|
||||||
{
|
|
||||||
tmthing->player->kartstuff[k_comebackmode] = 0;
|
|
||||||
tmthing->player->kartstuff[k_comebackpoints]++;
|
|
||||||
if (netgame && cv_hazardlog.value)
|
|
||||||
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[tmthing->player-players], player_names[thing->player-players]);
|
|
||||||
thing->player->kartstuff[k_itemroulette] = 1;
|
|
||||||
thing->player->kartstuff[k_roulettetype] = 1;
|
|
||||||
if (tmthing->player->kartstuff[k_comebackpoints] >= 3)
|
|
||||||
K_StealBalloon(tmthing->player, thing->player, true);
|
|
||||||
tmthing->player->kartstuff[k_comebacktimer] = comebacktime;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (P_IsObjectOnGround(thing) && tmthing->momz < 0)
|
if (P_IsObjectOnGround(thing) && tmthing->momz < 0)
|
||||||
{
|
{
|
||||||
K_KartBouncing(tmthing, thing, true, false);
|
K_KartBouncing(tmthing, thing, true, false);
|
||||||
if (G_BattleGametype() && tmthing->player->kartstuff[k_feather] & 2)
|
if (G_BattleGametype() && tmthing->player->kartstuff[k_pogospring])
|
||||||
{
|
{
|
||||||
K_StealBalloon(tmthing->player, thing->player, false);
|
K_StealBumper(tmthing->player, thing->player, false);
|
||||||
K_SpinPlayer(thing->player, tmthing);
|
K_SpinPlayer(thing->player, tmthing, 0, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (P_IsObjectOnGround(tmthing) && thing->momz < 0)
|
else if (P_IsObjectOnGround(tmthing) && thing->momz < 0)
|
||||||
{
|
{
|
||||||
K_KartBouncing(thing, tmthing, true, false);
|
K_KartBouncing(thing, tmthing, true, false);
|
||||||
if (G_BattleGametype() && thing->player->kartstuff[k_feather] & 2)
|
if (G_BattleGametype() && thing->player->kartstuff[k_pogospring])
|
||||||
{
|
{
|
||||||
K_StealBalloon(thing->player, tmthing->player, false);
|
K_StealBumper(thing->player, tmthing->player, false);
|
||||||
K_SpinPlayer(tmthing->player, thing);
|
K_SpinPlayer(tmthing->player, thing, 0, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1757,15 +1672,15 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
|
|
||||||
if (G_BattleGametype())
|
if (G_BattleGametype())
|
||||||
{
|
{
|
||||||
if (thing->player->kartstuff[k_mushroomtimer] && !(tmthing->player->kartstuff[k_mushroomtimer]))
|
if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]))
|
||||||
{
|
{
|
||||||
K_StealBalloon(thing->player, tmthing->player, false);
|
K_StealBumper(thing->player, tmthing->player, false);
|
||||||
K_SpinPlayer(tmthing->player, thing);
|
K_SpinPlayer(tmthing->player, thing, 0, false);
|
||||||
}
|
}
|
||||||
else if (tmthing->player->kartstuff[k_mushroomtimer] && !(thing->player->kartstuff[k_mushroomtimer]))
|
else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]))
|
||||||
{
|
{
|
||||||
K_StealBalloon(tmthing->player, thing->player, false);
|
K_StealBumper(tmthing->player, thing->player, false);
|
||||||
K_SpinPlayer(thing->player, tmthing);
|
K_SpinPlayer(thing->player, tmthing, 0, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2608,10 +2523,13 @@ boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam)
|
||||||
fixed_t tryx = thiscam->x;
|
fixed_t tryx = thiscam->x;
|
||||||
fixed_t tryy = thiscam->y;
|
fixed_t tryy = thiscam->y;
|
||||||
|
|
||||||
|
#ifndef NOCLIPCAM
|
||||||
if ((thiscam == &camera && (players[displayplayer].pflags & PF_NOCLIP))
|
if ((thiscam == &camera && (players[displayplayer].pflags & PF_NOCLIP))
|
||||||
|| (thiscam == &camera2 && (players[secondarydisplayplayer].pflags & PF_NOCLIP))
|
|| (thiscam == &camera2 && (players[secondarydisplayplayer].pflags & PF_NOCLIP))
|
||||||
|| (thiscam == &camera3 && (players[thirddisplayplayer].pflags & PF_NOCLIP))
|
|| (thiscam == &camera3 && (players[thirddisplayplayer].pflags & PF_NOCLIP))
|
||||||
|| (thiscam == &camera4 && (players[fourthdisplayplayer].pflags & PF_NOCLIP)))
|
|| (thiscam == &camera4 && (players[fourthdisplayplayer].pflags & PF_NOCLIP))
|
||||||
|
|| (leveltime < introtime))
|
||||||
|
#endif
|
||||||
{ // Noclipping player camera noclips too!!
|
{ // Noclipping player camera noclips too!!
|
||||||
floatok = true;
|
floatok = true;
|
||||||
thiscam->floorz = thiscam->z;
|
thiscam->floorz = thiscam->z;
|
||||||
|
@ -3229,11 +3147,11 @@ static void P_HitSlideLine(line_t *ld)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// P_HitBounceLine
|
// P_PlayerHitBounceLine
|
||||||
//
|
//
|
||||||
// Adjusts the xmove / ymove so that the next move will bounce off the wall.
|
// HitBounceLine, for players
|
||||||
//
|
//
|
||||||
static void P_HitBounceLine(line_t *ld)
|
static void P_PlayerHitBounceLine(line_t *ld)
|
||||||
{
|
{
|
||||||
INT32 side;
|
INT32 side;
|
||||||
angle_t lineangle;
|
angle_t lineangle;
|
||||||
|
@ -3256,6 +3174,47 @@ static void P_HitBounceLine(line_t *ld)
|
||||||
tmymove += FixedMul(movelen, FINESINE(lineangle));
|
tmymove += FixedMul(movelen, FINESINE(lineangle));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// P_HitBounceLine
|
||||||
|
//
|
||||||
|
// Adjusts the xmove / ymove so that the next move will bounce off the wall.
|
||||||
|
//
|
||||||
|
static void P_HitBounceLine(line_t *ld)
|
||||||
|
{
|
||||||
|
angle_t lineangle, moveangle, deltaangle;
|
||||||
|
fixed_t movelen;
|
||||||
|
|
||||||
|
if (ld->slopetype == ST_HORIZONTAL)
|
||||||
|
{
|
||||||
|
tmymove = -tmymove;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ld->slopetype == ST_VERTICAL)
|
||||||
|
{
|
||||||
|
tmxmove = -tmxmove;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
lineangle = R_PointToAngle2(0, 0, ld->dx, ld->dy);
|
||||||
|
|
||||||
|
if (lineangle >= ANGLE_180)
|
||||||
|
lineangle -= ANGLE_180;
|
||||||
|
|
||||||
|
moveangle = R_PointToAngle2(0, 0, tmxmove, tmymove);
|
||||||
|
deltaangle = moveangle + 2*(lineangle - moveangle);
|
||||||
|
|
||||||
|
lineangle >>= ANGLETOFINESHIFT;
|
||||||
|
deltaangle >>= ANGLETOFINESHIFT;
|
||||||
|
|
||||||
|
movelen = P_AproxDistance(tmxmove, tmymove);
|
||||||
|
|
||||||
|
tmxmove = FixedMul(movelen, FINECOSINE(deltaangle));
|
||||||
|
tmymove = FixedMul(movelen, FINESINE(deltaangle));
|
||||||
|
|
||||||
|
deltaangle = R_PointToAngle2(0, 0, tmxmove, tmymove);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// PTR_SlideCameraTraverse
|
// PTR_SlideCameraTraverse
|
||||||
//
|
//
|
||||||
|
@ -3874,41 +3833,35 @@ stairstep:
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// P_BounceMove
|
// P_BouncePlayerMove
|
||||||
//
|
//
|
||||||
// The momx / momy move is bad, so try to bounce off a wall.
|
// Bounce move, for players.
|
||||||
//
|
//
|
||||||
void P_BounceMove(mobj_t *mo)
|
|
||||||
|
void P_BouncePlayerMove(mobj_t *mo)
|
||||||
{
|
{
|
||||||
fixed_t leadx, leady;
|
fixed_t leadx, leady;
|
||||||
fixed_t trailx, traily;
|
fixed_t trailx, traily;
|
||||||
//fixed_t newx, newy;
|
|
||||||
//INT32 hitcount;
|
|
||||||
fixed_t mmomx = 0, mmomy = 0;
|
fixed_t mmomx = 0, mmomy = 0;
|
||||||
|
|
||||||
if (mo->eflags & MFE_JUSTBOUNCEDWALL)
|
if (!mo->player)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ((mo->eflags & MFE_JUSTBOUNCEDWALL) || (mo->player->spectator))
|
||||||
{
|
{
|
||||||
P_SlideMove(mo, true);
|
P_SlideMove(mo, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
slidemo = mo;
|
slidemo = mo;
|
||||||
//hitcount = 0;
|
|
||||||
|
|
||||||
/*retry:
|
mmomx = mo->player->rmomx;
|
||||||
if (++hitcount == 3)
|
mmomy = mo->player->rmomy;
|
||||||
goto bounceback; // don't loop forever*/
|
|
||||||
|
|
||||||
if (mo->player)
|
if (mo->player->kartstuff[k_drift] != 0) // SRB2kart
|
||||||
{
|
{
|
||||||
mmomx = mo->player->rmomx;
|
mo->player->kartstuff[k_drift] = 0;
|
||||||
mmomy = mo->player->rmomy;
|
mo->player->kartstuff[k_driftcharge] = 0;
|
||||||
|
|
||||||
if (mo->player->kartstuff[k_drift] != 0) // SRB2kart
|
|
||||||
{
|
|
||||||
mo->player->kartstuff[k_drift] = 0;
|
|
||||||
mo->player->kartstuff[k_driftcharge] = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3945,8 +3898,107 @@ void P_BounceMove(mobj_t *mo)
|
||||||
P_PathTraverse(trailx, leady, trailx + mmomx, leady + mmomy, PT_ADDLINES, PTR_SlideTraverse);
|
P_PathTraverse(trailx, leady, trailx + mmomx, leady + mmomy, PT_ADDLINES, PTR_SlideTraverse);
|
||||||
P_PathTraverse(leadx, traily, leadx + mmomx, traily + mmomy, PT_ADDLINES, PTR_SlideTraverse);
|
P_PathTraverse(leadx, traily, leadx + mmomx, traily + mmomy, PT_ADDLINES, PTR_SlideTraverse);
|
||||||
|
|
||||||
|
// Now continue along the wall.
|
||||||
|
// First calculate remainder.
|
||||||
|
bestslidefrac = FRACUNIT - bestslidefrac;
|
||||||
|
|
||||||
|
if (bestslidefrac > FRACUNIT)
|
||||||
|
bestslidefrac = FRACUNIT;
|
||||||
|
|
||||||
|
if (bestslidefrac <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
tmxmove = FixedMul(mmomx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||||
|
tmymove = FixedMul(mmomy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||||
|
|
||||||
|
{
|
||||||
|
mobj_t *fx = P_SpawnMobj(mo->x, mo->y, mo->z, MT_BUMP);
|
||||||
|
if (mo->eflags & MFE_VERTICALFLIP)
|
||||||
|
fx->eflags |= MFE_VERTICALFLIP;
|
||||||
|
else
|
||||||
|
fx->eflags &= ~MFE_VERTICALFLIP;
|
||||||
|
fx->scale = mo->scale;
|
||||||
|
|
||||||
|
S_StartSound(mo, sfx_s3k49);
|
||||||
|
}
|
||||||
|
|
||||||
|
P_PlayerHitBounceLine(bestslideline);
|
||||||
|
mo->eflags |= MFE_JUSTBOUNCEDWALL;
|
||||||
|
|
||||||
|
mo->momx = tmxmove;
|
||||||
|
mo->momy = tmymove;
|
||||||
|
mo->player->cmomx = tmxmove;
|
||||||
|
mo->player->cmomy = tmymove;
|
||||||
|
|
||||||
|
P_TryMove(mo, mo->x + tmxmove, mo->y + tmymove, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// P_BounceMove
|
||||||
|
//
|
||||||
|
// The momx / momy move is bad, so try to bounce off a wall.
|
||||||
|
//
|
||||||
|
void P_BounceMove(mobj_t *mo)
|
||||||
|
{
|
||||||
|
fixed_t leadx, leady;
|
||||||
|
fixed_t trailx, traily;
|
||||||
|
fixed_t newx, newy;
|
||||||
|
INT32 hitcount;
|
||||||
|
fixed_t mmomx = 0, mmomy = 0;
|
||||||
|
|
||||||
|
if (mo->eflags & MFE_JUSTBOUNCEDWALL)
|
||||||
|
{
|
||||||
|
P_SlideMove(mo, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mo->player)
|
||||||
|
{
|
||||||
|
P_BouncePlayerMove(mo);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
slidemo = mo;
|
||||||
|
hitcount = 0;
|
||||||
|
|
||||||
|
retry:
|
||||||
|
if (++hitcount == 3)
|
||||||
|
goto bounceback; // don't loop forever
|
||||||
|
|
||||||
|
mmomx = mo->momx;
|
||||||
|
mmomy = mo->momy;
|
||||||
|
|
||||||
|
// trace along the three leading corners
|
||||||
|
if (mo->momx > 0)
|
||||||
|
{
|
||||||
|
leadx = mo->x + mo->radius;
|
||||||
|
trailx = mo->x - mo->radius;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
leadx = mo->x - mo->radius;
|
||||||
|
trailx = mo->x + mo->radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mo->momy > 0)
|
||||||
|
{
|
||||||
|
leady = mo->y + mo->radius;
|
||||||
|
traily = mo->y - mo->radius;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
leady = mo->y - mo->radius;
|
||||||
|
traily = mo->y + mo->radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
bestslidefrac = FRACUNIT + 1;
|
||||||
|
|
||||||
|
P_PathTraverse(leadx, leady, leadx + mmomx, leady + mmomy, PT_ADDLINES, PTR_SlideTraverse);
|
||||||
|
P_PathTraverse(trailx, leady, trailx + mmomx, leady + mmomy, PT_ADDLINES, PTR_SlideTraverse);
|
||||||
|
P_PathTraverse(leadx, traily, leadx + mmomx, traily + mmomy, PT_ADDLINES, PTR_SlideTraverse);
|
||||||
|
|
||||||
// move up to the wall
|
// move up to the wall
|
||||||
/*if (bestslidefrac == FRACUNIT + 1)
|
if (bestslidefrac == FRACUNIT + 1)
|
||||||
{
|
{
|
||||||
// the move must have hit the middle, so bounce straight back
|
// the move must have hit the middle, so bounce straight back
|
||||||
bounceback:
|
bounceback:
|
||||||
|
@ -3956,22 +4008,12 @@ bounceback:
|
||||||
mo->momy *= -1;
|
mo->momy *= -1;
|
||||||
mo->momx = FixedMul(mo->momx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
mo->momx = FixedMul(mo->momx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||||
mo->momy = FixedMul(mo->momy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
mo->momy = FixedMul(mo->momy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||||
|
|
||||||
if (mo->player)
|
|
||||||
{
|
|
||||||
mo->player->cmomx *= -1;
|
|
||||||
mo->player->cmomy *= -1;
|
|
||||||
mo->player->cmomx = FixedMul(mo->player->cmomx,
|
|
||||||
(FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
|
||||||
mo->player->cmomy = FixedMul(mo->player->cmomy,
|
|
||||||
(FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
// fudge a bit to make sure it doesn't hit
|
// fudge a bit to make sure it doesn't hit
|
||||||
/*bestslidefrac -= 0x800;
|
bestslidefrac -= 0x800;
|
||||||
if (bestslidefrac > 0)
|
if (bestslidefrac > 0)
|
||||||
{
|
{
|
||||||
newx = FixedMul(mmomx, bestslidefrac);
|
newx = FixedMul(mmomx, bestslidefrac);
|
||||||
|
@ -3979,7 +4021,7 @@ bounceback:
|
||||||
|
|
||||||
if (!P_TryMove(mo, mo->x + newx, mo->y + newy, true))
|
if (!P_TryMove(mo, mo->x + newx, mo->y + newy, true))
|
||||||
goto bounceback;
|
goto bounceback;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
// Now continue along the wall.
|
// Now continue along the wall.
|
||||||
// First calculate remainder.
|
// First calculate remainder.
|
||||||
|
@ -4011,34 +4053,15 @@ bounceback:
|
||||||
{
|
{
|
||||||
tmxmove = FixedMul(mmomx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
tmxmove = FixedMul(mmomx, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||||
tmymove = FixedMul(mmomy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
tmymove = FixedMul(mmomy, (FRACUNIT - (FRACUNIT>>2) - (FRACUNIT>>3)));
|
||||||
if (mo->player)
|
|
||||||
{
|
|
||||||
mobj_t *fx = P_SpawnMobj(mo->x, mo->y, mo->z, MT_BUMP);
|
|
||||||
if (mo->eflags & MFE_VERTICALFLIP)
|
|
||||||
fx->eflags |= MFE_VERTICALFLIP;
|
|
||||||
else
|
|
||||||
fx->eflags &= ~MFE_VERTICALFLIP;
|
|
||||||
fx->scale = mo->scale;
|
|
||||||
|
|
||||||
S_StartSound(mo, sfx_s3k49);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
P_HitBounceLine(bestslideline);
|
P_HitBounceLine(bestslideline); // clip the moves
|
||||||
mo->eflags |= MFE_JUSTBOUNCEDWALL;
|
|
||||||
|
|
||||||
mo->momx = tmxmove;
|
mo->momx = tmxmove;
|
||||||
mo->momy = tmymove;
|
mo->momy = tmymove;
|
||||||
|
|
||||||
if (mo->player)
|
if (!P_TryMove(mo, mo->x + tmxmove, mo->y + tmymove, true))
|
||||||
{
|
goto retry;
|
||||||
mo->player->cmomx = tmxmove;
|
|
||||||
mo->player->cmomy = tmymove;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*if (!P_TryMove(mo, mo->x + tmxmove, mo->y + tmymove, true))
|
|
||||||
goto retry;*/
|
|
||||||
P_TryMove(mo, mo->x + tmxmove, mo->y + tmymove, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
863
src/p_mobj.c
863
src/p_mobj.c
File diff suppressed because it is too large
Load Diff
|
@ -366,7 +366,7 @@ typedef struct mobj_s
|
||||||
struct pslope_s *standingslope; // The slope that the object is standing on (shouldn't need synced in savegames, right?)
|
struct pslope_s *standingslope; // The slope that the object is standing on (shouldn't need synced in savegames, right?)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
boolean colorized; // Whether the mobj uses the starman colormap
|
boolean colorized; // Whether the mobj uses the rainbow colormap
|
||||||
|
|
||||||
// WARNING: New fields must be added separately to savegame and Lua.
|
// WARNING: New fields must be added separately to savegame and Lua.
|
||||||
} mobj_t;
|
} mobj_t;
|
||||||
|
@ -450,7 +450,7 @@ boolean P_SupermanLook4Players(mobj_t *actor);
|
||||||
void P_DestroyRobots(void);
|
void P_DestroyRobots(void);
|
||||||
void P_SnowThinker(precipmobj_t *mobj);
|
void P_SnowThinker(precipmobj_t *mobj);
|
||||||
void P_RainThinker(precipmobj_t *mobj);
|
void P_RainThinker(precipmobj_t *mobj);
|
||||||
FUNCMATH void P_NullPrecipThinker(precipmobj_t *mobj);
|
void P_NullPrecipThinker(precipmobj_t *mobj);
|
||||||
void P_RemovePrecipMobj(precipmobj_t *mobj);
|
void P_RemovePrecipMobj(precipmobj_t *mobj);
|
||||||
void P_SetScale(mobj_t *mobj, fixed_t newscale);
|
void P_SetScale(mobj_t *mobj, fixed_t newscale);
|
||||||
void P_XYMovement(mobj_t *mo);
|
void P_XYMovement(mobj_t *mo);
|
||||||
|
|
|
@ -436,7 +436,7 @@ static void P_NetUnArchivePlayers(void)
|
||||||
if (flags & AWAYVIEW)
|
if (flags & AWAYVIEW)
|
||||||
players[i].awayviewmobj = (mobj_t *)(size_t)READUINT32(save_p);
|
players[i].awayviewmobj = (mobj_t *)(size_t)READUINT32(save_p);
|
||||||
|
|
||||||
players[i].viewheight = cv_viewheight.value<<FRACBITS;
|
players[i].viewheight = 32<<FRACBITS;
|
||||||
|
|
||||||
//SetPlayerSkinByNum(i, players[i].skin);
|
//SetPlayerSkinByNum(i, players[i].skin);
|
||||||
players[i].charability = READUINT8(save_p);
|
players[i].charability = READUINT8(save_p);
|
||||||
|
@ -944,12 +944,11 @@ typedef enum
|
||||||
MD2_EXTVAL1 = 1<<5,
|
MD2_EXTVAL1 = 1<<5,
|
||||||
MD2_EXTVAL2 = 1<<6,
|
MD2_EXTVAL2 = 1<<6,
|
||||||
MD2_HNEXT = 1<<7,
|
MD2_HNEXT = 1<<7,
|
||||||
#ifdef ESLOPE
|
|
||||||
MD2_HPREV = 1<<8,
|
MD2_HPREV = 1<<8,
|
||||||
|
#ifdef ESLOPE
|
||||||
MD2_SLOPE = 1<<9,
|
MD2_SLOPE = 1<<9,
|
||||||
MD2_COLORIZED = 1<<10
|
MD2_COLORIZED = 1<<10
|
||||||
#else
|
#else
|
||||||
MD2_HPREV = 1<<8,
|
|
||||||
MD2_COLORIZED = 1<<9
|
MD2_COLORIZED = 1<<9
|
||||||
#endif
|
#endif
|
||||||
} mobj_diff2_t;
|
} mobj_diff2_t;
|
||||||
|
@ -3195,7 +3194,10 @@ static void P_NetArchiveMisc(void)
|
||||||
WRITEUINT32(save_p, ARCHIVEBLOCK_MISC);
|
WRITEUINT32(save_p, ARCHIVEBLOCK_MISC);
|
||||||
|
|
||||||
WRITEINT16(save_p, gamemap);
|
WRITEINT16(save_p, gamemap);
|
||||||
WRITEINT16(save_p, gamestate);
|
if (gamestate != GS_LEVEL)
|
||||||
|
WRITEINT16(save_p, GS_WAITINGPLAYERS); // nice hack to put people back into waitingplayers
|
||||||
|
else
|
||||||
|
WRITEINT16(save_p, gamestate);
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
pig |= (playeringame[i] != 0)<<i;
|
pig |= (playeringame[i] != 0)<<i;
|
||||||
|
@ -3210,7 +3212,10 @@ static void P_NetArchiveMisc(void)
|
||||||
WRITEINT16(save_p, lastmap);
|
WRITEINT16(save_p, lastmap);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
WRITEINT16(save_p, votelevels[i]);
|
{
|
||||||
|
WRITEINT16(save_p, votelevels[i][0]);
|
||||||
|
WRITEINT16(save_p, votelevels[i][1]);
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
WRITESINT8(save_p, votes[i]);
|
WRITESINT8(save_p, votes[i]);
|
||||||
|
@ -3255,9 +3260,14 @@ static void P_NetArchiveMisc(void)
|
||||||
WRITEUINT8(save_p, franticitems);
|
WRITEUINT8(save_p, franticitems);
|
||||||
WRITEUINT8(save_p, comeback);
|
WRITEUINT8(save_p, comeback);
|
||||||
|
|
||||||
WRITEUINT32(save_p, lightningcooldown);
|
for (i = 0; i < 4; i++)
|
||||||
WRITEUINT32(save_p, blueshellincoming);
|
WRITESINT8(save_p, battlewanted[i]);
|
||||||
WRITEUINT8(save_p, blueshellplayer);
|
|
||||||
|
WRITEUINT32(save_p, wantedcalcdelay);
|
||||||
|
WRITEUINT32(save_p, indirectitemcooldown);
|
||||||
|
WRITEUINT32(save_p, spbincoming);
|
||||||
|
WRITEUINT8(save_p, spbplayer);
|
||||||
|
WRITEUINT32(save_p, mapreset);
|
||||||
|
|
||||||
// Is it paused?
|
// Is it paused?
|
||||||
if (paused)
|
if (paused)
|
||||||
|
@ -3307,7 +3317,10 @@ static inline boolean P_NetUnArchiveMisc(void)
|
||||||
lastmap = READINT16(save_p);
|
lastmap = READINT16(save_p);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
votelevels[i] = READINT16(save_p);
|
{
|
||||||
|
votelevels[i][0] = READINT16(save_p);
|
||||||
|
votelevels[i][1] = READINT16(save_p);
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
votes[i] = READSINT8(save_p);
|
votes[i] = READSINT8(save_p);
|
||||||
|
@ -3352,9 +3365,14 @@ static inline boolean P_NetUnArchiveMisc(void)
|
||||||
franticitems = (boolean)READUINT8(save_p);
|
franticitems = (boolean)READUINT8(save_p);
|
||||||
comeback = (boolean)READUINT8(save_p);
|
comeback = (boolean)READUINT8(save_p);
|
||||||
|
|
||||||
lightningcooldown = READUINT32(save_p);
|
for (i = 0; i < 4; i++)
|
||||||
blueshellincoming = READUINT32(save_p);
|
battlewanted[i] = READSINT8(save_p);
|
||||||
blueshellplayer = READUINT8(save_p);
|
|
||||||
|
wantedcalcdelay = READUINT32(save_p);
|
||||||
|
indirectitemcooldown = READUINT32(save_p);
|
||||||
|
spbincoming = READUINT32(save_p);
|
||||||
|
spbplayer = READUINT8(save_p);
|
||||||
|
mapreset = READUINT32(save_p);
|
||||||
|
|
||||||
// Is it paused?
|
// Is it paused?
|
||||||
if (READUINT8(save_p) == 0x2f)
|
if (READUINT8(save_p) == 0x2f)
|
||||||
|
@ -3381,14 +3399,17 @@ void P_SaveNetGame(void)
|
||||||
P_NetArchiveMisc();
|
P_NetArchiveMisc();
|
||||||
|
|
||||||
// Assign the mobjnumber for pointer tracking
|
// Assign the mobjnumber for pointer tracking
|
||||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
if (gamestate == GS_LEVEL)
|
||||||
{
|
{
|
||||||
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
|
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||||
{
|
{
|
||||||
mobj = (mobj_t *)th;
|
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
|
||||||
if (mobj->type == MT_HOOP || mobj->type == MT_HOOPCOLLIDE || mobj->type == MT_HOOPCENTER)
|
{
|
||||||
continue;
|
mobj = (mobj_t *)th;
|
||||||
mobj->mobjnum = i++;
|
if (mobj->type == MT_HOOP || mobj->type == MT_HOOPCOLLIDE || mobj->type == MT_HOOPCENTER)
|
||||||
|
continue;
|
||||||
|
mobj->mobjnum = i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2197,11 +2197,15 @@ static void P_LevelInitStuff(void)
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if ((netgame || multiplayer) && (gametype == GT_COMPETITION || players[i].lives <= 0))
|
if ((netgame || multiplayer) && (gametype == GT_COMPETITION || players[i].lives <= 0))
|
||||||
{
|
{
|
||||||
// In Co-Op, replenish a user's lives if they are depleted.
|
// In Co-Op, replenish a user's lives if they are depleted.
|
||||||
players[i].lives = cv_startinglives.value;
|
players[i].lives = cv_startinglives.value;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
players[i].lives = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
players[i].realtime = countdown = countdown2 = 0;
|
players[i].realtime = countdown = countdown2 = 0;
|
||||||
curlap = bestlap = 0; // SRB2Kart
|
curlap = bestlap = 0; // SRB2Kart
|
||||||
|
@ -2426,6 +2430,7 @@ static void P_ForceCharacter(const char *forcecharskin)
|
||||||
|
|
||||||
static void P_LoadRecordGhosts(void)
|
static void P_LoadRecordGhosts(void)
|
||||||
{
|
{
|
||||||
|
// see also m_menu.c's Nextmap_OnChange
|
||||||
const size_t glen = strlen(srb2home)+1+strlen("replay")+1+strlen(timeattackfolder)+1+strlen("MAPXX")+1;
|
const size_t glen = strlen(srb2home)+1+strlen("replay")+1+strlen(timeattackfolder)+1+strlen("MAPXX")+1;
|
||||||
char *gpath = malloc(glen);
|
char *gpath = malloc(glen);
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
@ -2559,11 +2564,6 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
CON_Drawer(); // let the user know what we are going to do
|
CON_Drawer(); // let the user know what we are going to do
|
||||||
I_FinishUpdate(); // page flip or blit buffer
|
I_FinishUpdate(); // page flip or blit buffer
|
||||||
|
|
||||||
|
|
||||||
// Reset the palette
|
|
||||||
if (rendermode != render_none)
|
|
||||||
V_SetPaletteLump("PLAYPAL");
|
|
||||||
|
|
||||||
// Initialize sector node list.
|
// Initialize sector node list.
|
||||||
P_Initsecnode();
|
P_Initsecnode();
|
||||||
|
|
||||||
|
@ -2620,7 +2620,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
|
|
||||||
// Special stage fade to white
|
// Special stage fade to white
|
||||||
// This is handled BEFORE sounds are stopped.
|
// This is handled BEFORE sounds are stopped.
|
||||||
if (rendermode != render_none && G_IsSpecialStage(gamemap))
|
/*if (rendermode != render_none && G_IsSpecialStage(gamemap))
|
||||||
{
|
{
|
||||||
tic_t starttime = I_GetTime();
|
tic_t starttime = I_GetTime();
|
||||||
tic_t endtime = starttime + (3*TICRATE)/2;
|
tic_t endtime = starttime + (3*TICRATE)/2;
|
||||||
|
@ -2647,7 +2647,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
}
|
}
|
||||||
|
|
||||||
ranspecialwipe = 1;
|
ranspecialwipe = 1;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// Make sure all sounds are stopped before Z_FreeTags.
|
// Make sure all sounds are stopped before Z_FreeTags.
|
||||||
S_StopSounds();
|
S_StopSounds();
|
||||||
|
@ -2659,20 +2659,24 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
S_Start();
|
S_Start();
|
||||||
// SRB2 Kart - Yes this is weird, but we don't want the music to start until after the countdown is finished
|
// SRB2 Kart - Yes this is weird, but we don't want the music to start until after the countdown is finished
|
||||||
// but we do still need the mapmusname to be changed
|
// but we do still need the mapmusname to be changed
|
||||||
if (leveltime < 158)
|
if (leveltime < (starttime + (TICRATE/2)))
|
||||||
S_StopMusic();
|
S_ChangeMusicInternal("kstart", false); //S_StopMusic();
|
||||||
|
|
||||||
// Let's fade to black here
|
// Let's fade to black here
|
||||||
// But only if we didn't do the special stage wipe
|
// But only if we didn't do the special stage wipe
|
||||||
if (rendermode != render_none && !ranspecialwipe)
|
if (rendermode != render_none && !ranspecialwipe)
|
||||||
{
|
{
|
||||||
F_WipeStartScreen();
|
F_WipeStartScreen();
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120);
|
||||||
|
|
||||||
F_WipeEndScreen();
|
F_WipeEndScreen();
|
||||||
F_RunWipe(wipedefs[wipe_level_toblack], false);
|
F_RunWipe(wipedefs[wipe_level_toblack], false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset the palette now all fades have been done
|
||||||
|
if (rendermode != render_none)
|
||||||
|
V_SetPaletteLump(GetPalette()); // Set the level palette
|
||||||
|
|
||||||
// Print "SPEEDING OFF TO [ZONE] [ACT 1]..."
|
// Print "SPEEDING OFF TO [ZONE] [ACT 1]..."
|
||||||
/*if (rendermode != render_none)
|
/*if (rendermode != render_none)
|
||||||
{
|
{
|
||||||
|
@ -2875,8 +2879,11 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
CONS_Printf(M_GetText("No player currently available to become IT. Awaiting available players.\n"));
|
CONS_Printf(M_GetText("No player currently available to become IT. Awaiting available players.\n"));
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (G_RaceGametype() && server && cv_usemapnumlaps.value)
|
else if (G_RaceGametype() && server)
|
||||||
CV_StealthSetValue(&cv_numlaps, mapheaderinfo[gamemap - 1]->numlaps);
|
CV_StealthSetValue(&cv_numlaps,
|
||||||
|
((netgame || multiplayer) && cv_basenumlaps.value)
|
||||||
|
? cv_basenumlaps.value
|
||||||
|
: mapheaderinfo[gamemap - 1]->numlaps);
|
||||||
|
|
||||||
// ===========
|
// ===========
|
||||||
// landing point for netgames.
|
// landing point for netgames.
|
||||||
|
@ -2990,22 +2997,27 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (G_BattleGametype())
|
if (G_BattleGametype())
|
||||||
|
{
|
||||||
gamespeed = 0;
|
gamespeed = 0;
|
||||||
else
|
|
||||||
gamespeed = cv_kartspeed.value;
|
|
||||||
|
|
||||||
if (G_BattleGametype())
|
|
||||||
mirrormode = false;
|
mirrormode = false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
mirrormode = cv_kartmirror.value;
|
{
|
||||||
|
gamespeed = (UINT8)cv_kartspeed.value;
|
||||||
franticitems = cv_kartfrantic.value;
|
mirrormode = (boolean)cv_kartmirror.value;
|
||||||
comeback = cv_kartcomeback.value;
|
}
|
||||||
|
franticitems = (boolean)cv_kartfrantic.value;
|
||||||
|
comeback = (boolean)cv_kartcomeback.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
lightningcooldown = 0;
|
for (i = 0; i < 4; i++)
|
||||||
blueshellincoming = 0;
|
battlewanted[i] = -1;
|
||||||
blueshellplayer = 0;
|
|
||||||
|
wantedcalcdelay = wantedfrequency*2;
|
||||||
|
indirectitemcooldown = 0;
|
||||||
|
spbincoming = 0;
|
||||||
|
spbplayer = 0;
|
||||||
|
mapreset = 0;
|
||||||
|
|
||||||
// clear special respawning que
|
// clear special respawning que
|
||||||
iquehead = iquetail = 0;
|
iquehead = iquetail = 0;
|
||||||
|
@ -3025,7 +3037,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
|
|
||||||
// Remove the loading shit from the screen
|
// Remove the loading shit from the screen
|
||||||
if (rendermode != render_none)
|
if (rendermode != render_none)
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (ranspecialwipe) ? 0 : 31);
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120);
|
||||||
|
|
||||||
if (precache || dedicated)
|
if (precache || dedicated)
|
||||||
R_PrecacheLevel();
|
R_PrecacheLevel();
|
||||||
|
@ -3143,7 +3155,7 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
|
||||||
}
|
}
|
||||||
else if (name[1] == '_')
|
else if (name[1] == '_')
|
||||||
{
|
{
|
||||||
CONS_Debug(DBG_SETUP, "Music %.8s replaced\n", name);
|
CONS_Debug(DBG_SETUP, "Music %.8s ignored\n", name);
|
||||||
mreplaces++;
|
mreplaces++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3164,7 +3176,7 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
|
||||||
if (!devparm && sreplaces)
|
if (!devparm && sreplaces)
|
||||||
CONS_Printf(M_GetText("%s sounds replaced\n"), sizeu1(sreplaces));
|
CONS_Printf(M_GetText("%s sounds replaced\n"), sizeu1(sreplaces));
|
||||||
if (!devparm && mreplaces)
|
if (!devparm && mreplaces)
|
||||||
CONS_Printf(M_GetText("%s midi musics replaced\n"), sizeu1(mreplaces));
|
CONS_Printf(M_GetText("%s midi musics ignored\n"), sizeu1(mreplaces));
|
||||||
if (!devparm && digmreplaces)
|
if (!devparm && digmreplaces)
|
||||||
CONS_Printf(M_GetText("%s digital musics replaced\n"), sizeu1(digmreplaces));
|
CONS_Printf(M_GetText("%s digital musics replaced\n"), sizeu1(digmreplaces));
|
||||||
|
|
||||||
|
|
81
src/p_spec.c
81
src/p_spec.c
|
@ -3753,22 +3753,46 @@ DoneSection2:
|
||||||
// Process Section 3
|
// Process Section 3
|
||||||
switch (special)
|
switch (special)
|
||||||
{
|
{
|
||||||
case 1: // SRB2kart: bounce pad
|
case 1: // SRB2kart: Spring Panel
|
||||||
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
||||||
{
|
{
|
||||||
|
const fixed_t scale = mapheaderinfo[gamemap-1]->mobj_scale + abs(player->mo->scale - mapheaderinfo[gamemap-1]->mobj_scale);
|
||||||
|
const fixed_t minspeed = 24*scale;
|
||||||
|
|
||||||
if (player->mo->eflags & MFE_SPRUNG)
|
if (player->mo->eflags & MFE_SPRUNG)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (player->speed < K_GetKartSpeed(player, true)/4) // Push forward to prevent getting stuck
|
if (player->speed < minspeed) // Push forward to prevent getting stuck
|
||||||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(K_GetKartSpeed(player, true)/4, player->mo->scale));
|
P_InstaThrust(player->mo, player->mo->angle, minspeed);
|
||||||
|
|
||||||
player->kartstuff[k_feather] |= 2;
|
player->kartstuff[k_pogospring] = 1;
|
||||||
K_DoBouncePad(player->mo, 0);
|
K_DoPogoSpring(player->mo, 0, false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // Wind/Current
|
case 2: // Wind/Current
|
||||||
case 3: // Unused (was "Ice/Sludge and Wind/Current")
|
break;
|
||||||
|
|
||||||
|
case 3: // SRB2kart: Spring Panel (capped speed)
|
||||||
|
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
||||||
|
{
|
||||||
|
const fixed_t scale = mapheaderinfo[gamemap-1]->mobj_scale + abs(player->mo->scale - mapheaderinfo[gamemap-1]->mobj_scale);
|
||||||
|
const fixed_t minspeed = 24*scale;
|
||||||
|
const fixed_t maxspeed = 36*scale;
|
||||||
|
|
||||||
|
if (player->mo->eflags & MFE_SPRUNG)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (player->speed > maxspeed) // Prevent overshooting jumps
|
||||||
|
P_InstaThrust(player->mo, R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy), maxspeed);
|
||||||
|
else if (player->speed < minspeed) // Push forward to prevent getting stuck
|
||||||
|
P_InstaThrust(player->mo, player->mo->angle, minspeed);
|
||||||
|
|
||||||
|
player->kartstuff[k_pogospring] = 2;
|
||||||
|
K_DoPogoSpring(player->mo, 0, false);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 4: // Conveyor Belt
|
case 4: // Conveyor Belt
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -3969,22 +3993,21 @@ DoneSection2:
|
||||||
// P_SetPlayerMobjState(player->mo, S_PLAY_FALL1);
|
// P_SetPlayerMobjState(player->mo, S_PLAY_FALL1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6: // SRB2kart 190117 - Mushroom Boost Panel
|
case 6: // SRB2kart 190117 - Sneaker Panel
|
||||||
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
||||||
{
|
{
|
||||||
if (!player->kartstuff[k_floorboost])
|
if (!player->kartstuff[k_floorboost])
|
||||||
player->kartstuff[k_floorboost] = 3;
|
player->kartstuff[k_floorboost] = 3;
|
||||||
else
|
else
|
||||||
player->kartstuff[k_floorboost] = 2;
|
player->kartstuff[k_floorboost] = 2;
|
||||||
K_DoMushroom(player, false);
|
K_DoSneaker(player, false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7: // SRB2kart 190117 - Oil Slick
|
case 7: // SRB2kart 190117 - Oil Slick
|
||||||
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
||||||
{
|
{
|
||||||
player->kartstuff[k_spinouttype] = -1;
|
K_SpinPlayer(player, NULL, 0, false);
|
||||||
K_SpinPlayer(player, NULL);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -4151,7 +4174,7 @@ DoneSection2:
|
||||||
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
|
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
|
||||||
{
|
{
|
||||||
player->laps++;
|
player->laps++;
|
||||||
player->kartstuff[k_lapanimation] = 80;
|
//player->kartstuff[k_lapanimation] = 80;
|
||||||
|
|
||||||
if (player->pflags & PF_NIGHTSMODE)
|
if (player->pflags & PF_NIGHTSMODE)
|
||||||
player->drillmeter += 48*20;
|
player->drillmeter += 48*20;
|
||||||
|
@ -4184,11 +4207,12 @@ DoneSection2:
|
||||||
|
|
||||||
if (P_IsLocalPlayer(player))
|
if (P_IsLocalPlayer(player))
|
||||||
{
|
{
|
||||||
if (player->laps < (UINT8)(cv_numlaps.value - 1))
|
if (player->laps == (UINT8)(cv_numlaps.value - 1))
|
||||||
S_StartSound(NULL, sfx_mlap);
|
S_StartSound(NULL, sfx_s3k68);
|
||||||
else if (player->laps == (UINT8)(cv_numlaps.value - 1))
|
else if (player->laps < (UINT8)(cv_numlaps.value - 1))
|
||||||
S_StartSound(NULL, sfx_mlap);
|
S_StartSound(NULL, sfx_s221);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//player->starpostangle = player->starposttime = player->starpostnum = 0;
|
//player->starpostangle = player->starposttime = player->starpostnum = 0;
|
||||||
//player->starpostx = player->starposty = player->starpostz = 0;
|
//player->starpostx = player->starposty = player->starpostz = 0;
|
||||||
|
@ -4207,26 +4231,10 @@ DoneSection2:
|
||||||
|
|
||||||
if (player->laps >= (unsigned)cv_numlaps.value)
|
if (player->laps >= (unsigned)cv_numlaps.value)
|
||||||
{
|
{
|
||||||
if (P_IsLocalPlayer(player))
|
if (!splitscreen && P_IsLocalPlayer(player))
|
||||||
{
|
S_StartSound(NULL, sfx_s3k6a);
|
||||||
// SRB2kart 200117
|
else if (player->kartstuff[k_position] == 1)
|
||||||
if (splitscreen)
|
|
||||||
S_ChangeMusicInternal("karwin", true);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (player->kartstuff[k_position] == 1)
|
|
||||||
S_ChangeMusicInternal("karwin", true);
|
|
||||||
else if (K_IsPlayerLosing(player))
|
|
||||||
S_ChangeMusicInternal("karlos", true);
|
|
||||||
else
|
|
||||||
S_ChangeMusicInternal("karok", true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player->kartstuff[k_position] == 1)
|
|
||||||
S_StartSound(NULL, sfx_s253);
|
S_StartSound(NULL, sfx_s253);
|
||||||
else if (P_IsLocalPlayer(player))
|
|
||||||
S_StartSound(NULL, sfx_s24f);
|
|
||||||
|
|
||||||
P_DoPlayerExit(player);
|
P_DoPlayerExit(player);
|
||||||
}
|
}
|
||||||
|
@ -7222,8 +7230,8 @@ void T_Friction(friction_t *f)
|
||||||
// friction works for all mobj's
|
// friction works for all mobj's
|
||||||
// (or at least MF_PUSHABLEs, which is all I care about anyway)
|
// (or at least MF_PUSHABLEs, which is all I care about anyway)
|
||||||
if ((!(thing->flags & (MF_NOGRAVITY | MF_NOCLIP)) && thing->z == thing->floorz) && (thing->player
|
if ((!(thing->flags & (MF_NOGRAVITY | MF_NOCLIP)) && thing->z == thing->floorz) && (thing->player
|
||||||
&& (thing->player->kartstuff[k_startimer] == 0 && thing->player->kartstuff[k_bootimer] == 0
|
&& (thing->player->kartstuff[k_invincibilitytimer] == 0 && thing->player->kartstuff[k_hyudorotimer] == 0
|
||||||
&& thing->player->kartstuff[k_mushroomtimer] == 0 && thing->player->kartstuff[k_growshrinktimer] <= 0)))
|
&& thing->player->kartstuff[k_sneakertimer] == 0 && thing->player->kartstuff[k_growshrinktimer] <= 0)))
|
||||||
{
|
{
|
||||||
if (f->roverfriction)
|
if (f->roverfriction)
|
||||||
{
|
{
|
||||||
|
@ -7756,7 +7764,6 @@ void T_Pusher(pusher_t *p)
|
||||||
thing->player->pflags |= PF_JUMPED;
|
thing->player->pflags |= PF_JUMPED;
|
||||||
|
|
||||||
thing->player->pflags |= PF_SLIDING;
|
thing->player->pflags |= PF_SLIDING;
|
||||||
P_SetPlayerMobjState (thing, thing->info->painstate); // Whee!
|
|
||||||
thing->angle = R_PointToAngle2 (0, 0, xspeed<<(FRACBITS-PUSH_FACTOR), yspeed<<(FRACBITS-PUSH_FACTOR));
|
thing->angle = R_PointToAngle2 (0, 0, xspeed<<(FRACBITS-PUSH_FACTOR), yspeed<<(FRACBITS-PUSH_FACTOR));
|
||||||
|
|
||||||
if (!demoplayback || P_AnalogMove(thing->player))
|
if (!demoplayback || P_AnalogMove(thing->player))
|
||||||
|
|
24
src/p_tick.c
24
src/p_tick.c
|
@ -677,12 +677,12 @@ void P_Ticker(boolean run)
|
||||||
if (countdown2)
|
if (countdown2)
|
||||||
countdown2--;
|
countdown2--;
|
||||||
|
|
||||||
if (blueshellincoming && --blueshellincoming <= 0)
|
if (spbincoming && --spbincoming <= 0)
|
||||||
{
|
{
|
||||||
UINT8 best = 0;
|
UINT8 best = 0;
|
||||||
SINT8 hurtthisguy = -1;
|
SINT8 hurtthisguy = -1;
|
||||||
|
|
||||||
blueshellincoming = 0;
|
spbincoming = 0;
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
@ -703,11 +703,20 @@ void P_Ticker(boolean run)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hurtthisguy != -1)
|
if (hurtthisguy != -1)
|
||||||
players[hurtthisguy].kartstuff[k_deathsentence] = TICRATE+1;
|
{
|
||||||
|
players[hurtthisguy].kartstuff[k_deathsentence] = (2*TICRATE)+1;
|
||||||
|
S_StartSound(players[hurtthisguy].mo, sfx_kc57);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lightningcooldown)
|
if (indirectitemcooldown)
|
||||||
lightningcooldown--;
|
indirectitemcooldown--;
|
||||||
|
|
||||||
|
if (G_BattleGametype())
|
||||||
|
{
|
||||||
|
if (wantedcalcdelay && --wantedcalcdelay <= 0)
|
||||||
|
K_CalculateBattleWanted();
|
||||||
|
}
|
||||||
|
|
||||||
if (quake.time)
|
if (quake.time)
|
||||||
{
|
{
|
||||||
|
@ -731,6 +740,11 @@ void P_Ticker(boolean run)
|
||||||
G_ConsGhostTic();
|
G_ConsGhostTic();
|
||||||
if (modeattacking)
|
if (modeattacking)
|
||||||
G_GhostTicker();
|
G_GhostTicker();
|
||||||
|
|
||||||
|
if (mapreset > 1
|
||||||
|
&& --mapreset <= 1
|
||||||
|
&& server) // Remember: server uses it for mapchange, but EVERYONE ticks down for the animation
|
||||||
|
D_MapChange(gamemap, gametype, ultimatemode, true, 0, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
P_MapEnd();
|
P_MapEnd();
|
||||||
|
|
828
src/p_user.c
828
src/p_user.c
File diff suppressed because it is too large
Load Diff
10
src/r_bsp.c
10
src/r_bsp.c
|
@ -855,7 +855,7 @@ static void R_AddPolyObjects(subsector_t *sub)
|
||||||
|
|
||||||
drawseg_t *firstseg;
|
drawseg_t *firstseg;
|
||||||
|
|
||||||
static void R_Subsector(size_t num, UINT8 ssplayer)
|
static void R_Subsector(size_t num, UINT8 viewnumber)
|
||||||
{
|
{
|
||||||
INT32 count, floorlightlevel, ceilinglightlevel, light;
|
INT32 count, floorlightlevel, ceilinglightlevel, light;
|
||||||
seg_t *line;
|
seg_t *line;
|
||||||
|
@ -1213,7 +1213,7 @@ static void R_Subsector(size_t num, UINT8 ssplayer)
|
||||||
// Either you must pass the fake sector and handle validcount here, on the
|
// Either you must pass the fake sector and handle validcount here, on the
|
||||||
// real sector, or you must account for the lighting in some other way,
|
// real sector, or you must account for the lighting in some other way,
|
||||||
// like passing it as an argument.
|
// like passing it as an argument.
|
||||||
R_AddSprites(sub->sector, (floorlightlevel+ceilinglightlevel)/2, ssplayer);
|
R_AddSprites(sub->sector, (floorlightlevel+ceilinglightlevel)/2, viewnumber);
|
||||||
|
|
||||||
firstseg = NULL;
|
firstseg = NULL;
|
||||||
|
|
||||||
|
@ -1419,7 +1419,7 @@ INT32 R_GetPlaneLight(sector_t *sector, fixed_t planeheight, boolean underside)
|
||||||
//
|
//
|
||||||
// killough 5/2/98: reformatted, removed tail recursion
|
// killough 5/2/98: reformatted, removed tail recursion
|
||||||
|
|
||||||
void R_RenderBSPNode(INT32 bspnum, UINT8 ssplayer)
|
void R_RenderBSPNode(INT32 bspnum, UINT8 viewnumber)
|
||||||
{
|
{
|
||||||
node_t *bsp;
|
node_t *bsp;
|
||||||
INT32 side;
|
INT32 side;
|
||||||
|
@ -1430,7 +1430,7 @@ void R_RenderBSPNode(INT32 bspnum, UINT8 ssplayer)
|
||||||
// Decide which side the view point is on.
|
// Decide which side the view point is on.
|
||||||
side = R_PointOnSide(viewx, viewy, bsp);
|
side = R_PointOnSide(viewx, viewy, bsp);
|
||||||
// Recursively divide front space.
|
// Recursively divide front space.
|
||||||
R_RenderBSPNode(bsp->children[side], ssplayer);
|
R_RenderBSPNode(bsp->children[side], viewnumber);
|
||||||
|
|
||||||
// Possibly divide back space.
|
// Possibly divide back space.
|
||||||
|
|
||||||
|
@ -1448,5 +1448,5 @@ void R_RenderBSPNode(INT32 bspnum, UINT8 ssplayer)
|
||||||
portalcullsector = NULL;
|
portalcullsector = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
R_Subsector(bspnum == -1 ? 0 : bspnum & ~NF_SUBSECTOR, ssplayer);
|
R_Subsector(bspnum == -1 ? 0 : bspnum & ~NF_SUBSECTOR, viewnumber);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ extern INT32 doorclosed;
|
||||||
void R_ClearClipSegs(void);
|
void R_ClearClipSegs(void);
|
||||||
void R_PortalClearClipSegs(INT32 start, INT32 end);
|
void R_PortalClearClipSegs(INT32 start, INT32 end);
|
||||||
void R_ClearDrawSegs(void);
|
void R_ClearDrawSegs(void);
|
||||||
void R_RenderBSPNode(INT32 bspnum, UINT8 ssplayer);
|
void R_RenderBSPNode(INT32 bspnum, UINT8 viewnumber);
|
||||||
void R_AddPortal(INT32 line1, INT32 line2, INT32 x1, INT32 x2);
|
void R_AddPortal(INT32 line1, INT32 line2, INT32 x1, INT32 x2);
|
||||||
|
|
||||||
#ifdef POLYOBJECTS
|
#ifdef POLYOBJECTS
|
||||||
|
|
14
src/r_draw.c
14
src/r_draw.c
|
@ -135,7 +135,7 @@ UINT32 nflatxshift, nflatyshift, nflatshiftup, nflatmask;
|
||||||
#define BOSS_TT_CACHE_INDEX (MAXSKINS + 1)
|
#define BOSS_TT_CACHE_INDEX (MAXSKINS + 1)
|
||||||
#define METALSONIC_TT_CACHE_INDEX (MAXSKINS + 2)
|
#define METALSONIC_TT_CACHE_INDEX (MAXSKINS + 2)
|
||||||
#define ALLWHITE_TT_CACHE_INDEX (MAXSKINS + 3)
|
#define ALLWHITE_TT_CACHE_INDEX (MAXSKINS + 3)
|
||||||
#define STARMAN_TT_CACHE_INDEX (MAXSKINS + 4)
|
#define RAINBOW_TT_CACHE_INDEX (MAXSKINS + 4)
|
||||||
#define SKIN_RAMP_LENGTH 16
|
#define SKIN_RAMP_LENGTH 16
|
||||||
#define DEFAULT_STARTTRANSCOLOR 160
|
#define DEFAULT_STARTTRANSCOLOR 160
|
||||||
#define NUM_PALETTE_ENTRIES 256
|
#define NUM_PALETTE_ENTRIES 256
|
||||||
|
@ -155,7 +155,7 @@ const char *Color_Names[MAXSKINCOLORS] =
|
||||||
"Black", // SKINCOLOR_BLACK
|
"Black", // SKINCOLOR_BLACK
|
||||||
"Cyan", // SKINCOLOR_CYAN
|
"Cyan", // SKINCOLOR_CYAN
|
||||||
"Teal", // SKINCOLOR_TEAL
|
"Teal", // SKINCOLOR_TEAL
|
||||||
"Steel_Blue",// SKINCOLOR_STEELBLUE
|
"Steel_Blue",// SKINCOLOR_STEEL
|
||||||
"Blue", // SKINCOLOR_BLUE
|
"Blue", // SKINCOLOR_BLUE
|
||||||
"Peach", // SKINCOLOR_PEACH
|
"Peach", // SKINCOLOR_PEACH
|
||||||
"Tan", // SKINCOLOR_TAN
|
"Tan", // SKINCOLOR_TAN
|
||||||
|
@ -175,7 +175,6 @@ const char *Color_Names[MAXSKINCOLORS] =
|
||||||
"Yellow", // SKINCOLOR_YELLOW
|
"Yellow", // SKINCOLOR_YELLOW
|
||||||
"Gold" // SKINCOLOR_GOLD
|
"Gold" // SKINCOLOR_GOLD
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
const UINT8 Color_Opposite[MAXSKINCOLORS*2] =
|
const UINT8 Color_Opposite[MAXSKINCOLORS*2] =
|
||||||
{
|
{
|
||||||
|
@ -186,7 +185,7 @@ const UINT8 Color_Opposite[MAXSKINCOLORS*2] =
|
||||||
SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK
|
SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_CYAN
|
SKINCOLOR_NONE,8, // SKINCOLOR_CYAN
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_TEAL
|
SKINCOLOR_NONE,8, // SKINCOLOR_TEAL
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_STEELBLUE
|
SKINCOLOR_NONE,8, // SKINCOLOR_STEEL
|
||||||
SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE
|
SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_PEACH
|
SKINCOLOR_NONE,8, // SKINCOLOR_PEACH
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_TAN
|
SKINCOLOR_NONE,8, // SKINCOLOR_TAN
|
||||||
|
@ -206,6 +205,7 @@ const UINT8 Color_Opposite[MAXSKINCOLORS*2] =
|
||||||
SKINCOLOR_NONE,8, // SKINCOLOR_YELLOW
|
SKINCOLOR_NONE,8, // SKINCOLOR_YELLOW
|
||||||
SKINCOLOR_NONE,8 // SKINCOLOR_GOLD
|
SKINCOLOR_NONE,8 // SKINCOLOR_GOLD
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
CV_PossibleValue_t Color_cons_t[MAXSKINCOLORS+1];
|
CV_PossibleValue_t Color_cons_t[MAXSKINCOLORS+1];
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
||||||
0x18, // SKINCOLOR_BLACK
|
0x18, // SKINCOLOR_BLACK
|
||||||
0xd0, // SKINCOLOR_CYAN
|
0xd0, // SKINCOLOR_CYAN
|
||||||
0xdc, // SKINCOLOR_TEAL
|
0xdc, // SKINCOLOR_TEAL
|
||||||
0xc8, // SKINCOLOR_STEELBLUE
|
0xc8, // SKINCOLOR_STEEL
|
||||||
0xe2, // SKINCOLOR_BLUE
|
0xe2, // SKINCOLOR_BLUE
|
||||||
0x40, // SKINCOLOR_PEACH
|
0x40, // SKINCOLOR_PEACH
|
||||||
0x48, // SKINCOLOR_TAN
|
0x48, // SKINCOLOR_TAN
|
||||||
|
@ -339,7 +339,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
||||||
|
|
||||||
case SKINCOLOR_WHITE:
|
case SKINCOLOR_WHITE:
|
||||||
case SKINCOLOR_BLACK:
|
case SKINCOLOR_BLACK:
|
||||||
case SKINCOLOR_STEELBLUE:
|
case SKINCOLOR_STEEL:
|
||||||
case SKINCOLOR_PINK:
|
case SKINCOLOR_PINK:
|
||||||
case SKINCOLOR_LAVENDER:
|
case SKINCOLOR_LAVENDER:
|
||||||
case SKINCOLOR_PURPLE:
|
case SKINCOLOR_PURPLE:
|
||||||
|
@ -529,7 +529,7 @@ UINT8* R_GetTranslationColormap(INT32 skinnum, skincolors_t color, UINT8 flags)
|
||||||
else if (skinnum == TC_BOSS) skintableindex = BOSS_TT_CACHE_INDEX;
|
else if (skinnum == TC_BOSS) skintableindex = BOSS_TT_CACHE_INDEX;
|
||||||
else if (skinnum == TC_METALSONIC) skintableindex = METALSONIC_TT_CACHE_INDEX;
|
else if (skinnum == TC_METALSONIC) skintableindex = METALSONIC_TT_CACHE_INDEX;
|
||||||
else if (skinnum == TC_ALLWHITE) skintableindex = ALLWHITE_TT_CACHE_INDEX;
|
else if (skinnum == TC_ALLWHITE) skintableindex = ALLWHITE_TT_CACHE_INDEX;
|
||||||
else if (skinnum == TC_STARMAN) skintableindex = STARMAN_TT_CACHE_INDEX;
|
else if (skinnum == TC_RAINBOW) skintableindex = RAINBOW_TT_CACHE_INDEX;
|
||||||
else skintableindex = skinnum;
|
else skintableindex = skinnum;
|
||||||
|
|
||||||
if (flags & GTC_CACHE)
|
if (flags & GTC_CACHE)
|
||||||
|
|
|
@ -107,7 +107,7 @@ extern lumpnum_t viewborderlump[8];
|
||||||
#define TC_BOSS -2
|
#define TC_BOSS -2
|
||||||
#define TC_METALSONIC -3 // For Metal Sonic battle
|
#define TC_METALSONIC -3 // For Metal Sonic battle
|
||||||
#define TC_ALLWHITE -4 // For Cy-Brak-demon
|
#define TC_ALLWHITE -4 // For Cy-Brak-demon
|
||||||
#define TC_STARMAN -5 // For star power
|
#define TC_RAINBOW -5 // For invincibility power
|
||||||
|
|
||||||
// Initialize color translation tables, for player rendering etc.
|
// Initialize color translation tables, for player rendering etc.
|
||||||
void R_InitTranslationTables(void);
|
void R_InitTranslationTables(void);
|
||||||
|
|
44
src/r_main.c
44
src/r_main.c
|
@ -170,7 +170,7 @@ consvar_t cv_drawdist_precip = {"drawdist_precip", "1024", CV_SAVE, drawdist_con
|
||||||
consvar_t cv_precipdensity = {"precipdensity", "Moderate", CV_SAVE, precipdensity_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_precipdensity = {"precipdensity", "Moderate", CV_SAVE, precipdensity_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
// Okay, whoever said homremoval causes a performance hit should be shot.
|
// Okay, whoever said homremoval causes a performance hit should be shot.
|
||||||
consvar_t cv_homremoval = {"homremoval", "No", CV_SAVE, homremoval_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_homremoval = {"homremoval", "Yes", CV_SAVE, homremoval_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_maxportals = {"maxportals", "2", CV_SAVE, maxportals_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_maxportals = {"maxportals", "2", CV_SAVE, maxportals_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
@ -213,7 +213,6 @@ void SplitScreen_OnChange(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
INT32 i;
|
|
||||||
secondarydisplayplayer = consoleplayer;
|
secondarydisplayplayer = consoleplayer;
|
||||||
thirddisplayplayer = consoleplayer;
|
thirddisplayplayer = consoleplayer;
|
||||||
fourthdisplayplayer = consoleplayer;
|
fourthdisplayplayer = consoleplayer;
|
||||||
|
@ -1335,28 +1334,43 @@ void R_RenderPlayerView(player_t *player)
|
||||||
{
|
{
|
||||||
portal_pair *portal;
|
portal_pair *portal;
|
||||||
const boolean skybox = (skyboxmo[0] && cv_skybox.value);
|
const boolean skybox = (skyboxmo[0] && cv_skybox.value);
|
||||||
UINT8 ssplayer;
|
UINT8 viewnumber;
|
||||||
|
|
||||||
if (player == &players[secondarydisplayplayer] && splitscreen)
|
if (player == &players[secondarydisplayplayer] && splitscreen)
|
||||||
ssplayer = 2;
|
viewnumber = 1;
|
||||||
else if (player == &players[thirddisplayplayer] && splitscreen > 1)
|
else if (player == &players[thirddisplayplayer] && splitscreen > 1)
|
||||||
ssplayer = 3;
|
viewnumber = 2;
|
||||||
else if (player == &players[fourthdisplayplayer] && splitscreen > 2)
|
else if (player == &players[fourthdisplayplayer] && splitscreen > 2)
|
||||||
ssplayer = 4;
|
viewnumber = 3;
|
||||||
else if (splitscreen)
|
|
||||||
ssplayer = 1;
|
|
||||||
else
|
else
|
||||||
ssplayer = 0;
|
viewnumber = 0;
|
||||||
|
|
||||||
if (cv_homremoval.value && player == &players[displayplayer]) // if this is display player 1
|
// if this is display player 1
|
||||||
|
if (cv_homremoval.value && player == &players[displayplayer])
|
||||||
{
|
{
|
||||||
if (cv_homremoval.value == 1)
|
if (cv_homremoval.value == 1)
|
||||||
V_DrawFill(0, 0, vid.width, vid.height, 31); // No HOM effect!
|
V_DrawFill(0, 0, vid.width, vid.height, 31); // No HOM effect!
|
||||||
else //'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
|
else //'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
|
||||||
V_DrawFill(0, 0, vid.width, vid.height, 128+(timeinmap&15));
|
V_DrawFill(0, 0, vid.width, vid.height, 128+(timeinmap&15));
|
||||||
}
|
}
|
||||||
|
// Draw over the fourth screen so you don't have to stare at a HOM :V
|
||||||
else if (splitscreen == 2 && player == &players[thirddisplayplayer])
|
else if (splitscreen == 2 && player == &players[thirddisplayplayer])
|
||||||
V_DrawFill(viewwidth, viewheight, viewwidth, viewheight, 31|V_NOSCALESTART); // Draw over the fourth screen so you don't have to stare at a HOM :V
|
#if 1
|
||||||
|
{
|
||||||
|
// V_DrawPatchFill, but for the fourth screen only
|
||||||
|
patch_t *pat = W_CachePatchName("SRB2BACK", PU_CACHE);
|
||||||
|
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||||
|
INT32 x, y, pw = SHORT(pat->width) * dupz, ph = SHORT(pat->height) * dupz;
|
||||||
|
|
||||||
|
for (x = vid.width>>1; x < vid.width; x += pw)
|
||||||
|
{
|
||||||
|
for (y = vid.height>>1; y < vid.height; y += ph)
|
||||||
|
V_DrawScaledPatch(x, y, V_NOSCALESTART, pat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
V_DrawFill(viewwidth, viewheight, viewwidth, viewheight, 31|V_NOSCALESTART);
|
||||||
|
#endif
|
||||||
|
|
||||||
// load previous saved value of skyVisible for the player
|
// load previous saved value of skyVisible for the player
|
||||||
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||||
|
@ -1383,7 +1397,7 @@ void R_RenderPlayerView(player_t *player)
|
||||||
R_ClearVisibleFloorSplats();
|
R_ClearVisibleFloorSplats();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
R_RenderBSPNode((INT32)numnodes - 1, ssplayer);
|
R_RenderBSPNode((INT32)numnodes - 1, viewnumber);
|
||||||
R_ClipSprites();
|
R_ClipSprites();
|
||||||
R_DrawPlanes();
|
R_DrawPlanes();
|
||||||
#ifdef FLOORSPLATS
|
#ifdef FLOORSPLATS
|
||||||
|
@ -1416,7 +1430,7 @@ void R_RenderPlayerView(player_t *player)
|
||||||
mytotal = 0;
|
mytotal = 0;
|
||||||
ProfZeroTimer();
|
ProfZeroTimer();
|
||||||
#endif
|
#endif
|
||||||
R_RenderBSPNode((INT32)numnodes - 1, ssplayer);
|
R_RenderBSPNode((INT32)numnodes - 1, viewnumber);
|
||||||
R_ClipSprites();
|
R_ClipSprites();
|
||||||
#ifdef TIMING
|
#ifdef TIMING
|
||||||
RDMSR(0x10, &mycount);
|
RDMSR(0x10, &mycount);
|
||||||
|
@ -1441,7 +1455,7 @@ void R_RenderPlayerView(player_t *player)
|
||||||
|
|
||||||
validcount++;
|
validcount++;
|
||||||
|
|
||||||
R_RenderBSPNode((INT32)numnodes - 1, ssplayer);
|
R_RenderBSPNode((INT32)numnodes - 1, viewnumber);
|
||||||
R_ClipSprites();
|
R_ClipSprites();
|
||||||
//R_DrawPlanes();
|
//R_DrawPlanes();
|
||||||
//R_DrawMasked();
|
//R_DrawMasked();
|
||||||
|
@ -1548,7 +1562,7 @@ void R_RegisterEngineStuff(void)
|
||||||
|
|
||||||
// Default viewheight is changeable,
|
// Default viewheight is changeable,
|
||||||
// initialized to standard viewheight
|
// initialized to standard viewheight
|
||||||
CV_RegisterVar(&cv_viewheight);
|
//CV_RegisterVar(&cv_viewheight);
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
// GL-specific Commands
|
// GL-specific Commands
|
||||||
|
|
|
@ -714,6 +714,7 @@ void R_DrawPlanes(void)
|
||||||
if (dc_yl <= dc_yh)
|
if (dc_yl <= dc_yh)
|
||||||
{
|
{
|
||||||
angle = (pl->viewangle + xtoviewangle[x])>>ANGLETOSKYSHIFT;
|
angle = (pl->viewangle + xtoviewangle[x])>>ANGLETOSKYSHIFT;
|
||||||
|
dc_iscale = FixedMul(skyscale, FINECOSINE(xtoviewangle[x]>>ANGLETOFINESHIFT));
|
||||||
dc_x = x;
|
dc_x = x;
|
||||||
dc_source =
|
dc_source =
|
||||||
R_GetColumn(skytexture,
|
R_GetColumn(skytexture,
|
||||||
|
|
|
@ -87,7 +87,7 @@ extern lighttable_t **planezlight;
|
||||||
extern fixed_t *yslope;
|
extern fixed_t *yslope;
|
||||||
extern fixed_t distscale[MAXVIDWIDTH];
|
extern fixed_t distscale[MAXVIDWIDTH];
|
||||||
|
|
||||||
FUNCMATH void R_InitPlanes(void);
|
void R_InitPlanes(void);
|
||||||
void R_PortalStoreClipValues(INT32 start, INT32 end, INT16 *ceil, INT16 *floor, fixed_t *scale);
|
void R_PortalStoreClipValues(INT32 start, INT32 end, INT16 *ceil, INT16 *floor, fixed_t *scale);
|
||||||
void R_PortalRestoreClipValues(INT32 start, INT32 end, INT16 *ceil, INT16 *floor, fixed_t *scale);
|
void R_PortalRestoreClipValues(INT32 start, INT32 end, INT16 *ceil, INT16 *floor, fixed_t *scale);
|
||||||
void R_ClearPlanes(void);
|
void R_ClearPlanes(void);
|
||||||
|
|
30
src/r_segs.c
30
src/r_segs.c
|
@ -2674,22 +2674,28 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
worldbottomslope >>= 4;
|
worldbottomslope >>= 4;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
topstep = -FixedMul (rw_scalestep, worldtop);
|
if (linedef->special == 41) { // HORIZON LINES
|
||||||
topfrac = (centeryfrac>>4) - FixedMul (worldtop, rw_scale);
|
topstep = bottomstep = 0;
|
||||||
|
topfrac = bottomfrac = (centeryfrac>>4);
|
||||||
|
topfrac++; // Prevent 1px HOM
|
||||||
|
} else {
|
||||||
|
topstep = -FixedMul (rw_scalestep, worldtop);
|
||||||
|
topfrac = (centeryfrac>>4) - FixedMul (worldtop, rw_scale);
|
||||||
|
|
||||||
bottomstep = -FixedMul (rw_scalestep,worldbottom);
|
bottomstep = -FixedMul (rw_scalestep,worldbottom);
|
||||||
bottomfrac = (centeryfrac>>4) - FixedMul (worldbottom, rw_scale);
|
bottomfrac = (centeryfrac>>4) - FixedMul (worldbottom, rw_scale);
|
||||||
|
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
if (frontsector->c_slope) {
|
if (frontsector->c_slope) {
|
||||||
fixed_t topfracend = (centeryfrac>>4) - FixedMul (worldtopslope, ds_p->scale2);
|
fixed_t topfracend = (centeryfrac>>4) - FixedMul (worldtopslope, ds_p->scale2);
|
||||||
topstep = (topfracend-topfrac)/(range);
|
topstep = (topfracend-topfrac)/(range);
|
||||||
}
|
}
|
||||||
if (frontsector->f_slope) {
|
if (frontsector->f_slope) {
|
||||||
fixed_t bottomfracend = (centeryfrac>>4) - FixedMul (worldbottomslope, ds_p->scale2);
|
fixed_t bottomfracend = (centeryfrac>>4) - FixedMul (worldbottomslope, ds_p->scale2);
|
||||||
bottomstep = (bottomfracend-bottomfrac)/(range);
|
bottomstep = (bottomfracend-bottomfrac)/(range);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
dc_numlights = 0;
|
dc_numlights = 0;
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ fixed_t P_SegLength(seg_t *seg);
|
||||||
|
|
||||||
// call at P_SetupLevel()
|
// call at P_SetupLevel()
|
||||||
#if !(defined (WALLSPLATS) || defined (FLOORSPLATS))
|
#if !(defined (WALLSPLATS) || defined (FLOORSPLATS))
|
||||||
FUNCMATH void R_ClearLevelSplats(void);
|
void R_ClearLevelSplats(void);
|
||||||
#else
|
#else
|
||||||
void R_ClearLevelSplats(void);
|
void R_ClearLevelSplats(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -826,15 +826,12 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
||||||
{
|
{
|
||||||
colfunc = transtransfunc;
|
colfunc = transtransfunc;
|
||||||
dc_transmap = vis->transmap;
|
dc_transmap = vis->transmap;
|
||||||
if (vis->mobj->skin && vis->mobj->sprite == SPR_PLAY) // MT_GHOST LOOKS LIKE A PLAYER SO USE THE PLAYER TRANSLATION TABLES. >_>
|
if (vis->mobj->colorized)
|
||||||
|
dc_translation = R_GetTranslationColormap(TC_RAINBOW, vis->mobj->color, GTC_CACHE);
|
||||||
|
else if (vis->mobj->skin && vis->mobj->sprite == SPR_PLAY) // MT_GHOST LOOKS LIKE A PLAYER SO USE THE PLAYER TRANSLATION TABLES. >_>
|
||||||
{
|
{
|
||||||
if (vis->mobj->colorized)
|
size_t skinnum = (skin_t*)vis->mobj->skin-skins;
|
||||||
dc_translation = R_GetTranslationColormap(TC_STARMAN, vis->mobj->color, GTC_CACHE);
|
dc_translation = R_GetTranslationColormap((INT32)skinnum, vis->mobj->color, GTC_CACHE);
|
||||||
else
|
|
||||||
{
|
|
||||||
size_t skinnum = (skin_t*)vis->mobj->skin-skins;
|
|
||||||
dc_translation = R_GetTranslationColormap((INT32)skinnum, vis->mobj->color, GTC_CACHE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else // Use the defaults
|
else // Use the defaults
|
||||||
dc_translation = R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color, GTC_CACHE);
|
dc_translation = R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color, GTC_CACHE);
|
||||||
|
@ -850,15 +847,12 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
||||||
colfunc = transcolfunc;
|
colfunc = transcolfunc;
|
||||||
|
|
||||||
// New colormap stuff for skins Tails 06-07-2002
|
// New colormap stuff for skins Tails 06-07-2002
|
||||||
if (vis->mobj->skin && vis->mobj->sprite == SPR_PLAY) // This thing is a player!
|
if (vis->mobj->colorized)
|
||||||
|
dc_translation = R_GetTranslationColormap(TC_RAINBOW, vis->mobj->color, GTC_CACHE);
|
||||||
|
else if (vis->mobj->skin && vis->mobj->sprite == SPR_PLAY) // This thing is a player!
|
||||||
{
|
{
|
||||||
if (vis->mobj->colorized)
|
size_t skinnum = (skin_t*)vis->mobj->skin-skins;
|
||||||
dc_translation = R_GetTranslationColormap(TC_STARMAN, vis->mobj->color, GTC_CACHE);
|
dc_translation = R_GetTranslationColormap((INT32)skinnum, vis->mobj->color, GTC_CACHE);
|
||||||
else
|
|
||||||
{
|
|
||||||
size_t skinnum = (skin_t*)vis->mobj->skin-skins;
|
|
||||||
dc_translation = R_GetTranslationColormap((INT32)skinnum, vis->mobj->color, GTC_CACHE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else // Use the defaults
|
else // Use the defaults
|
||||||
dc_translation = R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color, GTC_CACHE);
|
dc_translation = R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color, GTC_CACHE);
|
||||||
|
@ -1676,7 +1670,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
||||||
// R_AddSprites
|
// R_AddSprites
|
||||||
// During BSP traversal, this adds sprites by sector.
|
// During BSP traversal, this adds sprites by sector.
|
||||||
//
|
//
|
||||||
void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 ssplayer)
|
void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 viewnumber)
|
||||||
{
|
{
|
||||||
mobj_t *thing;
|
mobj_t *thing;
|
||||||
precipmobj_t *precipthing; // Tails 08-25-2002
|
precipmobj_t *precipthing; // Tails 08-25-2002
|
||||||
|
@ -1722,19 +1716,19 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 ssplayer)
|
||||||
if (splitscreen)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
if (thing->eflags & MFE_DRAWONLYFORP1)
|
if (thing->eflags & MFE_DRAWONLYFORP1)
|
||||||
if (ssplayer != 1)
|
if (viewnumber != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (thing->eflags & MFE_DRAWONLYFORP2)
|
if (thing->eflags & MFE_DRAWONLYFORP2)
|
||||||
if (ssplayer != 2)
|
if (viewnumber != 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (thing->eflags & MFE_DRAWONLYFORP3 && splitscreen > 1)
|
if (thing->eflags & MFE_DRAWONLYFORP3 && splitscreen > 1)
|
||||||
if (ssplayer != 3)
|
if (viewnumber != 2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (thing->eflags & MFE_DRAWONLYFORP4 && splitscreen > 2)
|
if (thing->eflags & MFE_DRAWONLYFORP4 && splitscreen > 2)
|
||||||
if (ssplayer != 4)
|
if (viewnumber != 3)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1755,19 +1749,19 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 ssplayer)
|
||||||
if (splitscreen)
|
if (splitscreen)
|
||||||
{
|
{
|
||||||
if (thing->eflags & MFE_DRAWONLYFORP1)
|
if (thing->eflags & MFE_DRAWONLYFORP1)
|
||||||
if (ssplayer != 1)
|
if (viewnumber != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (thing->eflags & MFE_DRAWONLYFORP2)
|
if (thing->eflags & MFE_DRAWONLYFORP2)
|
||||||
if (ssplayer != 2)
|
if (viewnumber != 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (thing->eflags & MFE_DRAWONLYFORP3 && splitscreen > 1)
|
if (thing->eflags & MFE_DRAWONLYFORP3 && splitscreen > 1)
|
||||||
if (ssplayer != 3)
|
if (viewnumber != 2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (thing->eflags & MFE_DRAWONLYFORP4 && splitscreen > 2)
|
if (thing->eflags & MFE_DRAWONLYFORP4 && splitscreen > 2)
|
||||||
if (ssplayer != 4)
|
if (viewnumber != 3)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2502,9 +2496,9 @@ static void Sk_SetDefaultValue(skin_t *skin)
|
||||||
|
|
||||||
strcpy(skin->realname, "Someone");
|
strcpy(skin->realname, "Someone");
|
||||||
strcpy(skin->hudname, "???");
|
strcpy(skin->hudname, "???");
|
||||||
strncpy(skin->charsel, "CHRSONIC", 8);
|
strncpy(skin->charsel, "CHRSONIC", 9);
|
||||||
strncpy(skin->face, "MISSING", 8);
|
strncpy(skin->face, "MISSING", 9);
|
||||||
strncpy(skin->superface, "MISSING", 8);
|
strncpy(skin->superface, "MISSING", 9);
|
||||||
|
|
||||||
skin->starttranscolor = 160;
|
skin->starttranscolor = 160;
|
||||||
skin->prefcolor = SKINCOLOR_GREEN;
|
skin->prefcolor = SKINCOLOR_GREEN;
|
||||||
|
@ -2536,7 +2530,7 @@ static void Sk_SetDefaultValue(skin_t *skin)
|
||||||
for (i = 0; i < sfx_skinsoundslot0; i++)
|
for (i = 0; i < sfx_skinsoundslot0; i++)
|
||||||
if (S_sfx[i].skinsound != -1)
|
if (S_sfx[i].skinsound != -1)
|
||||||
skin->soundsid[S_sfx[i].skinsound] = i;
|
skin->soundsid[S_sfx[i].skinsound] = i;
|
||||||
strncpy(skin->iconprefix, "SONICICN", 8);
|
strncpy(skin->iconprefix, "SONICICN", 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -2569,9 +2563,9 @@ void R_InitSkins(void)
|
||||||
strcpy(skin->realname, "Sonic");
|
strcpy(skin->realname, "Sonic");
|
||||||
strcpy(skin->hudname, "SONIC");
|
strcpy(skin->hudname, "SONIC");
|
||||||
|
|
||||||
strncpy(skin->charsel, "CHRSONIC", 8);
|
strncpy(skin->charsel, "CHRSONIC", 9);
|
||||||
strncpy(skin->face, "LIVSONIC", 8);
|
strncpy(skin->face, "LIVSONIC", 9);
|
||||||
strncpy(skin->superface, "LIVSUPER", 8);
|
strncpy(skin->superface, "LIVSUPER", 9);
|
||||||
skin->prefcolor = SKINCOLOR_BLUE;
|
skin->prefcolor = SKINCOLOR_BLUE;
|
||||||
|
|
||||||
skin->ability = CA_THOK;
|
skin->ability = CA_THOK;
|
||||||
|
@ -2591,7 +2585,7 @@ void R_InitSkins(void)
|
||||||
skin->spritedef.numframes = sprites[SPR_PLAY].numframes;
|
skin->spritedef.numframes = sprites[SPR_PLAY].numframes;
|
||||||
skin->spritedef.spriteframes = sprites[SPR_PLAY].spriteframes;
|
skin->spritedef.spriteframes = sprites[SPR_PLAY].spriteframes;
|
||||||
ST_LoadFaceGraphics(skin->face, skin->superface, 0);
|
ST_LoadFaceGraphics(skin->face, skin->superface, 0);
|
||||||
strncpy(skin->iconprefix, "SONICICN", 8);
|
strncpy(skin->iconprefix, "SONICICN", 9);
|
||||||
K_LoadIconGraphics(skin->iconprefix, 0);
|
K_LoadIconGraphics(skin->iconprefix, 0);
|
||||||
|
|
||||||
//MD2 for sonic doesn't want to load in Linux.
|
//MD2 for sonic doesn't want to load in Linux.
|
||||||
|
|
|
@ -55,7 +55,7 @@ void R_DelSpriteDefs(UINT16 wadnum);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//SoM: 6/5/2000: Light sprites correctly!
|
//SoM: 6/5/2000: Light sprites correctly!
|
||||||
void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 ssplayer);
|
void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 viewnumber);
|
||||||
void R_InitSprites(void);
|
void R_InitSprites(void);
|
||||||
void R_ClearSprites(void);
|
void R_ClearSprites(void);
|
||||||
void R_ClipSprites(void);
|
void R_ClipSprites(void);
|
||||||
|
@ -81,7 +81,7 @@ typedef struct
|
||||||
|
|
||||||
char realname[SKINNAMESIZE+1]; // Display name for level completion.
|
char realname[SKINNAMESIZE+1]; // Display name for level completion.
|
||||||
char hudname[SKINNAMESIZE+1]; // HUD name to display (officially exactly 5 characters long)
|
char hudname[SKINNAMESIZE+1]; // HUD name to display (officially exactly 5 characters long)
|
||||||
char charsel[8], face[8], superface[8]; // Arbitrarily named patch lumps
|
char charsel[9], face[9], superface[9]; // Arbitrarily named patch lumps
|
||||||
|
|
||||||
UINT8 ability; // ability definition
|
UINT8 ability; // ability definition
|
||||||
UINT8 ability2; // secondary ability definition
|
UINT8 ability2; // secondary ability definition
|
||||||
|
|
|
@ -80,7 +80,7 @@ static consvar_t precachesound = {"precachesound", "Off", CV_SAVE, CV_OnOff, NUL
|
||||||
// actual general (maximum) sound & music volume, saved into the config
|
// actual general (maximum) sound & music volume, saved into the config
|
||||||
consvar_t cv_soundvolume = {"soundvolume", "31", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_soundvolume = {"soundvolume", "31", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_digmusicvolume = {"digmusicvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_digmusicvolume = {"digmusicvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_midimusicvolume = {"midimusicvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
//consvar_t cv_midimusicvolume = {"midimusicvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
// number of channels available
|
// number of channels available
|
||||||
#if defined (_WIN32_WCE) || defined (DC) || defined (PSP) || defined(GP2X)
|
#if defined (_WIN32_WCE) || defined (DC) || defined (PSP) || defined(GP2X)
|
||||||
consvar_t cv_numChannels = {"snd_channels", "8", CV_SAVE|CV_CALL, CV_Unsigned, SetChannelsNum, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_numChannels = {"snd_channels", "8", CV_SAVE|CV_CALL, CV_Unsigned, SetChannelsNum, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
@ -88,7 +88,7 @@ consvar_t cv_numChannels = {"snd_channels", "8", CV_SAVE|CV_CALL, CV_Unsigned, S
|
||||||
consvar_t cv_numChannels = {"snd_channels", "32", CV_SAVE|CV_CALL, CV_Unsigned, SetChannelsNum, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_numChannels = {"snd_channels", "32", CV_SAVE|CV_CALL, CV_Unsigned, SetChannelsNum, 0, NULL, NULL, 0, 0, NULL};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static consvar_t surround = {"surround", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t surround = {"surround", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
#define S_MAX_VOLUME 127
|
#define S_MAX_VOLUME 127
|
||||||
|
|
||||||
|
@ -846,7 +846,7 @@ void S_StopSound(void *origin)
|
||||||
//
|
//
|
||||||
static INT32 actualsfxvolume; // check for change through console
|
static INT32 actualsfxvolume; // check for change through console
|
||||||
static INT32 actualdigmusicvolume;
|
static INT32 actualdigmusicvolume;
|
||||||
static INT32 actualmidimusicvolume;
|
//static INT32 actualmidimusicvolume;
|
||||||
|
|
||||||
void S_UpdateSounds(void)
|
void S_UpdateSounds(void)
|
||||||
{
|
{
|
||||||
|
@ -873,8 +873,8 @@ void S_UpdateSounds(void)
|
||||||
S_SetSfxVolume (cv_soundvolume.value);
|
S_SetSfxVolume (cv_soundvolume.value);
|
||||||
if (actualdigmusicvolume != cv_digmusicvolume.value)
|
if (actualdigmusicvolume != cv_digmusicvolume.value)
|
||||||
S_SetDigMusicVolume (cv_digmusicvolume.value);
|
S_SetDigMusicVolume (cv_digmusicvolume.value);
|
||||||
if (actualmidimusicvolume != cv_midimusicvolume.value)
|
//if (actualmidimusicvolume != cv_midimusicvolume.value)
|
||||||
S_SetMIDIMusicVolume (cv_midimusicvolume.value);
|
//S_SetMIDIMusicVolume (cv_midimusicvolume.value);
|
||||||
|
|
||||||
// We're done now, if we're not in a level.
|
// We're done now, if we're not in a level.
|
||||||
if (gamestate != GS_LEVEL)
|
if (gamestate != GS_LEVEL)
|
||||||
|
@ -1438,7 +1438,7 @@ void S_StartSoundName(void *mo, const char *soundname)
|
||||||
/// ------------------------
|
/// ------------------------
|
||||||
|
|
||||||
#ifdef MUSICSLOT_COMPATIBILITY
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
const char *compat_special_music_slots[21] =
|
const char *compat_special_music_slots[16] =
|
||||||
{
|
{
|
||||||
"titles", // 1036 title screen
|
"titles", // 1036 title screen
|
||||||
"read_m", // 1037 intro
|
"read_m", // 1037 intro
|
||||||
|
@ -1455,12 +1455,6 @@ const char *compat_special_music_slots[21] =
|
||||||
"credit", // 1048 credits
|
"credit", // 1048 credits
|
||||||
"racent", // 1049 Race Results
|
"racent", // 1049 Race Results
|
||||||
"stjr", // 1050 Sonic Team Jr. Presents
|
"stjr", // 1050 Sonic Team Jr. Presents
|
||||||
// SRB2kart 040217
|
|
||||||
"finlap", // 1051 Sonic Team Jr. Presents
|
|
||||||
"karwin", // 1052 Sonic Team Jr. Presents
|
|
||||||
"karok", // 1053 Sonic Team Jr. Presents
|
|
||||||
"karlos", // 1054 Sonic Team Jr. Presents
|
|
||||||
"mega", // 1055 Sonic Team Jr. Presents
|
|
||||||
""
|
""
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -1476,16 +1470,22 @@ static boolean mus_paused = 0; // whether songs are mus_paused
|
||||||
|
|
||||||
static boolean S_MIDIMusic(const char *mname, boolean looping)
|
static boolean S_MIDIMusic(const char *mname, boolean looping)
|
||||||
{
|
{
|
||||||
lumpnum_t mlumpnum;
|
/*lumpnum_t mlumpnum;
|
||||||
void *mdata;
|
void *mdata;
|
||||||
INT32 mhandle;
|
INT32 mhandle;*/
|
||||||
|
|
||||||
if (nomidimusic || music_disabled)
|
(void)looping;
|
||||||
|
|
||||||
|
if (/*nomidimusic || */music_disabled)
|
||||||
return false; // didn't search.
|
return false; // didn't search.
|
||||||
|
|
||||||
if (W_CheckNumForName(va("d_%s", mname)) == LUMPERROR)
|
if (W_CheckNumForName(va("d_%s", mname)) == LUMPERROR)
|
||||||
return false;
|
return false;
|
||||||
mlumpnum = W_GetNumForName(va("d_%s", mname));
|
|
||||||
|
CONS_Alert(CONS_ERROR, "A MIDI Music lump %.6s was found,\nbut SRB2Kart does not support MIDI output.\nWe apologise for the inconvenience.\n", mname);
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/*mlumpnum = W_GetNumForName(va("d_%s", mname));
|
||||||
|
|
||||||
// load & register it
|
// load & register it
|
||||||
mdata = W_CacheLumpNum(mlumpnum, PU_MUSIC);
|
mdata = W_CacheLumpNum(mlumpnum, PU_MUSIC);
|
||||||
|
@ -1512,7 +1512,7 @@ static boolean S_MIDIMusic(const char *mname, boolean looping)
|
||||||
music_lumpnum = mlumpnum;
|
music_lumpnum = mlumpnum;
|
||||||
music_data = mdata;
|
music_data = mdata;
|
||||||
music_handle = mhandle;
|
music_handle = mhandle;
|
||||||
return true;
|
return true;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean S_DigMusic(const char *mname, boolean looping)
|
static boolean S_DigMusic(const char *mname, boolean looping)
|
||||||
|
@ -1601,7 +1601,7 @@ void S_SetDigMusicVolume(INT32 volume)
|
||||||
I_SetDigMusicVolume(volume&31);
|
I_SetDigMusicVolume(volume&31);
|
||||||
}
|
}
|
||||||
|
|
||||||
void S_SetMIDIMusicVolume(INT32 volume)
|
/*void S_SetMIDIMusicVolume(INT32 volume)
|
||||||
{
|
{
|
||||||
if (volume < 0 || volume > 31)
|
if (volume < 0 || volume > 31)
|
||||||
CONS_Alert(CONS_WARNING, "musicvolume should be between 0-31\n");
|
CONS_Alert(CONS_WARNING, "musicvolume should be between 0-31\n");
|
||||||
|
@ -1613,7 +1613,7 @@ void S_SetMIDIMusicVolume(INT32 volume)
|
||||||
I_SetMIDIMusicVolume(31); // Trick for buggy dos drivers. Win32 doesn't need this.
|
I_SetMIDIMusicVolume(31); // Trick for buggy dos drivers. Win32 doesn't need this.
|
||||||
#endif
|
#endif
|
||||||
I_SetMIDIMusicVolume(volume&0x1f);
|
I_SetMIDIMusicVolume(volume&0x1f);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/// ------------------------
|
/// ------------------------
|
||||||
/// Init & Others
|
/// Init & Others
|
||||||
|
@ -1624,7 +1624,7 @@ void S_SetMIDIMusicVolume(INT32 volume)
|
||||||
// Sets channels, SFX and music volume,
|
// Sets channels, SFX and music volume,
|
||||||
// allocates channel buffer, sets S_sfx lookup.
|
// allocates channel buffer, sets S_sfx lookup.
|
||||||
//
|
//
|
||||||
void S_Init(INT32 sfxVolume, INT32 digMusicVolume, INT32 midiMusicVolume)
|
void S_Init(INT32 sfxVolume, INT32 digMusicVolume)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
|
@ -1633,7 +1633,7 @@ void S_Init(INT32 sfxVolume, INT32 digMusicVolume, INT32 midiMusicVolume)
|
||||||
|
|
||||||
S_SetSfxVolume(sfxVolume);
|
S_SetSfxVolume(sfxVolume);
|
||||||
S_SetDigMusicVolume(digMusicVolume);
|
S_SetDigMusicVolume(digMusicVolume);
|
||||||
S_SetMIDIMusicVolume(midiMusicVolume);
|
//S_SetMIDIMusicVolume(midiMusicVolume);
|
||||||
|
|
||||||
SetChannelsNum();
|
SetChannelsNum();
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,9 @@
|
||||||
#define PICKUP_SOUND 0x8000
|
#define PICKUP_SOUND 0x8000
|
||||||
|
|
||||||
extern consvar_t stereoreverse;
|
extern consvar_t stereoreverse;
|
||||||
extern consvar_t cv_soundvolume, cv_digmusicvolume, cv_midimusicvolume;
|
extern consvar_t cv_soundvolume, cv_digmusicvolume;//, cv_midimusicvolume;
|
||||||
extern consvar_t cv_numChannels;
|
extern consvar_t cv_numChannels;
|
||||||
|
extern consvar_t surround;
|
||||||
|
|
||||||
#ifdef SNDSERV
|
#ifdef SNDSERV
|
||||||
extern consvar_t sndserver_cmd, sndserver_arg;
|
extern consvar_t sndserver_cmd, sndserver_arg;
|
||||||
|
@ -71,7 +72,7 @@ void S_RegisterSoundStuff(void);
|
||||||
// Initializes sound stuff, including volume
|
// Initializes sound stuff, including volume
|
||||||
// Sets channels, SFX and music volume, allocates channel buffer, sets S_sfx lookup.
|
// Sets channels, SFX and music volume, allocates channel buffer, sets S_sfx lookup.
|
||||||
//
|
//
|
||||||
void S_Init(INT32 sfxVolume, INT32 digMusicVolume, INT32 midiMusicVolume);
|
void S_Init(INT32 sfxVolume, INT32 digMusicVolume);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Per level startup code.
|
// Per level startup code.
|
||||||
|
@ -122,7 +123,7 @@ void S_UpdateSounds(void);
|
||||||
FUNCMATH fixed_t S_CalculateSoundDistance(fixed_t px1, fixed_t py1, fixed_t pz1, fixed_t px2, fixed_t py2, fixed_t pz2);
|
FUNCMATH fixed_t S_CalculateSoundDistance(fixed_t px1, fixed_t py1, fixed_t pz1, fixed_t px2, fixed_t py2, fixed_t pz2);
|
||||||
|
|
||||||
void S_SetDigMusicVolume(INT32 volume);
|
void S_SetDigMusicVolume(INT32 volume);
|
||||||
void S_SetMIDIMusicVolume(INT32 volume);
|
//void S_SetMIDIMusicVolume(INT32 volume);
|
||||||
void S_SetSfxVolume(INT32 volume);
|
void S_SetSfxVolume(INT32 volume);
|
||||||
|
|
||||||
INT32 S_OriginPlaying(void *origin);
|
INT32 S_OriginPlaying(void *origin);
|
||||||
|
@ -142,7 +143,7 @@ void S_StopSoundByNum(sfxenum_t sfxnum);
|
||||||
#ifdef MUSICSLOT_COMPATIBILITY
|
#ifdef MUSICSLOT_COMPATIBILITY
|
||||||
// For compatibility with code/scripts relying on older versions
|
// For compatibility with code/scripts relying on older versions
|
||||||
// This is a list of all the "special" slot names and their associated numbers
|
// This is a list of all the "special" slot names and their associated numbers
|
||||||
const char *compat_special_music_slots[21];
|
const char *compat_special_music_slots[16];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -71,7 +71,7 @@ consvar_t cv_scr_depth = {"scr_depth", "16 bits", CV_SAVE, scr_depth_cons_t, NUL
|
||||||
consvar_t cv_renderview = {"renderview", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_renderview = {"renderview", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
#ifdef DIRECTFULLSCREEN
|
#ifdef DIRECTFULLSCREEN
|
||||||
static FUNCMATH void SCR_ChangeFullscreen (void);
|
static void SCR_ChangeFullscreen (void);
|
||||||
#else
|
#else
|
||||||
static void SCR_ChangeFullscreen (void);
|
static void SCR_ChangeFullscreen (void);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -12,19 +12,19 @@ consvar_t cd_volume = {"cd_volume","31",CV_SAVE,soundvolume_cons_t, NULL, 0, NUL
|
||||||
consvar_t cdUpdate = {"cd_update","1",CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cdUpdate = {"cd_update","1",CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
|
||||||
FUNCMATH void I_InitCD(void){}
|
void I_InitCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_StopCD(void){}
|
void I_StopCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_PauseCD(void){}
|
void I_PauseCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_ResumeCD(void){}
|
void I_ResumeCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_ShutdownCD(void){}
|
void I_ShutdownCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_UpdateCD(void){}
|
void I_UpdateCD(void){}
|
||||||
|
|
||||||
FUNCMATH void I_PlayCD(UINT8 track, UINT8 looping)
|
void I_PlayCD(UINT8 track, UINT8 looping)
|
||||||
{
|
{
|
||||||
(void)track;
|
(void)track;
|
||||||
(void)looping;
|
(void)looping;
|
||||||
|
|
|
@ -2552,28 +2552,28 @@ void I_StartupMouse2(void)
|
||||||
//
|
//
|
||||||
// I_Tactile
|
// I_Tactile
|
||||||
//
|
//
|
||||||
FUNCMATH void I_Tactile(FFType pFFType, const JoyFF_t *FFEffect)
|
void I_Tactile(FFType pFFType, const JoyFF_t *FFEffect)
|
||||||
{
|
{
|
||||||
// UNUSED.
|
// UNUSED.
|
||||||
(void)pFFType;
|
(void)pFFType;
|
||||||
(void)FFEffect;
|
(void)FFEffect;
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH void I_Tactile2(FFType pFFType, const JoyFF_t *FFEffect)
|
void I_Tactile2(FFType pFFType, const JoyFF_t *FFEffect)
|
||||||
{
|
{
|
||||||
// UNUSED.
|
// UNUSED.
|
||||||
(void)pFFType;
|
(void)pFFType;
|
||||||
(void)FFEffect;
|
(void)FFEffect;
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH void I_Tactile3(FFType pFFType, const JoyFF_t *FFEffect)
|
void I_Tactile3(FFType pFFType, const JoyFF_t *FFEffect)
|
||||||
{
|
{
|
||||||
// UNUSED.
|
// UNUSED.
|
||||||
(void)pFFType;
|
(void)pFFType;
|
||||||
(void)FFEffect;
|
(void)FFEffect;
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH void I_Tactile4(FFType pFFType, const JoyFF_t *FFEffect)
|
void I_Tactile4(FFType pFFType, const JoyFF_t *FFEffect)
|
||||||
{
|
{
|
||||||
// UNUSED.
|
// UNUSED.
|
||||||
(void)pFFType;
|
(void)pFFType;
|
||||||
|
@ -2705,7 +2705,7 @@ tic_t I_GetTime (void)
|
||||||
//
|
//
|
||||||
//I_StartupTimer
|
//I_StartupTimer
|
||||||
//
|
//
|
||||||
FUNCMATH void I_StartupTimer(void)
|
void I_StartupTimer(void)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// for win2k time bug
|
// for win2k time bug
|
||||||
|
@ -2805,11 +2805,11 @@ void I_WaitVBL(INT32 count)
|
||||||
SDL_Delay(count);
|
SDL_Delay(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH void I_BeginRead(void)
|
void I_BeginRead(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH void I_EndRead(void)
|
void I_EndRead(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3557,5 +3557,5 @@ const CPUInfoFlags *I_CPUInfo(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// note CPUAFFINITY code used to reside here
|
// note CPUAFFINITY code used to reside here
|
||||||
FUNCMATH void I_RegisterSysCommands(void) {}
|
void I_RegisterSysCommands(void) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1014,7 +1014,6 @@ static inline boolean I_SkipFrame(void)
|
||||||
if (!paused)
|
if (!paused)
|
||||||
return false;
|
return false;
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
case GS_TIMEATTACK:
|
|
||||||
case GS_WAITINGPLAYERS:
|
case GS_WAITINGPLAYERS:
|
||||||
return skip; // Skip odd frames
|
return skip; // Skip odd frames
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -124,7 +124,7 @@ void I_ShutdownSound(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNCMATH void I_UpdateSound(void)
|
void I_UpdateSound(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -462,7 +462,7 @@ static void mix_gme(void *udata, Uint8 *stream, int len)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FUNCMATH void I_InitMusic(void)
|
void I_InitMusic(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,7 +767,7 @@ boolean I_SetSongTrack(int track)
|
||||||
// MIDI Music
|
// MIDI Music
|
||||||
//
|
//
|
||||||
|
|
||||||
FUNCMATH void I_InitMIDIMusic(void)
|
void I_InitMIDIMusic(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1311,7 +1311,6 @@ static inline boolean I_SkipFrame(void)
|
||||||
case GS_LEVEL:
|
case GS_LEVEL:
|
||||||
if (!paused)
|
if (!paused)
|
||||||
return false;
|
return false;
|
||||||
case GS_TIMEATTACK:
|
|
||||||
case GS_WAITINGPLAYERS:
|
case GS_WAITINGPLAYERS:
|
||||||
return skip; // Skip odd frames
|
return skip; // Skip odd frames
|
||||||
default:
|
default:
|
||||||
|
|
64
src/sounds.c
64
src/sounds.c
|
@ -147,7 +147,6 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"drown", false, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"drown", false, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"fizzle", false, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"fizzle", false, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"gbeep", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Grenade beep
|
{"gbeep", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Grenade beep
|
||||||
{"gclose", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
|
||||||
{"ghit" , false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"ghit" , false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"gloop", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"gloop", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"gspray", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"gspray", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -294,7 +293,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s1ba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s1ba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s1bb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s1bb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s1bc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s1bc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s1bd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s1bd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Ballhog bounce
|
||||||
{"s1be", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s1be", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s1bf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s1bf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s1c0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s1c0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -316,7 +315,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
|
|
||||||
// Sonic 2 sounds
|
// Sonic 2 sounds
|
||||||
{"s220", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s220", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s221", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s221", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Lap sound
|
||||||
{"s222", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s222", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s223", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s223", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s224", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s224", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -343,7 +342,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s239", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s239", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s23a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s23a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s23b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s23b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s23c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s23c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Drift boost
|
||||||
{"s23d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s23d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s23e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s23e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s23f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s23f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -362,7 +361,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s24c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s24c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s24d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s24d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s24e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s24e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s24f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Normal finish
|
{"s24f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s250", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s250", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s251", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s251", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s252", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s252", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -378,7 +377,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s25c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s25c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s25d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s25d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s25e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s25e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s25f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s25f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Perfect start boost
|
||||||
{"s260", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s260", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s261", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s261", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s262", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s262", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -405,7 +404,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s3k37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k39", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k39", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k3a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k3a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart item shield
|
||||||
{"s3k3b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k3b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k3c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k3c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k3d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k3d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -416,7 +415,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s3k42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Lightning Shield use
|
||||||
{"s3k46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -451,9 +450,9 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s3k65", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Blue Spheres
|
{"s3k65", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Blue Spheres
|
||||||
{"s3k66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart final lap
|
||||||
{"s3k69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k6a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k6a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart finish
|
||||||
{"s3k6b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k6b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k6c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k6c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k6d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k6d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -493,11 +492,11 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s3k8f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k8f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k90", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k90", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k91", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k91", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k92", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k92", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Hyudoro use
|
||||||
{"s3k93", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k93", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k94", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k94", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k95", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k95", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k96", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k96", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Orbinaut
|
||||||
{"s3k97", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k97", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k98", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k98", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3k99", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3k99", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -514,13 +513,13 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s3ka4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3ka4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3ka5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3ka5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3ka6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3ka6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3ka7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3ka7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart 3,2,1
|
||||||
{"s3ka8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3ka8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3ka9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3ka9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kaa", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kaa", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kab", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kab", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kac", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kac", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kad", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kad", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart GO!
|
||||||
{"s3kae", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kae", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kaf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kaf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kb0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kb0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -543,7 +542,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s3kbel", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kbel", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kbfs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kbfs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kbfl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kbfl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kc0s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc0s", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart Jawz
|
||||||
{"s3kc0l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc0l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kc1s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc1s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kc1l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc1l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -557,12 +556,13 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s3kc5l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc5l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kc6s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc6s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kc6l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc6l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kc7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc7s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
{"s3kc7l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kc8s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc8s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kc8l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc8l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kc9s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc9s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kc9l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kc9l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kcas", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kcas", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart respawn
|
||||||
{"s3kcal", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kcal", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kcbs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kcbs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"s3kcbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kcbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -600,14 +600,14 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"s3kdbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"s3kdbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
|
||||||
// 3D Blast sounds (the "missing" ones are direct copies of S3K's, no minor differences what-so-ever)
|
// 3D Blast sounds (the "missing" ones are direct copies of S3K's, no minor differences what-so-ever)
|
||||||
{"3db06", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"3db06", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Bumper stolen
|
||||||
{"3db09", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"3db09", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"3db14", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"3db14", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"3db16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"3db16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
|
||||||
// Sonic CD sounds
|
// Sonic CD sounds
|
||||||
{"cdfm00", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm00", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm01", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm01", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Sneaker boost
|
||||||
{"cdfm02", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm02", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm03", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm03", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm04", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm04", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -645,7 +645,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"cdfm36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm39", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm39", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // SS Mine deployed
|
||||||
{"cdfm40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -676,7 +676,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"cdfm67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm70", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm70", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Trail item dragging
|
||||||
{"cdfm71", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm71", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm72", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm72", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdfm73", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdfm73", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -695,7 +695,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"cdpcm6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdpcm6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdpcm7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdpcm7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdpcm8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdpcm8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"cdpcm9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"cdpcm9", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // No damage taken
|
||||||
|
|
||||||
// Knuckles Chaotix sounds
|
// Knuckles Chaotix sounds
|
||||||
{"kc2a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc2a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -703,7 +703,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"kc2c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc2c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc2d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc2d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc2e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc2e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc2f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Pogo Spring
|
{"kc2f", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Pogo Spring use
|
||||||
{"kc30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc31", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc31", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -726,7 +726,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"kc43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc46", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Shrink use
|
||||||
{"kc47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Vote picked
|
{"kc48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Vote picked
|
||||||
{"kc49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -743,10 +743,10 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"kc54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc57", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc57", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // SPB locked in
|
||||||
{"kc58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc59", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Shrink
|
{"kc59", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Shrink
|
||||||
{"kc5a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Grow
|
{"kc5a", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Grow
|
||||||
{"kc5b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc5b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc5c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc5c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"kc5d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kc5d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -777,8 +777,8 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"mlap", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"mlap", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"sboost", true, 90, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"sboost", true, 90, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"mush", false, 90, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"mush", false, 90, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"star", false, 140, 16, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kinvnc", false, 140, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"mega", false, 140, 16, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"kgrow", false, 140, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"bomb", false, 110, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"bomb", false, 110, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"bomb2", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"bomb2", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"peel", false, 100, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"peel", false, 100, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
@ -804,8 +804,12 @@ sfxinfo_t S_sfx[NUMSFX] =
|
||||||
{"shelit", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"shelit", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"vroom", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"vroom", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"boing", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"boing", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"smkinv", false, 140, 16, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"smkinv", false, 140, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
{"screec", false, 52, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
{"screec", false, 52, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
{"yeeeah", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
{"noooo1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
{"noooo2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
{"hogbom", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||||
|
|
||||||
// SRB2kart - Skin sounds
|
// SRB2kart - Skin sounds
|
||||||
{"kwin", false, 64, 0, -1, NULL, 0, SKSWIN, -1, LUMPERROR},
|
{"kwin", false, 64, 0, -1, NULL, 0, SKSWIN, -1, LUMPERROR},
|
||||||
|
|
12
src/sounds.h
12
src/sounds.h
|
@ -219,7 +219,6 @@ typedef enum
|
||||||
sfx_drown,
|
sfx_drown,
|
||||||
sfx_fizzle,
|
sfx_fizzle,
|
||||||
sfx_gbeep,
|
sfx_gbeep,
|
||||||
sfx_gclose,
|
|
||||||
sfx_ghit,
|
sfx_ghit,
|
||||||
sfx_gloop,
|
sfx_gloop,
|
||||||
sfx_gspray,
|
sfx_gspray,
|
||||||
|
@ -629,7 +628,8 @@ typedef enum
|
||||||
sfx_s3kc5l,
|
sfx_s3kc5l,
|
||||||
sfx_s3kc6s,
|
sfx_s3kc6s,
|
||||||
sfx_s3kc6l,
|
sfx_s3kc6l,
|
||||||
sfx_s3kc7,
|
sfx_s3kc7s,
|
||||||
|
sfx_s3kc7l,
|
||||||
sfx_s3kc8s,
|
sfx_s3kc8s,
|
||||||
sfx_s3kc8l,
|
sfx_s3kc8l,
|
||||||
sfx_s3kc9s,
|
sfx_s3kc9s,
|
||||||
|
@ -849,8 +849,8 @@ typedef enum
|
||||||
sfx_mlap,
|
sfx_mlap,
|
||||||
sfx_sboost,
|
sfx_sboost,
|
||||||
sfx_mush,
|
sfx_mush,
|
||||||
sfx_star,
|
sfx_kinvnc,
|
||||||
sfx_mega,
|
sfx_kgrow,
|
||||||
sfx_bomb,
|
sfx_bomb,
|
||||||
sfx_bomb2,
|
sfx_bomb2,
|
||||||
sfx_peel,
|
sfx_peel,
|
||||||
|
@ -878,6 +878,10 @@ typedef enum
|
||||||
sfx_boing,
|
sfx_boing,
|
||||||
sfx_smkinv,
|
sfx_smkinv,
|
||||||
sfx_screec,
|
sfx_screec,
|
||||||
|
sfx_yeeeah,
|
||||||
|
sfx_noooo1,
|
||||||
|
sfx_noooo2,
|
||||||
|
sfx_hogbom,
|
||||||
|
|
||||||
sfx_kwin,
|
sfx_kwin,
|
||||||
sfx_klose,
|
sfx_klose,
|
||||||
|
|
152
src/st_stuff.c
152
src/st_stuff.c
|
@ -229,7 +229,7 @@ void ST_doPaletteStuff(void)
|
||||||
|
|
||||||
if (rendermode != render_none)
|
if (rendermode != render_none)
|
||||||
{
|
{
|
||||||
V_SetPaletteLump(GetPalette()); // Reset the palette
|
//V_SetPaletteLump(GetPalette()); // Reset the palette -- is this needed?
|
||||||
if (!splitscreen)
|
if (!splitscreen)
|
||||||
V_SetPalette(palette);
|
V_SetPalette(palette);
|
||||||
}
|
}
|
||||||
|
@ -755,63 +755,75 @@ static void ST_drawLevelTitle(void)
|
||||||
char *zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
|
char *zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
|
||||||
char *actnum = mapheaderinfo[gamemap-1]->actnum;
|
char *actnum = mapheaderinfo[gamemap-1]->actnum;
|
||||||
INT32 lvlttlxpos;
|
INT32 lvlttlxpos;
|
||||||
INT32 subttlxpos = BASEVIDWIDTH/2;
|
|
||||||
INT32 ttlnumxpos;
|
INT32 ttlnumxpos;
|
||||||
INT32 zonexpos;
|
INT32 zonexpos;
|
||||||
|
INT32 dupcalc = (vid.width/vid.dupx);
|
||||||
|
UINT8 gtc = G_GetGametypeColor(gametype);
|
||||||
|
INT32 sub = 0;
|
||||||
|
INT32 bary = (splitscreen)
|
||||||
|
? BASEVIDHEIGHT/2
|
||||||
|
: 163;
|
||||||
|
INT32 lvlw;
|
||||||
|
|
||||||
INT32 lvlttly;
|
if (timeinmap > 113)
|
||||||
INT32 zoney;
|
|
||||||
|
|
||||||
if (!(timeinmap > 2 && timeinmap-3 < 110))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (strlen(actnum) > 0)
|
lvlw = V_LevelNameWidth(lvlttl);
|
||||||
lvlttlxpos = ((BASEVIDWIDTH/2) - (V_LevelNameWidth(lvlttl)/2)) - V_LevelNameWidth(actnum);
|
|
||||||
else
|
|
||||||
lvlttlxpos = ((BASEVIDWIDTH/2) - (V_LevelNameWidth(lvlttl)/2));
|
|
||||||
|
|
||||||
ttlnumxpos = lvlttlxpos + V_LevelNameWidth(lvlttl);
|
if (strlen(actnum) > 0)
|
||||||
if (strlen(zonttl) > 0)
|
lvlttlxpos = ((BASEVIDWIDTH/2) - (lvlw/2)) - V_LevelNameWidth(actnum);
|
||||||
zonexpos = ttlnumxpos - V_LevelNameWidth(zonttl); // SRB2kart
|
|
||||||
else
|
else
|
||||||
zonexpos = ttlnumxpos - V_LevelNameWidth(M_GetText("ZONE"));
|
lvlttlxpos = ((BASEVIDWIDTH/2) - (lvlw/2));
|
||||||
|
|
||||||
|
zonexpos = ttlnumxpos = lvlttlxpos + lvlw;
|
||||||
|
if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
||||||
|
{
|
||||||
|
if (zonttl[0])
|
||||||
|
zonexpos -= V_LevelNameWidth(zonttl); // SRB2kart
|
||||||
|
else
|
||||||
|
zonexpos -= V_LevelNameWidth(M_GetText("ZONE"));
|
||||||
|
}
|
||||||
|
|
||||||
if (lvlttlxpos < 0)
|
if (lvlttlxpos < 0)
|
||||||
lvlttlxpos = 0;
|
lvlttlxpos = 0;
|
||||||
|
|
||||||
// There's no consistent algorithm that can accurately define the old positions
|
if (timeinmap > 105)
|
||||||
// so I just ended up resorting to a single switct statement to define them
|
|
||||||
switch (timeinmap-3)
|
|
||||||
{
|
{
|
||||||
case 0: zoney = 200; lvlttly = 0; break;
|
INT32 count = (113 - (INT32)(timeinmap));
|
||||||
case 1: zoney = 188; lvlttly = 12; break;
|
sub = dupcalc;
|
||||||
case 2: zoney = 176; lvlttly = 24; break;
|
while (count-- > 0)
|
||||||
case 3: zoney = 164; lvlttly = 36; break;
|
sub >>= 1;
|
||||||
case 4: zoney = 152; lvlttly = 48; break;
|
sub = -sub;
|
||||||
case 5: zoney = 140; lvlttly = 60; break;
|
|
||||||
case 6: zoney = 128; lvlttly = 72; break;
|
|
||||||
case 105: zoney = 80; lvlttly = 104; break;
|
|
||||||
case 106: zoney = 56; lvlttly = 128; break;
|
|
||||||
case 107: zoney = 32; lvlttly = 152; break;
|
|
||||||
case 108: zoney = 8; lvlttly = 176; break;
|
|
||||||
case 109: zoney = 0; lvlttly = 200; break;
|
|
||||||
default: zoney = 104; lvlttly = 80; break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(actnum) > 0)
|
{
|
||||||
V_DrawLevelTitle(ttlnumxpos+12, zoney, 0, actnum);
|
dupcalc = (dupcalc - BASEVIDWIDTH)>>1;
|
||||||
|
V_DrawFill(sub - dupcalc, bary+9, ttlnumxpos+dupcalc + 1, 2, 31);
|
||||||
|
V_DrawDiag(sub + ttlnumxpos + 1, bary, 11, 31);
|
||||||
|
V_DrawFill(sub - dupcalc, bary, ttlnumxpos+dupcalc, 10, gtc);
|
||||||
|
V_DrawDiag(sub + ttlnumxpos, bary, 10, gtc);
|
||||||
|
if (subttl[0])
|
||||||
|
V_DrawRightAlignedString(sub + zonexpos - 8, bary+1, V_ALLOWLOWERCASE, subttl);
|
||||||
|
else
|
||||||
|
V_DrawRightAlignedString(sub + zonexpos - 8, bary+1, V_ALLOWLOWERCASE, va("%s Mode", gametype_cons_t[gametype].strvalue));
|
||||||
|
}
|
||||||
|
|
||||||
V_DrawLevelTitle(lvlttlxpos, lvlttly, 0, lvlttl);
|
ttlnumxpos += sub;
|
||||||
|
lvlttlxpos += sub;
|
||||||
|
zonexpos += sub;
|
||||||
|
|
||||||
|
V_DrawLevelTitle(lvlttlxpos, bary-18, 0, lvlttl);
|
||||||
|
|
||||||
if (strlen(zonttl) > 0)
|
if (strlen(zonttl) > 0)
|
||||||
V_DrawLevelTitle(zonexpos, zoney, 0, zonttl);
|
V_DrawLevelTitle(zonexpos, bary+6, 0, zonttl);
|
||||||
else if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
else if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
||||||
V_DrawLevelTitle(zonexpos, zoney, 0, M_GetText("ZONE"));
|
V_DrawLevelTitle(zonexpos, bary+6, 0, M_GetText("ZONE"));
|
||||||
|
|
||||||
if (lvlttly+48 < 200)
|
if (actnum[0])
|
||||||
V_DrawCenteredString(subttlxpos, lvlttly+48, V_ALLOWLOWERCASE, subttl);
|
V_DrawLevelTitle(ttlnumxpos+12, bary+6, 0, actnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static void ST_drawFirstPersonHUD(void)
|
static void ST_drawFirstPersonHUD(void)
|
||||||
{
|
{
|
||||||
player_t *player = stplyr;
|
player_t *player = stplyr;
|
||||||
|
@ -913,11 +925,12 @@ static void ST_drawFirstPersonHUD(void)
|
||||||
V_DrawScaledPatch(SCX((BASEVIDWIDTH/2) - (SHORT(p->width)/2) + SHORT(p->leftoffset)), SCY(60 - SHORT(p->topoffset)),
|
V_DrawScaledPatch(SCX((BASEVIDWIDTH/2) - (SHORT(p->width)/2) + SHORT(p->leftoffset)), SCY(60 - SHORT(p->topoffset)),
|
||||||
V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, p);
|
V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, p);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// [21:42] <+Rob> Beige - Lavender - Steel Blue - Peach - Orange - Purple - Silver - Yellow - Pink - Red - Blue - Green - Cyan - Gold
|
// [21:42] <+Rob> Beige - Lavender - Steel Blue - Peach - Orange - Purple - Silver - Yellow - Pink - Red - Blue - Green - Cyan - Gold
|
||||||
static skincolors_t linkColor[14] =
|
static skincolors_t linkColor[14] =
|
||||||
{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_STEELBLUE, SKINCOLOR_PEACH, SKINCOLOR_ORANGE,
|
{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_STEEL, SKINCOLOR_PEACH, SKINCOLOR_ORANGE,
|
||||||
SKINCOLOR_PURPLE, SKINCOLOR_SILVER, SKINCOLOR_SUPER4, SKINCOLOR_PINK, SKINCOLOR_RED,
|
SKINCOLOR_PURPLE, SKINCOLOR_SILVER, SKINCOLOR_SUPER4, SKINCOLOR_PINK, SKINCOLOR_RED,
|
||||||
SKINCOLOR_BLUE, SKINCOLOR_GREEN, SKINCOLOR_CYAN, SKINCOLOR_GOLD};
|
SKINCOLOR_BLUE, SKINCOLOR_GREEN, SKINCOLOR_CYAN, SKINCOLOR_GOLD};
|
||||||
|
|
||||||
|
@ -967,7 +980,7 @@ static void ST_drawNightsRecords(void)
|
||||||
V_DrawString(BASEVIDWIDTH/2 - 48, STRINGY(148), aflag, "BONUS:");
|
V_DrawString(BASEVIDWIDTH/2 - 48, STRINGY(148), aflag, "BONUS:");
|
||||||
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(140), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings));
|
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(140), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings));
|
||||||
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(148), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings * 50));
|
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(148), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings * 50));
|
||||||
ST_DrawNightsOverlayNum(BASEVIDWIDTH/2 + 48, STRINGY(160), aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_STEELBLUE);
|
ST_DrawNightsOverlayNum(BASEVIDWIDTH/2 + 48, STRINGY(160), aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_STEEL);
|
||||||
|
|
||||||
// If new record, say so!
|
// If new record, say so!
|
||||||
if (!(netgame || multiplayer) && G_GetBestNightsScore(gamemap, stplyr->lastmare + 1) <= stplyr->lastmarescore)
|
if (!(netgame || multiplayer) && G_GetBestNightsScore(gamemap, stplyr->lastmare + 1) <= stplyr->lastmarescore)
|
||||||
|
@ -1251,7 +1264,7 @@ static void ST_drawNiGHTSHUD(void) // SRB2kart - unused.
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ST_DrawNightsOverlayNum(304, STRINGY(16), SPLITFLAGS(V_SNAPTOTOP)|V_SNAPTORIGHT, stplyr->marescore, nightsnum, SKINCOLOR_STEELBLUE);
|
ST_DrawNightsOverlayNum(304, STRINGY(16), SPLITFLAGS(V_SNAPTOTOP)|V_SNAPTORIGHT, stplyr->marescore, nightsnum, SKINCOLOR_STEEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stplyr->exiting
|
if (!stplyr->exiting
|
||||||
|
@ -1488,13 +1501,13 @@ static void ST_drawMatchHUD(void) // SRB2kart - unused.
|
||||||
|
|
||||||
static inline void ST_drawRaceHUD(void)
|
static inline void ST_drawRaceHUD(void)
|
||||||
{
|
{
|
||||||
if (leveltime > TICRATE && leveltime <= 2*TICRATE)
|
if (leveltime > starttime-(3*TICRATE) && leveltime <= starttime-(2*TICRATE))
|
||||||
V_DrawScaledPatch(SCX((BASEVIDWIDTH - SHORT(race3->width))/2), (INT32)(SCY(BASEVIDHEIGHT/2)), V_NOSCALESTART, race3);
|
V_DrawScaledPatch(SCX((BASEVIDWIDTH - SHORT(race3->width))/2), (INT32)(SCY(BASEVIDHEIGHT/2)), V_NOSCALESTART, race3);
|
||||||
else if (leveltime > 2*TICRATE && leveltime <= 3*TICRATE)
|
else if (leveltime > starttime-(2*TICRATE) && leveltime <= starttime-TICRATE)
|
||||||
V_DrawScaledPatch(SCX((BASEVIDWIDTH - SHORT(race2->width))/2), (INT32)(SCY(BASEVIDHEIGHT/2)), V_NOSCALESTART, race2);
|
V_DrawScaledPatch(SCX((BASEVIDWIDTH - SHORT(race2->width))/2), (INT32)(SCY(BASEVIDHEIGHT/2)), V_NOSCALESTART, race2);
|
||||||
else if (leveltime > 3*TICRATE && leveltime <= 4*TICRATE)
|
else if (leveltime > starttime-TICRATE && leveltime <= starttime)
|
||||||
V_DrawScaledPatch(SCX((BASEVIDWIDTH - SHORT(race1->width))/2), (INT32)(SCY(BASEVIDHEIGHT/2)), V_NOSCALESTART, race1);
|
V_DrawScaledPatch(SCX((BASEVIDWIDTH - SHORT(race1->width))/2), (INT32)(SCY(BASEVIDHEIGHT/2)), V_NOSCALESTART, race1);
|
||||||
else if (leveltime > 4*TICRATE && leveltime <= 5*TICRATE)
|
else if (leveltime > starttime && leveltime <= starttime+TICRATE)
|
||||||
V_DrawScaledPatch(SCX((BASEVIDWIDTH - SHORT(racego->width))/2), (INT32)(SCY(BASEVIDHEIGHT/2)), V_NOSCALESTART, racego);
|
V_DrawScaledPatch(SCX((BASEVIDWIDTH - SHORT(racego->width))/2), (INT32)(SCY(BASEVIDHEIGHT/2)), V_NOSCALESTART, racego);
|
||||||
|
|
||||||
if (circuitmap)
|
if (circuitmap)
|
||||||
|
@ -1815,7 +1828,7 @@ static void ST_overlayDrawer(void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// GAME OVER pic
|
// GAME OVER pic
|
||||||
if (G_GametypeUsesLives() && stplyr->lives <= 0 && !(hu_showscores && (netgame || multiplayer)))
|
/*if (G_GametypeUsesLives() && stplyr->lives <= 0 && !(hu_showscores && (netgame || multiplayer)))
|
||||||
{
|
{
|
||||||
patch_t *p;
|
patch_t *p;
|
||||||
|
|
||||||
|
@ -1825,23 +1838,12 @@ static void ST_overlayDrawer(void)
|
||||||
p = sboover;
|
p = sboover;
|
||||||
|
|
||||||
V_DrawScaledPatch((BASEVIDWIDTH - SHORT(p->width))/2, STRINGY(BASEVIDHEIGHT/2 - (SHORT(p->height)/2)), 0, p);
|
V_DrawScaledPatch((BASEVIDWIDTH - SHORT(p->width))/2, STRINGY(BASEVIDHEIGHT/2 - (SHORT(p->height)/2)), 0, p);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (!hu_showscores) // hide the following if TAB is held
|
if (!hu_showscores) // hide the following if TAB is held
|
||||||
{
|
{
|
||||||
// Countdown timer for Race Mode
|
// Countdown timer for Race Mode
|
||||||
if (countdown)
|
// ...moved to k_kart.c so we can take advantage of the LAPS_Y value
|
||||||
{
|
|
||||||
INT32 x = BASEVIDWIDTH/2;
|
|
||||||
INT32 y = BASEVIDHEIGHT-24;
|
|
||||||
if (splitscreen)
|
|
||||||
{
|
|
||||||
y = (BASEVIDHEIGHT/2)-12;
|
|
||||||
if (splitscreen > 1)
|
|
||||||
x = BASEVIDWIDTH/4;
|
|
||||||
}
|
|
||||||
V_DrawCenteredString(x, y, K_calcSplitFlags(0), va("%d", countdown/TICRATE));
|
|
||||||
}
|
|
||||||
|
|
||||||
K_drawKartHUD();
|
K_drawKartHUD();
|
||||||
|
|
||||||
|
@ -1897,18 +1899,18 @@ static void ST_overlayDrawer(void)
|
||||||
strlcpy(name, player_names[stplyr-players], 13);
|
strlcpy(name, player_names[stplyr-players], 13);
|
||||||
|
|
||||||
// Show name of player being displayed
|
// Show name of player being displayed
|
||||||
V_DrawCenteredString((BASEVIDWIDTH/6), BASEVIDHEIGHT-80, 0, M_GetText("Viewpoint:"));
|
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-40, 0, M_GetText("Viewpoint:"));
|
||||||
V_DrawCenteredString((BASEVIDWIDTH/6), BASEVIDHEIGHT-64, V_ALLOWLOWERCASE, name);
|
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, V_ALLOWLOWERCASE, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is where we draw all the fun cheese if you have the chasecam off!
|
// This is where we draw all the fun cheese if you have the chasecam off!
|
||||||
if ((stplyr == &players[displayplayer] && !camera.chase)
|
/*if ((stplyr == &players[displayplayer] && !camera.chase)
|
||||||
|| ((splitscreen && stplyr == &players[secondarydisplayplayer]) && !camera2.chase)
|
|| ((splitscreen && stplyr == &players[secondarydisplayplayer]) && !camera2.chase)
|
||||||
|| ((splitscreen > 1 && stplyr == &players[thirddisplayplayer]) && !camera3.chase)
|
|| ((splitscreen > 1 && stplyr == &players[thirddisplayplayer]) && !camera3.chase)
|
||||||
|| ((splitscreen > 2 && stplyr == &players[fourthdisplayplayer]) && !camera4.chase))
|
|| ((splitscreen > 2 && stplyr == &players[fourthdisplayplayer]) && !camera4.chase))
|
||||||
{
|
{
|
||||||
ST_drawFirstPersonHUD();
|
ST_drawFirstPersonHUD();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
|
@ -1917,16 +1919,16 @@ static void ST_overlayDrawer(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// draw level title Tails
|
// draw level title Tails
|
||||||
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer))
|
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer) && !mapreset)
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
&& LUA_HudEnabled(hud_stagetitle)
|
&& LUA_HudEnabled(hud_stagetitle)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
ST_drawLevelTitle();
|
ST_drawLevelTitle();
|
||||||
|
|
||||||
if (!hu_showscores && !splitscreen && netgame && displayplayer == consoleplayer)
|
if (!hu_showscores && !splitscreen && netgame && displayplayer == consoleplayer && !mapreset)
|
||||||
{
|
{
|
||||||
if (G_GametypeUsesLives() && stplyr->lives <= 0 && countdown != 1)
|
/*if (G_GametypeUsesLives() && stplyr->lives <= 0 && countdown != 1)
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), 0, M_GetText("Press F12 to watch another player."));
|
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), 0, M_GetText("Press F12 to watch another player."));
|
||||||
else if (gametype == GT_HIDEANDSEEK &&
|
else if (gametype == GT_HIDEANDSEEK &&
|
||||||
(!stplyr->spectator && !(stplyr->pflags & PF_TAGIT)) && (leveltime > hidetime * TICRATE))
|
(!stplyr->spectator && !(stplyr->pflags & PF_TAGIT)) && (leveltime > hidetime * TICRATE))
|
||||||
|
@ -1934,15 +1936,15 @@ static void ST_overlayDrawer(void)
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(116), 0, M_GetText("You cannot move while hiding."));
|
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(116), 0, M_GetText("You cannot move while hiding."));
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), 0, M_GetText("Press F12 to watch another player."));
|
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), 0, M_GetText("Press F12 to watch another player."));
|
||||||
}
|
}
|
||||||
/*else if (!G_RaceGametype() && stplyr->playerstate == PST_DEAD && stplyr->lives) //Death overrides spectator text.
|
else if (!G_RaceGametype() && stplyr->playerstate == PST_DEAD && stplyr->lives) //Death overrides spectator text.
|
||||||
{
|
{
|
||||||
INT32 respawntime = cv_respawntime.value - stplyr->deadtimer/TICRATE;
|
INT32 respawntime = cv_respawntime.value - stplyr->deadtimer/TICRATE;
|
||||||
if (respawntime > 0 && !stplyr->spectator)
|
if (respawntime > 0 && !stplyr->spectator)
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, va(M_GetText("Respawn in: %d second%s."), respawntime, respawntime == 1 ? "" : "s"));
|
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, va(M_GetText("Respawn in: %d second%s."), respawntime, respawntime == 1 ? "" : "s"));
|
||||||
else
|
else
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("Press Jump to respawn."));
|
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("Press Jump to respawn."));
|
||||||
}*/
|
}
|
||||||
else if (stplyr->spectator
|
else*/ if (stplyr->spectator
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
&& LUA_HudEnabled(hud_textspectator)
|
&& LUA_HudEnabled(hud_textspectator)
|
||||||
#endif
|
#endif
|
||||||
|
@ -1950,12 +1952,12 @@ static void ST_overlayDrawer(void)
|
||||||
{
|
{
|
||||||
// SRB2kart: changed positions & text
|
// SRB2kart: changed positions & text
|
||||||
V_DrawString(2, BASEVIDHEIGHT-50, V_HUDTRANSHALF|V_YELLOWMAP, M_GetText("- SPECTATING -"));
|
V_DrawString(2, BASEVIDHEIGHT-50, V_HUDTRANSHALF|V_YELLOWMAP, M_GetText("- SPECTATING -"));
|
||||||
/*if (G_GametypeHasTeams())
|
if (stplyr->pflags & PF_WANTSTOJOIN)
|
||||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Join Team"));
|
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Cancel Join"));
|
||||||
else if (G_IsSpecialStage(gamemap) && useNightsSS)
|
/*else if (G_GametypeHasTeams())
|
||||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF|V_REDMAP, M_GetText("- CANNOT JOIN -"));
|
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Join Team"));*/
|
||||||
else*/
|
else
|
||||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Enter Game"));
|
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Join Game"));
|
||||||
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("F12 - Change View"));
|
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("F12 - Change View"));
|
||||||
V_DrawString(2, BASEVIDHEIGHT-20, V_HUDTRANSHALF, M_GetText("Accelerate - Float"));
|
V_DrawString(2, BASEVIDHEIGHT-20, V_HUDTRANSHALF, M_GetText("Accelerate - Float"));
|
||||||
V_DrawString(2, BASEVIDHEIGHT-10, V_HUDTRANSHALF, M_GetText("Brake - Sink"));
|
V_DrawString(2, BASEVIDHEIGHT-10, V_HUDTRANSHALF, M_GetText("Brake - Sink"));
|
||||||
|
@ -1968,7 +1970,7 @@ static void ST_overlayDrawer(void)
|
||||||
void ST_Drawer(void)
|
void ST_Drawer(void)
|
||||||
{
|
{
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
if (cv_seenames.value && cv_allowseenames.value && displayplayer == consoleplayer && seenplayer && seenplayer->mo)
|
if (cv_seenames.value && cv_allowseenames.value && displayplayer == consoleplayer && seenplayer && seenplayer->mo && !mapreset)
|
||||||
{
|
{
|
||||||
if (cv_seenames.value == 1)
|
if (cv_seenames.value == 1)
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF, player_names[seenplayer-players]);
|
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF, player_names[seenplayer-players]);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
// Called by main loop.
|
// Called by main loop.
|
||||||
FUNCMATH void ST_Ticker(void);
|
void ST_Ticker(void);
|
||||||
|
|
||||||
// Called by main loop.
|
// Called by main loop.
|
||||||
void ST_Drawer(void);
|
void ST_Drawer(void);
|
||||||
|
|
252
src/v_video.c
252
src/v_video.c
|
@ -41,7 +41,7 @@ UINT8 *screens[5];
|
||||||
static CV_PossibleValue_t gamma_cons_t[] = {{0, "MIN"}, {4, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t gamma_cons_t[] = {{0, "MIN"}, {4, "MAX"}, {0, NULL}};
|
||||||
static void CV_usegamma_OnChange(void);
|
static void CV_usegamma_OnChange(void);
|
||||||
|
|
||||||
consvar_t cv_ticrate = {"showfps", "No", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_ticrate = {"showfps", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_usegamma = {"gamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_usegamma_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_usegamma = {"gamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_usegamma_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_allcaps = {"allcaps", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_allcaps = {"allcaps", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
@ -305,6 +305,7 @@ void VID_BlitLinearScreen(const UINT8 *srcptr, UINT8 *destptr, INT32 width, INT3
|
||||||
|
|
||||||
static UINT8 hudplusalpha[11] = { 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 0};
|
static UINT8 hudplusalpha[11] = { 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 0};
|
||||||
static UINT8 hudminusalpha[11] = { 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5};
|
static UINT8 hudminusalpha[11] = { 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5};
|
||||||
|
UINT8 hudtrans = 0;
|
||||||
|
|
||||||
static const UINT8 *v_colormap = NULL;
|
static const UINT8 *v_colormap = NULL;
|
||||||
static const UINT8 *v_translevel = NULL;
|
static const UINT8 *v_translevel = NULL;
|
||||||
|
@ -359,11 +360,11 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
if ((alphalevel = ((scrn & V_ALPHAMASK) >> V_ALPHASHIFT)))
|
if ((alphalevel = ((scrn & V_ALPHAMASK) >> V_ALPHASHIFT)))
|
||||||
{
|
{
|
||||||
if (alphalevel == 13)
|
if (alphalevel == 13)
|
||||||
alphalevel = hudminusalpha[cv_translucenthud.value];
|
alphalevel = hudminusalpha[hudtrans];
|
||||||
else if (alphalevel == 14)
|
else if (alphalevel == 14)
|
||||||
alphalevel = 10 - cv_translucenthud.value;
|
alphalevel = 10 - hudtrans;
|
||||||
/*else if (alphalevel == 15)
|
/*else if (alphalevel == 15)
|
||||||
alphalevel = hudplusalpha[cv_translucenthud.value];*/
|
alphalevel = hudplusalpha[hudtrans];*/
|
||||||
|
|
||||||
if (alphalevel >= 10)
|
if (alphalevel >= 10)
|
||||||
return; // invis
|
return; // invis
|
||||||
|
@ -418,7 +419,7 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
if (scrn & V_FLIP)
|
if (scrn & V_FLIP)
|
||||||
{
|
{
|
||||||
flip = true;
|
flip = true;
|
||||||
x -= FixedMul((SHORT(patch->width) - SHORT(patch->leftoffset))<<FRACBITS, pscale);
|
x -= FixedMul((SHORT(patch->width) - SHORT(patch->leftoffset))<<FRACBITS, pscale) + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
x -= FixedMul(SHORT(patch->leftoffset)<<FRACBITS, pscale);
|
x -= FixedMul(SHORT(patch->leftoffset)<<FRACBITS, pscale);
|
||||||
|
@ -449,21 +450,31 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
y = FixedMul(y,dupy<<FRACBITS);
|
y = FixedMul(y,dupy<<FRACBITS);
|
||||||
x >>= FRACBITS;
|
x >>= FRACBITS;
|
||||||
y >>= FRACBITS;
|
y >>= FRACBITS;
|
||||||
desttop += (y*vid.width) + x;
|
|
||||||
|
|
||||||
// Center it if necessary
|
// Center it if necessary
|
||||||
if (!(scrn & V_SCALEPATCHMASK))
|
if (!(scrn & V_SCALEPATCHMASK))
|
||||||
{
|
{
|
||||||
|
// if it's meant to cover the whole screen, black out the rest
|
||||||
|
// BAD, BAD, BAD, FUCK OFF, STOP, EW, AAAAAAA
|
||||||
|
// This does NOT account for transparent pixels
|
||||||
|
/*if (x == 0 && FixedMul(SHORT(patch->width)<<FRACBITS, pscale)>>FRACBITS == BASEVIDWIDTH
|
||||||
|
&& y == 0 && FixedMul(SHORT(patch->height)<<FRACBITS, pscale)>>FRACBITS == BASEVIDHEIGHT)
|
||||||
|
{
|
||||||
|
column = (const column_t *)((const UINT8 *)(patch) + LONG(patch->columnofs[0]));
|
||||||
|
source = (const UINT8 *)(column) + 3;
|
||||||
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
||||||
|
}*/
|
||||||
|
|
||||||
if (vid.width != BASEVIDWIDTH * dupx)
|
if (vid.width != BASEVIDWIDTH * dupx)
|
||||||
{
|
{
|
||||||
// dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx,
|
// dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx,
|
||||||
// so center this imaginary screen
|
// so center this imaginary screen
|
||||||
if ((scrn & (V_HORZSCREEN|V_SNAPTOLEFT)) == (V_HORZSCREEN|V_SNAPTOLEFT))
|
if ((scrn & (V_HORZSCREEN|V_SNAPTOLEFT)) == (V_HORZSCREEN|V_SNAPTOLEFT))
|
||||||
desttop += (vid.width/2 - (BASEVIDWIDTH/2 * dupx));
|
x += (vid.width/2 - (BASEVIDWIDTH/2 * dupx));
|
||||||
else if (scrn & V_SNAPTORIGHT)
|
else if (scrn & V_SNAPTORIGHT)
|
||||||
desttop += (vid.width - (BASEVIDWIDTH * dupx));
|
x += (vid.width - (BASEVIDWIDTH * dupx));
|
||||||
else if (!(scrn & V_SNAPTOLEFT))
|
else if (!(scrn & V_SNAPTOLEFT))
|
||||||
desttop += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
||||||
}
|
}
|
||||||
if (vid.height != BASEVIDHEIGHT * dupy)
|
if (vid.height != BASEVIDHEIGHT * dupy)
|
||||||
{
|
{
|
||||||
|
@ -475,15 +486,9 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
else if (!(scrn & V_SNAPTOTOP))
|
else if (!(scrn & V_SNAPTOTOP))
|
||||||
desttop += (vid.height - (BASEVIDHEIGHT * dupy)) * vid.width / 2;
|
desttop += (vid.height - (BASEVIDHEIGHT * dupy)) * vid.width / 2;
|
||||||
}
|
}
|
||||||
// if it's meant to cover the whole screen, black out the rest
|
|
||||||
if (x == 0 && FixedMul(SHORT(patch->width)<<FRACBITS, pscale)>>FRACBITS == BASEVIDWIDTH
|
|
||||||
&& y == 0 && FixedMul(SHORT(patch->height)<<FRACBITS, pscale)>>FRACBITS == BASEVIDHEIGHT)
|
|
||||||
{
|
|
||||||
column = (const column_t *)((const UINT8 *)(patch) + LONG(patch->columnofs[0]));
|
|
||||||
source = (const UINT8 *)(column) + 3;
|
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
desttop += (y*vid.width) + x;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pscale != FRACUNIT) // scale width properly
|
if (pscale != FRACUNIT) // scale width properly
|
||||||
|
@ -612,12 +617,14 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
||||||
desttop += (vid.height - (BASEVIDHEIGHT * dupy)) * vid.width / 2;
|
desttop += (vid.height - (BASEVIDHEIGHT * dupy)) * vid.width / 2;
|
||||||
}
|
}
|
||||||
// if it's meant to cover the whole screen, black out the rest
|
// if it's meant to cover the whole screen, black out the rest
|
||||||
if (x == 0 && SHORT(patch->width) == BASEVIDWIDTH && y == 0 && SHORT(patch->height) == BASEVIDHEIGHT)
|
// BAD, BAD, BAD, FUCK OFF, STOP, EW, AAAAAAA
|
||||||
|
// This does NOT account for transparent pixels
|
||||||
|
/*if (x == 0 && SHORT(patch->width) == BASEVIDWIDTH && y == 0 && SHORT(patch->height) == BASEVIDHEIGHT)
|
||||||
{
|
{
|
||||||
column = (const column_t *)((const UINT8 *)(patch) + LONG(patch->columnofs[0]));
|
column = (const column_t *)((const UINT8 *)(patch) + LONG(patch->columnofs[0]));
|
||||||
source = (const UINT8 *)(column) + 3;
|
source = (const UINT8 *)(column) + 3;
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -837,7 +844,104 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
||||||
c &= 255;
|
c &= 255;
|
||||||
|
|
||||||
for (;(--h >= 0) && dest < deststop; dest += vid.width)
|
for (;(--h >= 0) && dest < deststop; dest += vid.width)
|
||||||
memset(dest, (UINT8)(c&255), w * vid.bpp);
|
memset(dest, c, w * vid.bpp);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Fills a triangle of pixels with a single color, NOTE: scaled to screen size
|
||||||
|
//
|
||||||
|
// ...
|
||||||
|
// .. <-- this shape only for now, i'm afraid
|
||||||
|
// .
|
||||||
|
//
|
||||||
|
void V_DrawDiag(INT32 x, INT32 y, INT32 wh, INT32 c)
|
||||||
|
{
|
||||||
|
UINT8 *dest;
|
||||||
|
const UINT8 *deststop;
|
||||||
|
INT32 w, h, wait = 0;
|
||||||
|
|
||||||
|
if (rendermode == render_none)
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifdef HWRENDER
|
||||||
|
if (rendermode != render_soft && !con_startup)
|
||||||
|
{
|
||||||
|
HWR_DrawDiag(x, y, wh, c);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (!(c & V_NOSCALESTART))
|
||||||
|
{
|
||||||
|
INT32 dupx = vid.dupx, dupy = vid.dupy;
|
||||||
|
|
||||||
|
x *= dupx;
|
||||||
|
y *= dupy;
|
||||||
|
wh *= dupx;
|
||||||
|
|
||||||
|
// Center it if necessary
|
||||||
|
if (vid.width != BASEVIDWIDTH * dupx)
|
||||||
|
{
|
||||||
|
// dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx,
|
||||||
|
// so center this imaginary screen
|
||||||
|
if (c & V_SNAPTORIGHT)
|
||||||
|
x += (vid.width - (BASEVIDWIDTH * dupx));
|
||||||
|
else if (!(c & V_SNAPTOLEFT))
|
||||||
|
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
||||||
|
}
|
||||||
|
if (vid.height != BASEVIDHEIGHT * dupy)
|
||||||
|
{
|
||||||
|
// same thing here
|
||||||
|
if (c & V_SNAPTOBOTTOM)
|
||||||
|
y += (vid.height - (BASEVIDHEIGHT * dupy));
|
||||||
|
else if (!(c & V_SNAPTOTOP))
|
||||||
|
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x >= vid.width || y >= vid.height)
|
||||||
|
return; // off the screen
|
||||||
|
|
||||||
|
if (y < 0)
|
||||||
|
{
|
||||||
|
wh += y;
|
||||||
|
y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
w = h = wh;
|
||||||
|
|
||||||
|
if (x < 0)
|
||||||
|
{
|
||||||
|
w += x;
|
||||||
|
x = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (w <= 0 || h <= 0)
|
||||||
|
return; // zero width/height wouldn't draw anything
|
||||||
|
if (x + w > vid.width)
|
||||||
|
{
|
||||||
|
wait = w - (vid.width - x);
|
||||||
|
w = vid.width - x;
|
||||||
|
}
|
||||||
|
if (y + w > vid.height)
|
||||||
|
h = vid.height - y;
|
||||||
|
|
||||||
|
if (h > w)
|
||||||
|
h = w;
|
||||||
|
|
||||||
|
dest = screens[0] + y*vid.width + x;
|
||||||
|
deststop = screens[0] + vid.rowbytes * vid.height;
|
||||||
|
|
||||||
|
c &= 255;
|
||||||
|
|
||||||
|
for (;(--h >= 0) && dest < deststop; dest += vid.width)
|
||||||
|
{
|
||||||
|
memset(dest, c, w * vid.bpp);
|
||||||
|
if (wait)
|
||||||
|
wait--;
|
||||||
|
else
|
||||||
|
w--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// THANK YOU MPC!!!
|
// THANK YOU MPC!!!
|
||||||
|
@ -1076,25 +1180,34 @@ void V_DrawPatchFill(patch_t *pat)
|
||||||
//
|
//
|
||||||
// Fade all the screen buffer, so that the menu is more readable,
|
// Fade all the screen buffer, so that the menu is more readable,
|
||||||
// especially now that we use the small hufont in the menus...
|
// especially now that we use the small hufont in the menus...
|
||||||
|
// If color is 0x00 to 0xFF, draw transtable (strength range 0-9).
|
||||||
|
// Else, use COLORMAP lump (strength range 0-31).
|
||||||
|
// IF YOU ARE NOT CAREFUL, THIS CAN AND WILL CRASH!
|
||||||
|
// I have kept the safety checks out of this function;
|
||||||
|
// the v.fadeScreen Lua interface handles those.
|
||||||
//
|
//
|
||||||
void V_DrawFadeScreen(void)
|
void V_DrawFadeScreen(UINT16 color, UINT8 strength)
|
||||||
{
|
{
|
||||||
const UINT8 *fadetable = (UINT8 *)colormaps + 16*256;
|
|
||||||
const UINT8 *deststop = screens[0] + vid.rowbytes * vid.height;
|
|
||||||
UINT8 *buf = screens[0];
|
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (rendermode != render_soft && rendermode != render_none)
|
if (rendermode != render_soft && rendermode != render_none)
|
||||||
{
|
{
|
||||||
HWR_FadeScreenMenuBack(0x01010160, 0); // hack, 0 means full height
|
HWR_FadeScreenMenuBack(color, strength);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// heavily simplified -- we don't need to know x or y
|
{
|
||||||
// position when we're doing a full screen fade
|
const UINT8 *fadetable = ((color & 0xFF00) // Color is not palette index?
|
||||||
for (; buf < deststop; ++buf)
|
? ((UINT8 *)colormaps + strength*256) // Do COLORMAP fade.
|
||||||
*buf = fadetable[*buf];
|
: ((UINT8 *)transtables + ((9-strength)<<FF_TRANSSHIFT) + color*256)); // Else, do TRANSMAP** fade.
|
||||||
|
const UINT8 *deststop = screens[0] + vid.rowbytes * vid.height;
|
||||||
|
UINT8 *buf = screens[0];
|
||||||
|
|
||||||
|
// heavily simplified -- we don't need to know x or y
|
||||||
|
// position when we're doing a full screen fade
|
||||||
|
for (; buf < deststop; ++buf)
|
||||||
|
*buf = fadetable[*buf];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simple translucency with one color, over a set number of lines starting from the top.
|
// Simple translucency with one color, over a set number of lines starting from the top.
|
||||||
|
@ -1134,7 +1247,7 @@ void V_DrawFadeConsBack(INT32 plines)
|
||||||
|
|
||||||
// Gets string colormap, used for 0x80 color codes
|
// Gets string colormap, used for 0x80 color codes
|
||||||
//
|
//
|
||||||
static const UINT8 *V_GetStringColormap(INT32 colorflags)
|
const UINT8 *V_GetStringColormap(INT32 colorflags)
|
||||||
{
|
{
|
||||||
switch ((colorflags & V_CHARCOLORMASK) >> V_CHARCOLORSHIFT)
|
switch ((colorflags & V_CHARCOLORMASK) >> V_CHARCOLORSHIFT)
|
||||||
{
|
{
|
||||||
|
@ -1143,7 +1256,7 @@ static const UINT8 *V_GetStringColormap(INT32 colorflags)
|
||||||
case 2: // 0x82, yellow
|
case 2: // 0x82, yellow
|
||||||
return yellowmap;
|
return yellowmap;
|
||||||
case 3: // 0x83, lgreen
|
case 3: // 0x83, lgreen
|
||||||
return lgreenmap;
|
return greenmap;
|
||||||
case 4: // 0x84, blue
|
case 4: // 0x84, blue
|
||||||
return bluemap;
|
return bluemap;
|
||||||
case 5: // 0x85, red
|
case 5: // 0x85, red
|
||||||
|
@ -1152,6 +1265,8 @@ static const UINT8 *V_GetStringColormap(INT32 colorflags)
|
||||||
return graymap;
|
return graymap;
|
||||||
case 7: // 0x87, orange
|
case 7: // 0x87, orange
|
||||||
return orangemap;
|
return orangemap;
|
||||||
|
case 8: // 0x88, sky
|
||||||
|
return skymap;
|
||||||
default: // reset
|
default: // reset
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1284,7 +1399,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string)
|
||||||
//
|
//
|
||||||
void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
{
|
{
|
||||||
INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth = BASEVIDWIDTH, center = 0;
|
INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth, center = 0, left = 0;
|
||||||
const char *ch = string;
|
const char *ch = string;
|
||||||
INT32 charflags = 0;
|
INT32 charflags = 0;
|
||||||
const UINT8 *colormap = NULL;
|
const UINT8 *colormap = NULL;
|
||||||
|
@ -1300,7 +1415,11 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
scrwidth = vid.width;
|
scrwidth = vid.width;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
dupx = dupy = 1;
|
dupx = dupy = 1;
|
||||||
|
scrwidth = vid.width/vid.dupx;
|
||||||
|
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||||
|
}
|
||||||
|
|
||||||
charflags = (option & V_CHARCOLORMASK);
|
charflags = (option & V_CHARCOLORMASK);
|
||||||
|
|
||||||
|
@ -1361,9 +1480,9 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
else
|
else
|
||||||
w = SHORT(hu_font[c]->width) * dupx;
|
w = SHORT(hu_font[c]->width) * dupx;
|
||||||
|
|
||||||
if (cx + w > scrwidth)
|
if (cx > scrwidth)
|
||||||
break;
|
break;
|
||||||
if (cx < 0) //left boundary check
|
if (cx+left + w < 0) //left boundary check
|
||||||
{
|
{
|
||||||
cx += w;
|
cx += w;
|
||||||
continue;
|
continue;
|
||||||
|
@ -1379,7 +1498,7 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
// SRB2kart
|
// SRB2kart
|
||||||
void V_DrawKartString(INT32 x, INT32 y, INT32 option, const char *string)
|
void V_DrawKartString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
{
|
{
|
||||||
INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth = BASEVIDWIDTH, center = 0;
|
INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth, center = 0, left = 0;
|
||||||
const char *ch = string;
|
const char *ch = string;
|
||||||
INT32 charflags = 0;
|
INT32 charflags = 0;
|
||||||
const UINT8 *colormap = NULL;
|
const UINT8 *colormap = NULL;
|
||||||
|
@ -1395,7 +1514,11 @@ void V_DrawKartString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
scrwidth = vid.width;
|
scrwidth = vid.width;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
dupx = dupy = 1;
|
dupx = dupy = 1;
|
||||||
|
scrwidth = vid.width/vid.dupx;
|
||||||
|
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||||
|
}
|
||||||
|
|
||||||
charflags = (option & V_CHARCOLORMASK);
|
charflags = (option & V_CHARCOLORMASK);
|
||||||
|
|
||||||
|
@ -1456,9 +1579,9 @@ void V_DrawKartString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
else
|
else
|
||||||
w = SHORT(kart_font[c]->width) * dupx;
|
w = SHORT(kart_font[c]->width) * dupx;
|
||||||
|
|
||||||
if (cx + w > scrwidth)
|
if (cx > scrwidth)
|
||||||
break;
|
break;
|
||||||
if (cx < 0) //left boundary check
|
if (cx+left + w < 0) //left boundary check
|
||||||
{
|
{
|
||||||
cx += w;
|
cx += w;
|
||||||
continue;
|
continue;
|
||||||
|
@ -1490,7 +1613,7 @@ void V_DrawRightAlignedString(INT32 x, INT32 y, INT32 option, const char *string
|
||||||
//
|
//
|
||||||
void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
{
|
{
|
||||||
INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth = BASEVIDWIDTH, center = 0;
|
INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth, center = 0, left = 0;
|
||||||
const char *ch = string;
|
const char *ch = string;
|
||||||
INT32 charflags = 0;
|
INT32 charflags = 0;
|
||||||
const UINT8 *colormap = NULL;
|
const UINT8 *colormap = NULL;
|
||||||
|
@ -1506,7 +1629,11 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
scrwidth = vid.width;
|
scrwidth = vid.width;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
dupx = dupy = 1;
|
dupx = dupy = 1;
|
||||||
|
scrwidth = vid.width/vid.dupx;
|
||||||
|
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||||
|
}
|
||||||
|
|
||||||
charflags = (option & V_CHARCOLORMASK);
|
charflags = (option & V_CHARCOLORMASK);
|
||||||
|
|
||||||
|
@ -1565,9 +1692,9 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
w = SHORT(hu_font[c]->width) * dupx / 2;
|
w = SHORT(hu_font[c]->width) * dupx / 2;
|
||||||
if (cx + w > scrwidth)
|
if (cx > scrwidth)
|
||||||
break;
|
break;
|
||||||
if (cx < 0) //left boundary check
|
if (cx+left + w < 0) //left boundary check
|
||||||
{
|
{
|
||||||
cx += w;
|
cx += w;
|
||||||
continue;
|
continue;
|
||||||
|
@ -1592,7 +1719,7 @@ void V_DrawRightAlignedSmallString(INT32 x, INT32 y, INT32 option, const char *s
|
||||||
//
|
//
|
||||||
void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
{
|
{
|
||||||
INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth = BASEVIDWIDTH;
|
INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth, left = 0;
|
||||||
const char *ch = string;
|
const char *ch = string;
|
||||||
INT32 charflags = 0;
|
INT32 charflags = 0;
|
||||||
const UINT8 *colormap = NULL;
|
const UINT8 *colormap = NULL;
|
||||||
|
@ -1608,7 +1735,11 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
scrwidth = vid.width;
|
scrwidth = vid.width;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
dupx = dupy = 1;
|
dupx = dupy = 1;
|
||||||
|
scrwidth = vid.width/vid.dupx;
|
||||||
|
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||||
|
}
|
||||||
|
|
||||||
charflags = (option & V_CHARCOLORMASK);
|
charflags = (option & V_CHARCOLORMASK);
|
||||||
|
|
||||||
|
@ -1665,9 +1796,9 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
else
|
else
|
||||||
w = (SHORT(tny_font[c]->width) * dupx);
|
w = (SHORT(tny_font[c]->width) * dupx);
|
||||||
|
|
||||||
if (cx + w > scrwidth)
|
if (cx > scrwidth)
|
||||||
break;
|
break;
|
||||||
if (cx < 0) //left boundary check
|
if (cx+left + w < 0) //left boundary check
|
||||||
{
|
{
|
||||||
cx += w;
|
cx += w;
|
||||||
continue;
|
continue;
|
||||||
|
@ -1690,7 +1821,7 @@ void V_DrawRightAlignedThinString(INT32 x, INT32 y, INT32 option, const char *st
|
||||||
void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
|
void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
|
||||||
{
|
{
|
||||||
fixed_t cx = x, cy = y;
|
fixed_t cx = x, cy = y;
|
||||||
INT32 w, c, dupx, dupy, scrwidth = BASEVIDWIDTH, center = 0;
|
INT32 w, c, dupx, dupy, scrwidth, center = 0, left = 0;
|
||||||
const char *ch = string;
|
const char *ch = string;
|
||||||
INT32 spacewidth = 4, charwidth = 0;
|
INT32 spacewidth = 4, charwidth = 0;
|
||||||
|
|
||||||
|
@ -1704,7 +1835,11 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
|
||||||
scrwidth = vid.width;
|
scrwidth = vid.width;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
dupx = dupy = 1;
|
dupx = dupy = 1;
|
||||||
|
scrwidth = vid.width/vid.dupx;
|
||||||
|
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||||
|
}
|
||||||
|
|
||||||
switch (option & V_SPACINGMASK)
|
switch (option & V_SPACINGMASK)
|
||||||
{
|
{
|
||||||
|
@ -1758,9 +1893,9 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
|
||||||
else
|
else
|
||||||
w = SHORT(hu_font[c]->width) * dupx;
|
w = SHORT(hu_font[c]->width) * dupx;
|
||||||
|
|
||||||
if ((cx>>FRACBITS) + w > scrwidth)
|
if ((cx>>FRACBITS) > scrwidth)
|
||||||
break;
|
break;
|
||||||
if (cx < 0) //left boundary check
|
if (cx+left + w < 0) //left boundary check
|
||||||
{
|
{
|
||||||
cx += w<<FRACBITS;
|
cx += w<<FRACBITS;
|
||||||
continue;
|
continue;
|
||||||
|
@ -1860,7 +1995,7 @@ void V_DrawCreditString(fixed_t x, fixed_t y, INT32 option, const char *string)
|
||||||
}
|
}
|
||||||
|
|
||||||
w = SHORT(cred_font[c]->width) * dupx;
|
w = SHORT(cred_font[c]->width) * dupx;
|
||||||
if ((cx>>FRACBITS) + w > scrwidth)
|
if ((cx>>FRACBITS) > scrwidth)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
V_DrawSciencePatch(cx, cy, option, cred_font[c], FRACUNIT);
|
V_DrawSciencePatch(cx, cy, option, cred_font[c], FRACUNIT);
|
||||||
|
@ -1896,7 +2031,7 @@ INT32 V_CreditStringWidth(const char *string)
|
||||||
//
|
//
|
||||||
void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
|
void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
{
|
{
|
||||||
INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth = BASEVIDWIDTH;
|
INT32 w, c, cx = x, cy = y, dupx, dupy, scrwidth, left = 0;
|
||||||
const char *ch = string;
|
const char *ch = string;
|
||||||
|
|
||||||
if (option & V_NOSCALESTART)
|
if (option & V_NOSCALESTART)
|
||||||
|
@ -1906,7 +2041,11 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
scrwidth = vid.width;
|
scrwidth = vid.width;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
dupx = dupy = 1;
|
dupx = dupy = 1;
|
||||||
|
scrwidth = vid.width/vid.dupx;
|
||||||
|
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||||
|
}
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -1928,11 +2067,10 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
|
||||||
}
|
}
|
||||||
|
|
||||||
w = SHORT(lt_font[c]->width) * dupx;
|
w = SHORT(lt_font[c]->width) * dupx;
|
||||||
if (cx + w > scrwidth)
|
|
||||||
break;
|
|
||||||
|
|
||||||
//left boundary check
|
if (cx > scrwidth)
|
||||||
if (cx < 0)
|
break;
|
||||||
|
if (cx + left < 0) //left boundary check
|
||||||
{
|
{
|
||||||
cx += w;
|
cx += w;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -43,6 +43,8 @@ const char *GetPalette(void);
|
||||||
|
|
||||||
extern RGBA_t *pLocalPalette;
|
extern RGBA_t *pLocalPalette;
|
||||||
|
|
||||||
|
extern UINT8 hudtrans;
|
||||||
|
|
||||||
// Retrieve the ARGB value from a palette color index
|
// Retrieve the ARGB value from a palette color index
|
||||||
#define V_GetColor(color) (pLocalPalette[color&0xFF])
|
#define V_GetColor(color) (pLocalPalette[color&0xFF])
|
||||||
|
|
||||||
|
@ -76,6 +78,7 @@ extern RGBA_t *pLocalPalette;
|
||||||
#define V_REDMAP 0x00005000
|
#define V_REDMAP 0x00005000
|
||||||
#define V_GRAYMAP 0x00006000
|
#define V_GRAYMAP 0x00006000
|
||||||
#define V_ORANGEMAP 0x00007000
|
#define V_ORANGEMAP 0x00007000
|
||||||
|
#define V_SKYMAP 0x00008000
|
||||||
|
|
||||||
// use bits 17-20 for alpha transparency
|
// use bits 17-20 for alpha transparency
|
||||||
#define V_ALPHASHIFT 16
|
#define V_ALPHASHIFT 16
|
||||||
|
@ -140,11 +143,13 @@ void V_DrawScaledPic (INT32 px1, INT32 py1, INT32 scrn, INT32 lumpnum);
|
||||||
// fill a box with a single color
|
// fill a box with a single color
|
||||||
void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c);
|
void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c);
|
||||||
void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c);
|
void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c);
|
||||||
|
// fill a triangle with a single color
|
||||||
|
void V_DrawDiag(INT32 x, INT32 y, INT32 wh, INT32 c);
|
||||||
// fill a box with a flat as a pattern
|
// fill a box with a flat as a pattern
|
||||||
void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum);
|
void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum);
|
||||||
|
|
||||||
// fade down the screen buffer before drawing the menu over
|
// fade down the screen buffer before drawing the menu over
|
||||||
void V_DrawFadeScreen(void);
|
void V_DrawFadeScreen(UINT16 color, UINT8 strength);
|
||||||
|
|
||||||
void V_DrawFadeConsBack(INT32 plines);
|
void V_DrawFadeConsBack(INT32 plines);
|
||||||
|
|
||||||
|
@ -152,6 +157,7 @@ void V_DrawFadeConsBack(INT32 plines);
|
||||||
void V_DrawCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed);
|
void V_DrawCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed);
|
||||||
// draw a single character, but for the chat
|
// draw a single character, but for the chat
|
||||||
void V_DrawChatCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed, UINT8 *colormap);
|
void V_DrawChatCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed, UINT8 *colormap);
|
||||||
|
const UINT8 *V_GetStringColormap(INT32 colorflags);
|
||||||
|
|
||||||
void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string);
|
void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string);
|
||||||
|
|
||||||
|
|
|
@ -323,7 +323,6 @@ static inline boolean I_SkipFrame(void)
|
||||||
if (!paused)
|
if (!paused)
|
||||||
return false;
|
return false;
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
case GS_TIMEATTACK:
|
|
||||||
#ifndef CLIENT_LOADINGSCREEN
|
#ifndef CLIENT_LOADINGSCREEN
|
||||||
case GS_WAITINGPLAYERS:
|
case GS_WAITINGPLAYERS:
|
||||||
#endif
|
#endif
|
||||||
|
|
2037
src/y_inter.c
2037
src/y_inter.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue