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
|
||||
*.mo
|
||||
r_opengl.dll
|
||||
*.bat
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
*.exe
|
||||
*.mo
|
||||
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
|
||||
{
|
||||
#define MINVAL 0
|
||||
#define MAXVAL 1
|
||||
INT32 i;
|
||||
// search for maximum
|
||||
for (i = 1; var->PossibleValue[i].strvalue; i++)
|
||||
if (!stricmp(var->PossibleValue[i].strvalue, "MAX"))
|
||||
break;
|
||||
|
||||
#ifdef PARANOIA
|
||||
if (!var->PossibleValue[i].strvalue)
|
||||
if (!var->PossibleValue[MAXVAL].strvalue)
|
||||
I_Error("Bounded cvar \"%s\" without maximum!\n", var->name);
|
||||
#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))
|
||||
{
|
||||
v = var->PossibleValue[0].value;
|
||||
valstr = var->PossibleValue[0].strvalue;
|
||||
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[MINVAL].value;
|
||||
valstr = var->PossibleValue[MINVAL].strvalue;
|
||||
override = true;
|
||||
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;
|
||||
valstr = var->PossibleValue[i].strvalue;
|
||||
v = var->PossibleValue[MAXVAL].value;
|
||||
valstr = var->PossibleValue[MAXVAL].strvalue;
|
||||
override = true;
|
||||
overrideval = v;
|
||||
}
|
||||
if (v == INT32_MIN)
|
||||
goto badinput;
|
||||
#undef MINVAL
|
||||
#undef MAXVAL
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1453,7 +1463,6 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
|||
|
||||
if (var->PossibleValue)
|
||||
{
|
||||
#define MINVAL 0
|
||||
if (var == &cv_nextmap)
|
||||
{
|
||||
// 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)
|
||||
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])
|
||||
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->func();
|
||||
return;
|
||||
}
|
||||
}
|
||||
#define MINVAL 0
|
||||
#define MAXVAL 1
|
||||
else if (var->PossibleValue[MINVAL].strvalue && !strcmp(var->PossibleValue[MINVAL].strvalue, "MIN"))
|
||||
{ // SRB2Kart
|
||||
#ifdef PARANOIA
|
||||
if (!var->PossibleValue[MAXVAL].strvalue)
|
||||
I_Error("Bounded cvar \"%s\" without maximum!\n", var->name);
|
||||
#endif
|
||||
|
||||
if (newvalue < var->PossibleValue[MINVAL].value || newvalue > var->PossibleValue[MAXVAL].value)
|
||||
{
|
||||
// search the next to last
|
||||
for (max = 0; var->PossibleValue[max+1].strvalue; max++)
|
||||
;
|
||||
INT32 currentindice = -1, newindice;
|
||||
for (max = MAXVAL+1; var->PossibleValue[max].strvalue; max++)
|
||||
if (var->PossibleValue[max].value == var->value)
|
||||
currentindice = max;
|
||||
|
||||
if (newvalue < var->PossibleValue[MINVAL].value) // add the max+1
|
||||
newvalue += var->PossibleValue[max].value - var->PossibleValue[MINVAL].value + 1;
|
||||
|
||||
newvalue = var->PossibleValue[MINVAL].value + (newvalue - var->PossibleValue[MINVAL].value)
|
||||
% (var->PossibleValue[max].value - var->PossibleValue[MINVAL].value + 1);
|
||||
if (currentindice == -1 && max != MAXVAL+1)
|
||||
newindice = ((increment > 0) ? MAXVAL : max) + increment;
|
||||
else
|
||||
newindice = currentindice + increment;
|
||||
|
||||
if (newindice >= max || newindice <= MAXVAL)
|
||||
{
|
||||
newvalue = var->PossibleValue[((increment > 0) ? MINVAL : MAXVAL)].value;
|
||||
CV_SetValue(var, newvalue);
|
||||
#undef MINVAL
|
||||
}
|
||||
else
|
||||
CV_Set(var, var->PossibleValue[newindice].strvalue);
|
||||
}
|
||||
else
|
||||
CV_SetValue(var, newvalue);
|
||||
}
|
||||
#undef MINVAL
|
||||
#undef MAXVAL
|
||||
else
|
||||
{
|
||||
INT32 currentindice = -1, newindice;
|
||||
|
@ -1514,8 +1542,6 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
|||
if (var->PossibleValue[max].value == var->value)
|
||||
currentindice = max;
|
||||
|
||||
max--;
|
||||
|
||||
if (var == &cv_chooseskin)
|
||||
{
|
||||
// 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);
|
||||
#endif
|
||||
|
||||
newindice = (currentindice + increment + max + 1) % (max+1);
|
||||
newindice = (currentindice + increment + max) % max;
|
||||
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}};
|
||||
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);
|
||||
|
||||
//
|
||||
|
@ -227,13 +242,7 @@ static void CONS_Bind_f(void)
|
|||
// Font colormap colors
|
||||
// TODO: This could probably be improved somehow...
|
||||
// These colormaps are 99% identical, with just a few changed bytes
|
||||
UINT8 *yellowmap;
|
||||
UINT8 *purplemap;
|
||||
UINT8 *lgreenmap;
|
||||
UINT8 *bluemap;
|
||||
UINT8 *graymap;
|
||||
UINT8 *redmap;
|
||||
UINT8 *orangemap;
|
||||
UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap;
|
||||
|
||||
// Console BG color
|
||||
UINT8 *consolebgmap = NULL;
|
||||
|
@ -278,39 +287,34 @@ static void CONS_backcolor_Change(void)
|
|||
static void CON_SetupColormaps(void)
|
||||
{
|
||||
INT32 i;
|
||||
UINT8 *memorysrc = (UINT8 *)Z_Malloc((256*8), PU_STATIC, NULL);
|
||||
|
||||
yellowmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
||||
graymap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
||||
purplemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
||||
lgreenmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
||||
bluemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
||||
redmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
||||
orangemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
||||
purplemap = memorysrc;
|
||||
yellowmap = (purplemap+256);
|
||||
greenmap = (yellowmap+256);
|
||||
bluemap = (greenmap+256);
|
||||
redmap = (bluemap+256);
|
||||
graymap = (redmap+256);
|
||||
orangemap = (graymap+256);
|
||||
skymap = (orangemap+256);
|
||||
|
||||
// setup the other colormaps, for console text
|
||||
|
||||
// these don't need to be aligned, unless you convert the
|
||||
// V_DrawMappedPatch() into optimised asm.
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
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;
|
||||
}
|
||||
for (i = 0; i < (256*8); i++, ++memorysrc)
|
||||
*memorysrc = (UINT8)(i & 0xFF); // remap each color to itself...
|
||||
|
||||
// SRB2Kart: Different console font, new colors
|
||||
yellowmap[120] = (UINT8)103;
|
||||
purplemap[120] = (UINT8)194;
|
||||
lgreenmap[120] = (UINT8)162;
|
||||
yellowmap[120] = (UINT8)103;
|
||||
greenmap[120] = (UINT8)162;
|
||||
bluemap[120] = (UINT8)228;
|
||||
graymap[120] = (UINT8)10;
|
||||
redmap[120] = (UINT8)126;
|
||||
orangemap[120] = (UINT8)85;
|
||||
redmap[120] = (UINT8)126; // battle
|
||||
orangemap[120] = (UINT8)85; // record attack
|
||||
skymap[120] = (UINT8)214; // race
|
||||
|
||||
// Init back colormap
|
||||
CON_SetupBackColormap();
|
||||
|
@ -367,6 +371,7 @@ void CON_Init(void)
|
|||
CV_RegisterVar(&cons_height);
|
||||
CV_RegisterVar(&cons_backpic);
|
||||
CV_RegisterVar(&cons_backcolor);
|
||||
CV_RegisterVar(&cons_menuhighlight);
|
||||
COM_AddCommand("bind", CONS_Bind_f);
|
||||
}
|
||||
else
|
||||
|
@ -1620,6 +1625,6 @@ void CON_Drawer(void)
|
|||
if (con_curlines > 0)
|
||||
CON_DrawConsole();
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -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 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)
|
||||
extern UINT8 *consolebgmap;
|
||||
|
|
|
@ -1166,7 +1166,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
INT32 ccstime = I_GetTime();
|
||||
|
||||
// Draw background fade
|
||||
V_DrawFadeScreen();
|
||||
V_DrawFadeScreen(0xFF00, 16);
|
||||
|
||||
// Draw the bottom box.
|
||||
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-24-8, 32, 1);
|
||||
|
@ -1559,7 +1559,7 @@ static void SV_SavedGame(void)
|
|||
{
|
||||
size_t length;
|
||||
UINT8 *savebuffer;
|
||||
XBOXSTATIC char tmpsave[256];
|
||||
XBOXSTATIC char tmpsave[264];
|
||||
|
||||
if (!cv_dumpconsistency.value)
|
||||
return;
|
||||
|
@ -1601,7 +1601,7 @@ static void CL_LoadReceivedSavegame(void)
|
|||
{
|
||||
UINT8 *savebuffer = NULL;
|
||||
size_t length, decompressedlen;
|
||||
XBOXSTATIC char tmpsave[256];
|
||||
XBOXSTATIC char tmpsave[264];
|
||||
|
||||
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
||||
|
||||
|
@ -2062,7 +2062,7 @@ static void CL_ConnectToServer(boolean viams)
|
|||
tic_t asksent;
|
||||
#endif
|
||||
#ifdef JOININGAME
|
||||
XBOXSTATIC char tmpsave[256];
|
||||
XBOXSTATIC char tmpsave[264];
|
||||
|
||||
sprintf(tmpsave, "%s" PATHSEP TMPSAVENAME, srb2home);
|
||||
#endif
|
||||
|
@ -2145,6 +2145,8 @@ static void CL_ConnectToServer(boolean viams)
|
|||
}
|
||||
while (!(cl_mode == CL_CONNECTED && (client || (server && nodewaited <= pnumnodes))));
|
||||
|
||||
if (netgame)
|
||||
F_StartWaitingPlayers();
|
||||
DEBFILE(va("Synchronisation Finished\n"));
|
||||
|
||||
displayplayer = consoleplayer;
|
||||
|
@ -2430,6 +2432,9 @@ static void CL_RemovePlayer(INT32 playernum)
|
|||
}
|
||||
}
|
||||
|
||||
if (K_IsPlayerWanted(&players[playernum]))
|
||||
K_CalculateBattleWanted();
|
||||
|
||||
if (gametype == GT_CTF)
|
||||
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
|
||||
P_CheckSurvivors();
|
||||
else if (G_BattleGametype()) // SRB2Kart
|
||||
K_CheckBalloons();
|
||||
K_CheckBumpers();
|
||||
else if (G_RaceGametype())
|
||||
P_CheckRacers();
|
||||
}
|
||||
|
@ -3534,7 +3539,7 @@ static void HandleConnect(SINT8 node)
|
|||
#ifdef JOININGAME
|
||||
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
|
||||
DEBFILE("send savegame\n");
|
||||
|
@ -3705,7 +3710,8 @@ static void HandlePacketFromAwayNode(SINT8 node)
|
|||
if (client)
|
||||
{
|
||||
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;
|
||||
for (j = 0; j < MAXPLAYERS; 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?
|
||||
/// Shouldn't them be downloaded even at intermission time?
|
||||
/// Also, according to HandleConnect, the server will send the savegame even during intermission...
|
||||
if (netbuffer->u.servercfg.gamestate == GS_LEVEL
|
||||
/*|| netbuffer->u.servercfg.gamestate == GS_INTERMISSION
|
||||
|| netbuffer->u.servercfg.gamestate == GS_VOTING*/)
|
||||
cl_mode = CL_DOWNLOADSAVEGAME;
|
||||
else
|
||||
#endif
|
||||
/// Sryder 2018-07-05: If we don't want to send the player config another way we need to send the gamestate
|
||||
/// At almost any gamestate there could be joiners... So just always send gamestate?
|
||||
cl_mode = ((server) ? CL_CONNECTED : CL_DOWNLOADSAVEGAME);
|
||||
#else
|
||||
cl_mode = CL_CONNECTED;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3874,9 +3879,8 @@ FILESTAMP
|
|||
// Update the nettics
|
||||
nettics[node] = realend;
|
||||
|
||||
// Don't do anything for packets of type NODEKEEPALIVE?
|
||||
if (netconsole == -1 || netbuffer->packettype == PT_NODEKEEPALIVE
|
||||
|| netbuffer->packettype == PT_NODEKEEPALIVEMIS)
|
||||
// This should probably still timeout though, as the node should always have a player 1 number
|
||||
if (netconsole == -1)
|
||||
break;
|
||||
|
||||
// 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?
|
||||
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
|
||||
G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][netconsole], &netbuffer->u.clientpak.cmd, 1);
|
||||
|
||||
|
@ -4335,7 +4345,7 @@ static INT16 Consistancy(void)
|
|||
{
|
||||
if (!playeringame[i])
|
||||
ret ^= 0xCCCC;
|
||||
else if (!players[i].mo);
|
||||
else if (!players[i].mo || gamestate != GS_LEVEL);
|
||||
else
|
||||
{
|
||||
ret += players[i].mo->x;
|
||||
|
@ -4346,7 +4356,7 @@ static INT16 Consistancy(void)
|
|||
}
|
||||
// I give up
|
||||
// Coop desynching enemies is painful
|
||||
if (!G_RaceGametype())
|
||||
if (gamestate == GS_LEVEL)
|
||||
ret += P_GetRandSeed();
|
||||
|
||||
#ifdef MOBJCONSISTANCY
|
||||
|
@ -4355,6 +4365,8 @@ static INT16 Consistancy(void)
|
|||
DEBFILE(va("Consistancy = %u\n", ret));
|
||||
return ret;
|
||||
}
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
|
||||
|
@ -4421,6 +4433,7 @@ static INT16 Consistancy(void)
|
|||
ret += mo->frame;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
DEBFILE(va("Consistancy = %u\n", (ret & 0xFFFF)));
|
||||
|
|
68
src/d_main.c
68
src/d_main.c
|
@ -125,10 +125,12 @@ INT32 postimgparam3;
|
|||
postimg_t postimgtype4 = postimg_none;
|
||||
INT32 postimgparam4;
|
||||
#ifdef _XBOX
|
||||
boolean nomidimusic = true, nosound = true;
|
||||
boolean nomidimusic = false;
|
||||
boolean nosound = true;
|
||||
boolean nodigimusic = true;
|
||||
#else
|
||||
boolean nomidimusic = false, nosound = false;
|
||||
boolean nomidimusic = false;
|
||||
boolean nosound = false;
|
||||
boolean nodigimusic = false; // No fmod-based music
|
||||
#endif
|
||||
|
||||
|
@ -295,15 +297,15 @@ static void D_Display(void)
|
|||
{
|
||||
// set for all later
|
||||
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
|
||||
wipedefindex = wipe_specinter_toblack;
|
||||
else //if (intertype != int_coop) // Multiplayer
|
||||
wipedefindex = wipe_multinter_toblack;
|
||||
}
|
||||
else if (gamestate == GS_VOTING)
|
||||
wipedefindex = wipe_multinter_toblack;
|
||||
|
||||
if (rendermode != render_none)
|
||||
{
|
||||
|
@ -315,6 +317,8 @@ static void D_Display(void)
|
|||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
F_WipeEndScreen();
|
||||
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK);
|
||||
if (wipegamestate == GS_LEVEL && rendermode != render_none)
|
||||
V_SetPaletteLump("PLAYPAL"); // Reset the palette
|
||||
}
|
||||
|
||||
F_WipeStartScreen();
|
||||
|
@ -368,6 +372,7 @@ static void D_Display(void)
|
|||
|
||||
case GS_EVALUATION:
|
||||
F_GameEvaluationDrawer();
|
||||
HU_Erase();
|
||||
HU_Drawer();
|
||||
break;
|
||||
|
||||
|
@ -383,10 +388,19 @@ static void D_Display(void)
|
|||
|
||||
case GS_TITLESCREEN:
|
||||
F_TitleScreenDrawer();
|
||||
if (wipe)
|
||||
wipedefindex = wipe_titlescreen_toblack;
|
||||
break;
|
||||
|
||||
case GS_WAITINGPLAYERS:
|
||||
// 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_NULL:
|
||||
break;
|
||||
|
@ -526,7 +540,7 @@ static void D_Display(void)
|
|||
wipegamestate = gamestate;
|
||||
|
||||
// draw pause pic
|
||||
if (paused && cv_showhud.value && (!menuactive || netgame))
|
||||
if (paused && cv_showhud.value)
|
||||
{
|
||||
INT32 py;
|
||||
patch_t *patch;
|
||||
|
@ -812,9 +826,9 @@ void D_StartTitle(void)
|
|||
F_StartTitleScreen();
|
||||
CON_ToggleOff();
|
||||
|
||||
// Reset the palette
|
||||
if (rendermode != render_none)
|
||||
V_SetPaletteLump("PLAYPAL");
|
||||
// Reset the palette -- SRB2Kart: actually never mind let's do this in the middle of every fade
|
||||
/*if (rendermode != render_none)
|
||||
V_SetPaletteLump("PLAYPAL");*/
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -942,6 +956,10 @@ static void IdentifyVersion(void)
|
|||
D_AddFile(va(pandf,srb2waddir,"maps.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 (DC) && 0
|
||||
|
@ -1240,25 +1258,23 @@ void D_SRB2Main(void)
|
|||
#ifndef DEVELOP // md5s last updated 12/14/14
|
||||
|
||||
// Check MD5s of autoloaded files
|
||||
W_VerifyFileMD5(0, ASSET_HASH_SRB2_SRB); // srb2.srb/srb2.wad
|
||||
W_VerifyFileMD5(1, ASSET_HASH_GFX_DTA); // gfx.kart
|
||||
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.
|
||||
|
||||
mainwads = 0;
|
||||
W_VerifyFileMD5(mainwads, ASSET_HASH_SRB2_SRB); mainwads++; // srb2.srb/srb2.wad
|
||||
#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
|
||||
|
||||
// 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.
|
||||
#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();
|
||||
|
||||
//---------------------------------------------------- READY SCREEN
|
||||
|
@ -1325,7 +1341,7 @@ void D_SRB2Main(void)
|
|||
if (dedicated)
|
||||
{
|
||||
nosound = true;
|
||||
nomidimusic = nodigimusic = true;
|
||||
/*nomidimusic = */nodigimusic = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1334,17 +1350,17 @@ void D_SRB2Main(void)
|
|||
if (M_CheckParm("-nosound"))
|
||||
nosound = true;
|
||||
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
|
||||
nomidimusic = nodigimusic = true;
|
||||
/*nomidimusic = */nodigimusic = true;
|
||||
else
|
||||
{
|
||||
if (M_CheckParm("-nomidimusic"))
|
||||
nomidimusic = true; ; // WARNING: DOS version initmusic in I_StartupSound
|
||||
/*if (M_CheckParm("-nomidimusic"))
|
||||
nomidimusic = true; ; // WARNING: DOS version initmusic in I_StartupSound*/
|
||||
if (M_CheckParm("-nodigmusic"))
|
||||
nodigimusic = true; // WARNING: DOS version initmusic in I_StartupSound
|
||||
}
|
||||
I_StartupSound();
|
||||
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");
|
||||
ST_Init();
|
||||
|
|
|
@ -41,7 +41,7 @@ void D_SRB2Main(void);
|
|||
// Called by IO functions when input is detected.
|
||||
void D_PostEvent(const event_t *ev);
|
||||
#ifndef DOXYGEN
|
||||
FUNCMATH void D_PostEvent_end(void); // delimiter for locking memory
|
||||
void D_PostEvent_end(void); // delimiter for locking memory
|
||||
#endif
|
||||
|
||||
void D_ProcessEvents(void);
|
||||
|
|
415
src/d_netcmd.c
415
src/d_netcmd.c
|
@ -109,10 +109,12 @@ static void Color4_OnChange(void);
|
|||
static void DummyConsvar_OnChange(void);
|
||||
static void SoundTest_OnChange(void);
|
||||
|
||||
static void BaseNumLaps_OnChange(void);
|
||||
static void KartFrantic_OnChange(void);
|
||||
static void KartSpeed_OnChange(void);
|
||||
static void KartMirror_OnChange(void);
|
||||
static void KartComeback_OnChange(void);
|
||||
static void KartEliminateLast_OnChange(void);
|
||||
|
||||
#ifdef NETGAME_DEVMODE
|
||||
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"},
|
||||
{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 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
|
||||
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};
|
||||
#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_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,
|
||||
I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_usejoystick2 = {"use_joystick2", "2", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||
I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL};
|
||||
#elif defined (PSP) || defined (GP2X) || defined (_NDS) //only one joystick
|
||||
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,
|
||||
consvar_t cv_usejoystick3 = {"use_joystick3", "3", CV_SAVE|CV_CALL, usejoystick_cons_t,
|
||||
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};
|
||||
#endif
|
||||
|
||||
#if (defined (LJOYSTICK) || defined (HAVE_SDL))
|
||||
#ifdef LJOYSTICK
|
||||
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_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_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};
|
||||
|
@ -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_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_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
|
||||
consvar_t cv_magnet = {"magnets", "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_mushroom = {"mushrooms", "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_megashroom = {"megashrooms", "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_star = {"stars", "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_fakeitem = {"fakeitems", "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_greenshell = {"greenshells", "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_laserwisp = {"laserwisps", "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_bobomb = {"bobombs", "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_fireflower = {"fireflowers", "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_lightning = {"lightning", "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_sneaker = {"sneaker", "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_invincibility = {"invincibility", "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_eggmanmonitor = {"eggmanmonitor", "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_jawz = {"jawz", "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_ballhog = {"ballhog", "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_grow = {"grow", "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_lightningshield = {"lightningshield", "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_pogospring = {"pogospring", "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_triplebanana = {"triplebanana", "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_dualjawz = {"dualjawz", "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};
|
||||
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_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}};
|
||||
consvar_t cv_kartstarsfx = {"kartstarsfx", "SMK", CV_SAVE, kartstarsfx_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t kartinvinsfx_cons_t[] = {{0, "Music"}, {1, "SFX"}, {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};
|
||||
static CV_PossibleValue_t kartballoons_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};
|
||||
static CV_PossibleValue_t kartbumpers_cons_t[] = {{1, "MIN"}, {12, "MAX"}, {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_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};
|
||||
static CV_PossibleValue_t speedometer_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
|
||||
static CV_PossibleValue_t kartspeedometer_cons_t[] = {{0, "Off"}, {1, "Kilometers"}, {2, "Miles"}, {3, "Fracunits"}, {0, NULL}};
|
||||
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}};
|
||||
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}};
|
||||
consvar_t cv_timelimit = {"timelimit", "0", CV_NETVAR|CV_CALL|CV_NOINIT, timelimit_cons_t,
|
||||
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,
|
||||
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
|
||||
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}};
|
||||
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};
|
||||
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};
|
||||
|
@ -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};
|
||||
|
||||
INT16 gametype = GT_RACE; // SRB2kart
|
||||
boolean forceresetplayers = false;
|
||||
UINT8 splitscreen = 0;
|
||||
boolean circuitmap = true; // SRB2kart
|
||||
INT32 adminplayers[MAXPLAYERS];
|
||||
|
@ -579,7 +583,7 @@ void D_RegisterServerCommands(void)
|
|||
CV_RegisterVar(&cv_friendlyfire);
|
||||
CV_RegisterVar(&cv_pointlimit);
|
||||
CV_RegisterVar(&cv_numlaps);
|
||||
CV_RegisterVar(&cv_usemapnumlaps);
|
||||
CV_RegisterVar(&cv_basenumlaps);
|
||||
|
||||
CV_RegisterVar(&cv_hazardlog);
|
||||
|
||||
|
@ -603,7 +607,7 @@ void D_RegisterServerCommands(void)
|
|||
CV_RegisterVar(&cv_competitionboxes);
|
||||
CV_RegisterVar(&cv_matchboxes);
|
||||
|
||||
CV_RegisterVar(&cv_recycler);
|
||||
/*CV_RegisterVar(&cv_recycler);
|
||||
CV_RegisterVar(&cv_teleporters);
|
||||
CV_RegisterVar(&cv_superring);
|
||||
CV_RegisterVar(&cv_supersneakers);
|
||||
|
@ -614,7 +618,7 @@ void D_RegisterServerCommands(void)
|
|||
CV_RegisterVar(&cv_forceshield);
|
||||
CV_RegisterVar(&cv_bombshield);
|
||||
CV_RegisterVar(&cv_1up);
|
||||
CV_RegisterVar(&cv_eggmanbox);
|
||||
CV_RegisterVar(&cv_eggmanbox);*/
|
||||
|
||||
K_RegisterKartStuff(); // SRB2kart
|
||||
|
||||
|
@ -865,7 +869,7 @@ void D_RegisterClientCommands(void)
|
|||
// s_sound.c
|
||||
CV_RegisterVar(&cv_soundvolume);
|
||||
CV_RegisterVar(&cv_digmusicvolume);
|
||||
CV_RegisterVar(&cv_midimusicvolume);
|
||||
//CV_RegisterVar(&cv_midimusicvolume);
|
||||
CV_RegisterVar(&cv_numChannels);
|
||||
|
||||
// i_cdmus.c
|
||||
|
@ -1159,7 +1163,7 @@ UINT8 CanChangeSkin(INT32 playernum)
|
|||
return true;
|
||||
|
||||
// Can change skin during initial countdown.
|
||||
if (leveltime < 4*TICRATE)
|
||||
if (leveltime < starttime)
|
||||
return true;
|
||||
|
||||
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_p = buf;
|
||||
|
||||
forceresetplayers = false;
|
||||
|
||||
// The supplied data are assumed to be good.
|
||||
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)
|
||||
{
|
||||
char buf[8];
|
||||
char *p = buf;
|
||||
UINT8 buf[6*2]; // five UINT16 maps (at twice the width of a UINT8), and two gametypes
|
||||
UINT8 *p = buf;
|
||||
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)
|
||||
WRITEUINT16(p, G_RandMap(G_TOLFlag(gametype), prevmap, true, false));
|
||||
if (i == 2) // sometimes a different gametype
|
||||
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
|
||||
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);
|
||||
|
@ -1997,7 +2009,9 @@ void D_PickVote(void)
|
|||
char* p = buf;
|
||||
SINT8 temppicks[MAXPLAYERS];
|
||||
SINT8 templevels[MAXPLAYERS];
|
||||
SINT8 votecompare = -1;
|
||||
UINT8 numvotes = 0, key = 0;
|
||||
boolean force = true;
|
||||
INT32 i;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
|
@ -2009,6 +2023,10 @@ void D_PickVote(void)
|
|||
temppicks[numvotes] = i;
|
||||
templevels[numvotes] = votes[i];
|
||||
numvotes++;
|
||||
if (votecompare == -1)
|
||||
votecompare = votes[i];
|
||||
else if (votes[i] != votecompare)
|
||||
force = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2017,6 +2035,9 @@ void D_PickVote(void)
|
|||
if (numvotes > 0)
|
||||
{
|
||||
WRITESINT8(p, temppicks[key]);
|
||||
if (force && templevels[key] == 3 && numvotes > 1)
|
||||
WRITESINT8(p, 4);
|
||||
else
|
||||
WRITESINT8(p, templevels[key]);
|
||||
}
|
||||
else
|
||||
|
@ -2109,7 +2130,6 @@ static void Command_Map_f(void)
|
|||
// Don't do any variable setting here. Wait until you get your
|
||||
// map packet first to avoid sending the same info twice!
|
||||
newgametype = gametype_cons_t[j].value;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2127,27 +2147,24 @@ 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
|
||||
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.
|
||||
// G_TOLFlag handles both multiplayer gametype and ignores it for !multiplayer
|
||||
// Alternatively, bail if the map header is completely missing anyway.
|
||||
else if (!mapheaderinfo[newmapnum-1]
|
||||
else
|
||||
{
|
||||
if (!mapheaderinfo[newmapnum-1]
|
||||
|| !(mapheaderinfo[newmapnum-1]->typeoflevel & G_TOLFlag(newgametype)))
|
||||
{
|
||||
char gametypestring[32] = "Single Player";
|
||||
|
||||
if (multiplayer)
|
||||
for (i = 0; gametype_cons_t[i].strvalue != NULL; i++)
|
||||
if (gametype_cons_t[i].value == newgametype)
|
||||
{
|
||||
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);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("%s doesn't support %s mode!\n(Use -force to override)\n"), mapname,
|
||||
(multiplayer ? gametype_cons_t[newgametype].strvalue : "Single Player"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent warping to locked levels
|
||||
// ... unless you're in a dedicated server. Yes, technically this means you can view any level by
|
||||
|
@ -2232,6 +2249,9 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
emeralds = 0;
|
||||
}
|
||||
|
||||
if (modeattacking) // i remember moving this here in internal fixed a heisenbug so
|
||||
SetPlayerSkinByNum(0, cv_chooseskin.value-1);
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
LUAh_MapChange();
|
||||
#endif
|
||||
|
@ -2243,15 +2263,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
if (timingdemo)
|
||||
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)
|
||||
G_BeginMetal();
|
||||
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 (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"));
|
||||
return;
|
||||
|
@ -2351,7 +2362,7 @@ static void Command_Suicide(void)
|
|||
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"));
|
||||
return;
|
||||
|
@ -2518,18 +2529,12 @@ static void Command_Teamchange_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (NetPacket.packet.newteam == (unsigned)players[consoleplayer].ctfteam ||
|
||||
(players[consoleplayer].spectator && !NetPacket.packet.newteam))
|
||||
error = true;
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
{
|
||||
if ((players[consoleplayer].spectator && !NetPacket.packet.newteam) ||
|
||||
(!players[consoleplayer].spectator && NetPacket.packet.newteam == 3))
|
||||
error = true;
|
||||
}
|
||||
if (players[consoleplayer].spectator)
|
||||
error = !(NetPacket.packet.newteam || (players[consoleplayer].pflags & PF_WANTSTOJOIN)); // :lancer:
|
||||
else if (G_GametypeHasTeams())
|
||||
error = (NetPacket.packet.newteam == (unsigned)players[consoleplayer].ctfteam);
|
||||
else if (G_GametypeHasSpectators() && !players[consoleplayer].spectator)
|
||||
error = (NetPacket.packet.newteam == 3);
|
||||
#ifdef PARANOIA
|
||||
else
|
||||
I_Error("Invalid gametype after initial checks!");
|
||||
|
@ -2615,18 +2620,12 @@ static void Command_Teamchange2_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (NetPacket.packet.newteam == (unsigned)players[secondarydisplayplayer].ctfteam ||
|
||||
(players[secondarydisplayplayer].spectator && !NetPacket.packet.newteam))
|
||||
error = true;
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
{
|
||||
if ((players[secondarydisplayplayer].spectator && !NetPacket.packet.newteam) ||
|
||||
(!players[secondarydisplayplayer].spectator && NetPacket.packet.newteam == 3))
|
||||
error = true;
|
||||
}
|
||||
if (players[secondarydisplayplayer].spectator)
|
||||
error = !(NetPacket.packet.newteam || (players[secondarydisplayplayer].pflags & PF_WANTSTOJOIN));
|
||||
else if (G_GametypeHasTeams())
|
||||
error = (NetPacket.packet.newteam == (unsigned)players[secondarydisplayplayer].ctfteam);
|
||||
else if (G_GametypeHasSpectators() && !players[secondarydisplayplayer].spectator)
|
||||
error = (NetPacket.packet.newteam == 3);
|
||||
#ifdef PARANOIA
|
||||
else
|
||||
I_Error("Invalid gametype after initial checks!");
|
||||
|
@ -2712,18 +2711,12 @@ static void Command_Teamchange3_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (NetPacket.packet.newteam == (unsigned)players[thirddisplayplayer].ctfteam ||
|
||||
(players[thirddisplayplayer].spectator && !NetPacket.packet.newteam))
|
||||
error = true;
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
{
|
||||
if ((players[thirddisplayplayer].spectator && !NetPacket.packet.newteam) ||
|
||||
(!players[thirddisplayplayer].spectator && NetPacket.packet.newteam == 3))
|
||||
error = true;
|
||||
}
|
||||
if (players[thirddisplayplayer].spectator)
|
||||
error = !(NetPacket.packet.newteam || (players[thirddisplayplayer].pflags & PF_WANTSTOJOIN));
|
||||
else if (G_GametypeHasTeams())
|
||||
error = (NetPacket.packet.newteam == (unsigned)players[thirddisplayplayer].ctfteam);
|
||||
else if (G_GametypeHasSpectators() && !players[thirddisplayplayer].spectator)
|
||||
error = (NetPacket.packet.newteam == 3);
|
||||
#ifdef PARANOIA
|
||||
else
|
||||
I_Error("Invalid gametype after initial checks!");
|
||||
|
@ -2809,18 +2802,12 @@ static void Command_Teamchange4_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
if (NetPacket.packet.newteam == (unsigned)players[fourthdisplayplayer].ctfteam ||
|
||||
(players[fourthdisplayplayer].spectator && !NetPacket.packet.newteam))
|
||||
error = true;
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
{
|
||||
if ((players[fourthdisplayplayer].spectator && !NetPacket.packet.newteam) ||
|
||||
(!players[fourthdisplayplayer].spectator && NetPacket.packet.newteam == 3))
|
||||
error = true;
|
||||
}
|
||||
if (players[fourthdisplayplayer].spectator)
|
||||
error = !(NetPacket.packet.newteam || (players[fourthdisplayplayer].pflags & PF_WANTSTOJOIN));
|
||||
else if (G_GametypeHasTeams())
|
||||
error = (NetPacket.packet.newteam == (unsigned)players[fourthdisplayplayer].ctfteam);
|
||||
else if (G_GametypeHasSpectators() && !players[fourthdisplayplayer].spectator)
|
||||
error = (NetPacket.packet.newteam == 3);
|
||||
#ifdef PARANOIA
|
||||
else
|
||||
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.
|
||||
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) ||
|
||||
(!(players[playernum].pflags & PF_TAGIT) && NetPacket.packet.newteam == 2) ||
|
||||
(players[playernum].spectator && NetPacket.packet.newteam == 0) ||
|
||||
(!players[playernum].spectator && NetPacket.packet.newteam == 3))
|
||||
return;
|
||||
}
|
||||
else if (G_GametypeHasTeams())
|
||||
{
|
||||
if ((NetPacket.packet.newteam && (NetPacket.packet.newteam == (unsigned)players[playernum].ctfteam)) ||
|
||||
(players[playernum].spectator && !NetPacket.packet.newteam))
|
||||
if (NetPacket.packet.newteam && (NetPacket.packet.newteam == (unsigned)players[playernum].ctfteam))
|
||||
return;
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
{
|
||||
if ((players[playernum].spectator && !NetPacket.packet.newteam) ||
|
||||
(!players[playernum].spectator && NetPacket.packet.newteam == 3))
|
||||
if (!players[playernum].spectator && NetPacket.packet.newteam == 3)
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -3109,19 +3095,26 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
}
|
||||
|
||||
//Safety first!
|
||||
// (not respawning spectators here...)
|
||||
if (!players[playernum].spectator)
|
||||
{
|
||||
if (players[playernum].mo)
|
||||
{
|
||||
if (!players[playernum].spectator)
|
||||
//if (!players[playernum].spectator)
|
||||
P_DamageMobj(players[playernum].mo, NULL, NULL, 10000);
|
||||
else
|
||||
/*else
|
||||
{
|
||||
if (players[playernum].mo)
|
||||
{
|
||||
P_RemoveMobj(players[playernum].mo);
|
||||
players[playernum].mo = NULL;
|
||||
players[playernum].playerstate = PST_REBORN;
|
||||
}
|
||||
players[playernum].playerstate = PST_REBORN;
|
||||
}*/
|
||||
}
|
||||
else
|
||||
players[playernum].playerstate = PST_REBORN;
|
||||
}
|
||||
|
||||
//Now that we've done our error checking and killed the player
|
||||
//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.
|
||||
{
|
||||
players[playernum].spectator = false;
|
||||
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
||||
players[playernum].pflags &= ~PF_TAGGED;//Just in case.
|
||||
|
||||
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.
|
||||
{
|
||||
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 (gametype == GT_TAG && (leveltime > (hidetime * TICRATE)))
|
||||
|
@ -3165,7 +3158,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
else
|
||||
{
|
||||
players[playernum].ctfteam = NetPacket.packet.newteam;
|
||||
players[playernum].spectator = false;
|
||||
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
||||
}
|
||||
}
|
||||
else if (G_GametypeHasSpectators())
|
||||
|
@ -3173,7 +3166,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
if (!NetPacket.packet.newteam)
|
||||
players[playernum].spectator = true;
|
||||
else
|
||||
players[playernum].spectator = false;
|
||||
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
||||
}
|
||||
|
||||
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');
|
||||
}
|
||||
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
|
||||
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.
|
||||
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;
|
||||
if (players[playernum].mo)
|
||||
players[playernum].mo->health = 1;
|
||||
|
@ -3241,7 +3244,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
|||
if (G_TagGametype())
|
||||
P_CheckSurvivors();
|
||||
else if (G_BattleGametype())
|
||||
K_CheckBalloons(); // SRB2Kart
|
||||
K_CheckBumpers(); // SRB2Kart
|
||||
else if (G_RaceGametype())
|
||||
P_CheckRacers(); // also SRB2Kart
|
||||
}
|
||||
|
@ -3886,7 +3889,7 @@ static void Got_RequestAddfilecmd(UINT8 **cp, INT32 playernum)
|
|||
|
||||
if (ncs != FS_FOUND || toomany)
|
||||
{
|
||||
char message[256];
|
||||
char message[275];
|
||||
|
||||
if (toomany)
|
||||
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)
|
||||
{
|
||||
INT32 j;
|
||||
const char *gametypestr = NULL;
|
||||
|
||||
if (!(netgame || multiplayer)) // print "Single player" instead of "Co-op"
|
||||
if (!(netgame || multiplayer)) // print "Single player" instead of "Race"
|
||||
{
|
||||
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;
|
||||
}
|
||||
// find name string for current gametype
|
||||
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);
|
||||
CONS_Printf(M_GetText("Current gametype is %s\n"), gametype_cons_t[gametype].strvalue);
|
||||
}
|
||||
|
||||
/** Plays the intro.
|
||||
|
@ -4186,20 +4174,9 @@ static void TimeLimit_OnChange(void)
|
|||
*/
|
||||
void D_GameTypeChanged(INT32 lastgametype)
|
||||
{
|
||||
if (netgame)
|
||||
{
|
||||
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);
|
||||
}
|
||||
if (multiplayer)
|
||||
CONS_Printf(M_GetText("Gametype was changed from %s to %s\n"), gametype_cons_t[lastgametype].strvalue, gametype_cons_t[gametype].strvalue);
|
||||
|
||||
// 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.
|
||||
if (server && (multiplayer || netgame))
|
||||
|
@ -4275,7 +4252,7 @@ void D_GameTypeChanged(INT32 lastgametype)
|
|||
|
||||
// When swapping to a gametype that supports spectators,
|
||||
// make everyone a spectator initially.
|
||||
/*if (!splitscreen && (G_GametypeHasSpectators()))
|
||||
/*if (G_GametypeHasSpectators())
|
||||
{
|
||||
INT32 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)
|
||||
{
|
||||
INT32 i;
|
||||
UINT8 gt, secondgt;
|
||||
|
||||
if (playernum != serverplayer && !IsPlayerAdmin(playernum))
|
||||
{
|
||||
|
@ -4618,13 +4596,19 @@ static void Got_SetupVotecmd(UINT8 **cp, INT32 playernum)
|
|||
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);
|
||||
if (!mapheaderinfo[votelevels[i]])
|
||||
P_AllocMapHeader(votelevels[i]);
|
||||
votelevels[i][0] = (UINT16)READUINT16(*cp);
|
||||
votelevels[i][1] = gt;
|
||||
if (!mapheaderinfo[votelevels[i][0]])
|
||||
P_AllocMapHeader(votelevels[i][0]);
|
||||
}
|
||||
|
||||
votelevels[2][1] = secondgt;
|
||||
|
||||
G_SetGamestate(GS_VOTING);
|
||||
Y_StartVote();
|
||||
}
|
||||
|
@ -4749,7 +4733,7 @@ static void Command_RestartAudio_f(void)
|
|||
|
||||
I_SetSfxVolume(cv_soundvolume.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
|
||||
P_RestoreMusic(&players[consoleplayer]);
|
||||
|
||||
|
@ -5214,26 +5198,73 @@ static void Command_ShowTime_f(void)
|
|||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
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"));
|
||||
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)
|
||||
{
|
||||
if (cv_kartspeed.value != gamespeed && G_RaceGametype() && gamestate == GS_LEVEL)
|
||||
if (G_RaceGametype())
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (cv_kartmirror.value != mirrormode && G_RaceGametype() && gamestate == GS_LEVEL)
|
||||
CONS_Printf(M_GetText("Mirror Mode will be turned %s next round.\n"), cv_kartmirror.value ? M_GetText("on") : M_GetText("off"));
|
||||
if (G_RaceGametype())
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (cv_kartcomeback.value != comeback && G_BattleGametype() && gamestate == GS_LEVEL)
|
||||
if (G_BattleGametype())
|
||||
{
|
||||
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_timelimit;
|
||||
extern consvar_t cv_numlaps;
|
||||
extern consvar_t cv_usemapnumlaps;
|
||||
extern consvar_t cv_basenumlaps;
|
||||
extern UINT32 timelimitintics;
|
||||
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_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_1up, cv_eggmanbox;
|
||||
extern consvar_t cv_recycler;
|
||||
extern consvar_t cv_recycler;*/
|
||||
|
||||
// SRB2kart items
|
||||
extern consvar_t cv_magnet, cv_boo, cv_mushroom, cv_triplemushroom, cv_megashroom;
|
||||
extern consvar_t cv_goldshroom, cv_star, cv_triplebanana, cv_fakeitem, cv_banana;
|
||||
extern consvar_t cv_greenshell, cv_redshell, cv_laserwisp, cv_triplegreenshell, cv_bobomb;
|
||||
extern consvar_t cv_blueshell, cv_jaws, cv_fireflower, cv_tripleredshell, cv_lightning;
|
||||
extern consvar_t cv_feather;
|
||||
extern consvar_t cv_sneaker, cv_rocketsneaker, cv_invincibility, cv_banana;
|
||||
extern consvar_t cv_eggmanmonitor, cv_orbinaut, cv_jawz, cv_mine;
|
||||
extern consvar_t cv_ballhog, cv_selfpropelledbomb, cv_grow, cv_shrink;
|
||||
extern consvar_t cv_lightningshield, cv_hyudoro, cv_pogospring;
|
||||
|
||||
extern consvar_t cv_triplesneaker, cv_triplebanana, cv_tripleorbinaut, cv_dualjawz;
|
||||
|
||||
extern consvar_t cv_karthud;
|
||||
extern consvar_t cv_kartminimap;
|
||||
extern consvar_t cv_kartcheck;
|
||||
extern consvar_t cv_kartstarsfx;
|
||||
extern consvar_t cv_kartinvinsfx;
|
||||
extern consvar_t cv_kartspeed;
|
||||
extern consvar_t cv_kartballoons;
|
||||
extern consvar_t cv_kartbumpers;
|
||||
extern consvar_t cv_kartfrantic;
|
||||
extern consvar_t cv_kartcomeback;
|
||||
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_kartdebugitem, cv_kartdebugamount, cv_kartdebugcheckpoint, cv_kartdebugshrink;
|
||||
|
||||
extern consvar_t cv_itemfinder;
|
||||
|
||||
extern consvar_t cv_inttime, cv_advancemap, cv_playersforexit;
|
||||
|
|
116
src/d_player.h
116
src/d_player.h
|
@ -108,8 +108,8 @@ typedef enum
|
|||
// Did you get a time-over?
|
||||
PF_TIMEOVER = 1<<10,
|
||||
|
||||
// Ready for Super?
|
||||
PF_SUPERREADY = 1<<11,
|
||||
// SRB2Kart: Spectator that wants to join
|
||||
PF_WANTSTOJOIN = 1<<11,
|
||||
|
||||
// Character action status
|
||||
PF_JUMPED = 1<<12,
|
||||
|
@ -230,93 +230,105 @@ typedef enum
|
|||
NUMPOWERS
|
||||
} 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
|
||||
typedef enum
|
||||
{
|
||||
// Basic gameplay things
|
||||
k_position, // Used for Kart positions, mostly for deterministic stuff
|
||||
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_nextcheck, // Next checkpoint distance; for p_user.c (was "pw_ncd")
|
||||
k_waypoint, // Waypoints.
|
||||
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_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_voices, // Used to stop the player saying more voices than it should
|
||||
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 Mushroom sounds for a breif duration when triggered by a floor panel
|
||||
k_spinout, // Separate confirmation to prevent endless wipeout loops
|
||||
k_floorboost, // Prevents Sneaker sounds for a breif duration when triggered by a floor panel
|
||||
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_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_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_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_waterskip, // Water skipping counter
|
||||
|
||||
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_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
|
||||
k_magnettimer, // Duration of Magnet's item-break and item box pull
|
||||
k_bootimer, // Duration of the boo offroad effect itself
|
||||
k_bootaketimer, // You are stealing an item, this is your timer
|
||||
k_boostolentimer, // You are being stolen from, this is your timer
|
||||
k_mushroomtimer, // Duration of the Mushroom Boost itself
|
||||
k_attractiontimer, // Duration of Lightning Shield's item-break and item box pull
|
||||
k_hyudorotimer, // Duration of the Hyudoro offroad effect itself
|
||||
k_stealingtimer, // You are stealing an item, this is your timer
|
||||
k_stolentimer, // You are being stolen from, this is your timer
|
||||
k_sneakertimer, // Duration of the Sneaker Boost itself
|
||||
k_growshrinktimer, // > 0 = Big, < 0 = small
|
||||
k_squishedtimer, // Squished frame timer
|
||||
k_goldshroomtimer, // Gold Mushroom duration timer
|
||||
k_startimer, // Invincibility timer
|
||||
k_rocketsneakertimer, // Rocket Sneaker duration timer
|
||||
k_invincibilitytimer, // Invincibility timer
|
||||
k_deathsentence, // 30 seconds to live... (SPB murder timer (not actually 30 sec, I just couldn't help the FF reference :p))
|
||||
k_eggmanheld, // Eggman monitor held, separate from k_itemheld so it doesn't stop you from getting items
|
||||
k_bananadrag, // After a second of holding a banana behind you, you start to slow down
|
||||
k_spinouttimer, // Spin-out from a banana peel or oil slick (was "pw_bananacam")
|
||||
k_laserwisptimer, // The duration and relative angle of the laser
|
||||
k_wipeoutslow, // Timer before you slowdown when getting wiped out
|
||||
k_justbumped, // Prevent players from endlessly bumping into each other
|
||||
k_deathsentence, // 30 seconds to live... (Blue Shell murder timer (not actually 30 sec, I just couldn't help the FF reference :p))
|
||||
k_poweritemtimer, // Battle mode, how long before you're allowed another power item (Star, Megashroom)
|
||||
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
|
||||
// *** 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
|
||||
k_sadtimer, // How long you've been sad
|
||||
|
||||
// Battle Mode vars
|
||||
k_balloon, // Number of balloons 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_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 bumper
|
||||
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
|
||||
} kartstufftype_t;
|
||||
|
@ -511,7 +523,7 @@ typedef struct player_s
|
|||
tic_t startedtime; // Time which you started this mare with.
|
||||
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
|
||||
UINT32 marescore; // score for this nights stage
|
||||
UINT32 marescore; // SRB2Kart: Battle score
|
||||
UINT32 lastmarescore; // score for the last mare
|
||||
UINT8 lastmare; // previous mare
|
||||
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_ToggleFlameJet}, "A_TOGGLEFLAMEJET"},
|
||||
{{A_ItemPop}, "A_ITEMPOP"}, // SRB2kart
|
||||
{{A_RedShellChase}, "A_REDSHELLCHASE"}, // SRB2kart
|
||||
{{A_BobombExplode}, "A_BOBOMBEXPLODE"}, // SRB2kart
|
||||
{{A_JawzChase}, "A_JAWZCHASE"}, // SRB2kart
|
||||
{{A_JawzExplode}, "A_JAWZEXPLODE"}, // SRB2kart
|
||||
{{A_MineExplode}, "A_MINEEXPLODE"}, // SRB2kart
|
||||
{{A_BallhogExplode}, "A_BALLHOGEXPLODE"}, // SRB2kart
|
||||
{{A_OrbitNights}, "A_ORBITNIGHTS"},
|
||||
{{A_GhostMe}, "A_GHOSTME"},
|
||||
{{A_SetObjectState}, "A_SETOBJECTSTATE"},
|
||||
|
@ -3081,10 +3083,11 @@ static void readmaincfg(MYFILE *f)
|
|||
|
||||
// Also save a time attack folder
|
||||
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';
|
||||
|
||||
strncpy(savegamename, timeattackfolder, sizeof (timeattackfolder));
|
||||
strncpy(savegamename, timeattackfolder, filenamelen);
|
||||
strlcat(savegamename, "%u.ssg", sizeof(savegamename));
|
||||
// can't use sprintf since there is %u in savegamename
|
||||
strcatbf(savegamename, srb2home, PATHSEP);
|
||||
|
@ -3181,6 +3184,14 @@ static void readwipes(MYFILE *f)
|
|||
else if (fastcmp(pword, "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))
|
||||
{
|
||||
pword = word + 10;
|
||||
|
@ -5806,15 +5817,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_FIREBALL2",
|
||||
"S_FIREBALL3",
|
||||
"S_FIREBALL4",
|
||||
"S_FIREBALL5",
|
||||
"S_FIREBALL6",
|
||||
"S_FIREBALL7",
|
||||
"S_FIREBALLEXP1",
|
||||
"S_FIREBALLEXP2",
|
||||
"S_FIREBALLEXP3",
|
||||
"S_FIREBALLEXP4",
|
||||
"S_FIREBALLEXP5",
|
||||
"S_FIREBALLEXP6",
|
||||
"S_SHELL",
|
||||
"S_SHELL1",
|
||||
"S_SHELL2",
|
||||
|
@ -6242,9 +6247,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_DRIFTDUST3",
|
||||
"S_DRIFTDUST4",
|
||||
|
||||
// Magnet Burst
|
||||
// Lightning Shield Burst
|
||||
|
||||
// Mushroom Fire Trail
|
||||
// Sneaker Fire Trail
|
||||
"S_KARTFIRE1",
|
||||
"S_KARTFIRE2",
|
||||
"S_KARTFIRE3",
|
||||
|
@ -6254,7 +6259,33 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_KARTFIRE7",
|
||||
"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_FAKEITEM2",
|
||||
"S_FAKEITEM3",
|
||||
|
@ -6283,81 +6314,74 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
//}
|
||||
|
||||
// Banana
|
||||
"S_BANANAITEM",
|
||||
"S_DEADBANANA",
|
||||
"S_BANANA",
|
||||
"S_BANANA_DEAD",
|
||||
|
||||
//{ Green Shell
|
||||
"S_TRIPLEGREENSHIELD1",
|
||||
"S_TRIPLEGREENSHIELD2",
|
||||
"S_TRIPLEGREENSHIELD3",
|
||||
"S_TRIPLEGREENSHIELD4",
|
||||
"S_TRIPLEGREENSHIELD5",
|
||||
"S_TRIPLEGREENSHIELD6",
|
||||
"S_TRIPLEGREENSHIELD7",
|
||||
"S_TRIPLEGREENSHIELD8",
|
||||
"S_GREENSHIELD1",
|
||||
"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",
|
||||
//{ Orbinaut
|
||||
"S_ORBINAUT1",
|
||||
"S_ORBINAUT2",
|
||||
"S_ORBINAUT3",
|
||||
"S_ORBINAUT4",
|
||||
"S_ORBINAUT5",
|
||||
"S_ORBINAUT6",
|
||||
"S_ORBINAUT_SHIELD",
|
||||
"S_ORBINAUT_DEAD",
|
||||
"S_ORBINAUT_SHIELDDEAD",
|
||||
//}
|
||||
//{ Red Shell
|
||||
"S_TRIPLEREDSHIELD1",
|
||||
"S_TRIPLEREDSHIELD2",
|
||||
"S_TRIPLEREDSHIELD3",
|
||||
"S_TRIPLEREDSHIELD4",
|
||||
"S_TRIPLEREDSHIELD5",
|
||||
"S_TRIPLEREDSHIELD6",
|
||||
"S_TRIPLEREDSHIELD7",
|
||||
"S_TRIPLEREDSHIELD8",
|
||||
"S_REDSHIELD1",
|
||||
"S_REDSHIELD2",
|
||||
"S_REDSHIELD3",
|
||||
"S_REDSHIELD4",
|
||||
"S_REDSHIELD5",
|
||||
"S_REDSHIELD6",
|
||||
"S_REDSHIELD7",
|
||||
"S_REDSHIELD8",
|
||||
"S_REDITEM1",
|
||||
"S_REDITEM2",
|
||||
"S_REDITEM3",
|
||||
"S_REDITEM4",
|
||||
"S_REDITEM5",
|
||||
"S_REDITEM6",
|
||||
"S_REDITEM7",
|
||||
"S_REDITEM8",
|
||||
"S_DEADRED",
|
||||
//{ Jawz
|
||||
"S_JAWZ1",
|
||||
"S_JAWZ2",
|
||||
"S_JAWZ3",
|
||||
"S_JAWZ4",
|
||||
"S_JAWZ5",
|
||||
"S_JAWZ6",
|
||||
"S_JAWZ7",
|
||||
"S_JAWZ8",
|
||||
"S_JAWZ_DUD1",
|
||||
"S_JAWZ_DUD2",
|
||||
"S_JAWZ_DUD3",
|
||||
"S_JAWZ_DUD4",
|
||||
"S_JAWZ_DUD5",
|
||||
"S_JAWZ_DUD6",
|
||||
"S_JAWZ_DUD7",
|
||||
"S_JAWZ_DUD8",
|
||||
"S_JAWZ_SHIELD1",
|
||||
"S_JAWZ_SHIELD2",
|
||||
"S_JAWZ_SHIELD3",
|
||||
"S_JAWZ_SHIELD4",
|
||||
"S_JAWZ_SHIELD5",
|
||||
"S_JAWZ_SHIELD6",
|
||||
"S_JAWZ_SHIELD7",
|
||||
"S_JAWZ_SHIELD8",
|
||||
"S_JAWZ_DEAD1",
|
||||
"S_JAWZ_DEAD2",
|
||||
//}
|
||||
|
||||
"S_FIRETRAIL1",
|
||||
"S_FIRETRAIL2",
|
||||
"S_FIRETRAIL3",
|
||||
"S_FIRETRAIL4",
|
||||
"S_FIRETRAIL5",
|
||||
"S_FIRETRAIL6",
|
||||
"S_FIRETRAIL7",
|
||||
"S_FIRETRAIL8",
|
||||
"S_FIRETRAIL9",
|
||||
|
||||
// Bob-omb
|
||||
"S_BOMBSHIELD",
|
||||
"S_BOMBITEM",
|
||||
"S_BOMBAIR",
|
||||
"S_BOMBEXPLODE",
|
||||
"S_BOMBEXPLOSION1",
|
||||
"S_BOMBEXPLOSION2",
|
||||
// Special Stage Mine
|
||||
"S_SSMINE1",
|
||||
"S_SSMINE2",
|
||||
"S_SSMINE3",
|
||||
"S_SSMINE4",
|
||||
"S_SSMINE_SHIELD1",
|
||||
"S_SSMINE_SHIELD2",
|
||||
"S_SSMINE_AIR1",
|
||||
"S_SSMINE_AIR2",
|
||||
"S_SSMINE_DEPLOY1",
|
||||
"S_SSMINE_DEPLOY2",
|
||||
"S_SSMINE_DEPLOY3",
|
||||
"S_SSMINE_DEPLOY4",
|
||||
"S_SSMINE_DEPLOY5",
|
||||
"S_SSMINE_DEPLOY6",
|
||||
"S_SSMINE_DEPLOY7",
|
||||
"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
|
||||
"S_QUICKBOOM1",
|
||||
|
@ -6382,14 +6406,41 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_SLOWBOOM9",
|
||||
"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_BLUELIGHTNING2",
|
||||
"S_BLUELIGHTNING3",
|
||||
"S_BLUELIGHTNING4",
|
||||
"S_BLUEEXPLODE",
|
||||
|
||||
// Lightning
|
||||
// Grow/shrink beams
|
||||
"S_LIGHTNING1",
|
||||
"S_LIGHTNING2",
|
||||
"S_LIGHTNING3",
|
||||
|
@ -6401,14 +6452,13 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_SINKTRAIL2",
|
||||
"S_SINKTRAIL3",
|
||||
|
||||
// Battle Mode balloon
|
||||
"S_BATTLEBALLOON1",
|
||||
"S_BATTLEBALLOON2",
|
||||
"S_BATTLEBALLOON3",
|
||||
// Battle Mode bumper
|
||||
"S_BATTLEBUMPER1",
|
||||
"S_BATTLEBUMPER2",
|
||||
"S_BATTLEBUMPER3",
|
||||
|
||||
// Lakitu
|
||||
"S_LAKITU1",
|
||||
"S_LAKITU2",
|
||||
// DEZ respawn laser
|
||||
"S_DEZLASER",
|
||||
|
||||
// Pokey
|
||||
"S_POKEY1",
|
||||
|
@ -6488,15 +6538,22 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_DOOD_BOX4",
|
||||
"S_DOOD_BOX5",
|
||||
|
||||
// D00Dkart - Diddy Kong Racing Balloon
|
||||
// D00Dkart - Diddy Kong Racing Bumper
|
||||
"S_DOOD_BALLOON",
|
||||
|
||||
// D00Dkart - Big Ring
|
||||
"S_DOOD_RING1",
|
||||
"S_DOOD_RING2",
|
||||
"S_DOOD_RING3",
|
||||
"S_DOOD_RING4",
|
||||
"S_DOOD_RING5",
|
||||
// Chaotix Big Ring
|
||||
"S_BIGRING01",
|
||||
"S_BIGRING02",
|
||||
"S_BIGRING03",
|
||||
"S_BIGRING04",
|
||||
"S_BIGRING05",
|
||||
"S_BIGRING06",
|
||||
"S_BIGRING07",
|
||||
"S_BIGRING08",
|
||||
"S_BIGRING09",
|
||||
"S_BIGRING10",
|
||||
"S_BIGRING11",
|
||||
"S_BIGRING12",
|
||||
|
||||
// SNES Objects
|
||||
"S_SNES_DONUTBUSH1",
|
||||
|
@ -6568,28 +6625,38 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_FIREDITEM3",
|
||||
"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_MUSHROOM",
|
||||
"S_PLAYERARROW_GREENSHELL",
|
||||
"S_PLAYERARROW_BANANA",
|
||||
"S_PLAYERARROW_FAKEITEM",
|
||||
"S_PLAYERARROW_BOO",
|
||||
"S_PLAYERARROW_FEATHER",
|
||||
"S_PLAYERARROW_REDSHELL",
|
||||
"S_PLAYERARROW_BOBOMB",
|
||||
"S_PLAYERARROW_FIREFLOWER",
|
||||
"S_PLAYERARROW_TRIPLEGREENSHELL",
|
||||
"S_PLAYERARROW_TRIPLEBANANA",
|
||||
"S_PLAYERARROW_TRIPLEREDSHELL",
|
||||
"S_PLAYERARROW_STAR",
|
||||
"S_PLAYERARROW_MEGASHROOM",
|
||||
"S_PLAYERARROW_KITCHENSINK",
|
||||
"S_PLAYERARROW_EMPTY",
|
||||
"S_PLAYERARROW_ROULETTE",
|
||||
"S_PLAYERARROW_BOX",
|
||||
"S_PLAYERARROW_ITEM",
|
||||
"S_PLAYERARROW_NUMBER",
|
||||
"S_PLAYERARROW_X",
|
||||
"S_PLAYERARROW_WANTED1",
|
||||
"S_PLAYERARROW_WANTED2",
|
||||
"S_PLAYERARROW_WANTED3",
|
||||
"S_PLAYERARROW_WANTED4",
|
||||
"S_PLAYERARROW_WANTED5",
|
||||
"S_PLAYERARROW_WANTED6",
|
||||
"S_PLAYERARROW_WANTED7",
|
||||
|
||||
"S_PLAYERBOMB", // Player bomb overlay
|
||||
"S_PLAYERITEM", // Player item overlay
|
||||
"S_PLAYERBOMB_WHEEL",
|
||||
|
||||
"S_KARMAWHEEL", // Karma player wheels
|
||||
|
||||
#ifdef SEENAMES
|
||||
"S_NAMECHECK",
|
||||
|
@ -7108,52 +7175,48 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_RANDOMITEM",
|
||||
"MT_RANDOMITEMPOP",
|
||||
|
||||
"MT_MUSHROOMTRAIL",
|
||||
"MT_SNEAKERTRAIL",
|
||||
"MT_SPARKLETRAIL",
|
||||
"MT_INVULNFLASH",
|
||||
"MT_WIPEOUTTRAIL",
|
||||
"MT_DRIFT",
|
||||
"MT_DRIFTDUST",
|
||||
|
||||
"MT_FAKESHIELD",
|
||||
"MT_FAKEITEM",
|
||||
|
||||
"MT_TRIPLEBANANASHIELD1", // Banana Stuff
|
||||
"MT_TRIPLEBANANASHIELD2",
|
||||
"MT_TRIPLEBANANASHIELD3",
|
||||
"MT_BANANASHIELD",
|
||||
"MT_BANANAITEM",
|
||||
"MT_BANANA",
|
||||
"MT_BANANA_SHIELD", // Banana Stuff
|
||||
|
||||
"MT_TRIPLEGREENSHIELD1", // Green shell stuff
|
||||
"MT_TRIPLEGREENSHIELD2",
|
||||
"MT_TRIPLEGREENSHIELD3",
|
||||
"MT_GREENSHIELD",
|
||||
"MT_GREENITEM",
|
||||
"MT_FIRETRAIL",
|
||||
"MT_ORBINAUT", // Orbinaut stuff
|
||||
"MT_ORBINAUT_SHIELD",
|
||||
|
||||
"MT_TRIPLEREDSHIELD1", // Red shell stuff
|
||||
"MT_TRIPLEREDSHIELD2",
|
||||
"MT_TRIPLEREDSHIELD3",
|
||||
"MT_REDSHIELD",
|
||||
"MT_REDITEM",
|
||||
"MT_REDITEMDUD",
|
||||
"MT_JAWZ", // Jawz stuff
|
||||
"MT_JAWZ_DUD",
|
||||
"MT_JAWZ_SHIELD",
|
||||
|
||||
"MT_BOMBSHIELD", // Bob-omb stuff
|
||||
"MT_BOMBITEM",
|
||||
"MT_BOMBEXPLOSION",
|
||||
"MT_BOMBEXPLOSIONSOUND",
|
||||
"MT_SSMINE_SHIELD", // Special Stage Mine stuff
|
||||
"MT_SSMINE",
|
||||
"MT_MINEEXPLOSION",
|
||||
"MT_MINEEXPLOSIONSOUND",
|
||||
|
||||
"MT_SMOLDERING", // New explosion
|
||||
"MT_BOOMEXPLODE",
|
||||
"MT_BOOMPARTICLE",
|
||||
|
||||
"MT_BLUELIGHTNING", // Lightning stuff
|
||||
"MT_BALLHOG", // Ballhog
|
||||
"MT_BALLHOGBOOM",
|
||||
|
||||
"MT_BLUELIGHTNING", // Grow/shrink stuff
|
||||
"MT_BLUEEXPLOSION",
|
||||
"MT_LIGHTNING",
|
||||
|
||||
"MT_SINK", // Kitchen Sink Stuff
|
||||
"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.
|
||||
|
||||
|
@ -7189,7 +7252,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_DOOD_FLOWER4",
|
||||
"MT_DOOD_BOX",
|
||||
"MT_DOOD_BALLOON",
|
||||
"MT_DOOD_RING",
|
||||
"MT_BIGRING",
|
||||
|
||||
"MT_SNES_DONUTBUSH1",
|
||||
"MT_SNES_DONUTBUSH2",
|
||||
|
@ -7224,7 +7287,14 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
|
||||
"MT_FIREDITEM",
|
||||
|
||||
"MT_INSTASHIELDA",
|
||||
"MT_INSTASHIELDB",
|
||||
|
||||
"MT_PLAYERARROW",
|
||||
"MT_PLAYERWANTED",
|
||||
|
||||
"MT_KARMAHITBOX",
|
||||
"MT_KARMAWHEEL",
|
||||
|
||||
#ifdef SEENAMES
|
||||
"MT_NAMECHECK",
|
||||
|
@ -7349,8 +7419,8 @@ static const char *const PLAYERFLAG_LIST[] = {
|
|||
// Did you get a time-over?
|
||||
"TIMEOVER",
|
||||
|
||||
// Ready for Super?
|
||||
"SUPERREADY",
|
||||
// SRB2Kart: spectator that wants to join
|
||||
"WANTSTOJOIN",
|
||||
|
||||
// Character action status
|
||||
"JUMPED",
|
||||
|
@ -7428,64 +7498,64 @@ static const char *COLOR_ENUMS[] = { // Rejigged for Kart.
|
|||
"SILVER", // 03 // SKINCOLOR_SILVER
|
||||
"CLOUDY", // 04 // SKINCOLOR_CLOUDY
|
||||
"GREY", // 05 // SKINCOLOR_GREY
|
||||
"DARKGREY", // 06 // SKINCOLOR_DARKGREY
|
||||
"NICKEL", // 06 // SKINCOLOR_NICKEL
|
||||
"BLACK", // 07 // SKINCOLOR_BLACK
|
||||
"SALMON", // 08 // SKINCOLOR_SALMON
|
||||
"PINK", // 09 // SKINCOLOR_PINK
|
||||
"LIGHTRED", // 10 // SKINCOLOR_LIGHTRED
|
||||
"SHINYRED", // 11 // SKINCOLOR_SHINYRED
|
||||
"ROSE", // 10 // SKINCOLOR_ROSE
|
||||
"RASPBERRY", // 11 // SKINCOLOR_RASPBERRY
|
||||
"RED", // 12 // SKINCOLOR_RED
|
||||
"DARKPINK", // 13 // SKINCOLOR_DARKPINK
|
||||
"DARKRED", // 14 // SKINCOLOR_DARKRED
|
||||
"RUBY", // 13 // SKINCOLOR_RUBY
|
||||
"CRIMSON", // 14 // SKINCOLOR_CRIMSON
|
||||
"DAWN", // 15 // SKINCOLOR_DAWN
|
||||
"ORANGE", // 16 // SKINCOLOR_ORANGE
|
||||
"SHINYORANGE", // 17 // SKINCOLOR_SHINYORANGE
|
||||
"DARKORANGE", // 18 // SKINCOLOR_DARKORANGE
|
||||
"GOLDENBROWN", // 19 // SKINCOLOR_GOLDENBROWN
|
||||
"ROSEWOOD", // 20 // SKINCOLOR_ROSEWOOD
|
||||
"DARKROSEWOOD", // 21 // SKINCOLOR_DARKROSEWOOD
|
||||
"CREAMSICLE", // 16 // SKINCOLOR_CREAMSICLE
|
||||
"ORANGE", // 17 // SKINCOLOR_ORANGE
|
||||
"PUMPKIN", // 18 // SKINCOLOR_PUMPKIN
|
||||
"ROSEWOOD", // 19 // SKINCOLOR_ROSEWOOD
|
||||
"BURGUNDY", // 20 // SKINCOLOR_BURGUNDY
|
||||
"BRONZE", // 21 // SKINCOLOR_BRONZE
|
||||
"SEPIA", // 22 // SKINCOLOR_SEPIA
|
||||
"BEIGE", // 23 // SKINCOLOR_BEIGE
|
||||
"BROWN", // 24 // SKINCOLOR_BROWN
|
||||
"LEATHER", // 25 // SKINCOLOR_LEATHER
|
||||
"YELLOW", // 26 // SKINCOLOR_YELLOW
|
||||
"PEACH", // 27 // SKINCOLOR_PEACH
|
||||
"LIGHTORANGE", // 28 // SKINCOLOR_LIGHTORANGE
|
||||
"CARAMEL", // 29 // SKINCOLOR_CARAMEL
|
||||
"GOLD", // 30 // SKINCOLOR_GOLD
|
||||
"SHINYCARAMEL", // 31 // SKINCOLOR_SHINYCARAMEL
|
||||
"VOMIT", // 32 // SKINCOLOR_VOMIT
|
||||
"GARDEN", // 33 // SKINCOLOR_GARDEN
|
||||
"LIGHTARMY", // 34 // SKINCOLOR_LIGHTARMY
|
||||
"ARMY", // 35 // SKINCOLOR_ARMY
|
||||
"PISTACHIO", // 36 // SKINCOLOR_PISTACHIO
|
||||
"ROBOHOOD", // 37 // SKINCOLOR_ROBOHOOD
|
||||
"OLIVE", // 38 // SKINCOLOR_OLIVE
|
||||
"DARKARMY", // 39 // SKINCOLOR_DARKARMY
|
||||
"LIGHTGREEN", // 40 // SKINCOLOR_LIGHTGREEN
|
||||
"UGLYGREEN", // 41 // SKINCOLOR_UGLYGREEN
|
||||
"NEONGREEN", // 42 // SKINCOLOR_NEONGREEN
|
||||
"GREEN", // 43 // SKINCOLOR_GREEN
|
||||
"DARKGREEN", // 44 // SKINCOLOR_DARKGREEN
|
||||
"PEACH", // 26 // SKINCOLOR_PEACH
|
||||
"CARAMEL", // 27 // SKINCOLOR_CARAMEL
|
||||
"TANGERINE", // 28 // SKINCOLOR_TANGERINE
|
||||
"GOLD", // 29 // SKINCOLOR_GOLD
|
||||
"VOMIT", // 30 // SKINCOLOR_VOMIT
|
||||
"YELLOW", // 31 // SKINCOLOR_YELLOW
|
||||
"CANARY", // 32 // SKINCOLOR_CANARY
|
||||
"OLIVE", // 33 // SKINCOLOR_OLIVE
|
||||
"GARDEN", // 34 // SKINCOLOR_GARDEN
|
||||
"LIME", // 35 // SKINCOLOR_LIME
|
||||
"TEA", // 36 // SKINCOLOR_TEA
|
||||
"ARMY", // 37 // SKINCOLOR_ARMY
|
||||
"PISTACHIO", // 38 // SKINCOLOR_PISTACHIO
|
||||
"MOSS", // 39 // SKINCOLOR_MOSS
|
||||
"MINT", // 40 // SKINCOLOR_MINT
|
||||
"GREEN", // 41 // SKINCOLOR_GREEN
|
||||
"ROBOHOOD", // 42 // SKINCOLOR_ROBOHOOD
|
||||
"PINETREE", // 43 // SKINCOLOR_PINETREE
|
||||
"EMERALD", // 44 // SKINCOLOR_EMERALD
|
||||
"SWAMP", // 45 // SKINCOLOR_SWAMP
|
||||
"FROST", // 46 // SKINCOLOR_FROST
|
||||
"SLATE", // 47 // SKINCOLOR_SLATE
|
||||
"LIGHTBLUE", // 48 // SKINCOLOR_LIGHTBLUE
|
||||
"CYAN", // 49 // SKINCOLOR_CYAN
|
||||
"CERULEAN", // 50 // SKINCOLOR_CERULEAN
|
||||
"TURQUOISE", // 51 // SKINCOLOR_TURQUOISE
|
||||
"TEAL", // 52 // SKINCOLOR_TEAL
|
||||
"STEELBLUE", // 53 // SKINCOLOR_STEELBLUE
|
||||
"BLUE", // 54 // SKINCOLOR_BLUE
|
||||
"SHINYBLUE", // 55 // SKINCOLOR_SHINYBLUE
|
||||
"AQUA", // 46 // SKINCOLOR_AQUA
|
||||
"TEAL", // 47 // SKINCOLOR_TEAL
|
||||
"CYAN", // 48 // SKINCOLOR_CYAN
|
||||
"CERULEAN", // 49 // SKINCOLOR_CERULEAN
|
||||
"SLATE", // 50 // SKINCOLOR_SLATE
|
||||
"STEEL", // 51 // SKINCOLOR_STEEL
|
||||
"PERIWINKLE", // 52 // SKINCOLOR_PERIWINKLE
|
||||
"BLUE", // 53 // SKINCOLOR_BLUE
|
||||
"SAPPHIRE", // 54 // SKINCOLOR_SAPPHIRE
|
||||
"BLUEBERRY", // 55 // SKINCOLOR_BLUEBERRY
|
||||
"NAVY", // 56 // SKINCOLOR_NAVY
|
||||
"DARKBLUE", // 57 // SKINCOLOR_DARKBLUE
|
||||
"JETBLACK", // 58 // SKINCOLOR_JETBLACK
|
||||
"LILAC", // 59 // SKINCOLOR_LILAC
|
||||
"PURPLE", // 60 // SKINCOLOR_PURPLE
|
||||
"LAVENDER", // 61 // SKINCOLOR_LAVENDER
|
||||
"JET", // 57 // SKINCOLOR_JET
|
||||
"DUSK", // 58 // SKINCOLOR_DUSK
|
||||
"PURPLE", // 59 // SKINCOLOR_PURPLE
|
||||
"LAVENDER", // 60 // SKINCOLOR_LAVENDER
|
||||
"INDIGO", // 61 // SKINCOLOR_INDIGO
|
||||
"BYZANTIUM", // 62 // SKINCOLOR_BYZANTIUM
|
||||
"INDIGO", // 63 // SKINCOLOR_INDIGO
|
||||
"LILAC", // 63 // SKINCOLOR_LILAC
|
||||
|
||||
// Super special awesome Super flashing colors!
|
||||
"SUPER1", // SKINCOLOR_SUPER1
|
||||
|
@ -7550,17 +7620,16 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"NEXTCHECK",
|
||||
"WAYPOINT",
|
||||
"STARPOSTWP",
|
||||
"LAKITU",
|
||||
"RESPAWN",
|
||||
|
||||
"THROWDIR",
|
||||
"LAPANIMATION",
|
||||
//"LAPANIMATION",
|
||||
"CARDANIMATION",
|
||||
"VOICES",
|
||||
"TAUNTVOICES",
|
||||
"INSTASHIELD",
|
||||
|
||||
"BOOSTING",
|
||||
"FLOORBOOST",
|
||||
"SPINOUT",
|
||||
"SPINOUTTYPE",
|
||||
|
||||
"DRIFT",
|
||||
|
@ -7570,53 +7639,42 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"BOOSTCHARGE",
|
||||
"JMP",
|
||||
"OFFROAD",
|
||||
"POGOSPRING",
|
||||
"BRAKESTOP",
|
||||
"WATERSKIP",
|
||||
|
||||
"ITEMROULETTE",
|
||||
"ROULETTETYPE",
|
||||
"ITEMCLOSE",
|
||||
|
||||
"MAGNETTIMER",
|
||||
"BOOTIMER",
|
||||
"BOOTAKETIMER",
|
||||
"BOOSTOLENTIMER",
|
||||
"MUSHROOMTIMER",
|
||||
// Item held stuff
|
||||
"ITEMTYPE",
|
||||
"ITEMAMOUNT",
|
||||
"ITEMHELD",
|
||||
|
||||
// Some items use timers for their duration or effects
|
||||
"ATTRACTIONTIMER",
|
||||
"HYUDOROTIMER",
|
||||
"STEALINGTIMER",
|
||||
"STOLENTIMER",
|
||||
"SNEAKERTIMER",
|
||||
"GROWSHRINKTIMER",
|
||||
"SQUISHEDTIMER",
|
||||
"GOLDSHROOMTIMER",
|
||||
"STARTIMER",
|
||||
"SPINOUTTIMER",
|
||||
"LASERWISPTIMER",
|
||||
"JUSTBUMPED",
|
||||
"ROCKETSNEAKERTIMER",
|
||||
"INVINCIBILITYTIMER",
|
||||
"DEATHSENTENCE",
|
||||
"POWERITEMTIMER",
|
||||
"EGGMANHELD",
|
||||
"BANANADRAG",
|
||||
"SPINOUTTIMER",
|
||||
"WIPEOUTSLOW",
|
||||
"JUSTBUMPED",
|
||||
"COMEBACKTIMER",
|
||||
"SADTIMER",
|
||||
|
||||
"MAGNET",
|
||||
"BOO",
|
||||
"MUSHROOM",
|
||||
"MEGASHROOM",
|
||||
"GOLDSHROOM",
|
||||
"STAR",
|
||||
"TRIPLEBANANA",
|
||||
"FAKEITEM",
|
||||
"BANANA",
|
||||
"GREENSHELL",
|
||||
"REDSHELL",
|
||||
"LASERWISP",
|
||||
"TRIPLEGREENSHELL",
|
||||
"BOBOMB",
|
||||
"BLUESHELL",
|
||||
"JAWS",
|
||||
"FIREFLOWER",
|
||||
"TRIPLEREDSHELL",
|
||||
"LIGHTNING",
|
||||
"FEATHER",
|
||||
"KITCHENSINK",
|
||||
|
||||
"BALLOON",
|
||||
// Battle Mode vars
|
||||
"BUMPER",
|
||||
"COMEBACKPOINTS",
|
||||
"COMEBACKMODE"
|
||||
"COMEBACKMODE",
|
||||
"WANTED",
|
||||
};
|
||||
|
||||
static const char *const HUDITEMS_LIST[] = {
|
||||
|
@ -8494,7 +8552,7 @@ fixed_t get_number(const char *word)
|
|||
#endif
|
||||
}
|
||||
|
||||
void FUNCMATH DEH_Check(void)
|
||||
void DEH_Check(void)
|
||||
{
|
||||
#if defined(_DEBUG) || defined(PARANOIA)
|
||||
const size_t dehstates = sizeof(STATE_LIST)/sizeof(const char*);
|
||||
|
|
|
@ -207,8 +207,8 @@ typedef struct
|
|||
|
||||
#define ZSHIFT 4
|
||||
|
||||
extern const char *Color_Names[MAXSKINCOLORS];
|
||||
extern const UINT8 Color_Opposite[MAXSKINCOLORS*2];
|
||||
//extern const char *Color_Names[MAXSKINCOLORS];
|
||||
//extern const UINT8 Color_Opposite[MAXSKINCOLORS*2];
|
||||
|
||||
#define NUMMAPS 1035
|
||||
|
||||
|
|
|
@ -161,6 +161,9 @@ extern FILE *logstream;
|
|||
// Comment or uncomment this as necessary.
|
||||
//#define USE_PATCH_DTA
|
||||
|
||||
// Kart has it's own, as well.
|
||||
#define USE_PATCH_KART
|
||||
|
||||
// Modification options
|
||||
// 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
|
||||
|
@ -234,64 +237,64 @@ typedef enum
|
|||
SKINCOLOR_SILVER,
|
||||
SKINCOLOR_CLOUDY,
|
||||
SKINCOLOR_GREY,
|
||||
SKINCOLOR_DARKGREY,
|
||||
SKINCOLOR_NICKEL,
|
||||
SKINCOLOR_BLACK,
|
||||
SKINCOLOR_SALMON,
|
||||
SKINCOLOR_PINK,
|
||||
SKINCOLOR_LIGHTRED,
|
||||
SKINCOLOR_SHINYRED,
|
||||
SKINCOLOR_ROSE,
|
||||
SKINCOLOR_RASPBERRY,
|
||||
SKINCOLOR_RED,
|
||||
SKINCOLOR_DARKPINK,
|
||||
SKINCOLOR_DARKRED,
|
||||
SKINCOLOR_RUBY,
|
||||
SKINCOLOR_CRIMSON,
|
||||
SKINCOLOR_DAWN,
|
||||
SKINCOLOR_CREAMSICLE,
|
||||
SKINCOLOR_ORANGE,
|
||||
SKINCOLOR_SHINYORANGE,
|
||||
SKINCOLOR_DARKORANGE,
|
||||
SKINCOLOR_GOLDENBROWN,
|
||||
SKINCOLOR_PUMPKIN,
|
||||
SKINCOLOR_ROSEWOOD,
|
||||
SKINCOLOR_DARKROSEWOOD,
|
||||
SKINCOLOR_BURGUNDY,
|
||||
SKINCOLOR_BRONZE,
|
||||
SKINCOLOR_SEPIA,
|
||||
SKINCOLOR_BEIGE,
|
||||
SKINCOLOR_BROWN,
|
||||
SKINCOLOR_LEATHER,
|
||||
SKINCOLOR_YELLOW,
|
||||
SKINCOLOR_PEACH,
|
||||
SKINCOLOR_LIGHTORANGE,
|
||||
SKINCOLOR_CARAMEL,
|
||||
SKINCOLOR_TANGERINE,
|
||||
SKINCOLOR_GOLD,
|
||||
SKINCOLOR_SHINYCARAMEL,
|
||||
SKINCOLOR_VOMIT,
|
||||
SKINCOLOR_YELLOW,
|
||||
SKINCOLOR_CANARY,
|
||||
SKINCOLOR_OLIVE,
|
||||
SKINCOLOR_GARDEN,
|
||||
SKINCOLOR_LIGHTARMY,
|
||||
SKINCOLOR_LIME,
|
||||
SKINCOLOR_TEA,
|
||||
SKINCOLOR_ARMY,
|
||||
SKINCOLOR_PISTACHIO,
|
||||
SKINCOLOR_ROBOHOOD,
|
||||
SKINCOLOR_OLIVE,
|
||||
SKINCOLOR_DARKARMY,
|
||||
SKINCOLOR_LIGHTGREEN,
|
||||
SKINCOLOR_UGLYGREEN,
|
||||
SKINCOLOR_NEONGREEN,
|
||||
SKINCOLOR_MOSS,
|
||||
SKINCOLOR_MINT,
|
||||
SKINCOLOR_GREEN,
|
||||
SKINCOLOR_DARKGREEN,
|
||||
SKINCOLOR_ROBOHOOD,
|
||||
SKINCOLOR_PINETREE,
|
||||
SKINCOLOR_EMERALD,
|
||||
SKINCOLOR_SWAMP,
|
||||
SKINCOLOR_FROST,
|
||||
SKINCOLOR_SLATE,
|
||||
SKINCOLOR_LIGHTBLUE,
|
||||
SKINCOLOR_AQUA,
|
||||
SKINCOLOR_TEAL,
|
||||
SKINCOLOR_CYAN,
|
||||
SKINCOLOR_CERULEAN,
|
||||
SKINCOLOR_TURQUOISE,
|
||||
SKINCOLOR_TEAL,
|
||||
SKINCOLOR_STEELBLUE,
|
||||
SKINCOLOR_SLATE,
|
||||
SKINCOLOR_STEEL,
|
||||
SKINCOLOR_PERIWINKLE,
|
||||
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_DARKBLUE,
|
||||
SKINCOLOR_JETBLACK,
|
||||
SKINCOLOR_LILAC,
|
||||
SKINCOLOR_JET,
|
||||
SKINCOLOR_DUSK,
|
||||
SKINCOLOR_PURPLE,
|
||||
SKINCOLOR_LAVENDER,
|
||||
SKINCOLOR_BYZANTIUM,
|
||||
SKINCOLOR_INDIGO,
|
||||
SKINCOLOR_BYZANTIUM,
|
||||
SKINCOLOR_LILAC,
|
||||
|
||||
// Careful! MAXSKINCOLORS cannot be greater than 0x40 -- Which it is now.
|
||||
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.
|
||||
#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__
|
||||
|
|
|
@ -80,6 +80,7 @@ extern INT16 gametype;
|
|||
extern UINT8 splitscreen;
|
||||
extern boolean circuitmap; // Does this level have 'circuit mode'?
|
||||
extern boolean fromlevelselect;
|
||||
extern boolean forceresetplayers;
|
||||
|
||||
// ========================================
|
||||
// Internal parameters for sound rendering.
|
||||
|
@ -303,21 +304,19 @@ enum TypeOfLevel
|
|||
};
|
||||
|
||||
// Gametypes
|
||||
enum GameType
|
||||
enum GameType // SRB2Kart
|
||||
{
|
||||
GT_COOP = 0, // also used in single player
|
||||
GT_COMPETITION, // Classic "Race"
|
||||
GT_RACE,
|
||||
GT_RACE = 0, // also used in record attack
|
||||
GT_MATCH, // battle, but renaming would be silly
|
||||
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_TAG,
|
||||
GT_HIDEANDSEEK,
|
||||
|
||||
GT_CTF, // capture the flag
|
||||
|
||||
NUMGAMETYPES
|
||||
GT_CTF
|
||||
};
|
||||
// If you alter this list, update gametype_cons_t in m_menu.c
|
||||
|
||||
|
@ -409,12 +408,17 @@ extern UINT16 spacetimetics;
|
|||
extern UINT16 extralifetics;
|
||||
|
||||
// SRB2kart
|
||||
extern INT32 bootime;
|
||||
extern INT32 boostealtime;
|
||||
extern INT32 mushroomtime;
|
||||
extern tic_t introtime;
|
||||
extern tic_t starttime;
|
||||
extern INT32 hyudorotime;
|
||||
extern INT32 stealtime;
|
||||
extern INT32 sneakertime;
|
||||
extern INT32 itemtime;
|
||||
extern INT32 comebacktime;
|
||||
extern INT32 bumptime;
|
||||
extern INT32 wipeoutslowtime;
|
||||
extern INT32 wantedreduce;
|
||||
extern INT32 wantedfrequency;
|
||||
|
||||
extern UINT8 introtoplay;
|
||||
extern UINT8 creditscutscene;
|
||||
|
@ -445,15 +449,18 @@ extern boolean franticitems;
|
|||
extern boolean mirrormode;
|
||||
extern boolean comeback;
|
||||
|
||||
extern tic_t lightningcooldown;
|
||||
extern tic_t blueshellincoming;
|
||||
extern UINT8 blueshellplayer;
|
||||
extern SINT8 battlewanted[4];
|
||||
extern tic_t wantedcalcdelay;
|
||||
extern tic_t indirectitemcooldown;
|
||||
extern tic_t spbincoming;
|
||||
extern UINT8 spbplayer;
|
||||
extern tic_t mapreset;
|
||||
|
||||
extern boolean legitimateexit;
|
||||
extern boolean comebackshowninfo;
|
||||
extern tic_t curlap, bestlap;
|
||||
|
||||
extern INT16 votelevels[4];
|
||||
extern INT16 votelevels[5][2];
|
||||
extern SINT8 votes[MAXPLAYERS];
|
||||
extern SINT8 pickedvote;
|
||||
|
||||
|
|
120
src/f_finale.c
120
src/f_finale.c
|
@ -58,6 +58,9 @@ static patch_t *ttkart; // *vroom* KART
|
|||
static patch_t *ttcheckers; // *vroom* KART
|
||||
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);
|
||||
|
||||
//
|
||||
|
@ -525,6 +528,7 @@ static const char *credits[] = {
|
|||
"\"Nev3r\"",
|
||||
"\"Ritz\"",
|
||||
"\"Spherallic\"",
|
||||
"\"DirkTheHusky\"",
|
||||
"",
|
||||
"\1Produced By",
|
||||
"Kart Krew",
|
||||
|
@ -590,7 +594,7 @@ void F_CreditDrawer(void)
|
|||
UINT16 i;
|
||||
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
|
||||
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;
|
||||
break;
|
||||
}
|
||||
if (FixedMul(y,vid.dupy) > vid.height)
|
||||
if (((y>>FRACBITS) * vid.dupy) > vid.height)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -682,13 +686,20 @@ boolean F_CreditResponder(event_t *event)
|
|||
break;
|
||||
}
|
||||
|
||||
/*if (!(timesBeaten) && !(netgame || multiplayer))
|
||||
return false;*/
|
||||
|
||||
if (event->type != ev_keydown)
|
||||
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;
|
||||
|
||||
if (keypressed)
|
||||
|
@ -903,36 +914,52 @@ void F_TitleScreenDrawer(void)
|
|||
if (modeattacking)
|
||||
return; // We likely came here from retrying. Don't do a damn thing.
|
||||
|
||||
if (finalecount < 50)
|
||||
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.
|
||||
// Don't draw outside of the title screen, or if the patch isn't there.
|
||||
if (!ttbanner || (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS))
|
||||
{
|
||||
F_SkyScroll(titlescrollspeed);
|
||||
return;
|
||||
}
|
||||
|
||||
if (finalecount < 50)
|
||||
{
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
|
||||
V_DrawSmallScaledPatch(84, 36, 0, ttbanner);
|
||||
|
||||
if (finalecount < 20)
|
||||
{
|
||||
if (finalecount >= 10)
|
||||
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);
|
||||
}
|
||||
else if (finalecount < 52)
|
||||
{
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120);
|
||||
V_DrawSmallScaledPatch(84, 36, 0, ttkflash);
|
||||
}
|
||||
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(280<<FRACBITS, -(40<<FRACBITS) + FixedMul(40<<FRACBITS, FixedDiv(finalecount%70, 70)), V_SNAPTOTOP|V_SNAPTORIGHT, ttcheckers, FRACUNIT);
|
||||
}
|
||||
|
||||
if (finalecount >= 50 && finalecount < 55)
|
||||
{
|
||||
V_DrawFill(0, 0, 320, 200, 120);
|
||||
V_DrawSmallScaledPatch(84, 36, 0, ttkflash);
|
||||
if (transval)
|
||||
V_DrawFadeScreen(120, 10 - transval);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
// ================
|
||||
// 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
|
||||
// ==========
|
||||
|
|
|
@ -35,10 +35,14 @@ void F_CutsceneTicker(void);
|
|||
void F_TitleDemoTicker(void);
|
||||
|
||||
// Called by main loop.
|
||||
FUNCMATH void F_GameEndDrawer(void);
|
||||
void F_GameEndDrawer(void);
|
||||
void F_IntroDrawer(void);
|
||||
void F_TitleScreenDrawer(void);
|
||||
|
||||
void F_StartWaitingPlayers(void);
|
||||
void F_WaitingPlayersTicker(void);
|
||||
void F_WaitingPlayersDrawer(void);
|
||||
|
||||
void F_GameEvaluationDrawer(void);
|
||||
void F_StartGameEvaluation(void);
|
||||
void F_GameEvaluationTicker(void);
|
||||
|
@ -78,6 +82,7 @@ enum
|
|||
|
||||
wipe_level_toblack,
|
||||
wipe_intermission_toblack,
|
||||
wipe_voting_toblack,
|
||||
wipe_continuing_toblack,
|
||||
wipe_titlescreen_toblack,
|
||||
wipe_timeattack_toblack,
|
||||
|
@ -94,6 +99,7 @@ enum
|
|||
|
||||
wipe_level_final,
|
||||
wipe_intermission_final,
|
||||
wipe_voting_final,
|
||||
wipe_continuing_final,
|
||||
wipe_titlescreen_final,
|
||||
wipe_timeattack_final,
|
||||
|
@ -107,9 +113,10 @@ enum
|
|||
wipe_specinter_final,
|
||||
wipe_multinter_final,
|
||||
|
||||
NUMWIPEDEFS
|
||||
NUMWIPEDEFS,
|
||||
WIPEFINALSHIFT = wipe_level_final - wipe_level_toblack
|
||||
};
|
||||
#define WIPEFINALSHIFT 13
|
||||
|
||||
extern UINT8 wipedefs[NUMWIPEDEFS];
|
||||
|
||||
#endif
|
||||
|
|
10
src/f_wipe.c
10
src/f_wipe.c
|
@ -47,6 +47,7 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
|||
|
||||
0, // wipe_level_toblack
|
||||
UINT8_MAX, // wipe_intermission_toblack
|
||||
0, // wipe_voting_toblack,
|
||||
UINT8_MAX, // wipe_continuing_toblack
|
||||
3, // wipe_titlescreen_toblack
|
||||
0, // wipe_timeattack_toblack
|
||||
|
@ -56,12 +57,13 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
|
|||
UINT8_MAX, // wipe_intro_toblack (hardcoded)
|
||||
UINT8_MAX, // wipe_cutscene_toblack (hardcoded)
|
||||
|
||||
0, // wipe_specinter_toblack
|
||||
0, // wipe_multinter_toblack
|
||||
0, // wipe_speclevel_towhite
|
||||
UINT8_MAX, // wipe_specinter_toblack
|
||||
UINT8_MAX, // wipe_multinter_toblack
|
||||
99, // wipe_speclevel_towhite
|
||||
|
||||
0, // wipe_level_final
|
||||
3, // wipe_level_final
|
||||
0, // wipe_intermission_final
|
||||
0, // wipe_voting_final
|
||||
0, // wipe_continuing_final
|
||||
3, // wipe_titlescreen_final
|
||||
0, // wipe_timeattack_final
|
||||
|
|
353
src/g_game.c
353
src/g_game.c
|
@ -95,7 +95,7 @@ boolean imcontinuing = false;
|
|||
boolean runemeraldmanager = false;
|
||||
|
||||
// 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 demoIdleTime = 3*TICRATE;
|
||||
|
||||
|
@ -132,7 +132,7 @@ boolean useNightsSS = false;
|
|||
UINT8 skincolor_redteam = SKINCOLOR_RED;
|
||||
UINT8 skincolor_blueteam = SKINCOLOR_BLUE;
|
||||
UINT8 skincolor_redring = SKINCOLOR_RED;
|
||||
UINT8 skincolor_bluering = SKINCOLOR_STEELBLUE;
|
||||
UINT8 skincolor_bluering = SKINCOLOR_STEEL;
|
||||
|
||||
tic_t countdowntimer = 0;
|
||||
boolean countdowntimeup = false;
|
||||
|
@ -207,12 +207,17 @@ UINT16 spacetimetics = 11*TICRATE + (TICRATE/2);
|
|||
UINT16 extralifetics = 4*TICRATE;
|
||||
|
||||
// SRB2kart
|
||||
INT32 bootime = 7*TICRATE;
|
||||
INT32 boostealtime = TICRATE/2;
|
||||
INT32 mushroomtime = TICRATE + (TICRATE/3);
|
||||
tic_t introtime = 108+5; // plus 5 for white fade
|
||||
tic_t starttime = 6*TICRATE + (3*TICRATE/4);
|
||||
INT32 hyudorotime = 7*TICRATE;
|
||||
INT32 stealtime = TICRATE/2;
|
||||
INT32 sneakertime = TICRATE + (TICRATE/3);
|
||||
INT32 itemtime = 8*TICRATE;
|
||||
INT32 comebacktime = 10*TICRATE;
|
||||
INT32 bumptime = 6;
|
||||
INT32 wipeoutslowtime = 20;
|
||||
INT32 wantedreduce = 5*TICRATE;
|
||||
INT32 wantedfrequency = 10*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
|
||||
|
||||
// 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 pickedvote; // What vote the host rolls
|
||||
|
||||
// Server-sided variables
|
||||
tic_t lightningcooldown; // Cooldown before any more lightning/blue shell is awarded
|
||||
tic_t blueshellincoming; // Timer before blue shell hits, can switch targets at this point
|
||||
UINT8 blueshellplayer; // Player num that used the last blue shell
|
||||
// Server-sided, synched variables
|
||||
SINT8 battlewanted[4]; // WANTED players in battle, worth x2 points
|
||||
tic_t wantedcalcdelay; // Time before it recalculates WANTED
|
||||
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 comebackshowninfo; // Have you already seen the "ATTACK OR PROTECT" message?
|
||||
tic_t curlap; // Current 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;
|
||||
|
||||
|
@ -307,13 +315,6 @@ static struct {
|
|||
|
||||
// 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;
|
||||
demoghost *ghosts = NULL;
|
||||
|
||||
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
|
||||
const INT32 speed = 1;
|
||||
// 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;
|
||||
camera_t *thiscam;
|
||||
angle_t lang;
|
||||
|
@ -1286,6 +1287,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
break;
|
||||
}
|
||||
|
||||
usejoystick = (analogjoystickmove || gamepadjoystickmove);
|
||||
turnright = InputDown(gc_turnright, 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));
|
||||
}
|
||||
|
||||
// Bounce pad strafing
|
||||
if (!demoplayback && ((player->pflags & PF_FORCESTRAFE) || (player->kartstuff[k_feather] & 2)))
|
||||
// Speed bump strafing
|
||||
if (!demoplayback && ((player->pflags & PF_FORCESTRAFE) || (player->kartstuff[k_pogospring])))
|
||||
{
|
||||
if (turnright)
|
||||
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 (InputDown(gc_accelerate, ssplayer) || (cv_usejoystick.value && axis > 0))
|
||||
if (InputDown(gc_accelerate, ssplayer) || (usejoystick && axis > 0))
|
||||
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;
|
||||
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];
|
||||
if (InputDown(gc_aimbackward, ssplayer) || (gamepadjoystickmove && axis > 0) || (analogjoystickmove && axis > 0))
|
||||
if (InputDown(gc_aimbackward, ssplayer) || (usejoystick && axis > 0))
|
||||
forward -= forwardmove[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
// forward with key or button // SRB2kart - we use an accel/brake instead of forward/backward.
|
||||
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;
|
||||
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.
|
||||
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;
|
||||
if (InputDown(gc_aimbackward, ssplayer) || (cv_usejoystick.value && axis > 0))
|
||||
if (InputDown(gc_aimbackward, ssplayer) || (usejoystick && axis > 0))
|
||||
cmd->buttons |= BT_BACKWARD;
|
||||
}
|
||||
|
||||
// fire with any button/key
|
||||
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;
|
||||
|
||||
// drift with any button/key
|
||||
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;
|
||||
|
||||
// Lua scriptable buttons
|
||||
|
@ -1534,6 +1517,29 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
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);
|
||||
|
||||
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
|
||||
/*if (gametype != GT_RACE)
|
||||
{
|
||||
if (players[consoleplayer].kartstuff[k_balloon] > 0)
|
||||
if (players[consoleplayer].kartstuff[k_bumper] > 0)
|
||||
continue;
|
||||
}*/
|
||||
|
||||
|
@ -1928,7 +1934,7 @@ boolean G_Responder(event_t *ev)
|
|||
else if (gamestate == GS_GAMEEND || gamestate == GS_EVALUATION || gamestate == GS_CREDITS)
|
||||
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))
|
||||
return true; // chat ate the event
|
||||
|
||||
|
@ -2181,9 +2187,13 @@ void G_Ticker(boolean run)
|
|||
break;
|
||||
|
||||
case GS_TITLESCREEN:
|
||||
case GS_WAITINGPLAYERS:
|
||||
F_TitleScreenTicker(run);
|
||||
break;
|
||||
case GS_WAITINGPLAYERS:
|
||||
if (netgame)
|
||||
F_WaitingPlayersTicker();
|
||||
HU_Ticker();
|
||||
break;
|
||||
|
||||
case GS_DEDICATEDSERVER:
|
||||
case GS_NULL:
|
||||
|
@ -2192,6 +2202,11 @@ void G_Ticker(boolean 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)
|
||||
pausedelay--;
|
||||
|
||||
|
@ -2244,13 +2259,26 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
|||
p->starpostnum = 0;
|
||||
p->starpostcount = 0;
|
||||
|
||||
if (rendermode == render_soft)
|
||||
V_SetPaletteLump(GetPalette()); // Reset the palette
|
||||
|
||||
// SRB2kart: Increment the "matches played" counter.
|
||||
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)
|
||||
{
|
||||
UINT8 i = 0;
|
||||
|
||||
if (netgame)
|
||||
{
|
||||
// check to see if there's anyone else at all
|
||||
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))
|
||||
|
@ -2259,6 +2287,7 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
|||
G_SaveGameData(true); // only save if unlocked something
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
legitimateexit = false;
|
||||
}
|
||||
|
@ -2271,7 +2300,7 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
|||
void G_PlayerReborn(INT32 player)
|
||||
{
|
||||
player_t *p;
|
||||
INT32 score;
|
||||
INT32 score, marescore;
|
||||
INT32 lives;
|
||||
INT32 continues;
|
||||
UINT8 charability;
|
||||
|
@ -2316,11 +2345,12 @@ void G_PlayerReborn(INT32 player)
|
|||
|
||||
// SRB2kart
|
||||
INT32 starpostwp;
|
||||
INT32 offroad;
|
||||
INT32 balloon;
|
||||
INT32 bumper;
|
||||
INT32 comebackpoints;
|
||||
INT32 wanted;
|
||||
|
||||
score = players[player].score;
|
||||
marescore = players[player].marescore;
|
||||
lives = players[player].lives;
|
||||
continues = players[player].continues;
|
||||
ctfteam = players[player].ctfteam;
|
||||
|
@ -2373,14 +2403,15 @@ void G_PlayerReborn(INT32 player)
|
|||
|
||||
// SRB2kart
|
||||
starpostwp = players[player].kartstuff[k_starpostwp];
|
||||
offroad = players[player].kartstuff[k_offroad];
|
||||
balloon = players[player].kartstuff[k_balloon];
|
||||
bumper = players[player].kartstuff[k_bumper];
|
||||
comebackpoints = players[player].kartstuff[k_comebackpoints];
|
||||
wanted = players[player].kartstuff[k_wanted];
|
||||
|
||||
p = &players[player];
|
||||
memset(p, 0, sizeof (*p));
|
||||
|
||||
p->score = score;
|
||||
p->marescore = marescore;
|
||||
p->lives = lives;
|
||||
p->continues = continues;
|
||||
p->pflags = pflags;
|
||||
|
@ -2431,11 +2462,10 @@ void G_PlayerReborn(INT32 player)
|
|||
|
||||
// SRB2kart
|
||||
p->kartstuff[k_starpostwp] = starpostwp; // TODO: get these out of kartstuff, it causes desync
|
||||
p->kartstuff[k_offroad] = offroad;
|
||||
|
||||
p->kartstuff[k_balloon] = balloon;
|
||||
p->kartstuff[k_bumper] = bumper;
|
||||
p->kartstuff[k_comebackpoints] = comebackpoints;
|
||||
p->kartstuff[k_comebacktimer] = comebacktime;
|
||||
p->kartstuff[k_wanted] = wanted;
|
||||
|
||||
// Don't do anything immediately
|
||||
p->pflags |= PF_USEDOWN;
|
||||
|
@ -2461,14 +2491,14 @@ void G_PlayerReborn(INT32 player)
|
|||
|
||||
P_RestoreMusic(p);
|
||||
|
||||
if (leveltime > 157 && !p->spectator)
|
||||
p->kartstuff[k_lakitu] = 48; // Lakitu Spawner
|
||||
if (leveltime > (starttime + (TICRATE/2)) && !p->spectator)
|
||||
p->kartstuff[k_respawn] = 48; // Respawn effect
|
||||
|
||||
if (gametype == GT_COOP)
|
||||
P_FindEmerald(); // scan for emeralds to hunt for
|
||||
|
||||
// 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.
|
||||
p->mare = P_FindLowestMare();
|
||||
|
@ -2980,7 +3010,7 @@ void G_ExitLevel(void)
|
|||
CV_SetValue(&cv_teamscramble, cv_scrambleonchange.value);
|
||||
}
|
||||
|
||||
if (gametype != GT_COOP)
|
||||
if (netgame || multiplayer)
|
||||
CONS_Printf(M_GetText("The round has ended.\n"));
|
||||
|
||||
// Remove CEcho text on round end.
|
||||
|
@ -2997,10 +3027,11 @@ void G_ExitLevel(void)
|
|||
boolean G_IsSpecialStage(INT32 mapnum)
|
||||
{
|
||||
#if 0
|
||||
if (gametype == GT_COOP && modeattacking != ATTACKING_RECORD && mapnum >= sstage_start && mapnum <= sstage_end)
|
||||
return true;
|
||||
#endif
|
||||
return (gametype == GT_COOP && modeattacking != ATTACKING_RECORD && mapnum >= sstage_start && mapnum <= sstage_end);
|
||||
#else
|
||||
(void)mapnum;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -3048,7 +3079,7 @@ boolean G_GametypeHasSpectators(void)
|
|||
#if 0
|
||||
return (gametype != GT_COOP && gametype != GT_COMPETITION && gametype != GT_RACE);
|
||||
#else
|
||||
return true;
|
||||
return (!splitscreen);//true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -3062,6 +3093,42 @@ boolean G_BattleGametype(void)
|
|||
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
|
||||
//
|
||||
|
@ -3131,12 +3198,15 @@ static INT32 TOLMaps(INT16 tolflags)
|
|||
* has those flags.
|
||||
* \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;
|
||||
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.
|
||||
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
|
||||
|| 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;
|
||||
|
||||
if (!ignorebuffer)
|
||||
|
@ -3171,10 +3243,12 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
|
|||
if (numokmaps == 0)
|
||||
{
|
||||
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.
|
||||
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
|
||||
}
|
||||
else
|
||||
|
@ -3182,13 +3256,17 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
|
|||
ix = okmaps[M_RandomKey(numokmaps)];
|
||||
if (!dontadd)
|
||||
{
|
||||
for (bufx = NUMMAPS; bufx > 0; bufx--)
|
||||
for (bufx = NUMMAPS-1; bufx > 0; bufx--)
|
||||
randmapbuffer[bufx] = randmapbuffer[bufx-1];
|
||||
randmapbuffer[0] = ix;
|
||||
}
|
||||
}
|
||||
|
||||
if (!callagainsoon)
|
||||
{
|
||||
Z_Free(okmaps);
|
||||
okmaps = NULL;
|
||||
}
|
||||
|
||||
return ix;
|
||||
}
|
||||
|
@ -3198,7 +3276,7 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb
|
|||
//
|
||||
static void G_DoCompleted(void)
|
||||
{
|
||||
INT32 i;
|
||||
INT32 i, j = 0;
|
||||
boolean gottoken = false;
|
||||
|
||||
tokenlist = 0; // Reset the list
|
||||
|
@ -3212,7 +3290,20 @@ static void G_DoCompleted(void)
|
|||
|
||||
for (i = 0; i < MAXPLAYERS; 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
|
||||
}
|
||||
|
||||
// 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)
|
||||
AM_Stop();
|
||||
|
@ -3253,6 +3344,9 @@ static void G_DoCompleted(void)
|
|||
else
|
||||
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)
|
||||
{
|
||||
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
|
||||
{
|
||||
for (i = 0; i < NUMMAPS; i++)
|
||||
for (i = 0; i < NUMMAPS+1; i++)
|
||||
randmapbuffer[i] = -1;
|
||||
}
|
||||
|
||||
|
@ -3324,7 +3418,7 @@ static void G_DoCompleted(void)
|
|||
if (cv_advancemap.value == 0) // Stay on same map.
|
||||
nextmap = prevmap;
|
||||
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.
|
||||
|
@ -3366,19 +3460,44 @@ void G_AfterIntermission(void)
|
|||
//
|
||||
void G_NextLevel(void)
|
||||
{
|
||||
boolean dovote = false;
|
||||
|
||||
if ((cv_advancemap.value == 3 && gamestate != GS_VOTING)
|
||||
&& !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;
|
||||
else
|
||||
{
|
||||
if (gamestate != GS_VOTING)
|
||||
forceresetplayers = false;
|
||||
gameaction = ga_worlddone;
|
||||
}
|
||||
}
|
||||
|
||||
static void G_DoWorldDone(void)
|
||||
{
|
||||
if (server)
|
||||
{
|
||||
// SRB2kart: don't reset player between maps
|
||||
D_MapChange(nextmap+1, gametype, ultimatemode, false, 0, false, false);
|
||||
// SRB2Kart
|
||||
D_MapChange(nextmap+1,
|
||||
gametype,
|
||||
ultimatemode,
|
||||
forceresetplayers,
|
||||
0,
|
||||
false,
|
||||
false);
|
||||
}
|
||||
|
||||
gameaction = ga_nothing;
|
||||
|
@ -3410,6 +3529,7 @@ static void G_DoStartContinue(void)
|
|||
{
|
||||
I_Assert(!netgame && !multiplayer);
|
||||
|
||||
legitimateexit = false;
|
||||
G_PlayerFinishLevel(consoleplayer); // take away cards and stuff
|
||||
|
||||
F_StartContinue();
|
||||
|
@ -3967,9 +4087,16 @@ void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar, U
|
|||
|
||||
if (demoplayback)
|
||||
COM_BufAddText("stopdemo\n");
|
||||
|
||||
while (ghosts)
|
||||
{
|
||||
demoghost *next = ghosts->next;
|
||||
Z_Free(ghosts);
|
||||
ghosts = next;
|
||||
}
|
||||
ghosts = NULL;
|
||||
|
||||
for (i = 0; i < NUMMAPS; i++)
|
||||
for (i = 0; i < NUMMAPS+1; i++)
|
||||
randmapbuffer[i] = -1;
|
||||
|
||||
// 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!
|
||||
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
|
||||
tokenlist = token = sstimer = redscore = bluescore = lastmap = 0;
|
||||
countdown = countdown2 = 0;
|
||||
countdown = countdown2 = mapreset = 0;
|
||||
|
||||
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].starpostcount = 0; // srb2kart
|
||||
|
||||
#if 0
|
||||
if (netgame || multiplayer)
|
||||
{
|
||||
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].xtralife = 0;
|
||||
#else
|
||||
players[i].lives = 1; // SRB2Kart
|
||||
#endif
|
||||
|
||||
// The latter two should clear by themselves, but just in case
|
||||
players[i].pflags &= ~(PF_TAGIT|PF_TAGGED|PF_FULLSTASIS);
|
||||
|
||||
// Clear cheatcodes too, just in case.
|
||||
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
|
||||
|
@ -4860,6 +4999,7 @@ void G_GhostTicker(void)
|
|||
p->next = g->next;
|
||||
else
|
||||
ghosts = g->next;
|
||||
Z_Free(g);
|
||||
continue;
|
||||
}
|
||||
p = g;
|
||||
|
@ -5592,8 +5732,7 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
memset(playeringame,0,sizeof(playeringame));
|
||||
playeringame[0] = true;
|
||||
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); // ...but uh, for demos? doing that makes them start in different positions depending on the last demo you watched
|
||||
G_InitNew(false, G_BuildMapName(gamemap), true, true); // Doesn't matter whether you reset or not here, given changes to resetplayer.
|
||||
|
||||
// Set skin
|
||||
SetPlayerSkin(0, skin);
|
||||
|
@ -5803,29 +5942,28 @@ void G_AddGhost(char *defdemoname)
|
|||
mthing = playerstarts[0];
|
||||
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.
|
||||
fixed_t x,y,z;
|
||||
sector_t *sector;
|
||||
x = mthing->x << FRACBITS;
|
||||
y = mthing->y << FRACBITS;
|
||||
sector = R_PointInSubsector(x, y)->sector;
|
||||
fixed_t z,f,c;
|
||||
gh->mo = P_SpawnMobj(mthing->x << FRACBITS, mthing->y << FRACBITS, 0, MT_GHOST);
|
||||
gh->mo->angle = FixedAngle(mthing->angle*FRACUNIT);
|
||||
f = gh->mo->floorz;
|
||||
c = gh->mo->ceilingz - mobjinfo[MT_PLAYER].height;
|
||||
if (!!(mthing->options & MTF_AMBUSH) ^ !!(mthing->options & MTF_OBJECTFLIP))
|
||||
{
|
||||
z = sector->ceilingheight - mobjinfo[MT_PLAYER].height;
|
||||
z = c;
|
||||
if (mthing->options >> ZSHIFT)
|
||||
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||
if (z < sector->floorheight)
|
||||
z = sector->floorheight;
|
||||
if (z < f)
|
||||
z = f;
|
||||
}
|
||||
else
|
||||
{
|
||||
z = sector->floorheight;
|
||||
z = f;
|
||||
if (mthing->options >> ZSHIFT)
|
||||
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||
if (z > sector->ceilingheight - mobjinfo[MT_PLAYER].height)
|
||||
z = sector->ceilingheight - mobjinfo[MT_PLAYER].height;
|
||||
if (z > c)
|
||||
z = c;
|
||||
}
|
||||
gh->mo = P_SpawnMobj(x, y, z, MT_GHOST);
|
||||
gh->mo->angle = FixedAngle(mthing->angle*FRACUNIT);
|
||||
gh->mo->z = z;
|
||||
}
|
||||
gh->mo->state = states+S_KART_STND1; // SRB2kart - was S_PLAY_STND
|
||||
gh->mo->sprite = gh->mo->state->sprite;
|
||||
|
@ -6023,8 +6161,13 @@ boolean G_CheckDemoStatus(void)
|
|||
{
|
||||
boolean saved;
|
||||
|
||||
if(ghosts) // ... ... ...
|
||||
ghosts = NULL; // :)
|
||||
while (ghosts)
|
||||
{
|
||||
demoghost *next = ghosts->next;
|
||||
Z_Free(ghosts);
|
||||
ghosts = next;
|
||||
}
|
||||
ghosts = NULL;
|
||||
|
||||
// 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_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_TimeDemo(const char *name);
|
||||
void G_AddGhost(char *defdemoname);
|
||||
|
@ -184,6 +195,8 @@ boolean G_GametypeUsesLives(void);
|
|||
boolean G_GametypeHasTeams(void);
|
||||
boolean G_GametypeHasSpectators(void);
|
||||
boolean G_BattleGametype(void);
|
||||
INT16 G_SometimesGetDifferentGametype(void);
|
||||
UINT8 G_GetGametypeColor(INT16 gt);
|
||||
boolean G_RaceGametype(void);
|
||||
boolean G_TagGametype(void);
|
||||
void G_ExitLevel(void);
|
||||
|
@ -237,6 +250,6 @@ FUNCMATH INT32 G_TicsToMilliseconds(tic_t tics);
|
|||
// Don't split up TOL handling
|
||||
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
|
||||
|
|
|
@ -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
|
||||
// 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
|
||||
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
|
||||
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;
|
||||
HWR_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
||||
Z_Free(realpatch);
|
||||
}
|
||||
}*/
|
||||
// centre screen
|
||||
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;
|
||||
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];
|
||||
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[cv_translucenthud.value];
|
||||
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[cv_translucenthud.value];
|
||||
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[hudtrans];
|
||||
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[hudtrans];
|
||||
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[hudtrans];
|
||||
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
||||
flags |= PF_Modulated;
|
||||
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
|
||||
// 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
|
||||
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
|
||||
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;
|
||||
HWR_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
||||
Z_Free(realpatch);
|
||||
}
|
||||
}*/
|
||||
// centre screen
|
||||
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;
|
||||
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];
|
||||
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[cv_translucenthud.value];
|
||||
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[cv_translucenthud.value];
|
||||
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[hudtrans];
|
||||
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[hudtrans];
|
||||
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[hudtrans];
|
||||
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
||||
flags |= PF_Modulated;
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||
|
@ -576,18 +576,14 @@ void HWR_DrawFlatFill (INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatlumpnum
|
|||
// | /|
|
||||
// |/ |
|
||||
// 0--1
|
||||
void HWR_FadeScreenMenuBack(UINT32 color, INT32 height)
|
||||
void HWR_FadeScreenMenuBack(UINT16 color, UINT8 strength)
|
||||
{
|
||||
FOutVector v[4];
|
||||
FSurfaceInfo Surf;
|
||||
|
||||
// setup some neat-o translucency effect
|
||||
if (!height) //cool hack 0 height is full height
|
||||
height = vid.height;
|
||||
|
||||
v[0].x = v[3].x = -1.0f;
|
||||
v[2].x = v[1].x = 1.0f;
|
||||
v[0].y = v[1].y = 1.0f-((height<<1)/(float)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;
|
||||
|
||||
|
@ -596,8 +592,16 @@ void HWR_FadeScreenMenuBack(UINT32 color, INT32 height)
|
|||
v[0].tow = v[1].tow = 1.0f;
|
||||
v[2].tow = v[3].tow = 0.0f;
|
||||
|
||||
Surf.FlatColor.rgba = UINT2RGBA(color);
|
||||
Surf.FlatColor.s.alpha = (UINT8)((0xff/2) * ((float)height / vid.height)); //calum: varies console alpha
|
||||
if (color & 0xFF00) // Do COLORMAP fade.
|
||||
{
|
||||
Surf.FlatColor.rgba = UINT2RGBA(0x01010160);
|
||||
Surf.FlatColor.s.alpha = (strength*8);
|
||||
}
|
||||
else // Do TRANSMAP** fade.
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -900,6 +904,7 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
|||
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.
|
||||
// -------------------+
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
// -----------------+
|
||||
// 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
|
||||
|
||||
#ifndef _MSC_VER
|
||||
|
|
|
@ -499,23 +499,46 @@ light_t *t_lspr[NUMSPRITES] =
|
|||
|
||||
&lspr[NOLIGHT], //"SPRG",
|
||||
&lspr[NOLIGHT], //"BSPR",
|
||||
|
||||
&lspr[NOLIGHT], //"RNDM",
|
||||
&lspr[NOLIGHT], //"SPRK",
|
||||
&lspr[NOLIGHT], //"KFRE",
|
||||
&lspr[NOLIGHT], //"DRIF",
|
||||
&lspr[NOLIGHT], //"FAKE",
|
||||
&lspr[NOLIGHT], //"DFAK",
|
||||
&lspr[NOLIGHT], //"DSMO",
|
||||
|
||||
&lspr[NOLIGHT], //"FITM",
|
||||
&lspr[NOLIGHT], //"BANA",
|
||||
&lspr[NOLIGHT], //"DBAN",
|
||||
&lspr[NOLIGHT], //"GSHE",
|
||||
&lspr[NOLIGHT], //"GSTR",
|
||||
&lspr[NOLIGHT], //"DGSH",
|
||||
&lspr[NOLIGHT], //"RSHE",
|
||||
&lspr[NOLIGHT], //"RSTR",
|
||||
&lspr[NOLIGHT], //"DRSH",
|
||||
&lspr[NOLIGHT], //"BOMB",
|
||||
&lspr[NOLIGHT], //"SSMN",
|
||||
&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
|
||||
&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);
|
||||
#ifdef HWPRECIP
|
||||
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 ?
|
||||
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);
|
||||
return;
|
||||
|
@ -3234,7 +3234,7 @@ static void HWR_AddPolyObjectPlanes(void)
|
|||
// : Draw one or more line segments.
|
||||
// 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;
|
||||
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
|
||||
// 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
|
||||
// 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
|
||||
fixed_t *hwbbox;
|
||||
|
||||
static void HWR_RenderBSPNode(INT32 bspnum)
|
||||
static void HWR_RenderBSPNode(INT32 bspnum, UINT8 ssplayer)
|
||||
{
|
||||
/*//GZDoom code
|
||||
if(bspnum == -1)
|
||||
|
@ -3694,12 +3694,12 @@ static void HWR_RenderBSPNode(INT32 bspnum)
|
|||
if (bspnum == -1)
|
||||
{
|
||||
//*(gr_drawsubsector_p++) = 0;
|
||||
HWR_Subsector(0);
|
||||
HWR_Subsector(0, ssplayer);
|
||||
}
|
||||
else
|
||||
{
|
||||
//*(gr_drawsubsector_p++) = bspnum&(~NF_SUBSECTOR);
|
||||
HWR_Subsector(bspnum&(~NF_SUBSECTOR));
|
||||
HWR_Subsector(bspnum&(~NF_SUBSECTOR), ssplayer);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -3711,14 +3711,14 @@ static void HWR_RenderBSPNode(INT32 bspnum)
|
|||
hwbbox = bsp->bbox[side];
|
||||
|
||||
// Recursively divide front space.
|
||||
HWR_RenderBSPNode(bsp->children[side]);
|
||||
HWR_RenderBSPNode(bsp->children[side], ssplayer);
|
||||
|
||||
// Possibly divide back space.
|
||||
if (HWR_CheckBBox(bsp->bbox[side^1]))
|
||||
{
|
||||
// BP: big hack for a test in lighning ref : 1249753487AB
|
||||
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.
|
||||
// --------------------------------------------------------------------------
|
||||
static UINT8 sectorlight;
|
||||
static void HWR_AddSprites(sector_t *sec)
|
||||
static void HWR_AddSprites(sector_t *sec, UINT8 ssplayer)
|
||||
{
|
||||
mobj_t *thing;
|
||||
#ifdef HWPRECIP
|
||||
|
@ -5140,6 +5140,25 @@ static void HWR_AddSprites(sector_t *sec)
|
|||
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;
|
||||
}
|
||||
|
||||
approx_dist = P_AproxDistance(viewx-thing->x, viewy-thing->y);
|
||||
|
||||
if (approx_dist <= limit_dist)
|
||||
|
@ -5150,9 +5169,32 @@ static void HWR_AddSprites(sector_t *sec)
|
|||
{
|
||||
// Draw everything in sector, no checks
|
||||
for (thing = sec->thinglist; thing; thing = thing->snext)
|
||||
if (!(thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW))
|
||||
{
|
||||
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
|
||||
// Someone seriously wants infinite draw distance for precipitation?
|
||||
|
@ -5388,23 +5430,15 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
else if (thing->color)
|
||||
{
|
||||
// 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_STARMAN, thing->color, GTC_CACHE);
|
||||
else
|
||||
vis->colormap = R_GetTranslationColormap(TC_RAINBOW, thing->color, GTC_CACHE);
|
||||
else if (thing->skin && thing->sprite == SPR_PLAY) // This thing is a player!
|
||||
{
|
||||
size_t skinnum = (skin_t*)thing->skin-skins;
|
||||
vis->colormap = R_GetTranslationColormap((INT32)skinnum, thing->color, GTC_CACHE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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);
|
||||
}
|
||||
vis->colormap = R_GetTranslationColormap(TC_DEFAULT, thing->color, GTC_CACHE);
|
||||
}
|
||||
else
|
||||
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);
|
||||
postimg_t *type;
|
||||
UINT8 ssplayer = 0;
|
||||
|
||||
if (splitscreen && player == &players[secondarydisplayplayer])
|
||||
if (splitscreen)
|
||||
{
|
||||
if (player == &players[secondarydisplayplayer])
|
||||
{
|
||||
type = &postimgtype2;
|
||||
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
|
||||
type = &postimgtype;
|
||||
|
||||
|
@ -5789,7 +5841,7 @@ if (0)
|
|||
|
||||
validcount++;
|
||||
|
||||
HWR_RenderBSPNode((INT32)numnodes-1);
|
||||
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer);
|
||||
|
||||
// Make a viewangle int so we can render things based on mouselook
|
||||
if (player == &players[consoleplayer])
|
||||
|
@ -5806,18 +5858,18 @@ if (0)
|
|||
{
|
||||
dup_viewangle += ANGLE_90;
|
||||
HWR_ClearClipSegs();
|
||||
HWR_RenderBSPNode((INT32)numnodes-1); //left
|
||||
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //left
|
||||
|
||||
dup_viewangle += ANGLE_90;
|
||||
if (((INT32)aimingangle > ANGLE_45 || (INT32)aimingangle<-ANGLE_45))
|
||||
{
|
||||
HWR_ClearClipSegs();
|
||||
HWR_RenderBSPNode((INT32)numnodes-1); //back
|
||||
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //back
|
||||
}
|
||||
|
||||
dup_viewangle += ANGLE_90;
|
||||
HWR_ClearClipSegs();
|
||||
HWR_RenderBSPNode((INT32)numnodes-1); //right
|
||||
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //right
|
||||
|
||||
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);
|
||||
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
|
||||
|
||||
FRGBAFloat ClearColor;
|
||||
|
||||
if (splitscreen && player == &players[secondarydisplayplayer])
|
||||
if (splitscreen)
|
||||
{
|
||||
if (player == &players[secondarydisplayplayer])
|
||||
{
|
||||
type = &postimgtype2;
|
||||
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
|
||||
type = &postimgtype;
|
||||
|
||||
|
@ -6019,7 +6089,7 @@ if (0)
|
|||
|
||||
validcount++;
|
||||
|
||||
HWR_RenderBSPNode((INT32)numnodes-1);
|
||||
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer);
|
||||
|
||||
// Make a viewangle int so we can render things based on mouselook
|
||||
if (player == &players[consoleplayer])
|
||||
|
@ -6036,18 +6106,18 @@ if (0)
|
|||
{
|
||||
dup_viewangle += ANGLE_90;
|
||||
HWR_ClearClipSegs();
|
||||
HWR_RenderBSPNode((INT32)numnodes-1); //left
|
||||
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //left
|
||||
|
||||
dup_viewangle += ANGLE_90;
|
||||
if (((INT32)aimingangle > ANGLE_45 || (INT32)aimingangle<-ANGLE_45))
|
||||
{
|
||||
HWR_ClearClipSegs();
|
||||
HWR_RenderBSPNode((INT32)numnodes-1); //back
|
||||
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //back
|
||||
}
|
||||
|
||||
dup_viewangle += ANGLE_90;
|
||||
HWR_ClearClipSegs();
|
||||
HWR_RenderBSPNode((INT32)numnodes-1); //right
|
||||
HWR_RenderBSPNode((INT32)numnodes-1, ssplayer); //right
|
||||
|
||||
dup_viewangle += ANGLE_90;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ void HWR_Shutdown(void);
|
|||
|
||||
void HWR_clearAutomap(void);
|
||||
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_RenderSkyboxView(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_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, 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_CreatePlanePolygons(INT32 bspnum);
|
||||
void HWR_CreateStaticLightmaps(INT32 bspnum);
|
||||
void HWR_PrepLevelCache(size_t pnumtextures);
|
||||
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_DrawDiag(INT32 x, INT32 y, INT32 wh, INT32 color);
|
||||
void HWR_DrawPic(INT32 x,INT32 y,lumpnum_t lumpnum);
|
||||
|
||||
void HWR_AddCommands(void);
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "../r_things.h"
|
||||
#include "../r_draw.h"
|
||||
#include "../p_tick.h"
|
||||
#include "../k_kart.h" // colortranslations
|
||||
|
||||
#include "hw_main.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)
|
||||
{
|
||||
UINT8 i;
|
||||
UINT16 w = gpatch->width, h = gpatch->height;
|
||||
UINT32 size = w*h;
|
||||
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;
|
||||
blendimage = blendgpatch->mipmap.grInfo.data;
|
||||
|
||||
switch (color)
|
||||
// Average all of the translation's colors
|
||||
{
|
||||
case SKINCOLOR_IVORY:
|
||||
blendcolor = V_GetColor(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;
|
||||
UINT16 r, g, b;
|
||||
UINT8 div = 0;
|
||||
|
||||
case SKINCOLOR_SUPER1:
|
||||
blendcolor = V_GetColor(97);
|
||||
break;
|
||||
case SKINCOLOR_SUPER2:
|
||||
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;
|
||||
blendcolor = V_GetColor(colortranslations[color][0]);
|
||||
r = (UINT16)blendcolor.s.red;
|
||||
g = (UINT16)blendcolor.s.green;
|
||||
b = (UINT16)blendcolor.s.blue;
|
||||
|
||||
case SKINCOLOR_TSUPER1:
|
||||
blendcolor = V_GetColor(81);
|
||||
break;
|
||||
case SKINCOLOR_TSUPER2:
|
||||
blendcolor = V_GetColor(82);
|
||||
break;
|
||||
case SKINCOLOR_TSUPER3:
|
||||
blendcolor = V_GetColor(84);
|
||||
break;
|
||||
case SKINCOLOR_TSUPER4:
|
||||
blendcolor = V_GetColor(85);
|
||||
break;
|
||||
case SKINCOLOR_TSUPER5:
|
||||
blendcolor = V_GetColor(87);
|
||||
break;
|
||||
|
||||
case SKINCOLOR_KSUPER1:
|
||||
blendcolor = V_GetColor(122);
|
||||
break;
|
||||
case SKINCOLOR_KSUPER2:
|
||||
blendcolor = V_GetColor(123);
|
||||
break;
|
||||
case SKINCOLOR_KSUPER3:
|
||||
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;
|
||||
for (i = 1; i < 16; i++)
|
||||
{
|
||||
RGBA_t nextcolor = V_GetColor(colortranslations[color][i]);
|
||||
UINT8 mul = 1;
|
||||
// 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
|
||||
if (i >= 1 && i <= 9)
|
||||
mul++;
|
||||
// The mid & dark tons on the minimap icons get weighted even harder
|
||||
if (i == 4 || i == 6)
|
||||
mul += 2;
|
||||
// And the shade between them, why not
|
||||
if (i == 5)
|
||||
mul++;
|
||||
r += (UINT16)(nextcolor.s.red)*mul;
|
||||
g += (UINT16)(nextcolor.s.green)*mul;
|
||||
b += (UINT16)(nextcolor.s.blue)*mul;
|
||||
div += mul;
|
||||
}
|
||||
|
||||
// starman support, could theoretically support boss ones too
|
||||
if (skinnum == TC_STARMAN)
|
||||
// This shouldn't happen.
|
||||
if (div < 1)
|
||||
div = 1;
|
||||
|
||||
blendcolor.s.red = (UINT8)(r/div);
|
||||
blendcolor.s.green = (UINT8)(g/div);
|
||||
blendcolor.s.blue = (UINT8)(b/div);
|
||||
}
|
||||
|
||||
// rainbow support, could theoretically support boss ones too
|
||||
if (skinnum == TC_RAINBOW)
|
||||
{
|
||||
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;
|
||||
|
||||
tempcolor = (finalbright*blendcolor.s.red)/colorbright;
|
||||
tempcolor = min(255, max(0, tempcolor));
|
||||
tempcolor = min(255, tempcolor);
|
||||
cur->s.red = (UINT8)tempcolor;
|
||||
tempcolor = (finalbright*blendcolor.s.green)/colorbright;
|
||||
tempcolor = min(255, max(0, tempcolor));
|
||||
tempcolor = min(255, tempcolor);
|
||||
cur->s.green = (UINT8)tempcolor;
|
||||
tempcolor = (finalbright*blendcolor.s.blue)/colorbright;
|
||||
tempcolor = min(255, max(0, tempcolor));
|
||||
tempcolor = min(255, tempcolor);
|
||||
cur->s.blue = (UINT8)tempcolor;
|
||||
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->colorized)
|
||||
skinnum = TC_STARMAN;
|
||||
skinnum = TC_RAINBOW;
|
||||
else
|
||||
{
|
||||
skinnum = (INT32)((skin_t*)spr->mobj->skin-skins);
|
||||
|
|
274
src/hu_stuff.c
274
src/hu_stuff.c
|
@ -1846,23 +1846,6 @@ static void HU_DrawCEcho(void)
|
|||
--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
|
||||
//
|
||||
|
@ -1950,7 +1933,7 @@ void HU_Drawer(void)
|
|||
|| gamestate == GS_INTERMISSION || gamestate == GS_CUTSCENE
|
||||
|| gamestate == GS_CREDITS || gamestate == GS_EVALUATION
|
||||
|| gamestate == GS_GAMEEND
|
||||
|| gamestate == GS_VOTING) // SRB2kart
|
||||
|| gamestate == GS_VOTING || gamestate == GS_WAITINGPLAYERS) // SRB2kart
|
||||
return;
|
||||
|
||||
// draw multiplayer rankings
|
||||
|
@ -2119,19 +2102,25 @@ void HU_drawPing(INT32 x, INT32 y, INT32 ping, boolean notext)
|
|||
//
|
||||
// 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;
|
||||
|
||||
//this function is designed for 9 or less score lines only
|
||||
I_Assert(scorelines <= 9);
|
||||
|
||||
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++)
|
||||
{
|
||||
if (players[tab[i].num].spectator)
|
||||
if (players[tab[i].num].spectator || !players[tab[i].num].mo)
|
||||
continue; //ignore them.
|
||||
|
||||
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,
|
||||
((tab[i].num == whiteplayer) ? V_YELLOWMAP : 0)
|
||||
| ((players[tab[i].num].health > 0) ? 0 : V_60TRANS)
|
||||
| V_ALLOWLOWERCASE, tab[i].name);
|
||||
((tab[i].num == whiteplayer)
|
||||
? hilicol|V_ALLOWLOWERCASE
|
||||
: V_ALLOWLOWERCASE),
|
||||
tab[i].name);
|
||||
|
||||
// Draw emeralds
|
||||
if (!players[tab[i].num].powers[pw_super]
|
||||
|| ((leveltime/7) & 1))
|
||||
if (players[tab[i].num].mo->color)
|
||||
{
|
||||
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);
|
||||
else
|
||||
colormap = R_GetTranslationColormap(players[tab[i].num].skin, 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
|
||||
{
|
||||
if (players[tab[i].num].health <= 0)
|
||||
V_DrawSmallTranslucentPatch(x, y-4, V_80TRANS, faceprefix[players[tab[i].num].skin]);
|
||||
else
|
||||
V_DrawSmallScaledPatch(x, y-4, 0, faceprefix[players[tab[i].num].skin]);
|
||||
}
|
||||
}
|
||||
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_BattleGametype() && players[tab[i].num].kartstuff[k_bumper] > 0)
|
||||
{
|
||||
INT32 bumperx = x-5;
|
||||
for (j = 0; j < players[tab[i].num].kartstuff[k_bumper]; j++)
|
||||
{
|
||||
bumperx -= 3;
|
||||
V_DrawSmallMappedPatch(bumperx, y+6, 0, W_CachePatchName("K_BLNICO", PU_CACHE), colormap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (G_GametypeUsesLives()) //show lives
|
||||
V_DrawRightAlignedString(x, y+4, V_ALLOWLOWERCASE|((players[tab[i].num].health > 0) ? 0 : V_60TRANS), va("%dx", players[tab[i].num].lives));
|
||||
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_BattleGametype() && players[tab[i].num].kartstuff[k_bumper] <= 0)
|
||||
V_DrawSmallScaledPatch(x-2, y-4, 0, W_CachePatchName("K_NOBLNS", PU_CACHE));
|
||||
|
||||
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)
|
||||
V_DrawRightAlignedString(x+240, y, V_YELLOWMAP, va("%d:%02d.%02d",
|
||||
players[tab[i].num].realtime/(60*TICRATE),
|
||||
players[tab[i].num].realtime/TICRATE % 60,
|
||||
players[tab[i].num].realtime % TICRATE));
|
||||
//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
|
||||
V_DrawRightAlignedString(x+240, y, 0, va("(CP%02d) %d:%02d.%02d",
|
||||
tab[i].count,
|
||||
players[tab[i].num].starposttime/(60*TICRATE),
|
||||
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));
|
||||
{
|
||||
V_DrawRightAlignedString(x, y-4, hilicol, "FIN");
|
||||
V_DrawRightAlignedString(x+rightoffset, y, hilicol, timestring(players[tab[i].num].realtime));
|
||||
}
|
||||
else if (players[tab[i].num].pflags & PF_TIMEOVER)
|
||||
V_DrawRightAlignedThinString(x+rightoffset, y-1, 0, "TIME OVER...");
|
||||
else if (circuitmap)
|
||||
{
|
||||
V_DrawRightAlignedString(x, y-4, 0, "Lap");
|
||||
V_DrawRightAlignedString(x, y+4, 0, va("%d", tab[i].count));
|
||||
V_DrawRightAlignedString(x+rightoffset, y, 0, timestring(players[tab[i].num].starposttime));
|
||||
}
|
||||
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
|
||||
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;
|
||||
if (i == 9)
|
||||
{
|
||||
y = 32;
|
||||
x += BASEVIDWIDTH/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// HU_DrawTeamTabRankings
|
||||
//
|
||||
void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer)
|
||||
/*void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer)
|
||||
{
|
||||
INT32 i,x,y;
|
||||
INT32 redplayers = 0, blueplayers = 0;
|
||||
|
@ -2396,7 +2361,7 @@ void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scoreline
|
|||
x += BASEVIDWIDTH/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//
|
||||
// HU_DrawEmeralds
|
||||
|
@ -2492,12 +2457,22 @@ static void HU_DrawRankings(void)
|
|||
{
|
||||
patch_t *p;
|
||||
playersort_t tab[MAXPLAYERS];
|
||||
INT32 i, j, scorelines;
|
||||
INT32 i, j, scorelines, hilicol, numplayersingame = 0;
|
||||
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
|
||||
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())
|
||||
{
|
||||
|
@ -2522,29 +2497,32 @@ static void HU_DrawRankings(void)
|
|||
{
|
||||
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, 16, 0, va("%u", timeval));
|
||||
V_DrawCenteredString(64, 16, hilicol, va("%u", timeval));
|
||||
}
|
||||
|
||||
// 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, 16, 0, "OVERTIME");
|
||||
V_DrawCenteredString(64, 16, hilicol, "OVERTIME");
|
||||
}
|
||||
}
|
||||
|
||||
if (cv_pointlimit.value > 0)
|
||||
{
|
||||
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;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
|
@ -2555,18 +2533,22 @@ static void HU_DrawRankings(void)
|
|||
|
||||
V_DrawCenteredString(256, 8, 0, "TOTAL SCORE");
|
||||
V_DrawCenteredString(256, 16, 0, va("%u", totalscore));
|
||||
}
|
||||
}*/
|
||||
else
|
||||
{
|
||||
if (circuitmap)
|
||||
{
|
||||
V_DrawCenteredString(64, 8, 0, "NUMBER OF LAPS");
|
||||
V_DrawCenteredString(64, 16, 0, va("%d", cv_numlaps.value));
|
||||
V_DrawCenteredString(64, 8, 0, "LAP COUNT");
|
||||
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 playing back a demo, you quickly see who's the view.
|
||||
if (!splitscreen)
|
||||
whiteplayer = demoplayback ? displayplayer : consoleplayer;
|
||||
|
||||
scorelines = 0;
|
||||
|
@ -2576,83 +2558,61 @@ static void HU_DrawRankings(void)
|
|||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
tab[i].num = -1;
|
||||
tab[i].name = 0;
|
||||
|
||||
if (G_RaceGametype() && !circuitmap)
|
||||
tab[i].name = NULL;
|
||||
tab[i].count = INT32_MAX;
|
||||
}
|
||||
|
||||
for (j = 0; j < MAXPLAYERS; j++)
|
||||
{
|
||||
if (!playeringame[j] || players[j].spectator)
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
continue;
|
||||
|
||||
numplayersingame++;
|
||||
}
|
||||
|
||||
if (netgame && numplayersingame <= 1)
|
||||
K_drawKartFreePlay(leveltime);
|
||||
|
||||
for (j = 0; j < numplayersingame; j++)
|
||||
{
|
||||
UINT8 lowestposition = MAXPLAYERS;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] && !players[i].spectator)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator || completed[i])
|
||||
continue;
|
||||
|
||||
if (players[i].kartstuff[k_position] >= lowestposition)
|
||||
continue;
|
||||
|
||||
tab[scorelines].num = i;
|
||||
lowestposition = players[i].kartstuff[k_position];
|
||||
}
|
||||
|
||||
i = tab[scorelines].num;
|
||||
|
||||
completed[i] = true;
|
||||
|
||||
tab[scorelines].name = player_names[i];
|
||||
|
||||
if (G_RaceGametype())
|
||||
{
|
||||
if (circuitmap)
|
||||
{
|
||||
if ((unsigned)players[i].laps+1 >= tab[scorelines].count && completed[i] == false)
|
||||
{
|
||||
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;
|
||||
tab[scorelines].count = players[i].marescore;
|
||||
|
||||
scorelines++;
|
||||
}
|
||||
|
||||
if (scorelines > 20)
|
||||
scorelines = 20; //dont draw past bottom of screen, show the best only
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
HU_DrawTeamTabRankings(tab, whiteplayer); //separate function for Spazzo's silly request
|
||||
else if (scorelines <= 9)
|
||||
HU_DrawTabRankings(40, 32, tab, scorelines, whiteplayer);
|
||||
else
|
||||
HU_DrawDualTabRankings(32, 32, tab, scorelines, whiteplayer);
|
||||
/*if (G_GametypeHasTeams())
|
||||
HU_DrawTeamTabRankings(tab, whiteplayer); //separate function for Spazzo's silly request -- gotta fix this up later
|
||||
else if (scorelines > 10)*/
|
||||
HU_DrawTabRankings(((scorelines > 9) ? 32 : 40), 32, tab, scorelines, whiteplayer, hilicol);
|
||||
/*else
|
||||
HU_DrawDualTabRankings(32, 32, tab, scorelines, whiteplayer);*/
|
||||
|
||||
// draw spectators in a ticker across the bottom
|
||||
if (!splitscreen && G_GametypeHasSpectators())
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
//------------------------------------
|
||||
// heads up font
|
||||
//------------------------------------
|
||||
#define HU_FONTSTART '\x1E' // the first font character
|
||||
#define HU_FONTSTART '\x19' // the first font character
|
||||
#define HU_FONTEND '~'
|
||||
|
||||
#define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1)
|
||||
|
@ -55,8 +55,6 @@ typedef struct
|
|||
{
|
||||
UINT32 count;
|
||||
INT32 num;
|
||||
INT32 color;
|
||||
INT32 emeralds;
|
||||
const char *name;
|
||||
} playersort_t;
|
||||
|
||||
|
@ -100,7 +98,7 @@ void HU_Init(void);
|
|||
void HU_LoadGraphics(void);
|
||||
|
||||
// reset heads up when consoleplayer respawns.
|
||||
FUNCMATH void HU_Start(void);
|
||||
void HU_Start(void);
|
||||
|
||||
boolean HU_Responder(event_t *ev);
|
||||
|
||||
|
@ -109,10 +107,12 @@ void HU_Drawer(void);
|
|||
char HU_dequeueChatChar(void);
|
||||
void HU_Erase(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_DrawTeamTabRankings(playersort_t *tab, 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);
|
||||
|
||||
INT32 HU_CreateTeamScoresTbl(playersort_t *tab, UINT32 dmtotals[]);
|
||||
|
|
|
@ -86,10 +86,10 @@ static HMODULE WS_getfunctions(HMODULE tmp)
|
|||
{
|
||||
if (tmp != NULL)
|
||||
{
|
||||
WS_getaddrinfo = (p_getaddrinfo)GetProcAddress(tmp, "getaddrinfo");
|
||||
WS_getaddrinfo = (p_getaddrinfo)((void *)GetProcAddress(tmp, "getaddrinfo"));
|
||||
if (WS_getaddrinfo == NULL)
|
||||
return NULL;
|
||||
WS_freeaddrinfo = (p_freeaddrinfo)GetProcAddress(tmp, "freeaddrinfo");
|
||||
WS_freeaddrinfo = (p_freeaddrinfo)((void *)GetProcAddress(tmp, "freeaddrinfo"));
|
||||
if (WS_freeaddrinfo == NULL)
|
||||
{
|
||||
WS_getaddrinfo = NULL;
|
||||
|
|
|
@ -50,7 +50,7 @@ struct JoyType_s
|
|||
};
|
||||
typedef struct JoyType_s JoyType_t;
|
||||
/** \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;
|
||||
|
|
1172
src/info.c
1172
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_ToggleFlameJet();
|
||||
void A_ItemPop(); // SRB2kart
|
||||
void A_RedShellChase(); // SRB2kart
|
||||
void A_BobombExplode(); // SRB2kart
|
||||
void A_JawzChase(); // SRB2kart
|
||||
void A_JawzExplode(); // SRB2kart
|
||||
void A_MineExplode(); // SRB2kart
|
||||
void A_BallhogExplode(); // SRB2kart
|
||||
void A_OrbitNights();
|
||||
void A_GhostMe();
|
||||
void A_SetObjectState();
|
||||
|
@ -580,28 +582,29 @@ typedef enum sprite
|
|||
|
||||
SPR_RNDM, // Random Item Box
|
||||
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_DUST, // Drift Dust
|
||||
|
||||
// Kart Items
|
||||
SPR_FITM, // Fake Item box
|
||||
SPR_DFAK, // Dead Fake Item
|
||||
SPR_FITM, // Eggman Monitor
|
||||
SPR_BANA, // Banana Peel
|
||||
SPR_DBAN, // Dead Banana Peel
|
||||
SPR_GSHE, // Green Shell
|
||||
SPR_DGSH, // Dead Green Shell
|
||||
SPR_RSHE, // Red Shell
|
||||
SPR_DRSH, // Dead Red Shell
|
||||
SPR_BOMB, // Bob-omb
|
||||
SPR_KRBM,
|
||||
SPR_BLIG, // Blue Lightning
|
||||
SPR_LIGH, // Lightning
|
||||
SPR_ORBN, // Orbinaut
|
||||
SPR_JAWZ, // Jawz
|
||||
SPR_SSMN, // SS Mine
|
||||
SPR_KRBM, // SS Mine BOOM
|
||||
SPR_BHOG, // Ballhog
|
||||
SPR_BHBM, // Ballhog BOOM
|
||||
SPR_BLIG, // Self-Propelled Bomb
|
||||
SPR_LIGH, // Grow/shrink beams (Metallic Maddness)
|
||||
SPR_SINK, // Kitchen Sink
|
||||
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
|
||||
SPR_POKE, // Pokey
|
||||
|
@ -616,16 +619,25 @@ typedef enum sprite
|
|||
SPR_SACO, // Sapphire Coast Fauna
|
||||
SPR_CRAB, // Crystal Abyss mobs
|
||||
SPR_SHAD, // TD shadows
|
||||
SPR_BRNG, // Chaotix Big Ring
|
||||
|
||||
SPR_BUMP, // Player/shell bump
|
||||
SPR_FLEN, // Shell hit graphics stuff
|
||||
SPR_CLAS, // items clash
|
||||
SPR_PSHW, // thrown indicator
|
||||
SPR_ISTA, // instashield layer A
|
||||
SPR_ISTB, // instashield layer B
|
||||
|
||||
SPR_ARRO, // player arrows
|
||||
SPR_ITEM,
|
||||
SPR_ITMI,
|
||||
SPR_ITMN,
|
||||
SPR_WANT,
|
||||
|
||||
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_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1,
|
||||
NUMSPRITES
|
||||
|
@ -2647,15 +2659,9 @@ typedef enum state
|
|||
S_FIREBALL2,
|
||||
S_FIREBALL3,
|
||||
S_FIREBALL4,
|
||||
S_FIREBALL5,
|
||||
S_FIREBALL6,
|
||||
S_FIREBALL7,
|
||||
S_FIREBALLEXP1,
|
||||
S_FIREBALLEXP2,
|
||||
S_FIREBALLEXP3,
|
||||
S_FIREBALLEXP4,
|
||||
S_FIREBALLEXP5,
|
||||
S_FIREBALLEXP6,
|
||||
S_SHELL,
|
||||
S_SHELL1,
|
||||
S_SHELL2,
|
||||
|
@ -3085,7 +3091,7 @@ typedef enum state
|
|||
|
||||
// Magnet Burst
|
||||
|
||||
// Mushroom Fire Trail
|
||||
// Sneaker Fire Trail
|
||||
S_KARTFIRE1,
|
||||
S_KARTFIRE2,
|
||||
S_KARTFIRE3,
|
||||
|
@ -3095,7 +3101,33 @@ typedef enum state
|
|||
S_KARTFIRE7,
|
||||
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_FAKEITEM2,
|
||||
S_FAKEITEM3,
|
||||
|
@ -3124,81 +3156,74 @@ typedef enum state
|
|||
//}
|
||||
|
||||
// Banana
|
||||
S_BANANAITEM,
|
||||
S_DEADBANANA,
|
||||
S_BANANA,
|
||||
S_BANANA_DEAD,
|
||||
|
||||
//{ Green Shell
|
||||
S_TRIPLEGREENSHIELD1,
|
||||
S_TRIPLEGREENSHIELD2,
|
||||
S_TRIPLEGREENSHIELD3,
|
||||
S_TRIPLEGREENSHIELD4,
|
||||
S_TRIPLEGREENSHIELD5,
|
||||
S_TRIPLEGREENSHIELD6,
|
||||
S_TRIPLEGREENSHIELD7,
|
||||
S_TRIPLEGREENSHIELD8,
|
||||
S_GREENSHIELD1,
|
||||
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,
|
||||
//{ Orbinaut
|
||||
S_ORBINAUT1,
|
||||
S_ORBINAUT2,
|
||||
S_ORBINAUT3,
|
||||
S_ORBINAUT4,
|
||||
S_ORBINAUT5,
|
||||
S_ORBINAUT6,
|
||||
S_ORBINAUT_SHIELD,
|
||||
S_ORBINAUT_DEAD,
|
||||
S_ORBINAUT_SHIELDDEAD,
|
||||
//}
|
||||
//{ Red Shell
|
||||
S_TRIPLEREDSHIELD1,
|
||||
S_TRIPLEREDSHIELD2,
|
||||
S_TRIPLEREDSHIELD3,
|
||||
S_TRIPLEREDSHIELD4,
|
||||
S_TRIPLEREDSHIELD5,
|
||||
S_TRIPLEREDSHIELD6,
|
||||
S_TRIPLEREDSHIELD7,
|
||||
S_TRIPLEREDSHIELD8,
|
||||
S_REDSHIELD1,
|
||||
S_REDSHIELD2,
|
||||
S_REDSHIELD3,
|
||||
S_REDSHIELD4,
|
||||
S_REDSHIELD5,
|
||||
S_REDSHIELD6,
|
||||
S_REDSHIELD7,
|
||||
S_REDSHIELD8,
|
||||
S_REDITEM1,
|
||||
S_REDITEM2,
|
||||
S_REDITEM3,
|
||||
S_REDITEM4,
|
||||
S_REDITEM5,
|
||||
S_REDITEM6,
|
||||
S_REDITEM7,
|
||||
S_REDITEM8,
|
||||
S_DEADRED,
|
||||
//{ Jawz
|
||||
S_JAWZ1,
|
||||
S_JAWZ2,
|
||||
S_JAWZ3,
|
||||
S_JAWZ4,
|
||||
S_JAWZ5,
|
||||
S_JAWZ6,
|
||||
S_JAWZ7,
|
||||
S_JAWZ8,
|
||||
S_JAWZ_DUD1,
|
||||
S_JAWZ_DUD2,
|
||||
S_JAWZ_DUD3,
|
||||
S_JAWZ_DUD4,
|
||||
S_JAWZ_DUD5,
|
||||
S_JAWZ_DUD6,
|
||||
S_JAWZ_DUD7,
|
||||
S_JAWZ_DUD8,
|
||||
S_JAWZ_SHIELD1,
|
||||
S_JAWZ_SHIELD2,
|
||||
S_JAWZ_SHIELD3,
|
||||
S_JAWZ_SHIELD4,
|
||||
S_JAWZ_SHIELD5,
|
||||
S_JAWZ_SHIELD6,
|
||||
S_JAWZ_SHIELD7,
|
||||
S_JAWZ_SHIELD8,
|
||||
S_JAWZ_DEAD1,
|
||||
S_JAWZ_DEAD2,
|
||||
//}
|
||||
|
||||
S_FIRETRAIL1,
|
||||
S_FIRETRAIL2,
|
||||
S_FIRETRAIL3,
|
||||
S_FIRETRAIL4,
|
||||
S_FIRETRAIL5,
|
||||
S_FIRETRAIL6,
|
||||
S_FIRETRAIL7,
|
||||
S_FIRETRAIL8,
|
||||
S_FIRETRAIL9,
|
||||
|
||||
// Bob-omb
|
||||
S_BOMBSHIELD,
|
||||
S_BOMBITEM,
|
||||
S_BOMBAIR,
|
||||
S_BOMBEXPLODE,
|
||||
S_BOMBEXPLOSION1,
|
||||
S_BOMBEXPLOSION2,
|
||||
// Special Stage Mine
|
||||
S_SSMINE1,
|
||||
S_SSMINE2,
|
||||
S_SSMINE3,
|
||||
S_SSMINE4,
|
||||
S_SSMINE_SHIELD1,
|
||||
S_SSMINE_SHIELD2,
|
||||
S_SSMINE_AIR1,
|
||||
S_SSMINE_AIR2,
|
||||
S_SSMINE_DEPLOY1,
|
||||
S_SSMINE_DEPLOY2,
|
||||
S_SSMINE_DEPLOY3,
|
||||
S_SSMINE_DEPLOY4,
|
||||
S_SSMINE_DEPLOY5,
|
||||
S_SSMINE_DEPLOY6,
|
||||
S_SSMINE_DEPLOY7,
|
||||
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
|
||||
S_QUICKBOOM1,
|
||||
|
@ -3223,14 +3248,41 @@ typedef enum state
|
|||
S_SLOWBOOM9,
|
||||
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_BLUELIGHTNING2,
|
||||
S_BLUELIGHTNING3,
|
||||
S_BLUELIGHTNING4,
|
||||
S_BLUEEXPLODE,
|
||||
|
||||
// Lightning
|
||||
// Size-Down
|
||||
S_LIGHTNING1,
|
||||
S_LIGHTNING2,
|
||||
S_LIGHTNING3,
|
||||
|
@ -3242,14 +3294,13 @@ typedef enum state
|
|||
S_SINKTRAIL2,
|
||||
S_SINKTRAIL3,
|
||||
|
||||
// Battle Mode balloons
|
||||
S_BATTLEBALLOON1,
|
||||
S_BATTLEBALLOON2,
|
||||
S_BATTLEBALLOON3,
|
||||
// Battle Mode bumpers
|
||||
S_BATTLEBUMPER1,
|
||||
S_BATTLEBUMPER2,
|
||||
S_BATTLEBUMPER3,
|
||||
|
||||
// Lakitu
|
||||
S_LAKITU1,
|
||||
S_LAKITU2,
|
||||
// DEZ Laser respawn
|
||||
S_DEZLASER,
|
||||
|
||||
// Pokey
|
||||
S_POKEY1,
|
||||
|
@ -3329,15 +3380,22 @@ typedef enum state
|
|||
S_DOOD_BOX4,
|
||||
S_DOOD_BOX5,
|
||||
|
||||
// D00Dkart - Diddy Kong Racing Balloon
|
||||
// D00Dkart - Diddy Kong Racing Bumper
|
||||
S_DOOD_BALLOON,
|
||||
|
||||
// D00Dkart - Big Ring
|
||||
S_DOOD_RING1,
|
||||
S_DOOD_RING2,
|
||||
S_DOOD_RING3,
|
||||
S_DOOD_RING4,
|
||||
S_DOOD_RING5,
|
||||
// Chaotix Big Ring
|
||||
S_BIGRING01,
|
||||
S_BIGRING02,
|
||||
S_BIGRING03,
|
||||
S_BIGRING04,
|
||||
S_BIGRING05,
|
||||
S_BIGRING06,
|
||||
S_BIGRING07,
|
||||
S_BIGRING08,
|
||||
S_BIGRING09,
|
||||
S_BIGRING10,
|
||||
S_BIGRING11,
|
||||
S_BIGRING12,
|
||||
|
||||
// SNES Objects
|
||||
S_SNES_DONUTBUSH1,
|
||||
|
@ -3409,28 +3467,38 @@ typedef enum state
|
|||
S_FIREDITEM3,
|
||||
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_MUSHROOM,
|
||||
S_PLAYERARROW_GREENSHELL,
|
||||
S_PLAYERARROW_BANANA,
|
||||
S_PLAYERARROW_FAKEITEM,
|
||||
S_PLAYERARROW_BOO,
|
||||
S_PLAYERARROW_FEATHER,
|
||||
S_PLAYERARROW_REDSHELL,
|
||||
S_PLAYERARROW_BOBOMB,
|
||||
S_PLAYERARROW_FIREFLOWER,
|
||||
S_PLAYERARROW_TRIPLEGREENSHELL,
|
||||
S_PLAYERARROW_TRIPLEBANANA,
|
||||
S_PLAYERARROW_TRIPLEREDSHELL,
|
||||
S_PLAYERARROW_STAR,
|
||||
S_PLAYERARROW_MEGASHROOM,
|
||||
S_PLAYERARROW_KITCHENSINK,
|
||||
S_PLAYERARROW_EMPTY,
|
||||
S_PLAYERARROW_ROULETTE,
|
||||
S_PLAYERARROW_BOX,
|
||||
S_PLAYERARROW_ITEM,
|
||||
S_PLAYERARROW_NUMBER,
|
||||
S_PLAYERARROW_X,
|
||||
S_PLAYERARROW_WANTED1,
|
||||
S_PLAYERARROW_WANTED2,
|
||||
S_PLAYERARROW_WANTED3,
|
||||
S_PLAYERARROW_WANTED4,
|
||||
S_PLAYERARROW_WANTED5,
|
||||
S_PLAYERARROW_WANTED6,
|
||||
S_PLAYERARROW_WANTED7,
|
||||
|
||||
S_PLAYERBOMB,
|
||||
S_PLAYERITEM,
|
||||
S_PLAYERWHEEL,
|
||||
|
||||
S_KARMAWHEEL,
|
||||
|
||||
#ifdef SEENAMES
|
||||
S_NAMECHECK,
|
||||
|
@ -3966,52 +4034,48 @@ typedef enum mobj_type
|
|||
MT_RANDOMITEM,
|
||||
MT_RANDOMITEMPOP,
|
||||
|
||||
MT_MUSHROOMTRAIL,
|
||||
MT_SNEAKERTRAIL,
|
||||
MT_SPARKLETRAIL,
|
||||
MT_INVULNFLASH,
|
||||
MT_WIPEOUTTRAIL,
|
||||
MT_DRIFT,
|
||||
MT_DRIFTDUST,
|
||||
|
||||
MT_FAKESHIELD,
|
||||
MT_FAKEITEM,
|
||||
|
||||
MT_TRIPLEBANANASHIELD1, // Banana Stuff
|
||||
MT_TRIPLEBANANASHIELD2,
|
||||
MT_TRIPLEBANANASHIELD3,
|
||||
MT_BANANASHIELD,
|
||||
MT_BANANAITEM,
|
||||
MT_BANANA, // Banana Stuff
|
||||
MT_BANANA_SHIELD,
|
||||
|
||||
MT_TRIPLEGREENSHIELD1, // Green shell stuff
|
||||
MT_TRIPLEGREENSHIELD2,
|
||||
MT_TRIPLEGREENSHIELD3,
|
||||
MT_GREENSHIELD,
|
||||
MT_GREENITEM,
|
||||
MT_FIRETRAIL,
|
||||
MT_ORBINAUT, // Orbinaut stuff
|
||||
MT_ORBINAUT_SHIELD,
|
||||
|
||||
MT_TRIPLEREDSHIELD1, // Red shell stuff
|
||||
MT_TRIPLEREDSHIELD2,
|
||||
MT_TRIPLEREDSHIELD3,
|
||||
MT_REDSHIELD,
|
||||
MT_REDITEM,
|
||||
MT_REDITEMDUD,
|
||||
MT_JAWZ, // Jawz stuff
|
||||
MT_JAWZ_DUD,
|
||||
MT_JAWZ_SHIELD,
|
||||
|
||||
MT_BOMBSHIELD, // Bob-omb stuff
|
||||
MT_BOMBITEM,
|
||||
MT_BOMBEXPLOSION,
|
||||
MT_BOMBEXPLOSIONSOUND,
|
||||
MT_SSMINE, // Mine stuff
|
||||
MT_SSMINE_SHIELD,
|
||||
MT_MINEEXPLOSION,
|
||||
MT_MINEEXPLOSIONSOUND,
|
||||
|
||||
MT_SMOLDERING, // New explosion
|
||||
MT_BOOMEXPLODE,
|
||||
MT_BOOMPARTICLE,
|
||||
|
||||
MT_BLUELIGHTNING, // Lightning stuff
|
||||
MT_BALLHOG, // Ballhog
|
||||
MT_BALLHOGBOOM,
|
||||
|
||||
MT_BLUELIGHTNING, // Grow/shrink stuff
|
||||
MT_BLUEEXPLOSION,
|
||||
MT_LIGHTNING,
|
||||
|
||||
MT_SINK, // Kitchen Sink Stuff
|
||||
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.
|
||||
|
||||
|
@ -4047,7 +4111,7 @@ typedef enum mobj_type
|
|||
MT_DOOD_FLOWER4,
|
||||
MT_DOOD_BOX,
|
||||
MT_DOOD_BALLOON,
|
||||
MT_DOOD_RING,
|
||||
MT_BIGRING,
|
||||
|
||||
MT_SNES_DONUTBUSH1,
|
||||
MT_SNES_DONUTBUSH2,
|
||||
|
@ -4082,7 +4146,14 @@ typedef enum mobj_type
|
|||
|
||||
MT_FIREDITEM,
|
||||
|
||||
MT_INSTASHIELDA,
|
||||
MT_INSTASHIELDB,
|
||||
|
||||
MT_PLAYERARROW,
|
||||
MT_PLAYERWANTED,
|
||||
|
||||
MT_KARMAHITBOX,
|
||||
MT_KARMAWHEEL,
|
||||
|
||||
#ifdef SEENAMES
|
||||
MT_NAMECHECK,
|
||||
|
|
5338
src/k_kart.c
5338
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];
|
||||
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);
|
||||
UINT8 K_GetKartColorByName(const char *name);
|
||||
|
||||
void K_RegisterKartStuff(void);
|
||||
|
||||
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_LakituChecker(player_t *player);
|
||||
void K_RespawnChecker(player_t *player);
|
||||
void K_KartMoveAnimation(player_t *player);
|
||||
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
|
||||
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_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_SpawnBobombExplosion(mobj_t *source, UINT8 color);
|
||||
void K_SpawnMineExplosion(mobj_t *source, UINT8 color);
|
||||
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_DoMushroom(player_t *player, boolean doPFlag);
|
||||
void K_DoBouncePad(mobj_t *mo, fixed_t vertispeed);
|
||||
void K_DoSneaker(player_t *player, boolean doPFlag);
|
||||
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);
|
||||
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);
|
||||
fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower);
|
||||
fixed_t K_GetKartAccel(player_t *player);
|
||||
UINT16 K_GetKartFlashing(void);
|
||||
fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove);
|
||||
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);
|
||||
void K_LoadKartHUDGraphics(void);
|
||||
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_drawKartFreePlay(UINT32 flashtime);
|
||||
void K_LoadIconGraphics(char *facestr, INT32 skinnum);
|
||||
void K_ReloadSkinIconGraphics(void);
|
||||
|
||||
|
|
|
@ -628,6 +628,16 @@ static int lib_pCanRunOnWater(lua_State *L)
|
|||
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
|
||||
////////////
|
||||
|
||||
|
@ -932,7 +942,7 @@ static int lib_pHomingAttack(lua_State *L)
|
|||
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));
|
||||
//HUDSAFE
|
||||
|
@ -940,7 +950,7 @@ static int lib_pSuperReady(lua_State *L)
|
|||
return LUA_ErrInvalid(L, "player_t");
|
||||
lua_pushboolean(L, P_SuperReady(player));
|
||||
return 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
static int lib_pDoJump(lua_State *L)
|
||||
{
|
||||
|
@ -2038,6 +2048,26 @@ static int lib_kGetKartColorByName(lua_State *L)
|
|||
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)
|
||||
{
|
||||
mobj_t *mobj1 = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||
|
@ -2053,16 +2083,28 @@ static int lib_kKartBouncing(lua_State *L)
|
|||
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)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
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
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
if (!source)
|
||||
return LUA_ErrInvalid(L, "mobj_t");
|
||||
K_SpinPlayer(player, source);
|
||||
K_SpinPlayer(player, source, type, trapitem);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2092,7 +2134,7 @@ static int lib_kExplodePlayer(lua_State *L)
|
|||
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 *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");
|
||||
if (!victim)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
K_StealBalloon(player, victim, force);
|
||||
K_StealBumper(player, victim, force);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2125,7 +2167,7 @@ static int lib_kSpawnKartExplosion(lua_State *L)
|
|||
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));
|
||||
NOHUD
|
||||
|
@ -2135,6 +2177,27 @@ static int lib_kSpawnDriftTrail(lua_State *L)
|
|||
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)
|
||||
{
|
||||
mobj_t *spawner = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||
|
@ -2145,25 +2208,52 @@ static int lib_kDriftDustHandling(lua_State *L)
|
|||
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));
|
||||
boolean doPFlag = luaL_checkboolean(L, 2);
|
||||
NOHUD
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
K_DoMushroom(player, doPFlag);
|
||||
K_DoSneaker(player, doPFlag);
|
||||
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));
|
||||
fixed_t vertispeed = luaL_checkfixed(L, 2);
|
||||
boolean mute = luaL_checkboolean(L, 3);
|
||||
NOHUD
|
||||
if (!mo)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -2260,6 +2350,7 @@ static luaL_Reg lib[] = {
|
|||
{"P_CheckDeathPitCollide",lib_pCheckDeathPitCollide},
|
||||
{"P_CheckSolidLava",lib_pCheckSolidLava},
|
||||
{"P_CanRunOnWater",lib_pCanRunOnWater},
|
||||
{"P_SpawnShadowMobj",lib_pSpawnShadowMobj},
|
||||
|
||||
// p_user
|
||||
{"P_GetPlayerHeight",lib_pGetPlayerHeight},
|
||||
|
@ -2290,7 +2381,7 @@ static luaL_Reg lib[] = {
|
|||
{"P_LookForEnemies",lib_pLookForEnemies},
|
||||
{"P_NukeEnemies",lib_pNukeEnemies},
|
||||
{"P_HomingAttack",lib_pHomingAttack},
|
||||
{"P_SuperReady",lib_pSuperReady},
|
||||
//{"P_SuperReady",lib_pSuperReady},
|
||||
{"P_DoJump",lib_pDoJump},
|
||||
{"P_SpawnThokMobj",lib_pSpawnThokMobj},
|
||||
{"P_SpawnSpinMobj",lib_pSpawnSpinMobj},
|
||||
|
@ -2385,16 +2476,23 @@ static luaL_Reg lib[] = {
|
|||
|
||||
// k_kart
|
||||
{"K_GetKartColorByName",lib_kGetKartColorByName},
|
||||
{"K_IsPlayerLosing",lib_kIsPlayerLosing},
|
||||
{"K_IsPlayerWanted",lib_kIsPlayerWanted},
|
||||
{"K_KartBouncing",lib_kKartBouncing},
|
||||
{"K_DoInstashield",lib_kDoInstashield},
|
||||
{"K_SpinPlayer",lib_kSpinPlayer},
|
||||
{"K_SquishPlayer",lib_kSquishPlayer},
|
||||
{"K_ExplodePlayer",lib_kExplodePlayer},
|
||||
{"K_StealBalloon",lib_kStealBalloon},
|
||||
{"K_StealBumper",lib_kStealBumper},
|
||||
{"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_DoMushroom",lib_kDoMushroom},
|
||||
{"K_DoBouncePad",lib_kDoBouncePad},
|
||||
{"K_DoSneaker",lib_kDoSneaker},
|
||||
{"K_DoPogoSpring",lib_kDoPogoSpring},
|
||||
{"K_KillBananaChain",lib_kKillBananaChain},
|
||||
{"K_RepairOrbitChain",lib_kRepairOrbitChain},
|
||||
{"K_MomentumToFacing",lib_kMomentumToFacing},
|
||||
{"K_GetKartSpeed",lib_kGetKartSpeed},
|
||||
{"K_GetKartAccel",lib_kGetKartAccel},
|
||||
|
|
|
@ -424,6 +424,30 @@ static int libd_drawFill(lua_State *L)
|
|||
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)
|
||||
{
|
||||
fixed_t x = luaL_checkinteger(L, 1);
|
||||
|
@ -568,6 +592,7 @@ static luaL_Reg lib_draw[] = {
|
|||
{"drawNum", libd_drawNum},
|
||||
{"drawPaddedNum", libd_drawPaddedNum},
|
||||
{"drawFill", libd_drawFill},
|
||||
{"fadeScreen", libd_fadeScreen},
|
||||
{"drawString", libd_drawString},
|
||||
{"stringWidth", libd_stringWidth},
|
||||
{"getColormap", libd_getColormap},
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "tables.h"
|
||||
#include "p_local.h"
|
||||
#include "doomstat.h" // for ALL7EMERALDS
|
||||
#include "k_kart.h" // KartColor_Opposite
|
||||
|
||||
#include "lua_script.h"
|
||||
#include "lua_libs.h"
|
||||
|
@ -191,8 +192,8 @@ static int lib_coloropposite(lua_State *L)
|
|||
UINT8 colornum = (UINT8)luaL_checkinteger(L, 1);
|
||||
if (colornum >= MAXSKINCOLORS)
|
||||
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, Color_Opposite[colornum*2+1]); // push frame
|
||||
lua_pushinteger(L, KartColor_Opposite[colornum*2]); // push color
|
||||
lua_pushinteger(L, KartColor_Opposite[colornum*2+1]); // push frame
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -530,10 +530,22 @@ static int mobj_set(lua_State *L)
|
|||
case mobj_bprev:
|
||||
return UNIMPLEMENTED;
|
||||
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;
|
||||
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;
|
||||
case mobj_type: // yeah sure, we'll let you change the mobj's type.
|
||||
{
|
||||
|
|
|
@ -962,6 +962,8 @@ void LUA_Archive(void)
|
|||
ArchiveExtVars(&players[i], "player");
|
||||
}
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
|
||||
{
|
||||
|
@ -969,6 +971,7 @@ void LUA_Archive(void)
|
|||
// and write mobjnum in otherwise.
|
||||
ArchiveExtVars(th, "mobj");
|
||||
}
|
||||
}
|
||||
WRITEUINT32(save_p, UINT32_MAX); // end of mobjs marker, replaces mobjnum.
|
||||
|
||||
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
|
||||
//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)
|
||||
player->viewz = player->mo->z + player->mo->height - player->viewheight;
|
||||
else
|
||||
|
|
2270
src/m_menu.c
2270
src/m_menu.c
File diff suppressed because it is too large
Load Diff
|
@ -267,7 +267,7 @@ void Screenshot_option_Onchange(void);
|
|||
prev,\
|
||||
source,\
|
||||
M_DrawServerMenu,\
|
||||
27,40,\
|
||||
24,40,\
|
||||
0,\
|
||||
NULL\
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ void Screenshot_option_Onchange(void);
|
|||
prev,\
|
||||
source,\
|
||||
M_DrawControl,\
|
||||
24, 40,\
|
||||
26, 40,\
|
||||
0,\
|
||||
NULL\
|
||||
}
|
||||
|
|
|
@ -56,7 +56,9 @@ typedef off_t off64_t;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32)
|
||||
#if defined(__MINGW32__) && ((__GNUC__ > 7) || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3))
|
||||
#define PRIdS "u"
|
||||
#elif defined (_WIN32)
|
||||
#define PRIdS "Iu"
|
||||
#elif defined (_PSP) || defined (_arch_dreamcast) || defined (DJGPP) || defined (_WII) || defined (_NDS) || defined (_PS3)
|
||||
#define PRIdS "u"
|
||||
|
|
113
src/p_enemy.c
113
src/p_enemy.c
|
@ -188,8 +188,10 @@ void A_DualAction(mobj_t *actor);
|
|||
void A_RemoteAction(mobj_t *actor);
|
||||
void A_ToggleFlameJet(mobj_t *actor);
|
||||
void A_ItemPop(mobj_t *actor); // SRB2kart
|
||||
void A_RedShellChase(mobj_t *actor); // SRB2kart
|
||||
void A_BobombExplode(mobj_t *actor); // SRB2kart
|
||||
void A_JawzChase(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_GhostMe(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)))
|
||||
return;
|
||||
|
||||
if (leveltime < 4*TICRATE) // SRB2kart - no looking before race starts
|
||||
if (leveltime < starttime) // SRB2kart - no looking before race starts
|
||||
return;
|
||||
|
||||
// go into chase state
|
||||
|
@ -2549,7 +2551,7 @@ void A_MonitorPop(mobj_t *actor)
|
|||
mobj_t *remains;
|
||||
mobjtype_t explode;
|
||||
mobjtype_t item = 0;
|
||||
mobjtype_t newbox;
|
||||
//mobjtype_t newbox;
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_MonitorPop", actor))
|
||||
|
@ -2601,7 +2603,7 @@ void A_MonitorPop(mobj_t *actor)
|
|||
|
||||
switch (actor->type)
|
||||
{
|
||||
case MT_QUESTIONBOX: // Random!
|
||||
/*case MT_QUESTIONBOX: // Random!
|
||||
{
|
||||
mobjtype_t spawnchance[256];
|
||||
INT32 numchoices = 0, i = 0;
|
||||
|
@ -2635,7 +2637,7 @@ for (i = cvar.value; i; --i) spawnchance[numchoices++] = type
|
|||
|
||||
remains->flags2 &= ~MF2_AMBUSH;
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
default:
|
||||
item = actor->info->damage;
|
||||
break;
|
||||
|
@ -3238,8 +3240,10 @@ void A_WaterShield(mobj_t *actor)
|
|||
P_SpawnShieldOrb(player);
|
||||
}
|
||||
|
||||
/* // SRB2kart - Can't drown.
|
||||
if (player->powers[pw_underwater] && player->powers[pw_underwater] <= 12*TICRATE + 1)
|
||||
P_RestoreMusic(player);
|
||||
*/
|
||||
|
||||
player->powers[pw_underwater] = 0;
|
||||
|
||||
|
@ -3825,7 +3829,7 @@ void A_ThrownRing(mobj_t *actor)
|
|||
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.
|
||||
{
|
||||
const INT32 temp = actor->threshold;
|
||||
|
@ -3877,7 +3881,7 @@ void A_ThrownRing(mobj_t *actor)
|
|||
&& actor->target->player->ctfteam == player->ctfteam)
|
||||
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;
|
||||
|
||||
}
|
||||
|
@ -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.
|
||||
return true;
|
||||
|
||||
if (thing->player && (thing->player->kartstuff[k_bootimer]
|
||||
|| (G_BattleGametype() && thing->player && thing->player->kartstuff[k_balloon] <= 0 && thing->player->kartstuff[k_comebacktimer])))
|
||||
if (thing->player && (thing->player->kartstuff[k_hyudorotimer]
|
||||
|| (G_BattleGametype() && thing->player && thing->player->kartstuff[k_bumper] <= 0 && thing->player->kartstuff[k_comebacktimer])))
|
||||
return true;
|
||||
|
||||
if ((gametype == GT_CTF || gametype == GT_TEAMMATCH)
|
||||
|
@ -3990,6 +3994,9 @@ void A_SetSolidSteam(mobj_t *actor)
|
|||
#endif
|
||||
actor->flags &= ~MF_NOCLIP;
|
||||
actor->flags |= MF_SOLID;
|
||||
|
||||
if (!(actor->flags2 & MF2_AMBUSH)) // Don't be so obnoxious.
|
||||
{
|
||||
if (P_RandomChance(FRACUNIT/8))
|
||||
{
|
||||
if (actor->info->deathsound)
|
||||
|
@ -4000,6 +4007,7 @@ void A_SetSolidSteam(mobj_t *actor)
|
|||
if (actor->info->painsound)
|
||||
S_StartSound(actor, actor->info->painsound);
|
||||
}
|
||||
}
|
||||
|
||||
P_SetObjectMomZ (actor, 1, true);
|
||||
}
|
||||
|
@ -4042,8 +4050,8 @@ void A_SignPlayer(mobj_t *actor)
|
|||
return;
|
||||
|
||||
// Set the sign to be an appropriate background color for this player's skincolor.
|
||||
actor->color = Color_Opposite[actor->target->player->skincolor*2];
|
||||
actor->frame += Color_Opposite[actor->target->player->skincolor*2+1];
|
||||
actor->color = KartColor_Opposite[actor->target->player->skincolor*2];
|
||||
actor->frame += KartColor_Opposite[actor->target->player->skincolor*2+1];
|
||||
|
||||
// spawn an overlay of the player's face.
|
||||
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)
|
||||
{
|
||||
mobj_t *remains;
|
||||
|
@ -8143,7 +8151,7 @@ void A_ItemPop(mobj_t *actor)
|
|||
if (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;
|
||||
|
||||
remains->flags2 &= ~MF2_AMBUSH;
|
||||
|
@ -8154,14 +8162,14 @@ void A_ItemPop(mobj_t *actor)
|
|||
P_RemoveMobj(actor);
|
||||
}
|
||||
|
||||
void A_RedShellChase(mobj_t *actor)
|
||||
void A_JawzChase(mobj_t *actor)
|
||||
{
|
||||
|
||||
INT32 c = 0;
|
||||
INT32 stop;
|
||||
player_t *player;
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_RedShellChase", actor))
|
||||
if (LUA_CallAction("A_JawzChase", actor))
|
||||
return;
|
||||
#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
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
if (G_BattleGametype())
|
||||
{
|
||||
if (player->kartstuff[k_balloon] <= 0)
|
||||
if (player->kartstuff[k_bumper] <= 0)
|
||||
continue;
|
||||
|
||||
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
|
||||
&& P_AproxDistance(P_AproxDistance(player->mo->x-actor->x,
|
||||
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);
|
||||
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;
|
||||
thinker_t *th;
|
||||
|
@ -8266,7 +8312,7 @@ void A_BobombExplode(mobj_t *actor)
|
|||
INT32 locvar1 = var1;
|
||||
mobjtype_t type;
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUA_CallAction("A_BobombExplode", actor))
|
||||
if (LUA_CallAction("A_MineExplode", actor))
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
@ -8282,10 +8328,10 @@ void A_BobombExplode(mobj_t *actor)
|
|||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
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
|
||||
|
||||
if (actor->target && actor->target->player)
|
||||
K_SpawnBobombExplosion(actor, actor->target->player->skincolor);
|
||||
K_SpawnMineExplosion(actor, actor->target->player->skincolor);
|
||||
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;
|
||||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -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_SPINFIRE: // Elemental Shield flame balls
|
||||
case MT_MUSHROOMTRAIL:
|
||||
case MT_SNEAKERTRAIL:
|
||||
case MT_SPIKE: // Floor Spike
|
||||
// Is the object hang from the ceiling?
|
||||
// In that case, swap the planes used.
|
||||
|
|
357
src/p_inter.c
357
src/p_inter.c
|
@ -152,25 +152,21 @@ void P_ResetStarposts(void)
|
|||
//
|
||||
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;*/
|
||||
|
||||
if (weapon)
|
||||
{
|
||||
if (player->kartstuff[k_bootaketimer] || player->kartstuff[k_boostolentimer]
|
||||
|| player->kartstuff[k_growshrinktimer] > 1 || player->kartstuff[k_goldshroomtimer]) // Item-specific timer going off
|
||||
if (player->kartstuff[k_stealingtimer] || player->kartstuff[k_stolentimer]
|
||||
|| player->kartstuff[k_growshrinktimer] != 0 || player->kartstuff[k_rocketsneakertimer]) // Item-specific timer going off
|
||||
return false;
|
||||
|
||||
if (player->kartstuff[k_itemroulette]
|
||||
|| player->kartstuff[k_greenshell] || player->kartstuff[k_triplegreenshell]
|
||||
|| player->kartstuff[k_redshell] || player->kartstuff[k_tripleredshell]
|
||||
|| 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
|
||||
|| player->kartstuff[k_itemamount]
|
||||
|| player->kartstuff[k_itemheld]) // Item slot already taken up
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -414,7 +410,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
if (!P_CanPickupItem(player, true))
|
||||
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])
|
||||
return;
|
||||
|
@ -426,6 +422,67 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
P_SetTarget(&special->target, toucher);
|
||||
P_KillMobj(special, toucher, toucher);
|
||||
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 //
|
||||
// ***************************************** //
|
||||
|
@ -1490,12 +1547,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
|| special->z > toucher->z + (toucher->height*2/3))
|
||||
return; // Only go in the mouth
|
||||
|
||||
/* // SRB2kart - Can't drown.
|
||||
// Eaten by player!
|
||||
if (player->powers[pw_underwater] && player->powers[pw_underwater] <= 12*TICRATE + 1)
|
||||
P_RestoreMusic(player);
|
||||
|
||||
if (player->powers[pw_underwater] < underwatertics + 1)
|
||||
player->powers[pw_underwater] = underwatertics + 1;
|
||||
*/
|
||||
|
||||
/*
|
||||
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");
|
||||
break;
|
||||
case MT_SPINFIRE:
|
||||
case MT_MUSHROOMTRAIL:
|
||||
case MT_SNEAKERTRAIL:
|
||||
str = M_GetText("%s%s's elemental fire trail %s %s.\n");
|
||||
break;
|
||||
case MT_THROWNBOUNCE:
|
||||
|
@ -1749,7 +1808,7 @@ void P_CheckTimeLimit(void)
|
|||
if (G_RaceGametype())
|
||||
return;
|
||||
|
||||
if (leveltime < timelimitintics)
|
||||
if (leveltime < (timelimitintics + starttime))
|
||||
return;
|
||||
|
||||
if (gameaction == ga_completed)
|
||||
|
@ -1771,9 +1830,6 @@ void P_CheckTimeLimit(void)
|
|||
P_AddPlayerScore(&players[i], players[i].score);
|
||||
}
|
||||
}
|
||||
|
||||
if (server)
|
||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
}
|
||||
|
||||
//Optional tie-breaker for Match/CTF
|
||||
|
@ -1787,6 +1843,8 @@ void P_CheckTimeLimit(void)
|
|||
//Figure out if we have enough participating players to care.
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (players[i].exiting)
|
||||
return;
|
||||
if (playeringame[i] && players[i].spectator)
|
||||
spectators++;
|
||||
}
|
||||
|
@ -1815,7 +1873,7 @@ void P_CheckTimeLimit(void)
|
|||
{
|
||||
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];
|
||||
playerarray[i-1] = playerarray[k];
|
||||
|
@ -1825,7 +1883,7 @@ void P_CheckTimeLimit(void)
|
|||
}
|
||||
|
||||
//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;
|
||||
}
|
||||
else
|
||||
|
@ -1835,12 +1893,19 @@ void P_CheckTimeLimit(void)
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (server)
|
||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
}
|
||||
|
||||
if (server)
|
||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
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.
|
||||
|
@ -1863,7 +1928,7 @@ void P_CheckPointLimit(void)
|
|||
return;
|
||||
|
||||
// pointlimit is nonzero, check if it's been reached by this player
|
||||
if (G_GametypeHasTeams())
|
||||
/*if (G_GametypeHasTeams())
|
||||
{
|
||||
// Just check both teams
|
||||
if ((UINT32)cv_pointlimit.value <= redscore || (UINT32)cv_pointlimit.value <= bluescore)
|
||||
|
@ -1872,18 +1937,27 @@ void P_CheckPointLimit(void)
|
|||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
else*/
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
continue;
|
||||
|
||||
if ((UINT32)cv_pointlimit.value <= players[i].score)
|
||||
if ((UINT32)cv_pointlimit.value <= players[i].marescore)
|
||||
{
|
||||
if (server)
|
||||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
for (i = 0; i < MAXPLAYERS; i++) // AAAAA nested loop using the same iteration variable ;;
|
||||
{
|
||||
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,12 +2051,14 @@ void P_CheckSurvivors(void)
|
|||
// Checks whether or not to end a race netgame.
|
||||
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.
|
||||
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)
|
||||
continue;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1992,6 +2068,35 @@ boolean P_CheckRacers(void)
|
|||
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;
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
// 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)
|
||||
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
|
||||
if (target->type != MT_PLAYER && !(target->flags & MF_MONITOR)
|
||||
&& !(target->type == MT_GREENITEM || target->type == MT_GREENSHIELD
|
||||
|| target->type == MT_TRIPLEGREENSHIELD1 || target->type == MT_TRIPLEGREENSHIELD2 || target->type == MT_TRIPLEGREENSHIELD3
|
||||
|| target->type == MT_REDITEM || target->type == MT_REDITEMDUD || target->type == MT_REDSHIELD
|
||||
|| 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_ORBINAUT || target->type == MT_ORBINAUT_SHIELD
|
||||
|| target->type == MT_JAWZ || target->type == MT_JAWZ_DUD || target->type == MT_JAWZ_SHIELD
|
||||
|| target->type == MT_BANANA || target->type == MT_BANANA_SHIELD
|
||||
|| 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
|
||||
else
|
||||
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;
|
||||
#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
|
||||
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
|
||||
P_UnsetThingPosition(target);
|
||||
target->flags |= MF_NOBLOCKMAP;
|
||||
target->flags |= MF_NOBLOCKMAP|MF_NOCLIPHEIGHT;
|
||||
P_SetThingPosition(target);
|
||||
|
||||
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())
|
||||
{
|
||||
K_CheckBalloons();
|
||||
}
|
||||
K_CheckBumpers();
|
||||
|
||||
target->player->kartstuff[k_pogospring] = 0;
|
||||
}
|
||||
|
||||
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 (player->kartstuff[k_balloon] > 0)
|
||||
if (player->kartstuff[k_bumper] > 0)
|
||||
{
|
||||
if (player->kartstuff[k_balloon] == 1)
|
||||
CONS_Printf(M_GetText("%s lost all of their balloons!\n"), player_names[player-players]);
|
||||
player->kartstuff[k_balloon]--;
|
||||
if (player->kartstuff[k_bumper] == 1)
|
||||
{
|
||||
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)
|
||||
{
|
||||
//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])))
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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.
|
||||
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)))
|
||||
|
@ -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.
|
||||
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
|
||||
P_PlayRinglossSound(player->mo); // Ringledingle!
|
||||
|
@ -2964,7 +3079,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
#else
|
||||
static const boolean force = false;
|
||||
#endif
|
||||
mobj_t *blueexplode;
|
||||
|
||||
if (objectplacing)
|
||||
return false;
|
||||
|
@ -3124,42 +3238,57 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
|
||||
//{ SRB2kart - special damage sources
|
||||
|
||||
player->kartstuff[k_mushroomtimer] = 0;
|
||||
|
||||
// Thunder
|
||||
// Shrink
|
||||
if (damage == 64)
|
||||
{
|
||||
if (player == source->player)
|
||||
return false;
|
||||
// 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!
|
||||
player->mo->scalespeed = FRACUNIT/TICRATE;
|
||||
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;
|
||||
}
|
||||
// Mega Mushroom? Let's take that away.
|
||||
|
||||
K_StripItems(player);
|
||||
player->kartstuff[k_growshrinktimer] -= (200+(40*(16-player->kartstuff[k_position])));
|
||||
}
|
||||
// Grow? Let's take that away.
|
||||
if (player->kartstuff[k_growshrinktimer] > 0)
|
||||
{
|
||||
player->kartstuff[k_growshrinktimer] = 2;
|
||||
}
|
||||
player->kartstuff[k_sneakertimer] = 0;
|
||||
// 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;
|
||||
}
|
||||
|
||||
// Blue Thunder
|
||||
// Self-Propelled Bomb
|
||||
if (damage == 65)
|
||||
{
|
||||
mobj_t *spbexplode;
|
||||
if (player == source->player)
|
||||
return false;
|
||||
// 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);
|
||||
blueexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUEEXPLOSION);
|
||||
P_SetTarget(&blueexplode->target, source);
|
||||
//P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUELIGHTNING);
|
||||
spbexplode = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BLUEEXPLOSION);
|
||||
P_SetTarget(&spbexplode->target, source);
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
|
@ -3185,22 +3314,24 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
// Instant-Death
|
||||
if (damage == 10000)
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (inflictor && (inflictor->type == MT_GREENITEM || inflictor->type == MT_GREENSHIELD
|
||||
|| inflictor->type == MT_REDITEM || inflictor->type == MT_REDSHIELD || inflictor->type == MT_REDITEMDUD
|
||||
if (inflictor && (inflictor->type == MT_ORBINAUT || inflictor->type == MT_ORBINAUT_SHIELD
|
||||
|| 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_TRIPLEGREENSHIELD1 || inflictor->type == MT_TRIPLEGREENSHIELD2 || inflictor->type == MT_TRIPLEGREENSHIELD3
|
||||
|| inflictor->type == MT_TRIPLEREDSHIELD1 || inflictor->type == MT_TRIPLEREDSHIELD2 || inflictor->type == MT_TRIPLEREDSHIELD3
|
||||
|| inflictor->player))
|
||||
{
|
||||
player->kartstuff[k_spinouttype] = 1;
|
||||
K_SpinPlayer(player, source);
|
||||
player->kartstuff[k_sneakertimer] = 0;
|
||||
K_SpinPlayer(player, source, 1, (inflictor->type == MT_FAKEITEM || inflictor->type == MT_FAKESHIELD));
|
||||
damage = player->mo->health - 1;
|
||||
P_RingDamage(player, inflictor, source, damage);
|
||||
P_PlayerRingBurst(player, 5);
|
||||
if (inflictor->type == MT_FAKEITEM || inflictor->type == MT_FAKESHIELD)
|
||||
player->mo->momx = player->mo->momy = 0;
|
||||
if (P_IsLocalPlayer(player))
|
||||
{
|
||||
|
@ -3210,8 +3341,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
}
|
||||
else
|
||||
{
|
||||
player->kartstuff[k_spinouttype] = -1;
|
||||
K_SpinPlayer(player, source);
|
||||
K_SpinPlayer(player, source, 0, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -3362,6 +3492,8 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
break;
|
||||
}
|
||||
|
||||
if (!P_MobjWasRemoved(target))
|
||||
{
|
||||
target->reactiontime = 0; // we're awake now...
|
||||
|
||||
if (source && source != target)
|
||||
|
@ -3380,6 +3512,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
P_SetMobjState(target, target->info->seestate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#define FLOATSPEED (FRACUNIT*4)
|
||||
|
||||
#define VIEWHEIGHTS "41"
|
||||
//#define VIEWHEIGHTS "41"
|
||||
|
||||
// Maximum player score.
|
||||
#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_RestoreMusic(player_t *player);
|
||||
boolean P_EndingMusic(player_t *player);
|
||||
void P_SpawnShieldOrb(player_t *player);
|
||||
mobj_t *P_SpawnGhostMobj(mobj_t *mobj);
|
||||
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_PlayerAfterThink(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_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);
|
||||
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
|
||||
boolean P_SuperReady(player_t *player);
|
||||
//boolean P_SuperReady(player_t *player);
|
||||
void P_DoJump(player_t *player, boolean soundandstate);
|
||||
boolean P_AnalogMove(player_t *player);
|
||||
boolean P_TransferToNextMare(player_t *player);
|
||||
UINT8 P_FindLowestMare(void);
|
||||
UINT8 P_FindLowestLap(void);
|
||||
UINT8 P_FindHighestLap(void);
|
||||
void P_FindEmerald(void);
|
||||
void P_TransferToAxis(player_t *player, INT32 axisnum);
|
||||
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_PlayLivesJingle(player_t *player);
|
||||
#define P_PlayRinglossSound(s) S_StartSound(s, (mariomode) ? sfx_mario8 : sfx_altow1 + P_RandomKey(4));
|
||||
#define P_PlayDeathSound(s) S_StartSound(s, sfx_altdi1 + P_RandomKey(4));
|
||||
#define P_PlayVictorySound(s) S_StartSound(s, sfx_victr1 + P_RandomKey(4));
|
||||
void P_PlayRinglossSound(mobj_t *source);
|
||||
void P_PlayDeathSound(mobj_t *source);
|
||||
void P_PlayVictorySound(mobj_t *source);
|
||||
|
||||
|
||||
//
|
||||
|
@ -209,7 +212,7 @@ void P_PlayLivesJingle(player_t *player);
|
|||
extern mapthing_t *itemrespawnque[ITEMQUESIZE];
|
||||
extern tic_t itemrespawntime[ITEMQUESIZE];
|
||||
extern size_t iquehead, iquetail;
|
||||
extern consvar_t cv_gravity, cv_viewheight;
|
||||
extern consvar_t cv_gravity/*, cv_viewheight*/;
|
||||
|
||||
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_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z);
|
||||
void P_SlideMove(mobj_t *mo, boolean forceslide);
|
||||
void P_BouncePlayerMove(mobj_t *mo);
|
||||
void P_BounceMove(mobj_t *mo);
|
||||
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);
|
||||
|
|
493
src/p_map.c
493
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)
|
||||
{
|
||||
//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 vertispeed = spring->info->mass;
|
||||
fixed_t horizspeed = spring->info->damage;
|
||||
|
@ -178,12 +179,12 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
}
|
||||
|
||||
if (vertispeed)
|
||||
object->momz = FixedMul(vertispeed,FixedSqrt(FixedMul(object->scale, spring->scale)));
|
||||
object->momz = FixedMul(vertispeed,FixedSqrt(FixedMul(scale, spring->scale)));
|
||||
|
||||
if (horizspeed)
|
||||
{
|
||||
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
|
||||
{
|
||||
fixed_t finalSpeed = horizspeed;
|
||||
|
@ -192,7 +193,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
|||
if (pSpeed > finalSpeed)
|
||||
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,6 +309,16 @@ static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object)
|
|||
if (spring->state != &states[S_STEAM1]) // Only when it bursts
|
||||
break;
|
||||
|
||||
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
|
||||
|
@ -655,10 +666,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
if (tmthing->type == MT_RANDOMITEM)
|
||||
return true;
|
||||
if (tmthing->type == MT_GREENITEM || tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD ||
|
||||
tmthing->type == MT_GREENSHIELD || tmthing->type == MT_REDSHIELD ||
|
||||
tmthing->type == MT_TRIPLEGREENSHIELD1 || tmthing->type == MT_TRIPLEGREENSHIELD2 || tmthing->type == MT_TRIPLEGREENSHIELD3 ||
|
||||
tmthing->type == MT_TRIPLEREDSHIELD1 || tmthing->type == MT_TRIPLEREDSHIELD2 || tmthing->type == MT_TRIPLEREDSHIELD3)
|
||||
if (tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD
|
||||
|| tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD)
|
||||
{
|
||||
// see if it went over / under
|
||||
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)
|
||||
return true;
|
||||
|
||||
if (((tmthing->type == MT_TRIPLEGREENSHIELD1 || tmthing->type == MT_TRIPLEGREENSHIELD2 || tmthing->type == MT_TRIPLEGREENSHIELD3
|
||||
|| tmthing->type == MT_TRIPLEREDSHIELD1 || tmthing->type == MT_TRIPLEREDSHIELD2 || tmthing->type == MT_TRIPLEREDSHIELD3)
|
||||
&& (thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
||||
|| thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3))
|
||||
if ((tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD) && tmthing->lastlook
|
||||
&& (thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD) && thing->lastlook
|
||||
&& (tmthing->target == thing->target)) // Don't hit each other if you have the same target
|
||||
return true;
|
||||
|
||||
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;
|
||||
|
||||
if (thing->type == MT_PLAYER)
|
||||
{
|
||||
// Player Damage
|
||||
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);
|
||||
|
||||
// This Item Damage
|
||||
|
@ -703,13 +711,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
||||
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
|
||||
|| thing->type == MT_GREENSHIELD || thing->type == MT_REDSHIELD
|
||||
|| 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_BANANAITEM || thing->type == MT_BANANASHIELD
|
||||
|| thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|
||||
|| thing->type == MT_FIREBALL)
|
||||
else if (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||
|| thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD
|
||||
|| thing->type == MT_BANANA || thing->type == MT_BANANA_SHIELD
|
||||
|| thing->type == MT_BALLHOG)
|
||||
{
|
||||
// Other Item Damage
|
||||
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)
|
||||
{
|
||||
if (tmthing->type == MT_GREENSHIELD || tmthing->type == MT_REDSHIELD
|
||||
|| tmthing->type == MT_TRIPLEGREENSHIELD1 || tmthing->type == MT_TRIPLEGREENSHIELD2 || tmthing->type == MT_TRIPLEGREENSHIELD3
|
||||
|| tmthing->type == MT_TRIPLEREDSHIELD1 || tmthing->type == MT_TRIPLEREDSHIELD2 || tmthing->type == MT_TRIPLEREDSHIELD3)
|
||||
if (tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD)
|
||||
{
|
||||
// This Item Damage
|
||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -770,7 +773,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
||||
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
|
||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -787,12 +790,12 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
// Bomb death
|
||||
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);
|
||||
|
||||
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
|
||||
if (tmthing->z > thing->z + thing->height)
|
||||
|
@ -834,7 +837,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
return true;
|
||||
}
|
||||
else if (tmthing->type == MT_BOMBEXPLOSION)
|
||||
else if (tmthing->type == MT_MINEEXPLOSION)
|
||||
{
|
||||
// see if it went over / under
|
||||
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 (tmthing->state == &states[S_BOMBEXPLOSION1])
|
||||
if (tmthing->state == &states[S_MINEEXPLOSION1])
|
||||
K_ExplodePlayer(thing->player, tmthing->target);
|
||||
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.
|
||||
}
|
||||
else if (tmthing->type == MT_BANANASHIELD || tmthing->type == MT_BANANAITEM
|
||||
|| tmthing->type == MT_TRIPLEBANANASHIELD1 || tmthing->type == MT_TRIPLEBANANASHIELD2 || tmthing->type == MT_TRIPLEBANANASHIELD3
|
||||
|| tmthing->type == MT_FIREBALL)
|
||||
else if (tmthing->type == MT_BANANA_SHIELD || tmthing->type == MT_BANANA
|
||||
|| tmthing->type == MT_BALLHOG)
|
||||
{
|
||||
// see if it went over / under
|
||||
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)
|
||||
return true;
|
||||
|
||||
if (((tmthing->type == MT_BANANASHIELD || tmthing->type == MT_TRIPLEBANANASHIELD1 || tmthing->type == MT_TRIPLEBANANASHIELD2 || tmthing->type == MT_TRIPLEBANANASHIELD3)
|
||||
&& (thing->type == MT_BANANASHIELD || thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3))
|
||||
if (((tmthing->type == MT_BANANA_SHIELD) && (thing->type == MT_BANANA_SHIELD))
|
||||
&& (tmthing->target == thing->target)) // Don't hit each other if you have the same target
|
||||
return true;
|
||||
|
||||
if (tmthing->type == MT_FIREBALL && thing->type == MT_FIREBALL)
|
||||
return true; // Fireballs don't collide with eachother
|
||||
if (tmthing->type == MT_BALLHOG && thing->type == MT_BALLHOG)
|
||||
return true; // Ballhogs don't collide with eachother
|
||||
|
||||
if (thing->player && thing->player->powers[pw_flashing])
|
||||
return true;
|
||||
|
@ -888,7 +889,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (thing->type == MT_PLAYER)
|
||||
{
|
||||
// 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
|
||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -902,12 +903,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
||||
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
|
||||
|| thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|
||||
|| thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|
||||
|| thing->type == MT_GREENSHIELD || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
||||
|| thing->type == MT_REDSHIELD || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3
|
||||
|| thing->type == MT_FIREBALL)
|
||||
else if (thing->type == MT_BANANA || thing->type == MT_BANANA_SHIELD
|
||||
|| thing->type == MT_ORBINAUT || thing->type == MT_ORBINAUT_SHIELD
|
||||
|| thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD || thing->type == MT_JAWZ_SHIELD
|
||||
|| thing->type == MT_BALLHOG)
|
||||
{
|
||||
// Other Item Damage
|
||||
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)
|
||||
{
|
||||
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
|
||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -985,10 +984,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
if (thing->player && thing->player->powers[pw_flashing])
|
||||
return true;
|
||||
|
||||
if (thing->type == MT_GREENITEM // 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_BOMBITEM
|
||||
|| thing->type == MT_BANANAITEM || thing->type == MT_FIREBALL)
|
||||
if (thing->type == MT_ORBINAUT // When these items collide with the fake item, just the fake item is destroyed
|
||||
|| thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||
|| thing->type == MT_SSMINE
|
||||
|| thing->type == MT_BANANA || thing->type == MT_BALLHOG)
|
||||
{
|
||||
// This Item Damage
|
||||
if (tmthing->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -1002,10 +1001,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
|
||||
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
|
||||
|| thing->type == MT_REDSHIELD || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3
|
||||
|| thing->type == MT_BOMBSHIELD
|
||||
|| thing->type == MT_BANANASHIELD || thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|
||||
else if (thing->type == MT_ORBINAUT_SHIELD // When these items collide with the fake item, both of them are destroyed
|
||||
|| thing->type == MT_JAWZ_SHIELD
|
||||
|| thing->type == MT_SSMINE_SHIELD
|
||||
|| thing->type == MT_BANANA_SHIELD
|
||||
|| thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
|
||||
{
|
||||
// Other Item Damage
|
||||
|
@ -1054,7 +1053,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
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
|
||||
if (tmthing->z > thing->z + thing->height)
|
||||
|
@ -1075,9 +1074,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
{
|
||||
P_KillMobj(tmthing, thing, thing);
|
||||
}
|
||||
else if (thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|
||||
|| thing->type == MT_GREENSHIELD || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
||||
|| thing->type == MT_REDSHIELD || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3)
|
||||
else if (thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||
|| thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD)
|
||||
{
|
||||
P_KillMobj(tmthing, thing, thing);
|
||||
|
||||
|
@ -1097,16 +1095,13 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
return true;
|
||||
}
|
||||
else if (tmthing->type == MT_PLAYER &&
|
||||
(thing->type == MT_GREENSHIELD || thing->type == MT_GREENITEM
|
||||
|| thing->type == MT_REDSHIELD || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|
||||
|| 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_ORBINAUT_SHIELD || thing->type == MT_ORBINAUT
|
||||
|| thing->type == MT_JAWZ_SHIELD || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||
|| thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM
|
||||
|| thing->type == MT_BANANASHIELD || thing->type == MT_BANANAITEM
|
||||
|| thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|
||||
|| thing->type == MT_BOMBSHIELD || thing->type == MT_BOMBITEM
|
||||
|| thing->type == MT_BOMBEXPLOSION
|
||||
|| thing->type == MT_SINK || thing->type == MT_FIREBALL
|
||||
|| thing->type == MT_BANANA_SHIELD || thing->type == MT_BANANA
|
||||
|| thing->type == MT_SSMINE_SHIELD || thing->type == MT_SSMINE
|
||||
|| thing->type == MT_MINEEXPLOSION
|
||||
|| thing->type == MT_SINK || thing->type == MT_BALLHOG
|
||||
))
|
||||
{
|
||||
// see if it went over / under
|
||||
|
@ -1116,12 +1111,11 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
return true; // underneath
|
||||
|
||||
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;
|
||||
|
||||
if (thing->type == MT_GREENSHIELD || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|
||||
|| thing->type == MT_REDSHIELD || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3
|
||||
|| thing->type == MT_GREENITEM || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|
||||
if (thing->type == MT_ORBINAUT_SHIELD || thing->type == MT_JAWZ_SHIELD
|
||||
|| thing->type == MT_ORBINAUT || thing->type == MT_JAWZ || thing->type == MT_JAWZ_DUD
|
||||
|| thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM)
|
||||
{
|
||||
if ((thing->target == tmthing) && (thing->threshold > 0))
|
||||
|
@ -1133,7 +1127,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
// Player Damage
|
||||
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);
|
||||
|
||||
// Other Item Damage
|
||||
|
@ -1148,9 +1145,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
||||
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
|
||||
|| thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|
||||
|| thing->type == MT_FIREBALL)
|
||||
else if (thing->type == MT_BANANA_SHIELD || thing->type == MT_BANANA
|
||||
|| thing->type == MT_BALLHOG)
|
||||
{
|
||||
if ((thing->target == tmthing) && (thing->threshold > 0))
|
||||
return true;
|
||||
|
@ -1159,7 +1155,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
return true;
|
||||
|
||||
// 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
|
||||
if (thing->eflags & MFE_VERTICALFLIP)
|
||||
|
@ -1173,7 +1169,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
|
||||
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))
|
||||
return true;
|
||||
|
@ -1183,13 +1179,13 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
P_KillMobj(thing, tmthing, tmthing);
|
||||
}
|
||||
else if (thing->type == MT_BOMBEXPLOSION && tmthing->player)
|
||||
else if (thing->type == MT_MINEEXPLOSION && tmthing->player)
|
||||
{
|
||||
// Player Damage
|
||||
if (thing->state == &states[S_BOMBEXPLOSION1])
|
||||
if (thing->state == &states[S_MINEEXPLOSION1])
|
||||
K_ExplodePlayer(tmthing->player, thing->target);
|
||||
else
|
||||
K_SpinPlayer(tmthing->player, thing->target);
|
||||
K_SpinPlayer(tmthing->player, thing->target, 0, false);
|
||||
|
||||
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))
|
||||
{
|
||||
// SRB2kart - Squish!
|
||||
if ((tmthing->player->kartstuff[k_growshrinktimer] > 0 && thing->player->kartstuff[k_growshrinktimer] <= 0)
|
||||
|| (tmthing->player->kartstuff[k_growshrinktimer] == 0 && thing->player->kartstuff[k_growshrinktimer] < 0))
|
||||
{
|
||||
if (tmthing->scale > thing->scale + (FRACUNIT/8))
|
||||
K_SquishPlayer(thing->player, tmthing);
|
||||
}
|
||||
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))
|
||||
{
|
||||
else if (thing->scale > tmthing->scale + (FRACUNIT/8))
|
||||
K_SquishPlayer(tmthing->player, thing);
|
||||
}
|
||||
|
||||
// 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);
|
||||
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);
|
||||
|
||||
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)
|
||||
return true; // underneath
|
||||
|
||||
if (thing->player->kartstuff[k_growshrinktimer] || thing->player->kartstuff[k_squishedtimer]
|
||||
|| thing->player->kartstuff[k_bootimer] || thing->player->kartstuff[k_spinouttimer]
|
||||
|| thing->player->kartstuff[k_startimer] || thing->player->kartstuff[k_justbumped]
|
||||
|| (G_BattleGametype() && (thing->player->kartstuff[k_balloon] <= 0
|
||||
&& (thing->player->kartstuff[k_comebacktimer])))
|
||||
|| tmthing->player->kartstuff[k_growshrinktimer] || tmthing->player->kartstuff[k_squishedtimer]
|
||||
|| 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]))))
|
||||
if (thing->player->kartstuff[k_squishedtimer] || thing->player->kartstuff[k_hyudorotimer]
|
||||
|| thing->player->kartstuff[k_justbumped] || thing->scale > tmthing->scale + (FRACUNIT/8)
|
||||
|| (G_BattleGametype() && thing->player->kartstuff[k_bumper] <= 0)
|
||||
|| tmthing->player->kartstuff[k_squishedtimer] || tmthing->player->kartstuff[k_hyudorotimer]
|
||||
|| tmthing->player->kartstuff[k_justbumped] || tmthing->scale > thing->scale + (FRACUNIT/8)
|
||||
|| (G_BattleGametype() && tmthing->player->kartstuff[k_bumper] <= 0))
|
||||
{
|
||||
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)
|
||||
{
|
||||
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_SpinPlayer(thing->player, tmthing);
|
||||
K_StealBumper(tmthing->player, thing->player, false);
|
||||
K_SpinPlayer(thing->player, tmthing, 0, false);
|
||||
}
|
||||
}
|
||||
else if (P_IsObjectOnGround(tmthing) && thing->momz < 0)
|
||||
{
|
||||
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_SpinPlayer(tmthing->player, thing);
|
||||
K_StealBumper(thing->player, tmthing->player, false);
|
||||
K_SpinPlayer(tmthing->player, thing, 0, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1757,15 +1672,15 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
|
||||
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_SpinPlayer(tmthing->player, thing);
|
||||
K_StealBumper(thing->player, tmthing->player, false);
|
||||
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_SpinPlayer(thing->player, tmthing);
|
||||
K_StealBumper(tmthing->player, thing->player, false);
|
||||
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 tryy = thiscam->y;
|
||||
|
||||
#ifndef NOCLIPCAM
|
||||
if ((thiscam == &camera && (players[displayplayer].pflags & PF_NOCLIP))
|
||||
|| (thiscam == &camera2 && (players[secondarydisplayplayer].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!!
|
||||
floatok = true;
|
||||
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;
|
||||
angle_t lineangle;
|
||||
|
@ -3256,6 +3174,47 @@ static void P_HitBounceLine(line_t *ld)
|
|||
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
|
||||
//
|
||||
|
@ -3874,33 +3833,28 @@ 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 trailx, traily;
|
||||
//fixed_t newx, newy;
|
||||
//INT32 hitcount;
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
||||
slidemo = mo;
|
||||
//hitcount = 0;
|
||||
|
||||
/*retry:
|
||||
if (++hitcount == 3)
|
||||
goto bounceback; // don't loop forever*/
|
||||
|
||||
if (mo->player)
|
||||
{
|
||||
mmomx = mo->player->rmomx;
|
||||
mmomy = mo->player->rmomy;
|
||||
|
||||
|
@ -3909,7 +3863,6 @@ void P_BounceMove(mobj_t *mo)
|
|||
mo->player->kartstuff[k_drift] = 0;
|
||||
mo->player->kartstuff[k_driftcharge] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mmomx = mo->momx;
|
||||
|
@ -3945,8 +3898,107 @@ void P_BounceMove(mobj_t *mo)
|
|||
P_PathTraverse(trailx, leady, trailx + mmomx, leady + 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
|
||||
/*if (bestslidefrac == FRACUNIT + 1)
|
||||
if (bestslidefrac == FRACUNIT + 1)
|
||||
{
|
||||
// the move must have hit the middle, so bounce straight back
|
||||
bounceback:
|
||||
|
@ -3956,22 +4008,12 @@ bounceback:
|
|||
mo->momy *= -1;
|
||||
mo->momx = FixedMul(mo->momx, (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;
|
||||
}*/
|
||||
}
|
||||
|
||||
// fudge a bit to make sure it doesn't hit
|
||||
/*bestslidefrac -= 0x800;
|
||||
bestslidefrac -= 0x800;
|
||||
if (bestslidefrac > 0)
|
||||
{
|
||||
newx = FixedMul(mmomx, bestslidefrac);
|
||||
|
@ -3979,7 +4021,7 @@ bounceback:
|
|||
|
||||
if (!P_TryMove(mo, mo->x + newx, mo->y + newy, true))
|
||||
goto bounceback;
|
||||
}*/
|
||||
}
|
||||
|
||||
// Now continue along the wall.
|
||||
// First calculate remainder.
|
||||
|
@ -4011,34 +4053,15 @@ bounceback:
|
|||
{
|
||||
tmxmove = FixedMul(mmomx, (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);
|
||||
mo->eflags |= MFE_JUSTBOUNCEDWALL;
|
||||
P_HitBounceLine(bestslideline); // clip the moves
|
||||
|
||||
mo->momx = tmxmove;
|
||||
mo->momy = tmymove;
|
||||
|
||||
if (mo->player)
|
||||
{
|
||||
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);
|
||||
if (!P_TryMove(mo, mo->x + tmxmove, mo->y + tmymove, true))
|
||||
goto retry;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
815
src/p_mobj.c
815
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?)
|
||||
#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.
|
||||
} mobj_t;
|
||||
|
@ -450,7 +450,7 @@ boolean P_SupermanLook4Players(mobj_t *actor);
|
|||
void P_DestroyRobots(void);
|
||||
void P_SnowThinker(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_SetScale(mobj_t *mobj, fixed_t newscale);
|
||||
void P_XYMovement(mobj_t *mo);
|
||||
|
|
|
@ -436,7 +436,7 @@ static void P_NetUnArchivePlayers(void)
|
|||
if (flags & AWAYVIEW)
|
||||
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);
|
||||
players[i].charability = READUINT8(save_p);
|
||||
|
@ -944,12 +944,11 @@ typedef enum
|
|||
MD2_EXTVAL1 = 1<<5,
|
||||
MD2_EXTVAL2 = 1<<6,
|
||||
MD2_HNEXT = 1<<7,
|
||||
#ifdef ESLOPE
|
||||
MD2_HPREV = 1<<8,
|
||||
#ifdef ESLOPE
|
||||
MD2_SLOPE = 1<<9,
|
||||
MD2_COLORIZED = 1<<10
|
||||
#else
|
||||
MD2_HPREV = 1<<8,
|
||||
MD2_COLORIZED = 1<<9
|
||||
#endif
|
||||
} mobj_diff2_t;
|
||||
|
@ -3195,6 +3194,9 @@ static void P_NetArchiveMisc(void)
|
|||
WRITEUINT32(save_p, ARCHIVEBLOCK_MISC);
|
||||
|
||||
WRITEINT16(save_p, gamemap);
|
||||
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++)
|
||||
|
@ -3210,7 +3212,10 @@ static void P_NetArchiveMisc(void)
|
|||
WRITEINT16(save_p, lastmap);
|
||||
|
||||
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++)
|
||||
WRITESINT8(save_p, votes[i]);
|
||||
|
@ -3255,9 +3260,14 @@ static void P_NetArchiveMisc(void)
|
|||
WRITEUINT8(save_p, franticitems);
|
||||
WRITEUINT8(save_p, comeback);
|
||||
|
||||
WRITEUINT32(save_p, lightningcooldown);
|
||||
WRITEUINT32(save_p, blueshellincoming);
|
||||
WRITEUINT8(save_p, blueshellplayer);
|
||||
for (i = 0; i < 4; i++)
|
||||
WRITESINT8(save_p, battlewanted[i]);
|
||||
|
||||
WRITEUINT32(save_p, wantedcalcdelay);
|
||||
WRITEUINT32(save_p, indirectitemcooldown);
|
||||
WRITEUINT32(save_p, spbincoming);
|
||||
WRITEUINT8(save_p, spbplayer);
|
||||
WRITEUINT32(save_p, mapreset);
|
||||
|
||||
// Is it paused?
|
||||
if (paused)
|
||||
|
@ -3307,7 +3317,10 @@ static inline boolean P_NetUnArchiveMisc(void)
|
|||
lastmap = READINT16(save_p);
|
||||
|
||||
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++)
|
||||
votes[i] = READSINT8(save_p);
|
||||
|
@ -3352,9 +3365,14 @@ static inline boolean P_NetUnArchiveMisc(void)
|
|||
franticitems = (boolean)READUINT8(save_p);
|
||||
comeback = (boolean)READUINT8(save_p);
|
||||
|
||||
lightningcooldown = READUINT32(save_p);
|
||||
blueshellincoming = READUINT32(save_p);
|
||||
blueshellplayer = READUINT8(save_p);
|
||||
for (i = 0; i < 4; i++)
|
||||
battlewanted[i] = READSINT8(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?
|
||||
if (READUINT8(save_p) == 0x2f)
|
||||
|
@ -3381,6 +3399,8 @@ void P_SaveNetGame(void)
|
|||
P_NetArchiveMisc();
|
||||
|
||||
// Assign the mobjnumber for pointer tracking
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
for (th = thinkercap.next; th != &thinkercap; th = th->next)
|
||||
{
|
||||
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
|
||||
|
@ -3391,6 +3411,7 @@ void P_SaveNetGame(void)
|
|||
mobj->mobjnum = i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
P_NetArchivePlayers();
|
||||
if (gamestate == GS_LEVEL)
|
||||
|
|
|
@ -2197,11 +2197,15 @@ static void P_LevelInitStuff(void)
|
|||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
#if 0
|
||||
if ((netgame || multiplayer) && (gametype == GT_COMPETITION || players[i].lives <= 0))
|
||||
{
|
||||
// In Co-Op, replenish a user's lives if they are depleted.
|
||||
players[i].lives = cv_startinglives.value;
|
||||
}
|
||||
#else
|
||||
players[i].lives = 1;
|
||||
#endif
|
||||
|
||||
players[i].realtime = countdown = countdown2 = 0;
|
||||
curlap = bestlap = 0; // SRB2Kart
|
||||
|
@ -2426,6 +2430,7 @@ static void P_ForceCharacter(const char *forcecharskin)
|
|||
|
||||
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;
|
||||
char *gpath = malloc(glen);
|
||||
INT32 i;
|
||||
|
@ -2559,11 +2564,6 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
CON_Drawer(); // let the user know what we are going to do
|
||||
I_FinishUpdate(); // page flip or blit buffer
|
||||
|
||||
|
||||
// Reset the palette
|
||||
if (rendermode != render_none)
|
||||
V_SetPaletteLump("PLAYPAL");
|
||||
|
||||
// Initialize sector node list.
|
||||
P_Initsecnode();
|
||||
|
||||
|
@ -2620,7 +2620,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
|
||||
// Special stage fade to white
|
||||
// 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 endtime = starttime + (3*TICRATE)/2;
|
||||
|
@ -2647,7 +2647,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
}
|
||||
|
||||
ranspecialwipe = 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
// Make sure all sounds are stopped before Z_FreeTags.
|
||||
S_StopSounds();
|
||||
|
@ -2659,20 +2659,24 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
S_Start();
|
||||
// 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
|
||||
if (leveltime < 158)
|
||||
S_StopMusic();
|
||||
if (leveltime < (starttime + (TICRATE/2)))
|
||||
S_ChangeMusicInternal("kstart", false); //S_StopMusic();
|
||||
|
||||
// Let's fade to black here
|
||||
// But only if we didn't do the special stage wipe
|
||||
if (rendermode != render_none && !ranspecialwipe)
|
||||
{
|
||||
F_WipeStartScreen();
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120);
|
||||
|
||||
F_WipeEndScreen();
|
||||
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]..."
|
||||
/*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"));
|
||||
|
||||
}
|
||||
else if (G_RaceGametype() && server && cv_usemapnumlaps.value)
|
||||
CV_StealthSetValue(&cv_numlaps, mapheaderinfo[gamemap - 1]->numlaps);
|
||||
else if (G_RaceGametype() && server)
|
||||
CV_StealthSetValue(&cv_numlaps,
|
||||
((netgame || multiplayer) && cv_basenumlaps.value)
|
||||
? cv_basenumlaps.value
|
||||
: mapheaderinfo[gamemap - 1]->numlaps);
|
||||
|
||||
// ===========
|
||||
// landing point for netgames.
|
||||
|
@ -2990,22 +2997,27 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
else
|
||||
{
|
||||
if (G_BattleGametype())
|
||||
{
|
||||
gamespeed = 0;
|
||||
else
|
||||
gamespeed = cv_kartspeed.value;
|
||||
|
||||
if (G_BattleGametype())
|
||||
mirrormode = false;
|
||||
}
|
||||
else
|
||||
mirrormode = cv_kartmirror.value;
|
||||
|
||||
franticitems = cv_kartfrantic.value;
|
||||
comeback = cv_kartcomeback.value;
|
||||
{
|
||||
gamespeed = (UINT8)cv_kartspeed.value;
|
||||
mirrormode = (boolean)cv_kartmirror.value;
|
||||
}
|
||||
franticitems = (boolean)cv_kartfrantic.value;
|
||||
comeback = (boolean)cv_kartcomeback.value;
|
||||
}
|
||||
|
||||
lightningcooldown = 0;
|
||||
blueshellincoming = 0;
|
||||
blueshellplayer = 0;
|
||||
for (i = 0; i < 4; i++)
|
||||
battlewanted[i] = -1;
|
||||
|
||||
wantedcalcdelay = wantedfrequency*2;
|
||||
indirectitemcooldown = 0;
|
||||
spbincoming = 0;
|
||||
spbplayer = 0;
|
||||
mapreset = 0;
|
||||
|
||||
// clear special respawning que
|
||||
iquehead = iquetail = 0;
|
||||
|
@ -3025,7 +3037,7 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
|
||||
// Remove the loading shit from the screen
|
||||
if (rendermode != render_none)
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (ranspecialwipe) ? 0 : 31);
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 120);
|
||||
|
||||
if (precache || dedicated)
|
||||
R_PrecacheLevel();
|
||||
|
@ -3143,7 +3155,7 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
|
|||
}
|
||||
else if (name[1] == '_')
|
||||
{
|
||||
CONS_Debug(DBG_SETUP, "Music %.8s replaced\n", name);
|
||||
CONS_Debug(DBG_SETUP, "Music %.8s ignored\n", name);
|
||||
mreplaces++;
|
||||
}
|
||||
}
|
||||
|
@ -3164,7 +3176,7 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
|
|||
if (!devparm && sreplaces)
|
||||
CONS_Printf(M_GetText("%s sounds replaced\n"), sizeu1(sreplaces));
|
||||
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)
|
||||
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
|
||||
switch (special)
|
||||
{
|
||||
case 1: // SRB2kart: bounce pad
|
||||
case 1: // SRB2kart: Spring Panel
|
||||
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)
|
||||
break;
|
||||
|
||||
if (player->speed < K_GetKartSpeed(player, true)/4) // Push forward to prevent getting stuck
|
||||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(K_GetKartSpeed(player, true)/4, player->mo->scale));
|
||||
if (player->speed < minspeed) // Push forward to prevent getting stuck
|
||||
P_InstaThrust(player->mo, player->mo->angle, minspeed);
|
||||
|
||||
player->kartstuff[k_feather] |= 2;
|
||||
K_DoBouncePad(player->mo, 0);
|
||||
player->kartstuff[k_pogospring] = 1;
|
||||
K_DoPogoSpring(player->mo, 0, false);
|
||||
}
|
||||
break;
|
||||
|
||||
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
|
||||
break;
|
||||
|
||||
|
@ -3969,22 +3993,21 @@ DoneSection2:
|
|||
// P_SetPlayerMobjState(player->mo, S_PLAY_FALL1);
|
||||
break;
|
||||
|
||||
case 6: // SRB2kart 190117 - Mushroom Boost Panel
|
||||
case 6: // SRB2kart 190117 - Sneaker Panel
|
||||
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
||||
{
|
||||
if (!player->kartstuff[k_floorboost])
|
||||
player->kartstuff[k_floorboost] = 3;
|
||||
else
|
||||
player->kartstuff[k_floorboost] = 2;
|
||||
K_DoMushroom(player, false);
|
||||
K_DoSneaker(player, false);
|
||||
}
|
||||
break;
|
||||
|
||||
case 7: // SRB2kart 190117 - Oil Slick
|
||||
if (roversector || P_MobjReadyToTrigger(player->mo, sector))
|
||||
{
|
||||
player->kartstuff[k_spinouttype] = -1;
|
||||
K_SpinPlayer(player, NULL);
|
||||
K_SpinPlayer(player, NULL, 0, false);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -4151,7 +4174,7 @@ DoneSection2:
|
|||
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
|
||||
{
|
||||
player->laps++;
|
||||
player->kartstuff[k_lapanimation] = 80;
|
||||
//player->kartstuff[k_lapanimation] = 80;
|
||||
|
||||
if (player->pflags & PF_NIGHTSMODE)
|
||||
player->drillmeter += 48*20;
|
||||
|
@ -4184,11 +4207,12 @@ DoneSection2:
|
|||
|
||||
if (P_IsLocalPlayer(player))
|
||||
{
|
||||
if (player->laps < (UINT8)(cv_numlaps.value - 1))
|
||||
S_StartSound(NULL, sfx_mlap);
|
||||
else if (player->laps == (UINT8)(cv_numlaps.value - 1))
|
||||
S_StartSound(NULL, sfx_mlap);
|
||||
if (player->laps == (UINT8)(cv_numlaps.value - 1))
|
||||
S_StartSound(NULL, sfx_s3k68);
|
||||
else if (player->laps < (UINT8)(cv_numlaps.value - 1))
|
||||
S_StartSound(NULL, sfx_s221);
|
||||
}
|
||||
|
||||
//
|
||||
//player->starpostangle = player->starposttime = player->starpostnum = 0;
|
||||
//player->starpostx = player->starposty = player->starpostz = 0;
|
||||
|
@ -4207,26 +4231,10 @@ DoneSection2:
|
|||
|
||||
if (player->laps >= (unsigned)cv_numlaps.value)
|
||||
{
|
||||
if (P_IsLocalPlayer(player))
|
||||
{
|
||||
// SRB2kart 200117
|
||||
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)
|
||||
if (!splitscreen && P_IsLocalPlayer(player))
|
||||
S_StartSound(NULL, sfx_s3k6a);
|
||||
else if (player->kartstuff[k_position] == 1)
|
||||
S_StartSound(NULL, sfx_s253);
|
||||
else if (P_IsLocalPlayer(player))
|
||||
S_StartSound(NULL, sfx_s24f);
|
||||
|
||||
P_DoPlayerExit(player);
|
||||
}
|
||||
|
@ -7222,8 +7230,8 @@ void T_Friction(friction_t *f)
|
|||
// friction works for all mobj's
|
||||
// (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
|
||||
&& (thing->player->kartstuff[k_startimer] == 0 && thing->player->kartstuff[k_bootimer] == 0
|
||||
&& thing->player->kartstuff[k_mushroomtimer] == 0 && thing->player->kartstuff[k_growshrinktimer] <= 0)))
|
||||
&& (thing->player->kartstuff[k_invincibilitytimer] == 0 && thing->player->kartstuff[k_hyudorotimer] == 0
|
||||
&& thing->player->kartstuff[k_sneakertimer] == 0 && thing->player->kartstuff[k_growshrinktimer] <= 0)))
|
||||
{
|
||||
if (f->roverfriction)
|
||||
{
|
||||
|
@ -7756,7 +7764,6 @@ void T_Pusher(pusher_t *p)
|
|||
thing->player->pflags |= PF_JUMPED;
|
||||
|
||||
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));
|
||||
|
||||
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)
|
||||
countdown2--;
|
||||
|
||||
if (blueshellincoming && --blueshellincoming <= 0)
|
||||
if (spbincoming && --spbincoming <= 0)
|
||||
{
|
||||
UINT8 best = 0;
|
||||
SINT8 hurtthisguy = -1;
|
||||
|
||||
blueshellincoming = 0;
|
||||
spbincoming = 0;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
@ -703,11 +703,20 @@ void P_Ticker(boolean run)
|
|||
}
|
||||
|
||||
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)
|
||||
lightningcooldown--;
|
||||
if (indirectitemcooldown)
|
||||
indirectitemcooldown--;
|
||||
|
||||
if (G_BattleGametype())
|
||||
{
|
||||
if (wantedcalcdelay && --wantedcalcdelay <= 0)
|
||||
K_CalculateBattleWanted();
|
||||
}
|
||||
|
||||
if (quake.time)
|
||||
{
|
||||
|
@ -731,6 +740,11 @@ void P_Ticker(boolean run)
|
|||
G_ConsGhostTic();
|
||||
if (modeattacking)
|
||||
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();
|
||||
|
|
632
src/p_user.c
632
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;
|
||||
|
||||
static void R_Subsector(size_t num, UINT8 ssplayer)
|
||||
static void R_Subsector(size_t num, UINT8 viewnumber)
|
||||
{
|
||||
INT32 count, floorlightlevel, ceilinglightlevel, light;
|
||||
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
|
||||
// real sector, or you must account for the lighting in some other way,
|
||||
// like passing it as an argument.
|
||||
R_AddSprites(sub->sector, (floorlightlevel+ceilinglightlevel)/2, ssplayer);
|
||||
R_AddSprites(sub->sector, (floorlightlevel+ceilinglightlevel)/2, viewnumber);
|
||||
|
||||
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
|
||||
|
||||
void R_RenderBSPNode(INT32 bspnum, UINT8 ssplayer)
|
||||
void R_RenderBSPNode(INT32 bspnum, UINT8 viewnumber)
|
||||
{
|
||||
node_t *bsp;
|
||||
INT32 side;
|
||||
|
@ -1430,7 +1430,7 @@ void R_RenderBSPNode(INT32 bspnum, UINT8 ssplayer)
|
|||
// Decide which side the view point is on.
|
||||
side = R_PointOnSide(viewx, viewy, bsp);
|
||||
// Recursively divide front space.
|
||||
R_RenderBSPNode(bsp->children[side], ssplayer);
|
||||
R_RenderBSPNode(bsp->children[side], viewnumber);
|
||||
|
||||
// Possibly divide back space.
|
||||
|
||||
|
@ -1448,5 +1448,5 @@ void R_RenderBSPNode(INT32 bspnum, UINT8 ssplayer)
|
|||
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_PortalClearClipSegs(INT32 start, INT32 end);
|
||||
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);
|
||||
|
||||
#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 METALSONIC_TT_CACHE_INDEX (MAXSKINS + 2)
|
||||
#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 DEFAULT_STARTTRANSCOLOR 160
|
||||
#define NUM_PALETTE_ENTRIES 256
|
||||
|
@ -155,7 +155,7 @@ const char *Color_Names[MAXSKINCOLORS] =
|
|||
"Black", // SKINCOLOR_BLACK
|
||||
"Cyan", // SKINCOLOR_CYAN
|
||||
"Teal", // SKINCOLOR_TEAL
|
||||
"Steel_Blue",// SKINCOLOR_STEELBLUE
|
||||
"Steel_Blue",// SKINCOLOR_STEEL
|
||||
"Blue", // SKINCOLOR_BLUE
|
||||
"Peach", // SKINCOLOR_PEACH
|
||||
"Tan", // SKINCOLOR_TAN
|
||||
|
@ -175,7 +175,6 @@ const char *Color_Names[MAXSKINCOLORS] =
|
|||
"Yellow", // SKINCOLOR_YELLOW
|
||||
"Gold" // SKINCOLOR_GOLD
|
||||
};
|
||||
*/
|
||||
|
||||
const UINT8 Color_Opposite[MAXSKINCOLORS*2] =
|
||||
{
|
||||
|
@ -186,7 +185,7 @@ const UINT8 Color_Opposite[MAXSKINCOLORS*2] =
|
|||
SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_CYAN
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_TEAL
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_STEELBLUE
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_STEEL
|
||||
SKINCOLOR_ORANGE,9, // SKINCOLOR_BLUE
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_PEACH
|
||||
SKINCOLOR_NONE,8, // SKINCOLOR_TAN
|
||||
|
@ -206,6 +205,7 @@ const UINT8 Color_Opposite[MAXSKINCOLORS*2] =
|
|||
SKINCOLOR_NONE,8, // SKINCOLOR_YELLOW
|
||||
SKINCOLOR_NONE,8 // SKINCOLOR_GOLD
|
||||
};
|
||||
*/
|
||||
|
||||
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
|
||||
0xd0, // SKINCOLOR_CYAN
|
||||
0xdc, // SKINCOLOR_TEAL
|
||||
0xc8, // SKINCOLOR_STEELBLUE
|
||||
0xc8, // SKINCOLOR_STEEL
|
||||
0xe2, // SKINCOLOR_BLUE
|
||||
0x40, // SKINCOLOR_PEACH
|
||||
0x48, // SKINCOLOR_TAN
|
||||
|
@ -339,7 +339,7 @@ static void R_GenerateTranslationColormap(UINT8 *dest_colormap, INT32 skinnum, U
|
|||
|
||||
case SKINCOLOR_WHITE:
|
||||
case SKINCOLOR_BLACK:
|
||||
case SKINCOLOR_STEELBLUE:
|
||||
case SKINCOLOR_STEEL:
|
||||
case SKINCOLOR_PINK:
|
||||
case SKINCOLOR_LAVENDER:
|
||||
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_METALSONIC) skintableindex = METALSONIC_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;
|
||||
|
||||
if (flags & GTC_CACHE)
|
||||
|
|
|
@ -107,7 +107,7 @@ extern lumpnum_t viewborderlump[8];
|
|||
#define TC_BOSS -2
|
||||
#define TC_METALSONIC -3 // For Metal Sonic battle
|
||||
#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.
|
||||
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};
|
||||
|
||||
// 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};
|
||||
|
||||
|
@ -213,7 +213,6 @@ void SplitScreen_OnChange(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
INT32 i;
|
||||
secondarydisplayplayer = consoleplayer;
|
||||
thirddisplayplayer = consoleplayer;
|
||||
fourthdisplayplayer = consoleplayer;
|
||||
|
@ -1335,28 +1334,43 @@ void R_RenderPlayerView(player_t *player)
|
|||
{
|
||||
portal_pair *portal;
|
||||
const boolean skybox = (skyboxmo[0] && cv_skybox.value);
|
||||
UINT8 ssplayer;
|
||||
UINT8 viewnumber;
|
||||
|
||||
if (player == &players[secondarydisplayplayer] && splitscreen)
|
||||
ssplayer = 2;
|
||||
viewnumber = 1;
|
||||
else if (player == &players[thirddisplayplayer] && splitscreen > 1)
|
||||
ssplayer = 3;
|
||||
viewnumber = 2;
|
||||
else if (player == &players[fourthdisplayplayer] && splitscreen > 2)
|
||||
ssplayer = 4;
|
||||
else if (splitscreen)
|
||||
ssplayer = 1;
|
||||
viewnumber = 3;
|
||||
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)
|
||||
V_DrawFill(0, 0, vid.width, vid.height, 31); // No HOM effect!
|
||||
else //'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
|
||||
V_DrawFill(0, 0, vid.width, vid.height, 128+(timeinmap&15));
|
||||
}
|
||||
// Draw over the fourth screen so you don't have to stare at a HOM :V
|
||||
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
|
||||
if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||
|
@ -1383,7 +1397,7 @@ void R_RenderPlayerView(player_t *player)
|
|||
R_ClearVisibleFloorSplats();
|
||||
#endif
|
||||
|
||||
R_RenderBSPNode((INT32)numnodes - 1, ssplayer);
|
||||
R_RenderBSPNode((INT32)numnodes - 1, viewnumber);
|
||||
R_ClipSprites();
|
||||
R_DrawPlanes();
|
||||
#ifdef FLOORSPLATS
|
||||
|
@ -1416,7 +1430,7 @@ void R_RenderPlayerView(player_t *player)
|
|||
mytotal = 0;
|
||||
ProfZeroTimer();
|
||||
#endif
|
||||
R_RenderBSPNode((INT32)numnodes - 1, ssplayer);
|
||||
R_RenderBSPNode((INT32)numnodes - 1, viewnumber);
|
||||
R_ClipSprites();
|
||||
#ifdef TIMING
|
||||
RDMSR(0x10, &mycount);
|
||||
|
@ -1441,7 +1455,7 @@ void R_RenderPlayerView(player_t *player)
|
|||
|
||||
validcount++;
|
||||
|
||||
R_RenderBSPNode((INT32)numnodes - 1, ssplayer);
|
||||
R_RenderBSPNode((INT32)numnodes - 1, viewnumber);
|
||||
R_ClipSprites();
|
||||
//R_DrawPlanes();
|
||||
//R_DrawMasked();
|
||||
|
@ -1548,7 +1562,7 @@ void R_RegisterEngineStuff(void)
|
|||
|
||||
// Default viewheight is changeable,
|
||||
// initialized to standard viewheight
|
||||
CV_RegisterVar(&cv_viewheight);
|
||||
//CV_RegisterVar(&cv_viewheight);
|
||||
|
||||
#ifdef HWRENDER
|
||||
// GL-specific Commands
|
||||
|
|
|
@ -714,6 +714,7 @@ void R_DrawPlanes(void)
|
|||
if (dc_yl <= dc_yh)
|
||||
{
|
||||
angle = (pl->viewangle + xtoviewangle[x])>>ANGLETOSKYSHIFT;
|
||||
dc_iscale = FixedMul(skyscale, FINECOSINE(xtoviewangle[x]>>ANGLETOFINESHIFT));
|
||||
dc_x = x;
|
||||
dc_source =
|
||||
R_GetColumn(skytexture,
|
||||
|
|
|
@ -87,7 +87,7 @@ extern lighttable_t **planezlight;
|
|||
extern fixed_t *yslope;
|
||||
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_PortalRestoreClipValues(INT32 start, INT32 end, INT16 *ceil, INT16 *floor, fixed_t *scale);
|
||||
void R_ClearPlanes(void);
|
||||
|
|
|
@ -2674,6 +2674,11 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
worldbottomslope >>= 4;
|
||||
#endif
|
||||
|
||||
if (linedef->special == 41) { // HORIZON LINES
|
||||
topstep = bottomstep = 0;
|
||||
topfrac = bottomfrac = (centeryfrac>>4);
|
||||
topfrac++; // Prevent 1px HOM
|
||||
} else {
|
||||
topstep = -FixedMul (rw_scalestep, worldtop);
|
||||
topfrac = (centeryfrac>>4) - FixedMul (worldtop, rw_scale);
|
||||
|
||||
|
@ -2690,6 +2695,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
bottomstep = (bottomfracend-bottomfrac)/(range);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
dc_numlights = 0;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ fixed_t P_SegLength(seg_t *seg);
|
|||
|
||||
// call at P_SetupLevel()
|
||||
#if !(defined (WALLSPLATS) || defined (FLOORSPLATS))
|
||||
FUNCMATH void R_ClearLevelSplats(void);
|
||||
void R_ClearLevelSplats(void);
|
||||
#else
|
||||
void R_ClearLevelSplats(void);
|
||||
#endif
|
||||
|
|
|
@ -826,16 +826,13 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||
{
|
||||
colfunc = transtransfunc;
|
||||
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_STARMAN, vis->mobj->color, GTC_CACHE);
|
||||
else
|
||||
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. >_>
|
||||
{
|
||||
size_t skinnum = (skin_t*)vis->mobj->skin-skins;
|
||||
dc_translation = R_GetTranslationColormap((INT32)skinnum, vis->mobj->color, GTC_CACHE);
|
||||
}
|
||||
}
|
||||
else // Use the defaults
|
||||
dc_translation = R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color, GTC_CACHE);
|
||||
}
|
||||
|
@ -850,16 +847,13 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||
colfunc = transcolfunc;
|
||||
|
||||
// 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_STARMAN, vis->mobj->color, GTC_CACHE);
|
||||
else
|
||||
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!
|
||||
{
|
||||
size_t skinnum = (skin_t*)vis->mobj->skin-skins;
|
||||
dc_translation = R_GetTranslationColormap((INT32)skinnum, vis->mobj->color, GTC_CACHE);
|
||||
}
|
||||
}
|
||||
else // Use the defaults
|
||||
dc_translation = R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color, GTC_CACHE);
|
||||
}
|
||||
|
@ -1676,7 +1670,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing)
|
|||
// R_AddSprites
|
||||
// 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;
|
||||
precipmobj_t *precipthing; // Tails 08-25-2002
|
||||
|
@ -1722,19 +1716,19 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 ssplayer)
|
|||
if (splitscreen)
|
||||
{
|
||||
if (thing->eflags & MFE_DRAWONLYFORP1)
|
||||
if (ssplayer != 1)
|
||||
if (viewnumber != 0)
|
||||
continue;
|
||||
|
||||
if (thing->eflags & MFE_DRAWONLYFORP2)
|
||||
if (ssplayer != 2)
|
||||
if (viewnumber != 1)
|
||||
continue;
|
||||
|
||||
if (thing->eflags & MFE_DRAWONLYFORP3 && splitscreen > 1)
|
||||
if (ssplayer != 3)
|
||||
if (viewnumber != 2)
|
||||
continue;
|
||||
|
||||
if (thing->eflags & MFE_DRAWONLYFORP4 && splitscreen > 2)
|
||||
if (ssplayer != 4)
|
||||
if (viewnumber != 3)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1755,19 +1749,19 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 ssplayer)
|
|||
if (splitscreen)
|
||||
{
|
||||
if (thing->eflags & MFE_DRAWONLYFORP1)
|
||||
if (ssplayer != 1)
|
||||
if (viewnumber != 0)
|
||||
continue;
|
||||
|
||||
if (thing->eflags & MFE_DRAWONLYFORP2)
|
||||
if (ssplayer != 2)
|
||||
if (viewnumber != 1)
|
||||
continue;
|
||||
|
||||
if (thing->eflags & MFE_DRAWONLYFORP3 && splitscreen > 1)
|
||||
if (ssplayer != 3)
|
||||
if (viewnumber != 2)
|
||||
continue;
|
||||
|
||||
if (thing->eflags & MFE_DRAWONLYFORP4 && splitscreen > 2)
|
||||
if (ssplayer != 4)
|
||||
if (viewnumber != 3)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2502,9 +2496,9 @@ static void Sk_SetDefaultValue(skin_t *skin)
|
|||
|
||||
strcpy(skin->realname, "Someone");
|
||||
strcpy(skin->hudname, "???");
|
||||
strncpy(skin->charsel, "CHRSONIC", 8);
|
||||
strncpy(skin->face, "MISSING", 8);
|
||||
strncpy(skin->superface, "MISSING", 8);
|
||||
strncpy(skin->charsel, "CHRSONIC", 9);
|
||||
strncpy(skin->face, "MISSING", 9);
|
||||
strncpy(skin->superface, "MISSING", 9);
|
||||
|
||||
skin->starttranscolor = 160;
|
||||
skin->prefcolor = SKINCOLOR_GREEN;
|
||||
|
@ -2536,7 +2530,7 @@ static void Sk_SetDefaultValue(skin_t *skin)
|
|||
for (i = 0; i < sfx_skinsoundslot0; i++)
|
||||
if (S_sfx[i].skinsound != -1)
|
||||
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->hudname, "SONIC");
|
||||
|
||||
strncpy(skin->charsel, "CHRSONIC", 8);
|
||||
strncpy(skin->face, "LIVSONIC", 8);
|
||||
strncpy(skin->superface, "LIVSUPER", 8);
|
||||
strncpy(skin->charsel, "CHRSONIC", 9);
|
||||
strncpy(skin->face, "LIVSONIC", 9);
|
||||
strncpy(skin->superface, "LIVSUPER", 9);
|
||||
skin->prefcolor = SKINCOLOR_BLUE;
|
||||
|
||||
skin->ability = CA_THOK;
|
||||
|
@ -2591,7 +2585,7 @@ void R_InitSkins(void)
|
|||
skin->spritedef.numframes = sprites[SPR_PLAY].numframes;
|
||||
skin->spritedef.spriteframes = sprites[SPR_PLAY].spriteframes;
|
||||
ST_LoadFaceGraphics(skin->face, skin->superface, 0);
|
||||
strncpy(skin->iconprefix, "SONICICN", 8);
|
||||
strncpy(skin->iconprefix, "SONICICN", 9);
|
||||
K_LoadIconGraphics(skin->iconprefix, 0);
|
||||
|
||||
//MD2 for sonic doesn't want to load in Linux.
|
||||
|
|
|
@ -55,7 +55,7 @@ void R_DelSpriteDefs(UINT16 wadnum);
|
|||
#endif
|
||||
|
||||
//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_ClearSprites(void);
|
||||
void R_ClipSprites(void);
|
||||
|
@ -81,7 +81,7 @@ typedef struct
|
|||
|
||||
char realname[SKINNAMESIZE+1]; // Display name for level completion.
|
||||
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 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
|
||||
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_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
|
||||
#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};
|
||||
|
@ -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};
|
||||
#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
|
||||
|
||||
|
@ -846,7 +846,7 @@ void S_StopSound(void *origin)
|
|||
//
|
||||
static INT32 actualsfxvolume; // check for change through console
|
||||
static INT32 actualdigmusicvolume;
|
||||
static INT32 actualmidimusicvolume;
|
||||
//static INT32 actualmidimusicvolume;
|
||||
|
||||
void S_UpdateSounds(void)
|
||||
{
|
||||
|
@ -873,8 +873,8 @@ void S_UpdateSounds(void)
|
|||
S_SetSfxVolume (cv_soundvolume.value);
|
||||
if (actualdigmusicvolume != cv_digmusicvolume.value)
|
||||
S_SetDigMusicVolume (cv_digmusicvolume.value);
|
||||
if (actualmidimusicvolume != cv_midimusicvolume.value)
|
||||
S_SetMIDIMusicVolume (cv_midimusicvolume.value);
|
||||
//if (actualmidimusicvolume != cv_midimusicvolume.value)
|
||||
//S_SetMIDIMusicVolume (cv_midimusicvolume.value);
|
||||
|
||||
// We're done now, if we're not in a level.
|
||||
if (gamestate != GS_LEVEL)
|
||||
|
@ -1438,7 +1438,7 @@ void S_StartSoundName(void *mo, const char *soundname)
|
|||
/// ------------------------
|
||||
|
||||
#ifdef MUSICSLOT_COMPATIBILITY
|
||||
const char *compat_special_music_slots[21] =
|
||||
const char *compat_special_music_slots[16] =
|
||||
{
|
||||
"titles", // 1036 title screen
|
||||
"read_m", // 1037 intro
|
||||
|
@ -1455,12 +1455,6 @@ const char *compat_special_music_slots[21] =
|
|||
"credit", // 1048 credits
|
||||
"racent", // 1049 Race Results
|
||||
"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
|
||||
|
@ -1476,16 +1470,22 @@ static boolean mus_paused = 0; // whether songs are mus_paused
|
|||
|
||||
static boolean S_MIDIMusic(const char *mname, boolean looping)
|
||||
{
|
||||
lumpnum_t mlumpnum;
|
||||
/*lumpnum_t mlumpnum;
|
||||
void *mdata;
|
||||
INT32 mhandle;
|
||||
INT32 mhandle;*/
|
||||
|
||||
if (nomidimusic || music_disabled)
|
||||
(void)looping;
|
||||
|
||||
if (/*nomidimusic || */music_disabled)
|
||||
return false; // didn't search.
|
||||
|
||||
if (W_CheckNumForName(va("d_%s", mname)) == LUMPERROR)
|
||||
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
|
||||
mdata = W_CacheLumpNum(mlumpnum, PU_MUSIC);
|
||||
|
@ -1512,7 +1512,7 @@ static boolean S_MIDIMusic(const char *mname, boolean looping)
|
|||
music_lumpnum = mlumpnum;
|
||||
music_data = mdata;
|
||||
music_handle = mhandle;
|
||||
return true;
|
||||
return true;*/
|
||||
}
|
||||
|
||||
static boolean S_DigMusic(const char *mname, boolean looping)
|
||||
|
@ -1601,7 +1601,7 @@ void S_SetDigMusicVolume(INT32 volume)
|
|||
I_SetDigMusicVolume(volume&31);
|
||||
}
|
||||
|
||||
void S_SetMIDIMusicVolume(INT32 volume)
|
||||
/*void S_SetMIDIMusicVolume(INT32 volume)
|
||||
{
|
||||
if (volume < 0 || volume > 31)
|
||||
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.
|
||||
#endif
|
||||
I_SetMIDIMusicVolume(volume&0x1f);
|
||||
}
|
||||
}*/
|
||||
|
||||
/// ------------------------
|
||||
/// Init & Others
|
||||
|
@ -1624,7 +1624,7 @@ void S_SetMIDIMusicVolume(INT32 volume)
|
|||
// 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)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
|
@ -1633,7 +1633,7 @@ void S_Init(INT32 sfxVolume, INT32 digMusicVolume, INT32 midiMusicVolume)
|
|||
|
||||
S_SetSfxVolume(sfxVolume);
|
||||
S_SetDigMusicVolume(digMusicVolume);
|
||||
S_SetMIDIMusicVolume(midiMusicVolume);
|
||||
//S_SetMIDIMusicVolume(midiMusicVolume);
|
||||
|
||||
SetChannelsNum();
|
||||
|
||||
|
|
|
@ -23,8 +23,9 @@
|
|||
#define PICKUP_SOUND 0x8000
|
||||
|
||||
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 surround;
|
||||
|
||||
#ifdef SNDSERV
|
||||
extern consvar_t sndserver_cmd, sndserver_arg;
|
||||
|
@ -71,7 +72,7 @@ void S_RegisterSoundStuff(void);
|
|||
// Initializes sound stuff, including volume
|
||||
// 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.
|
||||
|
@ -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);
|
||||
|
||||
void S_SetDigMusicVolume(INT32 volume);
|
||||
void S_SetMIDIMusicVolume(INT32 volume);
|
||||
//void S_SetMIDIMusicVolume(INT32 volume);
|
||||
void S_SetSfxVolume(INT32 volume);
|
||||
|
||||
INT32 S_OriginPlaying(void *origin);
|
||||
|
@ -142,7 +143,7 @@ void S_StopSoundByNum(sfxenum_t sfxnum);
|
|||
#ifdef MUSICSLOT_COMPATIBILITY
|
||||
// For compatibility with code/scripts relying on older versions
|
||||
// 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
|
||||
|
|
|
@ -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};
|
||||
|
||||
#ifdef DIRECTFULLSCREEN
|
||||
static FUNCMATH void SCR_ChangeFullscreen (void);
|
||||
static void SCR_ChangeFullscreen (void);
|
||||
#else
|
||||
static void SCR_ChangeFullscreen (void);
|
||||
#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};
|
||||
|
||||
|
||||
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)looping;
|
||||
|
|
|
@ -2552,28 +2552,28 @@ void I_StartupMouse2(void)
|
|||
//
|
||||
// I_Tactile
|
||||
//
|
||||
FUNCMATH void I_Tactile(FFType pFFType, const JoyFF_t *FFEffect)
|
||||
void I_Tactile(FFType pFFType, const JoyFF_t *FFEffect)
|
||||
{
|
||||
// UNUSED.
|
||||
(void)pFFType;
|
||||
(void)FFEffect;
|
||||
}
|
||||
|
||||
FUNCMATH void I_Tactile2(FFType pFFType, const JoyFF_t *FFEffect)
|
||||
void I_Tactile2(FFType pFFType, const JoyFF_t *FFEffect)
|
||||
{
|
||||
// UNUSED.
|
||||
(void)pFFType;
|
||||
(void)FFEffect;
|
||||
}
|
||||
|
||||
FUNCMATH void I_Tactile3(FFType pFFType, const JoyFF_t *FFEffect)
|
||||
void I_Tactile3(FFType pFFType, const JoyFF_t *FFEffect)
|
||||
{
|
||||
// UNUSED.
|
||||
(void)pFFType;
|
||||
(void)FFEffect;
|
||||
}
|
||||
|
||||
FUNCMATH void I_Tactile4(FFType pFFType, const JoyFF_t *FFEffect)
|
||||
void I_Tactile4(FFType pFFType, const JoyFF_t *FFEffect)
|
||||
{
|
||||
// UNUSED.
|
||||
(void)pFFType;
|
||||
|
@ -2705,7 +2705,7 @@ tic_t I_GetTime (void)
|
|||
//
|
||||
//I_StartupTimer
|
||||
//
|
||||
FUNCMATH void I_StartupTimer(void)
|
||||
void I_StartupTimer(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
// for win2k time bug
|
||||
|
@ -2805,11 +2805,11 @@ void I_WaitVBL(INT32 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
|
||||
FUNCMATH void I_RegisterSysCommands(void) {}
|
||||
void I_RegisterSysCommands(void) {}
|
||||
#endif
|
||||
|
|
|
@ -1014,7 +1014,6 @@ static inline boolean I_SkipFrame(void)
|
|||
if (!paused)
|
||||
return false;
|
||||
/* FALLTHRU */
|
||||
case GS_TIMEATTACK:
|
||||
case GS_WAITINGPLAYERS:
|
||||
return skip; // Skip odd frames
|
||||
default:
|
||||
|
|
|
@ -124,7 +124,7 @@ void I_ShutdownSound(void)
|
|||
#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
|
||||
|
||||
FUNCMATH void I_InitMusic(void)
|
||||
void I_InitMusic(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -767,7 +767,7 @@ boolean I_SetSongTrack(int track)
|
|||
// MIDI Music
|
||||
//
|
||||
|
||||
FUNCMATH void I_InitMIDIMusic(void)
|
||||
void I_InitMIDIMusic(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -1311,7 +1311,6 @@ static inline boolean I_SkipFrame(void)
|
|||
case GS_LEVEL:
|
||||
if (!paused)
|
||||
return false;
|
||||
case GS_TIMEATTACK:
|
||||
case GS_WAITINGPLAYERS:
|
||||
return skip; // Skip odd frames
|
||||
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},
|
||||
{"fizzle", false, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"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},
|
||||
{"gloop", false, 60, 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},
|
||||
{"s1bb", 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},
|
||||
{"s1bf", 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
|
||||
{"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},
|
||||
{"s223", 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},
|
||||
{"s23a", 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},
|
||||
{"s23e", 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},
|
||||
{"s24d", 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},
|
||||
{"s251", 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},
|
||||
{"s25d", 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},
|
||||
{"s261", 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},
|
||||
{"s3k38", 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},
|
||||
{"s3k3c", 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},
|
||||
{"s3k43", 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},
|
||||
{"s3k47", 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
|
||||
{"s3k66", 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},
|
||||
{"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},
|
||||
{"s3k6c", 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},
|
||||
{"s3k90", 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},
|
||||
{"s3k94", 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},
|
||||
{"s3k98", 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},
|
||||
{"s3ka5", 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},
|
||||
{"s3ka9", 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},
|
||||
{"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},
|
||||
{"s3kaf", 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},
|
||||
{"s3kbfs", 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},
|
||||
{"s3kc1s", 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},
|
||||
{"s3kc6s", 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},
|
||||
{"s3kc8l", 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},
|
||||
{"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},
|
||||
{"s3kcbs", 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},
|
||||
|
||||
// 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},
|
||||
{"3db14", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"3db16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
||||
// Sonic CD sounds
|
||||
{"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},
|
||||
{"cdfm03", 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},
|
||||
{"cdfm37", 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},
|
||||
{"cdfm41", 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},
|
||||
{"cdfm68", 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},
|
||||
{"cdfm72", 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},
|
||||
{"cdpcm7", 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
|
||||
{"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},
|
||||
{"kc2d", 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},
|
||||
{"kc31", 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},
|
||||
{"kc44", 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},
|
||||
{"kc48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Vote picked
|
||||
{"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},
|
||||
{"kc55", 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},
|
||||
{"kc59", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Shrink
|
||||
{"kc5a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Grow
|
||||
{"kc59", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Shrink
|
||||
{"kc5a", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // Grow
|
||||
{"kc5b", 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},
|
||||
|
@ -777,8 +777,8 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"mlap", true, 127, 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},
|
||||
{"star", false, 140, 16, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"mega", false, 140, 16, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"kinvnc", false, 140, 8, -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},
|
||||
{"bomb2", false, 110, 8, -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},
|
||||
{"vroom", 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},
|
||||
{"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
|
||||
{"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_fizzle,
|
||||
sfx_gbeep,
|
||||
sfx_gclose,
|
||||
sfx_ghit,
|
||||
sfx_gloop,
|
||||
sfx_gspray,
|
||||
|
@ -629,7 +628,8 @@ typedef enum
|
|||
sfx_s3kc5l,
|
||||
sfx_s3kc6s,
|
||||
sfx_s3kc6l,
|
||||
sfx_s3kc7,
|
||||
sfx_s3kc7s,
|
||||
sfx_s3kc7l,
|
||||
sfx_s3kc8s,
|
||||
sfx_s3kc8l,
|
||||
sfx_s3kc9s,
|
||||
|
@ -849,8 +849,8 @@ typedef enum
|
|||
sfx_mlap,
|
||||
sfx_sboost,
|
||||
sfx_mush,
|
||||
sfx_star,
|
||||
sfx_mega,
|
||||
sfx_kinvnc,
|
||||
sfx_kgrow,
|
||||
sfx_bomb,
|
||||
sfx_bomb2,
|
||||
sfx_peel,
|
||||
|
@ -878,6 +878,10 @@ typedef enum
|
|||
sfx_boing,
|
||||
sfx_smkinv,
|
||||
sfx_screec,
|
||||
sfx_yeeeah,
|
||||
sfx_noooo1,
|
||||
sfx_noooo2,
|
||||
sfx_hogbom,
|
||||
|
||||
sfx_kwin,
|
||||
sfx_klose,
|
||||
|
|
152
src/st_stuff.c
152
src/st_stuff.c
|
@ -229,7 +229,7 @@ void ST_doPaletteStuff(void)
|
|||
|
||||
if (rendermode != render_none)
|
||||
{
|
||||
V_SetPaletteLump(GetPalette()); // Reset the palette
|
||||
//V_SetPaletteLump(GetPalette()); // Reset the palette -- is this needed?
|
||||
if (!splitscreen)
|
||||
V_SetPalette(palette);
|
||||
}
|
||||
|
@ -755,63 +755,75 @@ static void ST_drawLevelTitle(void)
|
|||
char *zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
|
||||
char *actnum = mapheaderinfo[gamemap-1]->actnum;
|
||||
INT32 lvlttlxpos;
|
||||
INT32 subttlxpos = BASEVIDWIDTH/2;
|
||||
INT32 ttlnumxpos;
|
||||
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;
|
||||
INT32 zoney;
|
||||
|
||||
if (!(timeinmap > 2 && timeinmap-3 < 110))
|
||||
if (timeinmap > 113)
|
||||
return;
|
||||
|
||||
if (strlen(actnum) > 0)
|
||||
lvlttlxpos = ((BASEVIDWIDTH/2) - (V_LevelNameWidth(lvlttl)/2)) - V_LevelNameWidth(actnum);
|
||||
else
|
||||
lvlttlxpos = ((BASEVIDWIDTH/2) - (V_LevelNameWidth(lvlttl)/2));
|
||||
lvlw = V_LevelNameWidth(lvlttl);
|
||||
|
||||
ttlnumxpos = lvlttlxpos + V_LevelNameWidth(lvlttl);
|
||||
if (strlen(zonttl) > 0)
|
||||
zonexpos = ttlnumxpos - V_LevelNameWidth(zonttl); // SRB2kart
|
||||
if (strlen(actnum) > 0)
|
||||
lvlttlxpos = ((BASEVIDWIDTH/2) - (lvlw/2)) - V_LevelNameWidth(actnum);
|
||||
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)
|
||||
lvlttlxpos = 0;
|
||||
|
||||
// There's no consistent algorithm that can accurately define the old positions
|
||||
// so I just ended up resorting to a single switct statement to define them
|
||||
switch (timeinmap-3)
|
||||
if (timeinmap > 105)
|
||||
{
|
||||
case 0: zoney = 200; lvlttly = 0; break;
|
||||
case 1: zoney = 188; lvlttly = 12; break;
|
||||
case 2: zoney = 176; lvlttly = 24; break;
|
||||
case 3: zoney = 164; lvlttly = 36; break;
|
||||
case 4: zoney = 152; lvlttly = 48; break;
|
||||
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;
|
||||
INT32 count = (113 - (INT32)(timeinmap));
|
||||
sub = dupcalc;
|
||||
while (count-- > 0)
|
||||
sub >>= 1;
|
||||
sub = -sub;
|
||||
}
|
||||
|
||||
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)
|
||||
V_DrawLevelTitle(zonexpos, zoney, 0, zonttl);
|
||||
V_DrawLevelTitle(zonexpos, bary+6, 0, zonttl);
|
||||
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)
|
||||
V_DrawCenteredString(subttlxpos, lvlttly+48, V_ALLOWLOWERCASE, subttl);
|
||||
if (actnum[0])
|
||||
V_DrawLevelTitle(ttlnumxpos+12, bary+6, 0, actnum);
|
||||
}
|
||||
|
||||
/*
|
||||
static void ST_drawFirstPersonHUD(void)
|
||||
{
|
||||
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_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, p);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
// [21:42] <+Rob> Beige - Lavender - Steel Blue - Peach - Orange - Purple - Silver - Yellow - Pink - Red - Blue - Green - Cyan - Gold
|
||||
static skincolors_t linkColor[14] =
|
||||
{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_STEELBLUE, SKINCOLOR_PEACH, SKINCOLOR_ORANGE,
|
||||
{SKINCOLOR_BEIGE, SKINCOLOR_LAVENDER, SKINCOLOR_STEEL, SKINCOLOR_PEACH, SKINCOLOR_ORANGE,
|
||||
SKINCOLOR_PURPLE, SKINCOLOR_SILVER, SKINCOLOR_SUPER4, SKINCOLOR_PINK, SKINCOLOR_RED,
|
||||
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_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(140), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings));
|
||||
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(148), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings * 50));
|
||||
ST_DrawNightsOverlayNum(BASEVIDWIDTH/2 + 48, STRINGY(160), aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_STEELBLUE);
|
||||
ST_DrawNightsOverlayNum(BASEVIDWIDTH/2 + 48, STRINGY(160), aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_STEEL);
|
||||
|
||||
// If new record, say so!
|
||||
if (!(netgame || multiplayer) && G_GetBestNightsScore(gamemap, stplyr->lastmare + 1) <= stplyr->lastmarescore)
|
||||
|
@ -1251,7 +1264,7 @@ static void ST_drawNiGHTSHUD(void) // SRB2kart - unused.
|
|||
#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
|
||||
|
@ -1488,13 +1501,13 @@ static void ST_drawMatchHUD(void) // SRB2kart - unused.
|
|||
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
|
||||
if (circuitmap)
|
||||
|
@ -1815,7 +1828,7 @@ static void ST_overlayDrawer(void)
|
|||
*/
|
||||
|
||||
// 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;
|
||||
|
||||
|
@ -1825,23 +1838,12 @@ static void ST_overlayDrawer(void)
|
|||
p = sboover;
|
||||
|
||||
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
|
||||
{
|
||||
// Countdown timer for Race Mode
|
||||
if (countdown)
|
||||
{
|
||||
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));
|
||||
}
|
||||
// ...moved to k_kart.c so we can take advantage of the LAPS_Y value
|
||||
|
||||
K_drawKartHUD();
|
||||
|
||||
|
@ -1897,18 +1899,18 @@ static void ST_overlayDrawer(void)
|
|||
strlcpy(name, player_names[stplyr-players], 13);
|
||||
|
||||
// Show name of player being displayed
|
||||
V_DrawCenteredString((BASEVIDWIDTH/6), BASEVIDHEIGHT-80, 0, M_GetText("Viewpoint:"));
|
||||
V_DrawCenteredString((BASEVIDWIDTH/6), BASEVIDHEIGHT-64, V_ALLOWLOWERCASE, name);
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-40, 0, M_GetText("Viewpoint:"));
|
||||
V_DrawCenteredString((BASEVIDWIDTH/2), BASEVIDHEIGHT-32, V_ALLOWLOWERCASE, name);
|
||||
}
|
||||
|
||||
// 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 > 1 && stplyr == &players[thirddisplayplayer]) && !camera3.chase)
|
||||
|| ((splitscreen > 2 && stplyr == &players[fourthdisplayplayer]) && !camera4.chase))
|
||||
{
|
||||
ST_drawFirstPersonHUD();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
|
@ -1917,16 +1919,16 @@ static void ST_overlayDrawer(void)
|
|||
#endif
|
||||
|
||||
// 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
|
||||
&& LUA_HudEnabled(hud_stagetitle)
|
||||
#endif
|
||||
)
|
||||
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."));
|
||||
else if (gametype == GT_HIDEANDSEEK &&
|
||||
(!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(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;
|
||||
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"));
|
||||
else
|
||||
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
|
||||
&& LUA_HudEnabled(hud_textspectator)
|
||||
#endif
|
||||
|
@ -1950,12 +1952,12 @@ static void ST_overlayDrawer(void)
|
|||
{
|
||||
// SRB2kart: changed positions & text
|
||||
V_DrawString(2, BASEVIDHEIGHT-50, V_HUDTRANSHALF|V_YELLOWMAP, M_GetText("- SPECTATING -"));
|
||||
/*if (G_GametypeHasTeams())
|
||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Join Team"));
|
||||
else if (G_IsSpecialStage(gamemap) && useNightsSS)
|
||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF|V_REDMAP, M_GetText("- CANNOT JOIN -"));
|
||||
else*/
|
||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Enter Game"));
|
||||
if (stplyr->pflags & PF_WANTSTOJOIN)
|
||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Cancel Join"));
|
||||
/*else if (G_GametypeHasTeams())
|
||||
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF, M_GetText("Item - Join Team"));*/
|
||||
else
|
||||
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-20, V_HUDTRANSHALF, M_GetText("Accelerate - Float"));
|
||||
V_DrawString(2, BASEVIDHEIGHT-10, V_HUDTRANSHALF, M_GetText("Brake - Sink"));
|
||||
|
@ -1968,7 +1970,7 @@ static void ST_overlayDrawer(void)
|
|||
void ST_Drawer(void)
|
||||
{
|
||||
#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)
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF, player_names[seenplayer-players]);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
//
|
||||
|
||||
// Called by main loop.
|
||||
FUNCMATH void ST_Ticker(void);
|
||||
void ST_Ticker(void);
|
||||
|
||||
// Called by main loop.
|
||||
void ST_Drawer(void);
|
||||
|
|
236
src/v_video.c
236
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 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_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 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_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 == 13)
|
||||
alphalevel = hudminusalpha[cv_translucenthud.value];
|
||||
alphalevel = hudminusalpha[hudtrans];
|
||||
else if (alphalevel == 14)
|
||||
alphalevel = 10 - cv_translucenthud.value;
|
||||
alphalevel = 10 - hudtrans;
|
||||
/*else if (alphalevel == 15)
|
||||
alphalevel = hudplusalpha[cv_translucenthud.value];*/
|
||||
alphalevel = hudplusalpha[hudtrans];*/
|
||||
|
||||
if (alphalevel >= 10)
|
||||
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)
|
||||
{
|
||||
flip = true;
|
||||
x -= FixedMul((SHORT(patch->width) - SHORT(patch->leftoffset))<<FRACBITS, pscale);
|
||||
x -= FixedMul((SHORT(patch->width) - SHORT(patch->leftoffset))<<FRACBITS, pscale) + 1;
|
||||
}
|
||||
else
|
||||
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);
|
||||
x >>= FRACBITS;
|
||||
y >>= FRACBITS;
|
||||
desttop += (y*vid.width) + x;
|
||||
|
||||
// Center it if necessary
|
||||
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)
|
||||
{
|
||||
// dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx,
|
||||
// so center this imaginary screen
|
||||
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)
|
||||
desttop += (vid.width - (BASEVIDWIDTH * dupx));
|
||||
x += (vid.width - (BASEVIDWIDTH * dupx));
|
||||
else if (!(scrn & V_SNAPTOLEFT))
|
||||
desttop += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
||||
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
||||
}
|
||||
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))
|
||||
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
|
||||
|
@ -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;
|
||||
}
|
||||
// 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]));
|
||||
source = (const UINT8 *)(column) + 3;
|
||||
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;
|
||||
|
||||
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!!!
|
||||
|
@ -1076,26 +1180,35 @@ void V_DrawPatchFill(patch_t *pat)
|
|||
//
|
||||
// Fade all the screen buffer, so that the menu is more readable,
|
||||
// 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
|
||||
if (rendermode != render_soft && rendermode != render_none)
|
||||
{
|
||||
HWR_FadeScreenMenuBack(0x01010160, 0); // hack, 0 means full height
|
||||
HWR_FadeScreenMenuBack(color, strength);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
const UINT8 *fadetable = ((color & 0xFF00) // Color is not palette index?
|
||||
? ((UINT8 *)colormaps + strength*256) // Do COLORMAP fade.
|
||||
: ((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.
|
||||
void V_DrawFadeConsBack(INT32 plines)
|
||||
|
@ -1134,7 +1247,7 @@ void V_DrawFadeConsBack(INT32 plines)
|
|||
|
||||
// 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)
|
||||
{
|
||||
|
@ -1143,7 +1256,7 @@ static const UINT8 *V_GetStringColormap(INT32 colorflags)
|
|||
case 2: // 0x82, yellow
|
||||
return yellowmap;
|
||||
case 3: // 0x83, lgreen
|
||||
return lgreenmap;
|
||||
return greenmap;
|
||||
case 4: // 0x84, blue
|
||||
return bluemap;
|
||||
case 5: // 0x85, red
|
||||
|
@ -1152,6 +1265,8 @@ static const UINT8 *V_GetStringColormap(INT32 colorflags)
|
|||
return graymap;
|
||||
case 7: // 0x87, orange
|
||||
return orangemap;
|
||||
case 8: // 0x88, sky
|
||||
return skymap;
|
||||
default: // reset
|
||||
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)
|
||||
{
|
||||
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;
|
||||
INT32 charflags = 0;
|
||||
const UINT8 *colormap = NULL;
|
||||
|
@ -1300,7 +1415,11 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
scrwidth = vid.width;
|
||||
}
|
||||
else
|
||||
{
|
||||
dupx = dupy = 1;
|
||||
scrwidth = vid.width/vid.dupx;
|
||||
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||
}
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
|
||||
|
@ -1361,9 +1480,9 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
else
|
||||
w = SHORT(hu_font[c]->width) * dupx;
|
||||
|
||||
if (cx + w > scrwidth)
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
if (cx < 0) //left boundary check
|
||||
if (cx+left + w < 0) //left boundary check
|
||||
{
|
||||
cx += w;
|
||||
continue;
|
||||
|
@ -1379,7 +1498,7 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
// SRB2kart
|
||||
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;
|
||||
INT32 charflags = 0;
|
||||
const UINT8 *colormap = NULL;
|
||||
|
@ -1395,7 +1514,11 @@ void V_DrawKartString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
scrwidth = vid.width;
|
||||
}
|
||||
else
|
||||
{
|
||||
dupx = dupy = 1;
|
||||
scrwidth = vid.width/vid.dupx;
|
||||
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||
}
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
|
||||
|
@ -1456,9 +1579,9 @@ void V_DrawKartString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
else
|
||||
w = SHORT(kart_font[c]->width) * dupx;
|
||||
|
||||
if (cx + w > scrwidth)
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
if (cx < 0) //left boundary check
|
||||
if (cx+left + w < 0) //left boundary check
|
||||
{
|
||||
cx += w;
|
||||
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)
|
||||
{
|
||||
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;
|
||||
INT32 charflags = 0;
|
||||
const UINT8 *colormap = NULL;
|
||||
|
@ -1506,7 +1629,11 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
scrwidth = vid.width;
|
||||
}
|
||||
else
|
||||
{
|
||||
dupx = dupy = 1;
|
||||
scrwidth = vid.width/vid.dupx;
|
||||
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||
}
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
|
||||
|
@ -1565,9 +1692,9 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
}
|
||||
else
|
||||
w = SHORT(hu_font[c]->width) * dupx / 2;
|
||||
if (cx + w > scrwidth)
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
if (cx < 0) //left boundary check
|
||||
if (cx+left + w < 0) //left boundary check
|
||||
{
|
||||
cx += w;
|
||||
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)
|
||||
{
|
||||
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;
|
||||
INT32 charflags = 0;
|
||||
const UINT8 *colormap = NULL;
|
||||
|
@ -1608,7 +1735,11 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
scrwidth = vid.width;
|
||||
}
|
||||
else
|
||||
{
|
||||
dupx = dupy = 1;
|
||||
scrwidth = vid.width/vid.dupx;
|
||||
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||
}
|
||||
|
||||
charflags = (option & V_CHARCOLORMASK);
|
||||
|
||||
|
@ -1665,9 +1796,9 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
else
|
||||
w = (SHORT(tny_font[c]->width) * dupx);
|
||||
|
||||
if (cx + w > scrwidth)
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
if (cx < 0) //left boundary check
|
||||
if (cx+left + w < 0) //left boundary check
|
||||
{
|
||||
cx += w;
|
||||
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)
|
||||
{
|
||||
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;
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
dupx = dupy = 1;
|
||||
scrwidth = vid.width/vid.dupx;
|
||||
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||
}
|
||||
|
||||
switch (option & V_SPACINGMASK)
|
||||
{
|
||||
|
@ -1758,9 +1893,9 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
|
|||
else
|
||||
w = SHORT(hu_font[c]->width) * dupx;
|
||||
|
||||
if ((cx>>FRACBITS) + w > scrwidth)
|
||||
if ((cx>>FRACBITS) > scrwidth)
|
||||
break;
|
||||
if (cx < 0) //left boundary check
|
||||
if (cx+left + w < 0) //left boundary check
|
||||
{
|
||||
cx += w<<FRACBITS;
|
||||
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;
|
||||
if ((cx>>FRACBITS) + w > scrwidth)
|
||||
if ((cx>>FRACBITS) > scrwidth)
|
||||
break;
|
||||
|
||||
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)
|
||||
{
|
||||
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;
|
||||
|
||||
if (option & V_NOSCALESTART)
|
||||
|
@ -1906,7 +2041,11 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
scrwidth = vid.width;
|
||||
}
|
||||
else
|
||||
{
|
||||
dupx = dupy = 1;
|
||||
scrwidth = vid.width/vid.dupx;
|
||||
left = (scrwidth - BASEVIDWIDTH)/2;
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
@ -1928,11 +2067,10 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
|
|||
}
|
||||
|
||||
w = SHORT(lt_font[c]->width) * dupx;
|
||||
if (cx + w > scrwidth)
|
||||
break;
|
||||
|
||||
//left boundary check
|
||||
if (cx < 0)
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
if (cx + left < 0) //left boundary check
|
||||
{
|
||||
cx += w;
|
||||
continue;
|
||||
|
|
|
@ -43,6 +43,8 @@ const char *GetPalette(void);
|
|||
|
||||
extern RGBA_t *pLocalPalette;
|
||||
|
||||
extern UINT8 hudtrans;
|
||||
|
||||
// Retrieve the ARGB value from a palette color index
|
||||
#define V_GetColor(color) (pLocalPalette[color&0xFF])
|
||||
|
||||
|
@ -76,6 +78,7 @@ extern RGBA_t *pLocalPalette;
|
|||
#define V_REDMAP 0x00005000
|
||||
#define V_GRAYMAP 0x00006000
|
||||
#define V_ORANGEMAP 0x00007000
|
||||
#define V_SKYMAP 0x00008000
|
||||
|
||||
// use bits 17-20 for alpha transparency
|
||||
#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
|
||||
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);
|
||||
// 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
|
||||
void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum);
|
||||
|
||||
// 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);
|
||||
|
||||
|
@ -152,6 +157,7 @@ void V_DrawFadeConsBack(INT32 plines);
|
|||
void V_DrawCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed);
|
||||
// draw a single character, but for the chat
|
||||
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);
|
||||
|
||||
|
|
|
@ -323,7 +323,6 @@ static inline boolean I_SkipFrame(void)
|
|||
if (!paused)
|
||||
return false;
|
||||
/* FALLTHRU */
|
||||
case GS_TIMEATTACK:
|
||||
#ifndef CLIENT_LOADINGSCREEN
|
||||
case GS_WAITINGPLAYERS:
|
||||
#endif
|
||||
|
|
1975
src/y_inter.c
1975
src/y_inter.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue