Compare commits
35
Commits
v8.3
..
votebgstuff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e13ba89f1a | ||
|
|
d8b2134aef | ||
|
|
c168832f8e | ||
|
|
448a603a56 | ||
|
|
2a95201c6d | ||
|
|
a73de55f96 | ||
|
|
e4a4496be6 | ||
|
|
a8f3a8dfb0 | ||
|
|
e19b9d1c60 | ||
|
|
e28ec4e7cb | ||
|
|
d0f09b467b | ||
|
|
6617382f54 | ||
|
|
7d68c0598c | ||
|
|
201c725dc7 | ||
|
|
57b2316c42 | ||
|
|
fe682a8071 | ||
|
|
bf44a054a1 | ||
|
|
eca9c60d9b | ||
|
|
cf42c35b9f | ||
|
|
a364068abb | ||
|
|
e88093d9cf | ||
|
|
5e532a76cf | ||
|
|
fb9c459269 | ||
|
|
a6898bd1cd | ||
|
|
ff474d18ee | ||
|
|
f15d3be263 | ||
|
|
19e5366c5b | ||
|
|
346dee019c | ||
|
|
18914f22f2 | ||
|
|
1219ecf818 | ||
|
|
b6923d0d0d | ||
|
|
e8969b0645 | ||
|
|
7932c1af6f | ||
|
|
95b4228d3c | ||
|
|
a0ff44043f |
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
/* backtrace.h -- Public header file for stack backtrace library.
|
/* backtrace.h -- Public header file for stack backtrace library.
|
||||||
Copyright (C) 2012-2020 Free Software Foundation, Inc.
|
Copyright (C) 2012-2024 Free Software Foundation, Inc.
|
||||||
Written by Ian Lance Taylor, Google.
|
Written by Ian Lance Taylor, Google.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
@@ -54,13 +54,14 @@ struct backtrace_state;
|
|||||||
invalid after this function returns.
|
invalid after this function returns.
|
||||||
|
|
||||||
As a special case, the ERRNUM argument will be passed as -1 if no
|
As a special case, the ERRNUM argument will be passed as -1 if no
|
||||||
debug info can be found for the executable, but the function
|
debug info can be found for the executable, or if the debug info
|
||||||
requires debug info (e.g., backtrace_full, backtrace_pcinfo). The
|
exists but has an unsupported version, but the function requires
|
||||||
MSG in this case will be something along the lines of "no debug
|
debug info (e.g., backtrace_full, backtrace_pcinfo). The MSG in
|
||||||
info". Similarly, ERRNUM will be passed as -1 if there is no
|
this case will be something along the lines of "no debug info".
|
||||||
symbol table, but the function requires a symbol table (e.g.,
|
Similarly, ERRNUM will be passed as -1 if there is no symbol table,
|
||||||
backtrace_syminfo). This may be used as a signal that some other
|
but the function requires a symbol table (e.g., backtrace_syminfo).
|
||||||
approach should be tried. */
|
This may be used as a signal that some other approach should be
|
||||||
|
tried. */
|
||||||
|
|
||||||
typedef void (*backtrace_error_callback) (void *data, const char *msg,
|
typedef void (*backtrace_error_callback) (void *data, const char *msg,
|
||||||
int errnum);
|
int errnum);
|
||||||
|
|||||||
Binary file not shown.
+14
-35
@@ -816,17 +816,12 @@ static void COM_Help_f(void)
|
|||||||
cvar = CV_FindVar(help);
|
cvar = CV_FindVar(help);
|
||||||
if (cvar)
|
if (cvar)
|
||||||
{
|
{
|
||||||
boolean floatmode = false;
|
|
||||||
const char *cvalue = NULL;
|
|
||||||
CONS_Printf("\x82""Variable %s:\n", cvar->name);
|
CONS_Printf("\x82""Variable %s:\n", cvar->name);
|
||||||
CONS_Printf(M_GetText(" flags: "));
|
CONS_Printf(M_GetText(" flags: "));
|
||||||
if (cvar->flags & CV_SAVE)
|
if (cvar->flags & CV_SAVE)
|
||||||
CONS_Printf("AUTOSAVE ");
|
CONS_Printf("AUTOSAVE ");
|
||||||
if (cvar->flags & CV_FLOAT)
|
if (cvar->flags & CV_FLOAT)
|
||||||
{
|
|
||||||
CONS_Printf("FLOAT ");
|
CONS_Printf("FLOAT ");
|
||||||
floatmode = true;
|
|
||||||
}
|
|
||||||
if (cvar->flags & CV_NETVAR)
|
if (cvar->flags & CV_NETVAR)
|
||||||
CONS_Printf("NETVAR ");
|
CONS_Printf("NETVAR ");
|
||||||
if (cvar->flags & CV_CALL)
|
if (cvar->flags & CV_CALL)
|
||||||
@@ -836,43 +831,30 @@ static void COM_Help_f(void)
|
|||||||
CONS_Printf("\n");
|
CONS_Printf("\n");
|
||||||
if (cvar->PossibleValue)
|
if (cvar->PossibleValue)
|
||||||
{
|
{
|
||||||
|
if (!stricmp(cvar->PossibleValue[0].strvalue, "MIN") && !stricmp(cvar->PossibleValue[1].strvalue, "MAX"))
|
||||||
{
|
{
|
||||||
if (!stricmp(cvar->PossibleValue[0].strvalue, "MIN") && !stricmp(cvar->PossibleValue[1].strvalue, "MAX"))
|
CONS_Printf(" range from %d to %d\n", cvar->PossibleValue[0].value,
|
||||||
{
|
cvar->PossibleValue[1].value);
|
||||||
if (floatmode)
|
i = 2;
|
||||||
{
|
}
|
||||||
float fu = FIXED_TO_FLOAT(cvar->PossibleValue[0].value);
|
|
||||||
float ck = FIXED_TO_FLOAT(cvar->PossibleValue[1].value);
|
|
||||||
CONS_Printf(" range from %ld%s to %ld%s\n",
|
|
||||||
(long)fu, M_Ftrim(fu),
|
|
||||||
(long)ck, M_Ftrim(ck));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
CONS_Printf(" range from %d to %d\n", cvar->PossibleValue[0].value,
|
|
||||||
cvar->PossibleValue[1].value);
|
|
||||||
i = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
{
|
||||||
|
const char *cvalue = NULL;
|
||||||
//CONS_Printf(M_GetText(" possible value : %s\n"), cvar->name);
|
//CONS_Printf(M_GetText(" possible value : %s\n"), cvar->name);
|
||||||
while (cvar->PossibleValue[i].strvalue)
|
while (cvar->PossibleValue[i].strvalue)
|
||||||
{
|
{
|
||||||
if (floatmode)
|
CONS_Printf(" %-2d : %s\n", cvar->PossibleValue[i].value,
|
||||||
CONS_Printf(" %-2f : %s\n", FIXED_TO_FLOAT(cvar->PossibleValue[i].value),
|
cvar->PossibleValue[i].strvalue);
|
||||||
cvar->PossibleValue[i].strvalue);
|
|
||||||
else
|
|
||||||
CONS_Printf(" %-2d : %s\n", cvar->PossibleValue[i].value,
|
|
||||||
cvar->PossibleValue[i].strvalue);
|
|
||||||
if (cvar->PossibleValue[i].value == cvar->value)
|
if (cvar->PossibleValue[i].value == cvar->value)
|
||||||
cvalue = cvar->PossibleValue[i].strvalue;
|
cvalue = cvar->PossibleValue[i].strvalue;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
if (cvalue)
|
||||||
|
CONS_Printf(" Current value: %s\n", cvalue);
|
||||||
|
else
|
||||||
|
CONS_Printf(" Current value: %d\n", cvar->value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cvalue)
|
|
||||||
CONS_Printf(" Current value: %s\n", cvalue);
|
|
||||||
else if (cvar->string)
|
|
||||||
CONS_Printf(" Current value: %s\n", cvar->string);
|
|
||||||
else
|
else
|
||||||
CONS_Printf(" Current value: %d\n", cvar->value);
|
CONS_Printf(" Current value: %d\n", cvar->value);
|
||||||
}
|
}
|
||||||
@@ -1043,10 +1025,7 @@ static void COM_Add_f(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (( cvar->flags & CV_FLOAT ))
|
if (( cvar->flags & CV_FLOAT ))
|
||||||
{
|
CV_Set(cvar, va("%f", FIXED_TO_FLOAT (cvar->value) + atof(COM_Argv(2))));
|
||||||
float n =FIXED_TO_FLOAT (cvar->value) + atof(COM_Argv(2));
|
|
||||||
CV_Set(cvar, va("%ld%s", (long)n, M_Ftrim(n)));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
CV_AddValue(cvar, atoi(COM_Argv(2)));
|
CV_AddValue(cvar, atoi(COM_Argv(2)));
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-31
@@ -95,7 +95,7 @@ UINT8 playernode[MAXPLAYERS];
|
|||||||
tic_t jointimeout = (3*TICRATE);
|
tic_t jointimeout = (3*TICRATE);
|
||||||
static boolean sendingsavegame[MAXNETNODES]; // Are we sending the savegame?
|
static boolean sendingsavegame[MAXNETNODES]; // Are we sending the savegame?
|
||||||
#ifdef SATURNPAK
|
#ifdef SATURNPAK
|
||||||
static tic_t resendingsavegame[MAXNETNODES]; // Are we resending the savegame?
|
static boolean resendingsavegame[MAXNETNODES]; // Are we resending the savegame?
|
||||||
static tic_t savegameresendcooldown[MAXNETNODES]; // How long before we can resend again?
|
static tic_t savegameresendcooldown[MAXNETNODES]; // How long before we can resend again?
|
||||||
#endif
|
#endif
|
||||||
static tic_t freezetimeout[MAXNETNODES]; // Until when can this node freeze the server before getting a timeout?
|
static tic_t freezetimeout[MAXNETNODES]; // Until when can this node freeze the server before getting a timeout?
|
||||||
@@ -4244,7 +4244,7 @@ static void ResetNode(INT32 node)
|
|||||||
// SATURN
|
// SATURN
|
||||||
#ifdef SATURNPAK
|
#ifdef SATURNPAK
|
||||||
is_client_saturn[node] = false;
|
is_client_saturn[node] = false;
|
||||||
resendingsavegame[node] = 0;
|
resendingsavegame[node] = false;
|
||||||
savegameresendcooldown[node] = 0;
|
savegameresendcooldown[node] = 0;
|
||||||
gamestate_resend_counter[node] = 0;
|
gamestate_resend_counter[node] = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -4945,7 +4945,7 @@ static void PT_CanReceiveGamestate(SINT8 node)
|
|||||||
CONS_Printf(M_GetText("Resending game state to %s...\n"), player_names[nodetoplayer[node]]);
|
CONS_Printf(M_GetText("Resending game state to %s...\n"), player_names[nodetoplayer[node]]);
|
||||||
|
|
||||||
SV_SendSaveGame(node, true); // Resend a complete game state
|
SV_SendSaveGame(node, true); // Resend a complete game state
|
||||||
resendingsavegame[node] = 1;
|
resendingsavegame[node] = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -5392,7 +5392,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||||||
&& consistancy[realstart%TICQUEUE] != SHORT(netbuffer->u.clientpak.consistancy)
|
&& consistancy[realstart%TICQUEUE] != SHORT(netbuffer->u.clientpak.consistancy)
|
||||||
&& (!UseSaturnSynch(node) || (!resendingsavegame[node] && savegameresendcooldown[node] <= I_GetTime() && !SV_ResendingSavegameToAnyone())))
|
&& (!UseSaturnSynch(node) || (!resendingsavegame[node] && savegameresendcooldown[node] <= I_GetTime() && !SV_ResendingSavegameToAnyone())))
|
||||||
{
|
{
|
||||||
resendingsavegame[node] = 0; // reset this before just in case
|
resendingsavegame[node] = false; // reset this before just in case
|
||||||
|
|
||||||
// Check if a client is saturn before sending ANYTHING!
|
// Check if a client is saturn before sending ANYTHING!
|
||||||
// this way we only send stuff to clients we know can use the gamestate resend
|
// this way we only send stuff to clients we know can use the gamestate resend
|
||||||
@@ -5402,7 +5402,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||||||
// Tell the client we are about to resend them the gamestate
|
// Tell the client we are about to resend them the gamestate
|
||||||
netbuffer->packettype = PT_WILLRESENDGAMESTATE;
|
netbuffer->packettype = PT_WILLRESENDGAMESTATE;
|
||||||
HSendPacket(node, true, 0, 0);
|
HSendPacket(node, true, 0, 0);
|
||||||
resendingsavegame[node] = 1;
|
resendingsavegame[node] = true;
|
||||||
}
|
}
|
||||||
else if (UseVanillaSynch(node))
|
else if (UseVanillaSynch(node))
|
||||||
{
|
{
|
||||||
@@ -5732,7 +5732,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||||||
break;
|
break;
|
||||||
case PT_RECEIVEDGAMESTATE:
|
case PT_RECEIVEDGAMESTATE:
|
||||||
sendingsavegame[node] = false;
|
sendingsavegame[node] = false;
|
||||||
resendingsavegame[node] = 0;
|
resendingsavegame[node] = false;
|
||||||
savegameresendcooldown[node] = I_GetTime() + cv_resynchcooldown.value * TICRATE; // I_GetTime() + 5 * TICRATE;
|
savegameresendcooldown[node] = I_GetTime() + cv_resynchcooldown.value * TICRATE; // I_GetTime() + 5 * TICRATE;
|
||||||
break;
|
break;
|
||||||
case PT_WILLRESENDGAMESTATE:
|
case PT_WILLRESENDGAMESTATE:
|
||||||
@@ -6362,35 +6362,10 @@ static void SV_Maketic(void)
|
|||||||
maketic++;
|
maketic++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SATURNPAK
|
|
||||||
static void SV_UpdateResendGamestateTimeout(void)
|
|
||||||
{
|
|
||||||
for (INT32 i = 0; i < MAXNETNODES; ++i)
|
|
||||||
{
|
|
||||||
if (!resendingsavegame[i])
|
|
||||||
continue;
|
|
||||||
|
|
||||||
resendingsavegame[i]++;
|
|
||||||
|
|
||||||
// Resending savegame took too long
|
|
||||||
if (resendingsavegame[i] > (tic_t)TICRATE*cv_pingtimeout.value)
|
|
||||||
{
|
|
||||||
resendingsavegame[i] = 0;
|
|
||||||
SendKick(i, KICK_MSG_CON_FAIL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
boolean TryRunTics(tic_t realtics)
|
boolean TryRunTics(tic_t realtics)
|
||||||
{
|
{
|
||||||
boolean ticking;
|
boolean ticking;
|
||||||
|
|
||||||
#ifdef SATURNPAK
|
|
||||||
if (server)
|
|
||||||
SV_UpdateResendGamestateTimeout();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// the machine has lagged but it is not so bad
|
// the machine has lagged but it is not so bad
|
||||||
if (realtics > TICRATE/7) // FIXME: consistency failure!!
|
if (realtics > TICRATE/7) // FIXME: consistency failure!!
|
||||||
{
|
{
|
||||||
|
|||||||
+128
-142
@@ -149,8 +149,6 @@ boolean dedicated = false;
|
|||||||
|
|
||||||
boolean loaded_config = false; // true once config.cfg loaded AND executed
|
boolean loaded_config = false; // true once config.cfg loaded AND executed
|
||||||
|
|
||||||
static void D_CleanFile(char **filearray);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// D_PostEvent
|
// D_PostEvent
|
||||||
// Called by the I/O functions when input is detected
|
// Called by the I/O functions when input is detected
|
||||||
@@ -199,12 +197,10 @@ static void D_PadMenuScrollInput(UINT8 input)
|
|||||||
// and pass it to the eventlist
|
// and pass it to the eventlist
|
||||||
static void D_GamePadMenuScrollTicker(void)
|
static void D_GamePadMenuScrollTicker(void)
|
||||||
{
|
{
|
||||||
|
UINT8 i;
|
||||||
static UINT8 menuInputDelayTimer = 0;
|
static UINT8 menuInputDelayTimer = 0;
|
||||||
|
|
||||||
if (dedicated)
|
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||||
return;
|
|
||||||
|
|
||||||
for (UINT8 i = 0; i < 4; i++)
|
|
||||||
{
|
{
|
||||||
if (dpadscrollstate[i])
|
if (dpadscrollstate[i])
|
||||||
{
|
{
|
||||||
@@ -224,10 +220,10 @@ static void D_GamePadMenuScrollTicker(void)
|
|||||||
static void D_DeviceLEDTick(void)
|
static void D_DeviceLEDTick(void)
|
||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
static UINT16 color[MAXSPLITSCREENPLAYERS] = {0, 0, 0, 0};
|
static UINT16 color[MAXSPLITSCREENPLAYERS] = {0};
|
||||||
static UINT16 curcolor[MAXSPLITSCREENPLAYERS] = {0, 0, 0, 0};
|
static UINT16 curcolor[MAXSPLITSCREENPLAYERS] = {0};
|
||||||
|
|
||||||
if (dedicated || numcontrollers == 0)
|
if (numcontrollers == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -254,7 +250,6 @@ static void D_DeviceLEDTick(void)
|
|||||||
void D_ProcessEvents(void)
|
void D_ProcessEvents(void)
|
||||||
{
|
{
|
||||||
event_t *ev;
|
event_t *ev;
|
||||||
|
|
||||||
boolean eaten;
|
boolean eaten;
|
||||||
|
|
||||||
for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1))
|
for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1))
|
||||||
@@ -293,8 +288,10 @@ void D_ProcessEvents(void)
|
|||||||
|
|
||||||
// Demo input:
|
// Demo input:
|
||||||
if (demo.playback)
|
if (demo.playback)
|
||||||
|
{
|
||||||
if (M_DemoResponder(ev))
|
if (M_DemoResponder(ev))
|
||||||
continue; // demo ate the event
|
continue; // demo ate the event
|
||||||
|
}
|
||||||
|
|
||||||
// console input
|
// console input
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
@@ -319,6 +316,88 @@ void D_ProcessEvents(void)
|
|||||||
// draw current display, possibly wiping it from the previous
|
// draw current display, possibly wiping it from the previous
|
||||||
//
|
//
|
||||||
|
|
||||||
|
static void D_Renderview(void)
|
||||||
|
{
|
||||||
|
UINT8 i;
|
||||||
|
|
||||||
|
if (automapactive)
|
||||||
|
return;
|
||||||
|
|
||||||
|
R_ApplyLevelInterpolators(rendertimefrac);
|
||||||
|
|
||||||
|
for (i = 0; i <= splitscreen; i++)
|
||||||
|
{
|
||||||
|
const boolean issplitscreen = (i > 0);
|
||||||
|
|
||||||
|
if (!P_MobjWasRemoved(players[displayplayers[i]].mo) || players[displayplayers[i]].playerstate == PST_DEAD)
|
||||||
|
{
|
||||||
|
viewssnum = i;
|
||||||
|
|
||||||
|
if (!issplitscreen) // Initialize for P1
|
||||||
|
{
|
||||||
|
viewwindowy = viewwindowx = 0;
|
||||||
|
topleft = screens[0];
|
||||||
|
objectsdrawn = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef HWRENDER
|
||||||
|
if (rendermode == render_opengl)
|
||||||
|
{
|
||||||
|
HWR_RenderPlayerView();
|
||||||
|
R_RestoreLevelInterpolators();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (issplitscreen) // Splitscreen-specific
|
||||||
|
{
|
||||||
|
const INT32 len = viewheight*sizeof(ylookup[0]);
|
||||||
|
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
if (splitscreen > 1)
|
||||||
|
{
|
||||||
|
viewwindowx = viewwidth;
|
||||||
|
viewwindowy = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
viewwindowx = 0;
|
||||||
|
viewwindowy = viewheight;
|
||||||
|
}
|
||||||
|
M_Memcpy(ylookup, ylookup2, len);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
viewwindowx = 0;
|
||||||
|
viewwindowy = viewheight;
|
||||||
|
M_Memcpy(ylookup, ylookup3, len);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
viewwindowx = viewwidth;
|
||||||
|
viewwindowy = viewheight;
|
||||||
|
M_Memcpy(ylookup, ylookup4, len);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
|
||||||
|
}
|
||||||
|
|
||||||
|
R_RenderPlayerView(&players[displayplayers[i]]);
|
||||||
|
|
||||||
|
if (issplitscreen)
|
||||||
|
M_Memcpy(ylookup, ylookup1, viewheight*sizeof (ylookup[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!issplitscreen)
|
||||||
|
R_ApplyViewMorph();
|
||||||
|
|
||||||
|
V_DoPostProcessor(i, postimgparam[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
R_RestoreLevelInterpolators();
|
||||||
|
}
|
||||||
|
|
||||||
// wipegamestate can be set to -1 to force a wipe on the next draw
|
// wipegamestate can be set to -1 to force a wipe on the next draw
|
||||||
// added comment : there is a wipe eatch change of the gamestate
|
// added comment : there is a wipe eatch change of the gamestate
|
||||||
gamestate_t wipegamestate = GS_LEVEL;
|
gamestate_t wipegamestate = GS_LEVEL;
|
||||||
@@ -329,7 +408,6 @@ static boolean D_Display(void)
|
|||||||
boolean forcerefresh = false;
|
boolean forcerefresh = false;
|
||||||
static boolean wipe = false;
|
static boolean wipe = false;
|
||||||
INT32 wipedefindex = 0;
|
INT32 wipedefindex = 0;
|
||||||
UINT8 i;
|
|
||||||
|
|
||||||
if (!dedicated)
|
if (!dedicated)
|
||||||
{
|
{
|
||||||
@@ -368,6 +446,7 @@ static boolean D_Display(void)
|
|||||||
{
|
{
|
||||||
// set for all later
|
// set for all later
|
||||||
wipedefindex = gamestate; // wipe_xxx_toblack
|
wipedefindex = gamestate; // wipe_xxx_toblack
|
||||||
|
|
||||||
if (gamestate == GS_TITLESCREEN && wipegamestate != GS_INTRO)
|
if (gamestate == GS_TITLESCREEN && wipegamestate != GS_INTRO)
|
||||||
wipedefindex = wipe_timeattack_toblack;
|
wipedefindex = wipe_timeattack_toblack;
|
||||||
else if (gamestate == GS_INTERMISSION)
|
else if (gamestate == GS_INTERMISSION)
|
||||||
@@ -380,26 +459,28 @@ static boolean D_Display(void)
|
|||||||
|
|
||||||
if (!dedicated)
|
if (!dedicated)
|
||||||
{
|
{
|
||||||
// Fade to black first
|
if (gamestate != GS_LEVEL)
|
||||||
if (gamestate != GS_LEVEL // fades to black on its own timing, always
|
|
||||||
&& wipedefs[wipedefindex] != UINT8_MAX)
|
|
||||||
{
|
{
|
||||||
F_WipeStartScreen();
|
// Fade to black first
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
if (wipedefs[wipedefindex] != UINT8_MAX) // fades to black on its own timing, always
|
||||||
F_WipeEndScreen();
|
{
|
||||||
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK);
|
F_WipeStartScreen();
|
||||||
ranwipe = true;
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||||
}
|
F_WipeEndScreen();
|
||||||
|
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK);
|
||||||
|
ranwipe = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (gamestate != GS_LEVEL && rendermode != render_none)
|
if (rendermode != render_none)
|
||||||
{
|
{
|
||||||
V_SetPaletteLump("PLAYPAL"); // Reset the palette
|
V_SetPaletteLump("PLAYPAL"); // Reset the palette
|
||||||
R_ReInitColormaps(0, LUMPERROR);
|
R_ReInitColormaps(0, LUMPERROR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
F_WipeStartScreen();
|
F_WipeStartScreen();
|
||||||
}
|
}
|
||||||
else //dedicated servers
|
else // dedicated servers
|
||||||
{
|
{
|
||||||
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK);
|
F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK);
|
||||||
ranwipe = true;
|
ranwipe = true;
|
||||||
@@ -407,7 +488,7 @@ static boolean D_Display(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dedicated) //bail out after wipe logic
|
if (dedicated) // bail out after wipe logic
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// do buffered drawing
|
// do buffered drawing
|
||||||
@@ -432,9 +513,6 @@ static boolean D_Display(void)
|
|||||||
HU_Drawer();
|
HU_Drawer();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GS_TIMEATTACK:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GS_INTRO:
|
case GS_INTRO:
|
||||||
F_IntroDrawer();
|
F_IntroDrawer();
|
||||||
if (wipegamestate == (gamestate_t)-1)
|
if (wipegamestate == (gamestate_t)-1)
|
||||||
@@ -486,6 +564,7 @@ static boolean D_Display(void)
|
|||||||
HU_Erase();
|
HU_Erase();
|
||||||
HU_Drawer();
|
HU_Drawer();
|
||||||
}
|
}
|
||||||
|
case GS_TIMEATTACK:
|
||||||
case GS_DEDICATEDSERVER:
|
case GS_DEDICATEDSERVER:
|
||||||
case GS_NULL:
|
case GS_NULL:
|
||||||
break;
|
break;
|
||||||
@@ -494,89 +573,10 @@ static boolean D_Display(void)
|
|||||||
if (gamestate == GS_LEVEL)
|
if (gamestate == GS_LEVEL)
|
||||||
{
|
{
|
||||||
// draw the view directly
|
// draw the view directly
|
||||||
if (cv_renderview.value && !automapactive)
|
if (cv_renderview.value)
|
||||||
{
|
{
|
||||||
PS_START_TIMING(ps_rendercalltime);
|
PS_START_TIMING(ps_rendercalltime);
|
||||||
|
D_Renderview();
|
||||||
R_ApplyLevelInterpolators(rendertimefrac);
|
|
||||||
|
|
||||||
for (i = 0; i <= splitscreen; i++)
|
|
||||||
{
|
|
||||||
if (!P_MobjWasRemoved(players[displayplayers[i]].mo) || players[displayplayers[i]].playerstate == PST_DEAD)
|
|
||||||
{
|
|
||||||
viewssnum = i;
|
|
||||||
|
|
||||||
if (i == 0) // Initialize for P1
|
|
||||||
{
|
|
||||||
viewwindowy = 0;
|
|
||||||
viewwindowx = 0;
|
|
||||||
|
|
||||||
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
|
|
||||||
objectsdrawn = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HWRENDER
|
|
||||||
if (rendermode == render_opengl)
|
|
||||||
HWR_RenderPlayerView();
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
if (rendermode != render_none)
|
|
||||||
{
|
|
||||||
if (i > 0) // Splitscreen-specific
|
|
||||||
{
|
|
||||||
switch (i)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
if (splitscreen > 1)
|
|
||||||
{
|
|
||||||
viewwindowx = viewwidth;
|
|
||||||
viewwindowy = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
viewwindowx = 0;
|
|
||||||
viewwindowy = viewheight;
|
|
||||||
}
|
|
||||||
M_Memcpy(ylookup, ylookup2, viewheight*sizeof (ylookup[0]));
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
viewwindowx = 0;
|
|
||||||
viewwindowy = viewheight;
|
|
||||||
M_Memcpy(ylookup, ylookup3, viewheight*sizeof (ylookup[0]));
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
viewwindowx = viewwidth;
|
|
||||||
viewwindowy = viewheight;
|
|
||||||
M_Memcpy(ylookup, ylookup4, viewheight*sizeof (ylookup[0]));
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
topleft = screens[0] + viewwindowy*vid.width + viewwindowx;
|
|
||||||
}
|
|
||||||
|
|
||||||
R_RenderPlayerView(&players[displayplayers[i]]);
|
|
||||||
|
|
||||||
if (i > 0)
|
|
||||||
M_Memcpy(ylookup, ylookup1, viewheight*sizeof (ylookup[0]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rendermode == render_soft)
|
|
||||||
{
|
|
||||||
if (!splitscreen)
|
|
||||||
R_ApplyViewMorph();
|
|
||||||
|
|
||||||
for (i = 0; i <= splitscreen; i++)
|
|
||||||
{
|
|
||||||
V_DoPostProcessor(i, postimgparam[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
R_RestoreLevelInterpolators();
|
|
||||||
|
|
||||||
PS_STOP_TIMING(ps_rendercalltime);
|
PS_STOP_TIMING(ps_rendercalltime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -586,6 +586,7 @@ static boolean D_Display(void)
|
|||||||
{
|
{
|
||||||
VID_BlitLinearScreen(screens[0], screens[1], vid.width*vid.bpp, vid.height, vid.width*vid.bpp, vid.rowbytes);
|
VID_BlitLinearScreen(screens[0], screens[1], vid.width*vid.bpp, vid.height, vid.width*vid.bpp, vid.rowbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
lastdraw = false;
|
lastdraw = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,13 +609,8 @@ static boolean D_Display(void)
|
|||||||
// draw pause pic
|
// draw pause pic
|
||||||
if (paused && cv_showhud.value && !demo.playback)
|
if (paused && cv_showhud.value && !demo.playback)
|
||||||
{
|
{
|
||||||
INT32 py;
|
INT32 py = (automapactive) ? 4 : (viewwindowy + 4);
|
||||||
patch_t *patch;
|
patch_t *patch = W_CachePatchName("M_PAUSE", PU_PATCH);
|
||||||
if (automapactive)
|
|
||||||
py = 4;
|
|
||||||
else
|
|
||||||
py = viewwindowy + 4;
|
|
||||||
patch = W_CachePatchName("M_PAUSE", PU_PATCH);
|
|
||||||
V_DrawScaledPatch(viewwindowx + (BASEVIDWIDTH - patch->width)/2, py, V_SNAPTOTOP, patch);
|
V_DrawScaledPatch(viewwindowx + (BASEVIDWIDTH - patch->width)/2, py, V_SNAPTOTOP, patch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -756,7 +752,7 @@ void D_SRB2Loop(void)
|
|||||||
|
|
||||||
// Casting the return value of a function is bad practice (apparently)
|
// Casting the return value of a function is bad practice (apparently)
|
||||||
double budget = ((R_GetFramerateCap() == 0) ? 0.0 : round((1.0 / R_GetFramerateCap()) * I_GetPrecisePrecision()));
|
double budget = ((R_GetFramerateCap() == 0) ? 0.0 : round((1.0 / R_GetFramerateCap()) * I_GetPrecisePrecision()));
|
||||||
capbudget = (precise_t) budget;
|
capbudget = (precise_t)budget;
|
||||||
|
|
||||||
boolean ranwipe = false;
|
boolean ranwipe = false;
|
||||||
|
|
||||||
@@ -826,12 +822,15 @@ void D_SRB2Loop(void)
|
|||||||
doDisplay = true;
|
doDisplay = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menuactive)
|
if (!dedicated)
|
||||||
{
|
{
|
||||||
D_GamePadMenuScrollTicker();
|
if (menuactive)
|
||||||
}
|
{
|
||||||
|
D_GamePadMenuScrollTicker();
|
||||||
|
}
|
||||||
|
|
||||||
D_DeviceLEDTick();
|
D_DeviceLEDTick();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interp)
|
if (interp)
|
||||||
@@ -843,7 +842,9 @@ void D_SRB2Loop(void)
|
|||||||
ps_interp_frac.value.p = (precise_t)((FIXED_TO_FLOAT(g_time.timefrac)) * 1000.0f);
|
ps_interp_frac.value.p = (precise_t)((FIXED_TO_FLOAT(g_time.timefrac)) * 1000.0f);
|
||||||
ps_interp_lag.value.p = (precise_t)((deltasecs) * 1000.0f);
|
ps_interp_lag.value.p = (precise_t)((deltasecs) * 1000.0f);
|
||||||
|
|
||||||
if (!(paused || P_AutoPause()) && deltatics < 1.0 && !hu_stopped)
|
const boolean lagging = ((deltatics >= 1.0) || hu_stopped);
|
||||||
|
|
||||||
|
if (!(paused || P_AutoPause()) && !lagging)
|
||||||
{
|
{
|
||||||
rendertimefrac = g_time.timefrac;
|
rendertimefrac = g_time.timefrac;
|
||||||
}
|
}
|
||||||
@@ -852,7 +853,7 @@ void D_SRB2Loop(void)
|
|||||||
rendertimefrac = FRACUNIT;
|
rendertimefrac = FRACUNIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((deltatics < 1.0) && !hu_stopped)
|
if (!lagging)
|
||||||
{
|
{
|
||||||
rendertimefrac_unpaused = g_time.timefrac;
|
rendertimefrac_unpaused = g_time.timefrac;
|
||||||
}
|
}
|
||||||
@@ -868,24 +869,9 @@ void D_SRB2Loop(void)
|
|||||||
rendertimefrac_unpaused = FRACUNIT;
|
rendertimefrac_unpaused = FRACUNIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interp || doDisplay)
|
if ((interp || doDisplay) && !frameskip)
|
||||||
{
|
{
|
||||||
if (!frameskip)
|
ranwipe = D_Display();
|
||||||
{
|
|
||||||
ranwipe = D_Display();
|
|
||||||
}
|
|
||||||
else if (!dedicated)
|
|
||||||
{
|
|
||||||
// always update console and hud
|
|
||||||
// otherwise it may take minutes to open it
|
|
||||||
CON_Drawer();
|
|
||||||
|
|
||||||
if (gamestate == GS_LEVEL)
|
|
||||||
{
|
|
||||||
ST_Drawer();
|
|
||||||
HU_Drawer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only take screenshots after drawing.
|
// Only take screenshots after drawing.
|
||||||
@@ -1202,7 +1188,7 @@ void D_AddPostloadFiles(void)
|
|||||||
postautoloaded = true;
|
postautoloaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void D_CleanFile(char **filearray)
|
void D_CleanFile(char **filearray)
|
||||||
{
|
{
|
||||||
size_t pnumwadfiles;
|
size_t pnumwadfiles;
|
||||||
for (pnumwadfiles = 0; filearray[pnumwadfiles]; pnumwadfiles++)
|
for (pnumwadfiles = 0; filearray[pnumwadfiles]; pnumwadfiles++)
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ void D_PostEvent(const event_t *ev);
|
|||||||
|
|
||||||
void D_ProcessEvents(void);
|
void D_ProcessEvents(void);
|
||||||
|
|
||||||
|
void D_CleanFile(char **filearray);
|
||||||
|
|
||||||
const char *D_Home(void);
|
const char *D_Home(void);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1183,18 +1183,6 @@ filestatus_t findfile(char *filename, const UINT8 *wantedmd5sum, boolean complet
|
|||||||
badmd5 = true;
|
badmd5 = true;
|
||||||
// if not found at all, just move on without doing anything
|
// if not found at all, just move on without doing anything
|
||||||
|
|
||||||
if (cv_addons_option.value == 3 && *cv_addons_folder.string != '\0')
|
|
||||||
{
|
|
||||||
// next, check any custom directory if specified
|
|
||||||
homecheck = filesearch(filename, cv_addons_folder.string, wantedmd5sum, completepath, 10);
|
|
||||||
|
|
||||||
if (homecheck == FS_FOUND) // we found the file, so return that we have :)
|
|
||||||
return FS_FOUND;
|
|
||||||
else if (homecheck == FS_MD5SUMBAD) // file has a bad md5; move on and look for a file with the right md5
|
|
||||||
badmd5 = true;
|
|
||||||
// if not found at all, just move on without doing anything
|
|
||||||
}
|
|
||||||
|
|
||||||
// finally check "." directory
|
// finally check "." directory
|
||||||
homecheck = filesearch(filename, ".", wantedmd5sum, completepath, 10);
|
homecheck = filesearch(filename, ".", wantedmd5sum, completepath, 10);
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -113,8 +113,8 @@ extern char logfilename[1024];
|
|||||||
#else
|
#else
|
||||||
#define VERSION 1 // Game version
|
#define VERSION 1 // Game version
|
||||||
#define SUBVERSION 6 // more precise version number
|
#define SUBVERSION 6 // more precise version number
|
||||||
#define VERSIONSTRING "Saturn v8.3"
|
#define VERSIONSTRING "Saturn v8.2"
|
||||||
#define VERSIONSTRINGW L"Saturn v8.3"
|
#define VERSIONSTRINGW L"Saturn v8.2"
|
||||||
// Hey! If you change this, add 1 to the MODVERSION below! Otherwise we can't force updates!
|
// Hey! If you change this, add 1 to the MODVERSION below! Otherwise we can't force updates!
|
||||||
// And change CMakeLists.txt (not src/, but in root), for CMake users!
|
// And change CMakeLists.txt (not src/, but in root), for CMake users!
|
||||||
// AND appveyor.yml, for the build bots!
|
// AND appveyor.yml, for the build bots!
|
||||||
|
|||||||
@@ -540,8 +540,6 @@ static const char *credits[] = {
|
|||||||
"\"Jin\"",
|
"\"Jin\"",
|
||||||
"\"riomccloud\"",
|
"\"riomccloud\"",
|
||||||
"\"chromaticpipe\"",
|
"\"chromaticpipe\"",
|
||||||
"\"PAS\"",
|
|
||||||
"\"$HOME\"",
|
|
||||||
"\"Achii\"",
|
"\"Achii\"",
|
||||||
"\"Anonimus\"",
|
"\"Anonimus\"",
|
||||||
"\"scizor300\"",
|
"\"scizor300\"",
|
||||||
|
|||||||
+58
-64
@@ -124,7 +124,7 @@ boolean addedtogame;
|
|||||||
player_t players[MAXPLAYERS];
|
player_t players[MAXPLAYERS];
|
||||||
|
|
||||||
INT32 consoleplayer; // player taking events and displaying
|
INT32 consoleplayer; // player taking events and displaying
|
||||||
INT32 displayplayers[MAXSPLITSCREENPLAYERS] = {0}; // view being displayed
|
INT32 displayplayers[MAXSPLITSCREENPLAYERS]; // view being displayed
|
||||||
|
|
||||||
tic_t gametic;
|
tic_t gametic;
|
||||||
tic_t levelstarttic; // gametic at level start
|
tic_t levelstarttic; // gametic at level start
|
||||||
@@ -751,49 +751,47 @@ INT32 JoyAxis(axis_input_e axissel, UINT8 player)
|
|||||||
INT32 axisval;
|
INT32 axisval;
|
||||||
boolean flp = false;
|
boolean flp = false;
|
||||||
|
|
||||||
UINT8 pnum = player-1;
|
|
||||||
|
|
||||||
//find what axis to get
|
//find what axis to get
|
||||||
switch (axissel)
|
switch (axissel)
|
||||||
{
|
{
|
||||||
case AXISTURN:
|
case AXISTURN:
|
||||||
axisval = cv_turnaxis[pnum].value;
|
axisval = cv_turnaxis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISMOVE:
|
case AXISMOVE:
|
||||||
axisval = cv_moveaxis[pnum].value;
|
axisval = cv_moveaxis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISCAMTURN:
|
case AXISCAMTURN:
|
||||||
axisval = cv_camturnaxis[pnum].value;
|
axisval = cv_camturnaxis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISCAMSTRAFE:
|
case AXISCAMSTRAFE:
|
||||||
axisval = cv_camstrafeaxis[pnum].value;
|
axisval = cv_camstrafeaxis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISBRAKE:
|
case AXISBRAKE:
|
||||||
axisval = cv_brakeaxis[pnum].value;
|
axisval = cv_brakeaxis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISAIM:
|
case AXISAIM:
|
||||||
axisval = cv_aimaxis[pnum].value;
|
axisval = cv_aimaxis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISLOOK:
|
case AXISLOOK:
|
||||||
axisval = cv_lookaxis[pnum].value;
|
axisval = cv_lookaxis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISFIRE:
|
case AXISFIRE:
|
||||||
axisval = cv_fireaxis[pnum].value;
|
axisval = cv_fireaxis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISDRIFT:
|
case AXISDRIFT:
|
||||||
axisval = cv_driftaxis[pnum].value;
|
axisval = cv_driftaxis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISLOOKBACK:
|
case AXISLOOKBACK:
|
||||||
axisval = cv_lookbackaxis[pnum].value;
|
axisval = cv_lookbackaxis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISCUSTOM1:
|
case AXISCUSTOM1:
|
||||||
axisval = cv_custom1axis[pnum].value;
|
axisval = cv_custom1axis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISCUSTOM2:
|
case AXISCUSTOM2:
|
||||||
axisval = cv_custom2axis[pnum].value;
|
axisval = cv_custom2axis[player-1].value;
|
||||||
break;
|
break;
|
||||||
case AXISCUSTOM3:
|
case AXISCUSTOM3:
|
||||||
axisval = cv_custom3axis[pnum].value;
|
axisval = cv_custom3axis[player-1].value;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
@@ -804,51 +802,44 @@ INT32 JoyAxis(axis_input_e axissel, UINT8 player)
|
|||||||
axisval = -axisval;
|
axisval = -axisval;
|
||||||
flp = true;
|
flp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (axisval > JOYAXISSET*2 || axisval == 0) //not there in array or None
|
if (axisval > JOYAXISSET*2 || axisval == 0) //not there in array or None
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (axisval % 2)
|
if (axisval%2)
|
||||||
{
|
{
|
||||||
axisval /= 2;
|
axisval /= 2;
|
||||||
retaxis = joyxmove[pnum][axisval];
|
retaxis = joyxmove[axisval];
|
||||||
|
|
||||||
if (retaxis < (-JOYAXISRANGE))
|
if (retaxis < (-JOYAXISRANGE))
|
||||||
retaxis = -JOYAXISRANGE;
|
retaxis = -JOYAXISRANGE;
|
||||||
if (retaxis > (+JOYAXISRANGE))
|
if (retaxis > (+JOYAXISRANGE))
|
||||||
retaxis = +JOYAXISRANGE;
|
retaxis = +JOYAXISRANGE;
|
||||||
if (!Joystick[pnum].bGamepadStyle && axissel < AXISDEAD)
|
if (!Joystick[player-1].bGamepadStyle && axissel < AXISDEAD)
|
||||||
{
|
{
|
||||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_xdeadzone[pnum].value) >> FRACBITS;
|
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_xdeadzone[player-1].value) >> FRACBITS;
|
||||||
if (abs(retaxis) <= jdeadzone)
|
if (abs(retaxis) <= jdeadzone)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (flp) retaxis = -retaxis; //flip it around
|
||||||
if (flp)
|
|
||||||
retaxis = -retaxis; // flip it around
|
|
||||||
|
|
||||||
return retaxis;
|
return retaxis;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
axisval--;
|
axisval--;
|
||||||
axisval /= 2;
|
axisval /= 2;
|
||||||
retaxis = joyymove[pnum][axisval];
|
retaxis = joyymove[axisval];
|
||||||
|
|
||||||
if (retaxis < (-JOYAXISRANGE))
|
if (retaxis < (-JOYAXISRANGE))
|
||||||
retaxis = -JOYAXISRANGE;
|
retaxis = -JOYAXISRANGE;
|
||||||
if (retaxis > (+JOYAXISRANGE))
|
if (retaxis > (+JOYAXISRANGE))
|
||||||
retaxis = +JOYAXISRANGE;
|
retaxis = +JOYAXISRANGE;
|
||||||
if (!Joystick[pnum].bGamepadStyle && axissel < AXISDEAD)
|
if (!Joystick[player-1].bGamepadStyle && axissel < AXISDEAD)
|
||||||
{
|
{
|
||||||
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_ydeadzone[pnum].value) >> FRACBITS;
|
const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_ydeadzone[player-1].value) >> FRACBITS;
|
||||||
if (abs(retaxis) <= jdeadzone)
|
if (abs(retaxis) <= jdeadzone)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (flp) retaxis = -retaxis; //flip it around
|
||||||
if (flp)
|
|
||||||
retaxis = -retaxis; // flip it around
|
|
||||||
|
|
||||||
return retaxis;
|
return retaxis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1295,9 +1286,15 @@ static void G_DoLoadLevel(boolean resetplayer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clear cmd building stuff
|
// clear cmd building stuff
|
||||||
memset(gamekeydown, 0, sizeof(gamekeydown));
|
memset(gamekeydown, 0, sizeof (gamekeydown));
|
||||||
memset(joyxmove, 0, sizeof(joyxmove));
|
|
||||||
memset(joyymove, 0, sizeof(joyymove));
|
for (i = 0; i < JOYAXISSET; i++)
|
||||||
|
{
|
||||||
|
joyxmove[i] = joyymove[i] = 0;
|
||||||
|
joy2xmove[i] = joy2ymove[i] = 0;
|
||||||
|
joy3xmove[i] = joy3ymove[i] = 0;
|
||||||
|
joy4xmove[i] = joy4ymove[i] = 0;
|
||||||
|
}
|
||||||
mousex = mousey = 0;
|
mousex = mousey = 0;
|
||||||
|
|
||||||
// clear hud messages remains (usually from game startup)
|
// clear hud messages remains (usually from game startup)
|
||||||
@@ -5467,36 +5464,33 @@ void G_GhostTicker(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type != -1)
|
if (type == MT_GHOST)
|
||||||
{
|
{
|
||||||
if (type == MT_GHOST)
|
mobj = P_SpawnGhostMobj(g->mo); // does a large portion of the work for us
|
||||||
{
|
mobj->frame = (mobj->frame & ~FF_FRAMEMASK)|tr_trans60<<FF_TRANSSHIFT; // P_SpawnGhostMobj sets trans50, we want trans60
|
||||||
mobj = P_SpawnGhostMobj(g->mo); // does a large portion of the work for us
|
|
||||||
mobj->frame = (mobj->frame & ~FF_FRAMEMASK)|tr_trans60<<FF_TRANSSHIFT; // P_SpawnGhostMobj sets trans50, we want trans60
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mobj = P_SpawnMobj(g->mo->x, g->mo->y, g->mo->z - FixedDiv(FixedMul(g->mo->info->height, g->mo->scale) - g->mo->height,3*FRACUNIT), MT_THOK);
|
|
||||||
mobj->sprite = states[mobjinfo[type].spawnstate].sprite;
|
|
||||||
mobj->frame = (states[mobjinfo[type].spawnstate].frame & FF_FRAMEMASK) | tr_trans60<<FF_TRANSSHIFT;
|
|
||||||
mobj->tics = -1; // nope.
|
|
||||||
mobj->color = g->mo->color;
|
|
||||||
if (g->mo->eflags & MFE_VERTICALFLIP)
|
|
||||||
{
|
|
||||||
mobj->flags2 |= MF2_OBJECTFLIP;
|
|
||||||
mobj->eflags |= MFE_VERTICALFLIP;
|
|
||||||
}
|
|
||||||
P_SetScale(mobj, g->mo->scale);
|
|
||||||
mobj->destscale = g->mo->scale;
|
|
||||||
}
|
|
||||||
mobj->floorz = mobj->z;
|
|
||||||
mobj->ceilingz = mobj->z+mobj->height;
|
|
||||||
P_UnsetThingPosition(mobj);
|
|
||||||
mobj->flags = MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY; // make an ATTEMPT to curb crazy SOCs fucking stuff up...
|
|
||||||
P_SetThingPosition(mobj);
|
|
||||||
mobj->fuse = 8;
|
|
||||||
P_SetTarget(&mobj->target, g->mo);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mobj = P_SpawnMobj(g->mo->x, g->mo->y, g->mo->z - FixedDiv(FixedMul(g->mo->info->height, g->mo->scale) - g->mo->height,3*FRACUNIT), MT_THOK);
|
||||||
|
mobj->sprite = states[mobjinfo[type].spawnstate].sprite;
|
||||||
|
mobj->frame = (states[mobjinfo[type].spawnstate].frame & FF_FRAMEMASK) | tr_trans60<<FF_TRANSSHIFT;
|
||||||
|
mobj->tics = -1; // nope.
|
||||||
|
mobj->color = g->mo->color;
|
||||||
|
if (g->mo->eflags & MFE_VERTICALFLIP)
|
||||||
|
{
|
||||||
|
mobj->flags2 |= MF2_OBJECTFLIP;
|
||||||
|
mobj->eflags |= MFE_VERTICALFLIP;
|
||||||
|
}
|
||||||
|
P_SetScale(mobj, g->mo->scale);
|
||||||
|
mobj->destscale = g->mo->scale;
|
||||||
|
}
|
||||||
|
mobj->floorz = mobj->z;
|
||||||
|
mobj->ceilingz = mobj->z+mobj->height;
|
||||||
|
P_UnsetThingPosition(mobj);
|
||||||
|
mobj->flags = MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY; // make an ATTEMPT to curb crazy SOCs fucking stuff up...
|
||||||
|
P_SetThingPosition(mobj);
|
||||||
|
mobj->fuse = 8;
|
||||||
|
P_SetTarget(&mobj->target, g->mo);
|
||||||
}
|
}
|
||||||
if (ziptic & EZT_HIT)
|
if (ziptic & EZT_HIT)
|
||||||
{ // Spawn hit poofs for killing things!
|
{ // Spawn hit poofs for killing things!
|
||||||
@@ -8149,7 +8143,7 @@ void G_SaveDemo(void)
|
|||||||
size_t i, strindex = 0;
|
size_t i, strindex = 0;
|
||||||
boolean dash = true;
|
boolean dash = true;
|
||||||
|
|
||||||
for (i = 0; demo.titlename[i] && i < 127; i++)
|
for (i = 0; i < 127 && demo.titlename[i]; i++)
|
||||||
{
|
{
|
||||||
if ((demo.titlename[i] >= 'a' && demo.titlename[i] <= 'z') ||
|
if ((demo.titlename[i] >= 'a' && demo.titlename[i] <= 'z') ||
|
||||||
(demo.titlename[i] >= '0' && demo.titlename[i] <= '9'))
|
(demo.titlename[i] >= '0' && demo.titlename[i] <= '9'))
|
||||||
|
|||||||
+20
-10
@@ -114,7 +114,8 @@ INT32 mousex, mousey;
|
|||||||
INT32 mlooky; // like mousey but with a custom sensitivity for mlook
|
INT32 mlooky; // like mousey but with a custom sensitivity for mlook
|
||||||
|
|
||||||
// joystick values are repeated
|
// joystick values are repeated
|
||||||
INT32 joyxmove[MAXSPLITSCREENPLAYERS][JOYAXISSET], joyymove[MAXSPLITSCREENPLAYERS][JOYAXISSET];
|
INT32 joyxmove[JOYAXISSET], joyymove[JOYAXISSET], joy2xmove[JOYAXISSET], joy2ymove[JOYAXISSET],
|
||||||
|
joy3xmove[JOYAXISSET], joy3ymove[JOYAXISSET], joy4xmove[JOYAXISSET], joy4ymove[JOYAXISSET];
|
||||||
|
|
||||||
// current state of the keys: true if pushed
|
// current state of the keys: true if pushed
|
||||||
UINT8 gamekeydown[NUMINPUTS];
|
UINT8 gamekeydown[NUMINPUTS];
|
||||||
@@ -186,32 +187,32 @@ void G_MapEventsToControls(event_t *ev)
|
|||||||
i = ev->data1;
|
i = ev->data1;
|
||||||
if (i >= JOYAXISSET || menuactive || CON_Ready() || chat_on)
|
if (i >= JOYAXISSET || menuactive || CON_Ready() || chat_on)
|
||||||
break;
|
break;
|
||||||
if (ev->data2 != INT32_MAX) joyxmove[0][i] = ev->data2;
|
if (ev->data2 != INT32_MAX) joyxmove[i] = ev->data2;
|
||||||
if (ev->data3 != INT32_MAX) joyymove[0][i] = ev->data3;
|
if (ev->data3 != INT32_MAX) joyymove[i] = ev->data3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ev_joystick2: // buttons are virtual keys
|
case ev_joystick2: // buttons are virtual keys
|
||||||
i = ev->data1;
|
i = ev->data1;
|
||||||
if (i >= JOYAXISSET || menuactive)
|
if (i >= JOYAXISSET || menuactive)
|
||||||
break;
|
break;
|
||||||
if (ev->data2 != INT32_MAX) joyxmove[1][i] = ev->data2;
|
if (ev->data2 != INT32_MAX) joy2xmove[i] = ev->data2;
|
||||||
if (ev->data3 != INT32_MAX) joyymove[1][i] = ev->data3;
|
if (ev->data3 != INT32_MAX) joy2ymove[i] = ev->data3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ev_joystick3:
|
case ev_joystick3:
|
||||||
i = ev->data1;
|
i = ev->data1;
|
||||||
if (i >= JOYAXISSET)
|
if (i >= JOYAXISSET)
|
||||||
break;
|
break;
|
||||||
if (ev->data2 != INT32_MAX) joyxmove[2][i] = ev->data2;
|
if (ev->data2 != INT32_MAX) joy3xmove[i] = ev->data2;
|
||||||
if (ev->data3 != INT32_MAX) joyymove[2][i] = ev->data3;
|
if (ev->data3 != INT32_MAX) joy3ymove[i] = ev->data3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ev_joystick4:
|
case ev_joystick4:
|
||||||
i = ev->data1;
|
i = ev->data1;
|
||||||
if (i >= JOYAXISSET)
|
if (i >= JOYAXISSET)
|
||||||
break;
|
break;
|
||||||
if (ev->data2 != INT32_MAX) joyxmove[3][i] = ev->data2;
|
if (ev->data2 != INT32_MAX) joy4xmove[i] = ev->data2;
|
||||||
if (ev->data3 != INT32_MAX) joyymove[3][i] = ev->data3;
|
if (ev->data3 != INT32_MAX) joy4ymove[i] = ev->data3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -257,6 +258,15 @@ void G_ResetControls(void)
|
|||||||
memset(joyxmove, 0, sizeof(joyxmove));
|
memset(joyxmove, 0, sizeof(joyxmove));
|
||||||
memset(joyymove, 0, sizeof(joyymove));
|
memset(joyymove, 0, sizeof(joyymove));
|
||||||
|
|
||||||
|
memset(joy2xmove, 0, sizeof(joy2xmove));
|
||||||
|
memset(joy2ymove, 0, sizeof(joy2ymove));
|
||||||
|
|
||||||
|
memset(joy3xmove, 0, sizeof(joy3xmove));
|
||||||
|
memset(joy3ymove, 0, sizeof(joy3ymove));
|
||||||
|
|
||||||
|
memset(joy4xmove, 0, sizeof(joy4xmove));
|
||||||
|
memset(joy4ymove, 0, sizeof(joy4ymove));
|
||||||
|
|
||||||
// reset those just in case the game missed the keyup event
|
// reset those just in case the game missed the keyup event
|
||||||
memset(dpadscrollstate, false, sizeof(dpadscrollstate));
|
memset(dpadscrollstate, false, sizeof(dpadscrollstate));
|
||||||
}
|
}
|
||||||
@@ -1020,7 +1030,7 @@ INT32 G_KeyStringtoNum(const char *keystr)
|
|||||||
if (!keystr[0])
|
if (!keystr[0])
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z')
|
if (!keystr[0] || (!keystr[1] && keystr[0] > ' ' && keystr[0] <= 'z'))
|
||||||
return keystr[0];
|
return keystr[0];
|
||||||
|
|
||||||
if (!strncmp(keystr, "KEY", 3) && keystr[3] >= '0' && keystr[3] <= '9')
|
if (!strncmp(keystr, "KEY", 3) && keystr[3] >= '0' && keystr[3] <= '9')
|
||||||
|
|||||||
+5
-8
@@ -41,12 +41,10 @@ typedef enum
|
|||||||
KEY_DBLJOY1 = KEY_DBLMOUSE1 + MOUSEBUTTONS,
|
KEY_DBLJOY1 = KEY_DBLMOUSE1 + MOUSEBUTTONS,
|
||||||
KEY_DBLHAT1 = KEY_DBLJOY1 + JOYBUTTONS,
|
KEY_DBLHAT1 = KEY_DBLJOY1 + JOYBUTTONS,
|
||||||
|
|
||||||
KEY_2MOUSE1 = KEY_DBLHAT1 + JOYHATS*4,
|
KEY_2JOY1 = KEY_DBLHAT1 + MOUSEBUTTONS,
|
||||||
KEY_2JOY1 = KEY_2MOUSE1 + MOUSEBUTTONS,
|
|
||||||
KEY_2HAT1 = KEY_2JOY1 + JOYBUTTONS,
|
KEY_2HAT1 = KEY_2JOY1 + JOYBUTTONS,
|
||||||
|
|
||||||
KEY_DBL2MOUSE1 = KEY_2HAT1 + JOYHATS*4,
|
KEY_DBL2JOY1 = KEY_2HAT1 + MOUSEBUTTONS,
|
||||||
KEY_DBL2JOY1 = KEY_DBL2MOUSE1 + MOUSEBUTTONS,
|
|
||||||
KEY_DBL2HAT1 = KEY_DBL2JOY1 + JOYBUTTONS,
|
KEY_DBL2HAT1 = KEY_DBL2JOY1 + JOYBUTTONS,
|
||||||
|
|
||||||
KEY_3JOY1 = KEY_DBL2HAT1 + JOYHATS*4,
|
KEY_3JOY1 = KEY_DBL2HAT1 + JOYHATS*4,
|
||||||
@@ -63,10 +61,8 @@ typedef enum
|
|||||||
|
|
||||||
KEY_MOUSEWHEELUP = KEY_DBL4HAT1 + JOYHATS*4,
|
KEY_MOUSEWHEELUP = KEY_DBL4HAT1 + JOYHATS*4,
|
||||||
KEY_MOUSEWHEELDOWN = KEY_MOUSEWHEELUP + 1,
|
KEY_MOUSEWHEELDOWN = KEY_MOUSEWHEELUP + 1,
|
||||||
KEY_2MOUSEWHEELUP = KEY_MOUSEWHEELDOWN + 1,
|
|
||||||
KEY_2MOUSEWHEELDOWN = KEY_2MOUSEWHEELUP + 1,
|
|
||||||
|
|
||||||
NUMINPUTS = KEY_2MOUSEWHEELDOWN + 1, // FIXME: all the mouse 2 stuff should be removed, but it screws up mappings somehow
|
NUMINPUTS = KEY_MOUSEWHEELDOWN + 1,
|
||||||
} key_input_e;
|
} key_input_e;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
@@ -117,7 +113,8 @@ extern consvar_t cv_gamepadled[MAXSPLITSCREENPLAYERS];
|
|||||||
extern INT32 mousex, mousey;
|
extern INT32 mousex, mousey;
|
||||||
extern INT32 mlooky; //mousey with mlookSensitivity
|
extern INT32 mlooky; //mousey with mlookSensitivity
|
||||||
|
|
||||||
extern INT32 joyxmove[MAXSPLITSCREENPLAYERS][JOYAXISSET], joyymove[MAXSPLITSCREENPLAYERS][JOYAXISSET];
|
extern INT32 joyxmove[JOYAXISSET], joyymove[JOYAXISSET], joy2xmove[JOYAXISSET], joy2ymove[JOYAXISSET],
|
||||||
|
joy3xmove[JOYAXISSET], joy3ymove[JOYAXISSET], joy4xmove[JOYAXISSET], joy4ymove[JOYAXISSET];
|
||||||
|
|
||||||
// current state of the keys: true if pushed
|
// current state of the keys: true if pushed
|
||||||
extern UINT8 gamekeydown[NUMINPUTS];
|
extern UINT8 gamekeydown[NUMINPUTS];
|
||||||
|
|||||||
@@ -318,6 +318,8 @@ enum hwdsetspecialstate
|
|||||||
HWD_SET_TEXTUREFILTERMODE,
|
HWD_SET_TEXTUREFILTERMODE,
|
||||||
HWD_SET_TEXTUREANISOTROPICMODE,
|
HWD_SET_TEXTUREANISOTROPICMODE,
|
||||||
|
|
||||||
|
HWD_SET_WIREFRAME,
|
||||||
|
|
||||||
HWD_SET_MSAA,
|
HWD_SET_MSAA,
|
||||||
|
|
||||||
HWD_SET_SCREEN_TEXTURES,
|
HWD_SET_SCREEN_TEXTURES,
|
||||||
|
|||||||
+28
-23
@@ -226,6 +226,8 @@ consvar_t cv_glsolvetjoin = {"gr_solvetjoin", "On", 0, CV_OnOff, NULL, 0, NULL,
|
|||||||
|
|
||||||
consvar_t cv_glbatching = {"gr_batching", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_glbatching = {"gr_batching", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
consvar_t cv_glwireframe = {"gr_wireframe", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_glrenderdistance = {"gr_renderdistance", "Max", CV_SAVE, glrenderdistance_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_glrenderdistance = {"gr_renderdistance", "Max", CV_SAVE, glrenderdistance_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_glhorizonlines = {"gr_horizonlines", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_glhorizonlines = {"gr_horizonlines", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
@@ -338,6 +340,11 @@ static void HWR_SetShaderState(void)
|
|||||||
GL_SetSpecialState(HWD_SET_SHADERS, HWR_UseShader() ? 1 : 0);
|
GL_SetSpecialState(HWD_SET_SHADERS, HWR_UseShader() ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static boolean HWR_IsWireframeMode(void)
|
||||||
|
{
|
||||||
|
return (cv_glwireframe.value /*&& cv_debug*/);
|
||||||
|
}
|
||||||
|
|
||||||
static boolean HWR_OverrideObjectLightLevel(mobj_t *thing, INT32 *lightlevel)
|
static boolean HWR_OverrideObjectLightLevel(mobj_t *thing, INT32 *lightlevel)
|
||||||
{
|
{
|
||||||
if (R_ThingIsFullBright(thing))
|
if (R_ThingIsFullBright(thing))
|
||||||
@@ -3707,9 +3714,6 @@ static void HWR_SplitSprite(gl_vissprite_t *spr, const boolean papersprite)
|
|||||||
blend = HWR_GetBlendModeFlag(blendmode)|PF_Occlude;
|
blend = HWR_GetBlendModeFlag(blendmode)|PF_Occlude;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_playerfade.value && spr->mobj->player)
|
|
||||||
Surf.PolyColor.s.alpha = FixedMul(R_DoPlayerFade(spr->mobj), Surf.PolyColor.s.alpha);
|
|
||||||
|
|
||||||
if (HWR_UseShader())
|
if (HWR_UseShader())
|
||||||
{
|
{
|
||||||
shader = SHADER_SPRITE;
|
shader = SHADER_SPRITE;
|
||||||
@@ -3997,9 +4001,6 @@ static void HWR_DrawSprite(gl_vissprite_t *spr)
|
|||||||
blend = HWR_GetBlendModeFlag(blendmode)|PF_Occlude;
|
blend = HWR_GetBlendModeFlag(blendmode)|PF_Occlude;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_playerfade.value && spr->mobj->player)
|
|
||||||
Surf.PolyColor.s.alpha = FixedMul(R_DoPlayerFade(spr->mobj), Surf.PolyColor.s.alpha);
|
|
||||||
|
|
||||||
if (HWR_UseShader())
|
if (HWR_UseShader())
|
||||||
{
|
{
|
||||||
shader = SHADER_SPRITE;
|
shader = SHADER_SPRITE;
|
||||||
@@ -4233,7 +4234,6 @@ static void *HWR_CreateDrawNode(gl_drawnode_type_t type)
|
|||||||
Z_Realloc(drawnodes, alloceddrawnodes * sizeof(gl_drawnode_t), PU_LEVEL, &drawnodes);
|
Z_Realloc(drawnodes, alloceddrawnodes * sizeof(gl_drawnode_t), PU_LEVEL, &drawnodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
drawnode = &drawnodes[numdrawnodes++];
|
drawnode = &drawnodes[numdrawnodes++];
|
||||||
drawnode->type = type;
|
drawnode->type = type;
|
||||||
|
|
||||||
@@ -4464,10 +4464,7 @@ static void HWR_DrawModels(void)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!spr->mobj)
|
if (spr->mobj && spr->mobj->skin && spr->mobj->sprite == SPR_PLAY)
|
||||||
continue;
|
|
||||||
|
|
||||||
if (spr->mobj->skin && spr->mobj->sprite == SPR_PLAY)
|
|
||||||
{
|
{
|
||||||
md2_t *md2;
|
md2_t *md2;
|
||||||
|
|
||||||
@@ -5268,6 +5265,9 @@ static void HWR_DrawSkyBackground(void)
|
|||||||
if (drewsky)
|
if (drewsky)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (HWR_IsWireframeMode())
|
||||||
|
return;
|
||||||
|
|
||||||
GL_SetBlend(PF_Translucent|PF_NoDepthTest|PF_Modulated);
|
GL_SetBlend(PF_Translucent|PF_NoDepthTest|PF_Modulated);
|
||||||
|
|
||||||
memcpy(&dometransform, &atransform, sizeof(FTransform));
|
memcpy(&dometransform, &atransform, sizeof(FTransform));
|
||||||
@@ -5470,8 +5470,8 @@ void HWR_RenderViewpoint(gl_portal_t *rootportal, const float fpov, player_t *pl
|
|||||||
HWR_PortalClipping(rootportal);
|
HWR_PortalClipping(rootportal);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set transform.
|
if (HWR_IsWireframeMode())
|
||||||
GL_SetTransform(&atransform);
|
GL_SetSpecialState(HWD_SET_WIREFRAME, 1);
|
||||||
|
|
||||||
ps_numbspcalls.value.i = 0;
|
ps_numbspcalls.value.i = 0;
|
||||||
ps_numpolyobjects.value.i = 0;
|
ps_numpolyobjects.value.i = 0;
|
||||||
@@ -5536,6 +5536,9 @@ void HWR_RenderViewpoint(gl_portal_t *rootportal, const float fpov, player_t *pl
|
|||||||
ps_hw_nodedrawtime.value.p = 0;
|
ps_hw_nodedrawtime.value.p = 0;
|
||||||
HWR_RenderDrawNodes();
|
HWR_RenderDrawNodes();
|
||||||
|
|
||||||
|
if (HWR_IsWireframeMode())
|
||||||
|
GL_SetSpecialState(HWD_SET_WIREFRAME, 0);
|
||||||
|
|
||||||
HWR_FreePortalList(portallist);
|
HWR_FreePortalList(portallist);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5810,6 +5813,8 @@ void HWR_AddCommands(void)
|
|||||||
|
|
||||||
CV_RegisterVar(&cv_glbatching);
|
CV_RegisterVar(&cv_glbatching);
|
||||||
|
|
||||||
|
CV_RegisterVar(&cv_glwireframe);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_glrenderdistance);
|
CV_RegisterVar(&cv_glrenderdistance);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_glhorizonlines);
|
CV_RegisterVar(&cv_glhorizonlines);
|
||||||
@@ -5882,7 +5887,6 @@ static void COM_HWR_glinfo(void)
|
|||||||
CONS_Printf("Unrecognized argument: %s\n", argv);
|
CONS_Printf("Unrecognized argument: %s\n", argv);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CONS_Printf("\x88OpenGL %s\x80\n", gl_version);
|
CONS_Printf("\x88OpenGL %s\x80\n", gl_version);
|
||||||
@@ -6002,19 +6006,19 @@ static void HWR_DoPostProcessor(player_t *player)
|
|||||||
if (cv_glscreentextures.value != 2) // screen textures are needed for the rest of the effects
|
if (cv_glscreentextures.value != 2) // screen textures are needed for the rest of the effects
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Capture the screen for intermission and screen waving
|
//UINT8 viewnum = R_GetViewNumber(); // see below
|
||||||
if (gamestate != GS_INTERMISSION)
|
|
||||||
GL_MakeScreenTexture(HWD_SCREENTEXTURE_GENERIC1);
|
|
||||||
|
|
||||||
if (splitscreen) // Not supported in splitscreen - someone want to add support?
|
|
||||||
return;
|
|
||||||
|
|
||||||
//UINT8 viewnum = R_GetViewNumber(); // see above
|
|
||||||
//camera_t *thiscam = &camera[viewnum];
|
//camera_t *thiscam = &camera[viewnum];
|
||||||
camera_t *thiscam = &camera[0];
|
camera_t *thiscam = &camera[0];
|
||||||
|
|
||||||
|
// Not supported in splitscreen - someone want to add support?
|
||||||
|
const boolean screenwave = (!splitscreen && (thiscam->postimg & POSTIMG_WATER || thiscam->postimg & POSTIMG_HEAT));
|
||||||
|
|
||||||
|
// Capture the screen for intermission and screen waving
|
||||||
|
if ((lastdraw || screenwave) && gamestate != GS_INTERMISSION)
|
||||||
|
GL_MakeScreenTexture(HWD_SCREENTEXTURE_GENERIC1);
|
||||||
|
|
||||||
// Drunken vision! WooOOooo~
|
// Drunken vision! WooOOooo~
|
||||||
if (thiscam->postimg & POSTIMG_WATER || thiscam->postimg & POSTIMG_HEAT)
|
if (screenwave)
|
||||||
{
|
{
|
||||||
// 10 by 10 grid. 2 coordinates (xy)
|
// 10 by 10 grid. 2 coordinates (xy)
|
||||||
float v[SCREENVERTS][SCREENVERTS][2];
|
float v[SCREENVERTS][SCREENVERTS][2];
|
||||||
@@ -6048,6 +6052,7 @@ static void HWR_DoPostProcessor(player_t *player)
|
|||||||
v[x][y][1] = (y/((float)(SCREENVERTS-1.0f)/9.0f))-4.5f;
|
v[x][y][1] = (y/((float)(SCREENVERTS-1.0f)/9.0f))-4.5f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL_PostImgRedraw(v);
|
GL_PostImgRedraw(v);
|
||||||
|
|
||||||
// Capture the screen again for screen waving on the intermission
|
// Capture the screen again for screen waving on the intermission
|
||||||
|
|||||||
@@ -202,6 +202,8 @@ extern consvar_t cv_glsolvetjoin;
|
|||||||
|
|
||||||
extern consvar_t cv_glbatching;
|
extern consvar_t cv_glbatching;
|
||||||
|
|
||||||
|
extern consvar_t cv_glwireframe;
|
||||||
|
|
||||||
extern consvar_t cv_glrenderdistance;
|
extern consvar_t cv_glrenderdistance;
|
||||||
|
|
||||||
extern consvar_t cv_glhorizonlines;
|
extern consvar_t cv_glhorizonlines;
|
||||||
|
|||||||
@@ -1227,9 +1227,6 @@ void HWR_DrawMD2(gl_vissprite_t *spr)
|
|||||||
Surf.PolyFlags = HWR_GetBlendModeFlag(blendmode);
|
Surf.PolyFlags = HWR_GetBlendModeFlag(blendmode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cv_playerfade.value && spr->mobj->player)
|
|
||||||
Surf.PolyColor.s.alpha = FixedMul(R_DoPlayerFade(spr->mobj), Surf.PolyColor.s.alpha);
|
|
||||||
|
|
||||||
// dont forget to enabled the depth test because we can't do this like
|
// dont forget to enabled the depth test because we can't do this like
|
||||||
// before: polygons models are not sorted
|
// before: polygons models are not sorted
|
||||||
|
|
||||||
@@ -1244,7 +1241,7 @@ void HWR_DrawMD2(gl_vissprite_t *spr)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
md2s = md2_playermodels;
|
md2s = md2_playermodels;
|
||||||
skinnum = (skin_t *)spr->mobj->localskin - skins;
|
skinnum = (skin_t *)spr->mobj->localskin - skins;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1269,7 +1266,6 @@ void HWR_DrawMD2(gl_vissprite_t *spr)
|
|||||||
|
|
||||||
if (md2->error)
|
if (md2->error)
|
||||||
return; // we already failed loading this before :(
|
return; // we already failed loading this before :(
|
||||||
|
|
||||||
if (!md2->model)
|
if (!md2->model)
|
||||||
{
|
{
|
||||||
CONS_Debug(DBG_RENDER, "Loading model... (%s, %s)", sprnames[spr->mobj->sprite], md2->filename);
|
CONS_Debug(DBG_RENDER, "Loading model... (%s, %s)", sprnames[spr->mobj->sprite], md2->filename);
|
||||||
@@ -1288,7 +1284,6 @@ void HWR_DrawMD2(gl_vissprite_t *spr)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Hurdler: arf, I don't like that implementation at all... too much crappy
|
//Hurdler: arf, I don't like that implementation at all... too much crappy
|
||||||
gpatch = md2->glpatch;
|
gpatch = md2->glpatch;
|
||||||
if (gpatch)
|
if (gpatch)
|
||||||
|
|||||||
@@ -350,6 +350,8 @@ typedef void (APIENTRY * PFNglDisable) (GLenum cap);
|
|||||||
static PFNglDisable pglDisable;
|
static PFNglDisable pglDisable;
|
||||||
typedef void (APIENTRY * PFNglGetFloatv) (GLenum pname, GLfloat *params);
|
typedef void (APIENTRY * PFNglGetFloatv) (GLenum pname, GLfloat *params);
|
||||||
static PFNglGetFloatv pglGetFloatv;
|
static PFNglGetFloatv pglGetFloatv;
|
||||||
|
typedef void (APIENTRY * PFNglPolygonMode) (GLenum, GLenum);
|
||||||
|
static PFNglPolygonMode pglPolygonMode;
|
||||||
|
|
||||||
/* Depth Buffer */
|
/* Depth Buffer */
|
||||||
typedef void (APIENTRY * PFNglClearDepth) (GLclampd depth);
|
typedef void (APIENTRY * PFNglClearDepth) (GLclampd depth);
|
||||||
@@ -549,6 +551,7 @@ boolean SetupGLfunc(void)
|
|||||||
GETOPENGLFUNC(pglGetFloatv, glGetFloatv)
|
GETOPENGLFUNC(pglGetFloatv, glGetFloatv)
|
||||||
GETOPENGLFUNC(pglGetIntegerv, glGetIntegerv)
|
GETOPENGLFUNC(pglGetIntegerv, glGetIntegerv)
|
||||||
GETOPENGLFUNC(pglGetString, glGetString)
|
GETOPENGLFUNC(pglGetString, glGetString)
|
||||||
|
GETOPENGLFUNC(pglPolygonMode, glPolygonMode)
|
||||||
|
|
||||||
GETOPENGLFUNC(pglClearDepth, glClearDepth)
|
GETOPENGLFUNC(pglClearDepth, glClearDepth)
|
||||||
GETOPENGLFUNC(pglDepthFunc, glDepthFunc)
|
GETOPENGLFUNC(pglDepthFunc, glDepthFunc)
|
||||||
@@ -2364,6 +2367,10 @@ void GL_SetSpecialState(hwdspecialstate_t IdState, INT32 Value)
|
|||||||
GL_Flush(); //??? if we want to change filter mode by texture, remove this
|
GL_Flush(); //??? if we want to change filter mode by texture, remove this
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case HWD_SET_WIREFRAME:
|
||||||
|
pglPolygonMode(GL_FRONT_AND_BACK, Value ? GL_LINE : GL_FILL);
|
||||||
|
break;
|
||||||
|
|
||||||
case HWD_SET_TEXTURE_FORMAT:
|
case HWD_SET_TEXTURE_FORMAT:
|
||||||
gltexformat = (Value == 32) ? GL_RGBA : GL_RGB5_A1;
|
gltexformat = (Value == 32) ? GL_RGBA : GL_RGB5_A1;
|
||||||
GL_Flush();
|
GL_Flush();
|
||||||
|
|||||||
+4
-4
@@ -220,9 +220,9 @@ HMS_connect (const char *format, ...)
|
|||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||||
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, (long)CURL_IPRESOLVE_V4);
|
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)cv_masterserver_timeout.value);
|
curl_easy_setopt(curl, CURLOPT_TIMEOUT, cv_masterserver_timeout.value);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, buffer);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, buffer);
|
||||||
|
|
||||||
@@ -339,8 +339,8 @@ HMS_unlist (void)
|
|||||||
if (! hms)
|
if (! hms)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
curl_easy_setopt(hms->curl, CURLOPT_POST, (long)1);
|
curl_easy_setopt(hms->curl, CURLOPT_POST, 1);
|
||||||
curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDSIZE, (long)0);
|
curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDSIZE, 0);
|
||||||
|
|
||||||
okay = HMS_do(hms);
|
okay = HMS_do(hms);
|
||||||
HMS_end(hms);
|
HMS_end(hms);
|
||||||
|
|||||||
+8
-8
@@ -259,8 +259,6 @@ INT32 HU_FallBackFrSpecialLetter(INT32 key)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static char cechotext[1024];
|
static char cechotext[1024];
|
||||||
static tic_t cechotimer = 0;
|
static tic_t cechotimer = 0;
|
||||||
static tic_t cechoduration = 5*TICRATE;
|
static tic_t cechoduration = 5*TICRATE;
|
||||||
@@ -311,7 +309,7 @@ void HU_LoadGraphics(void)
|
|||||||
lt_font[0] = (patch_t *)W_CachePatchName("LTFNT039", PU_HUDGFX); /// \note fake start hack
|
lt_font[0] = (patch_t *)W_CachePatchName("LTFNT039", PU_HUDGFX); /// \note fake start hack
|
||||||
|
|
||||||
// Number support
|
// Number support
|
||||||
lt_font[9] = (patch_t *)W_CachePatchName("LTFNT048", PU_HUDGFX);
|
lt_font[9] = (patch_t *)W_CachePatchName("LTFNT048", PU_HUDGFX);
|
||||||
lt_font[10] = (patch_t *)W_CachePatchName("LTFNT049", PU_HUDGFX);
|
lt_font[10] = (patch_t *)W_CachePatchName("LTFNT049", PU_HUDGFX);
|
||||||
lt_font[11] = (patch_t *)W_CachePatchName("LTFNT050", PU_HUDGFX);
|
lt_font[11] = (patch_t *)W_CachePatchName("LTFNT050", PU_HUDGFX);
|
||||||
lt_font[12] = (patch_t *)W_CachePatchName("LTFNT051", PU_HUDGFX);
|
lt_font[12] = (patch_t *)W_CachePatchName("LTFNT051", PU_HUDGFX);
|
||||||
@@ -748,7 +746,7 @@ static void Command_CSay_f(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!server && !IsPlayerAdmin(consoleplayer))
|
if(!server && !IsPlayerAdmin(consoleplayer))
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_NOTICE, M_GetText("Only servers and admins can use csay.\n"));
|
CONS_Alert(CONS_NOTICE, M_GetText("Only servers and admins can use csay.\n"));
|
||||||
return;
|
return;
|
||||||
@@ -2789,11 +2787,13 @@ void HU_DoCEcho(const char *msg)
|
|||||||
*p = '\n';
|
*p = '\n';
|
||||||
|
|
||||||
CONS_Printf("%s\n", temp);
|
CONS_Printf("%s\n", temp);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cv_cechotoggle.value)
|
|
||||||
cechotimer = cechoduration;
|
|
||||||
|
|
||||||
I_OutputMsg("%s\n", msg); // ALWAYS print to log
|
I_OutputMsg("%s\n", msg); // print to log
|
||||||
|
|
||||||
|
if (!cv_cechotoggle.value)
|
||||||
|
return;
|
||||||
|
|
||||||
|
cechotimer = cechoduration;
|
||||||
}
|
}
|
||||||
@@ -141,8 +141,6 @@ boolean I_UseNativeKeyboard(void);
|
|||||||
|
|
||||||
boolean I_CheckNativeRes(void);
|
boolean I_CheckNativeRes(void);
|
||||||
|
|
||||||
void I_SetBorderlessWindow(void);
|
|
||||||
|
|
||||||
#ifdef USE_FBO_OGL
|
#ifdef USE_FBO_OGL
|
||||||
|
|
||||||
void RefreshOGLSDLSurface(void);
|
void RefreshOGLSDLSurface(void);
|
||||||
|
|||||||
+2
-3
@@ -10525,12 +10525,11 @@ static void K_drawKartWanted(void)
|
|||||||
{
|
{
|
||||||
INT32 x = basex+(splitscreen > 1 ? 13 : 8), y = basey+(splitscreen > 1 ? 16 : 21);
|
INT32 x = basex+(splitscreen > 1 ? 13 : 8), y = basey+(splitscreen > 1 ? 16 : 21);
|
||||||
fixed_t scale = FRACUNIT/2;
|
fixed_t scale = FRACUNIT/2;
|
||||||
|
player_t *p = &players[battlewanted[i]];
|
||||||
|
|
||||||
if (battlewanted[i] == -1)
|
if (battlewanted[i] == -1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
player_t *p = &players[battlewanted[i]];
|
|
||||||
|
|
||||||
if (numwanted == 1)
|
if (numwanted == 1)
|
||||||
scale = FRACUNIT;
|
scale = FRACUNIT;
|
||||||
else
|
else
|
||||||
@@ -10541,7 +10540,7 @@ static void K_drawKartWanted(void)
|
|||||||
y += 16;
|
y += 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->skincolor)
|
if (players[battlewanted[i]].skincolor)
|
||||||
{
|
{
|
||||||
colormap = R_GetTranslationColormap(TC_RAINBOW, p->skincolor, GTC_CACHE);
|
colormap = R_GetTranslationColormap(TC_RAINBOW, p->skincolor, GTC_CACHE);
|
||||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, V_HUDTRANS|(splitscreen < 3 ? V_SNAPTORIGHT : 0)|V_SNAPTOBOTTOM, (scale == FRACUNIT ? R_GetSkinFaceWant(p) : R_GetSkinFaceRank(p)), colormap);
|
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, V_HUDTRANS|(splitscreen < 3 ? V_SNAPTORIGHT : 0)|V_SNAPTOBOTTOM, (scale == FRACUNIT ? R_GetSkinFaceWant(p) : R_GetSkinFaceRank(p)), colormap);
|
||||||
|
|||||||
+4
-16
@@ -1260,15 +1260,10 @@ extern int lib_hudadd(lua_State *L);
|
|||||||
|
|
||||||
static int lib_hudsetvotebackground(lua_State *L)
|
static int lib_hudsetvotebackground(lua_State *L)
|
||||||
{
|
{
|
||||||
|
memset(VoteScreen.luaPrefix, 0, sizeof(VoteScreen.luaPrefix));
|
||||||
|
|
||||||
if (lua_isnoneornil(L, 1))
|
if (lua_isnoneornil(L, 1))
|
||||||
{
|
{
|
||||||
if (luaVoteScreen)
|
|
||||||
{
|
|
||||||
free(luaVoteScreen);
|
|
||||||
}
|
|
||||||
|
|
||||||
luaVoteScreen = NULL;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1279,15 +1274,8 @@ static int lib_hudsetvotebackground(lua_State *L)
|
|||||||
return luaL_argerror(L, 1, "prefix should 4 characters wide");
|
return luaL_argerror(L, 1, "prefix should 4 characters wide");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!luaVoteScreen)
|
strncpy(VoteScreen.luaPrefix, prefix, 4);
|
||||||
{
|
strupr(VoteScreen.luaPrefix);
|
||||||
luaVoteScreen = (char*)malloc(5);
|
|
||||||
luaVoteScreen[4] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
strncpy(luaVoteScreen, prefix, 4);
|
|
||||||
|
|
||||||
strupr(luaVoteScreen);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-43
@@ -1521,7 +1521,6 @@ enum
|
|||||||
//op_exp_dirlight,
|
//op_exp_dirlight,
|
||||||
op_exp_skybox,
|
op_exp_skybox,
|
||||||
op_exp_accuratefps,
|
op_exp_accuratefps,
|
||||||
op_exp_votescrn,
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
op_exp_glscrtx,
|
op_exp_glscrtx,
|
||||||
#ifdef USE_FBO_OGL
|
#ifdef USE_FBO_OGL
|
||||||
@@ -2465,38 +2464,32 @@ static menuitem_t OP_HudOffsetMenu[] =
|
|||||||
{IT_STRING | IT_CVAR, NULL, "Vertical Offset", &cv_stat_yoffset, 185},
|
{IT_STRING | IT_CVAR, NULL, "Vertical Offset", &cv_stat_yoffset, 185},
|
||||||
};
|
};
|
||||||
|
|
||||||
// FIXME: WE EFFECTIVELY HAVE NO MORE SPACE FOR GREEN RES
|
|
||||||
// i had to put multiple names into single lines at this point
|
|
||||||
// we ought to really do something better for this at this point
|
|
||||||
// absolutely crazy how many people put work into this at this point <3
|
|
||||||
static menuitem_t OP_SaturnCreditsMenu[] =
|
static menuitem_t OP_SaturnCreditsMenu[] =
|
||||||
{
|
{
|
||||||
{IT_HEADER, NULL, "Thanks to all contributers <3", NULL, 0},
|
{IT_HEADER, NULL, "Saturn Credits", NULL, 0},
|
||||||
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Alug", NULL, 10},
|
{IT_HEADER, NULL, "Thanks to all contributers <3", NULL, 7},
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Indev", NULL, 20},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Haya", NULL, 30},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Nepdisk", NULL, 40},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "GenericHeroGuy", NULL, 50},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "xyzzy", NULL, 60},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Chearii", NULL, 70},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "riomccloud", NULL, 80},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "chromaticpipe", NULL, 90},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "PAS", NULL, 100},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "$HOME", NULL, 110},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Achii", NULL, 120},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Anonimus", NULL, 130},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "scizor300", NULL, 140},
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Lugent", NULL, 150},
|
|
||||||
|
|
||||||
{IT_HEADER, NULL, "", NULL, 124},
|
{IT_STRING2+IT_SPACE, NULL, "Alug", NULL, 17},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "Indev", NULL, 27},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "Haya", NULL, 37},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "Nepdisk", NULL, 47},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "GenericHeroGuy", NULL, 57},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "xyzzy", NULL, 67},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "Chearii", NULL, 77},
|
||||||
|
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Sunflower Yuz", NULL, 180},
|
{IT_STRING2+IT_SPACE, NULL, "Sunflower aka AnimeSonic", NULL, 87},
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Democrab EXpand", NULL, 190},
|
{IT_STRING2+IT_SPACE, NULL, "Yuz aka Yuzler", NULL, 97},
|
||||||
{IT_STRING2+IT_SPACE, NULL, "Nexit Spee", NULL, 200},
|
{IT_STRING2+IT_SPACE, NULL, "Democrab", NULL, 107},
|
||||||
{IT_STRING2+IT_SPACE, NULL, "jin", NULL, 210},
|
{IT_STRING2+IT_SPACE, NULL, "EXpand", NULL, 117},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "Nexit", NULL, 127},
|
||||||
{IT_HEADER, NULL, "Special Thanks <3", NULL, 168},
|
{IT_STRING2+IT_SPACE, NULL, "Spee", NULL, 137},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "jin", NULL, 147},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "riomccloud", NULL, 157},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "chromaticpipe", NULL, 167},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "Achii", NULL, 177},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "Anonimus", NULL, 187},
|
||||||
|
{IT_STRING2+IT_SPACE, NULL, "scizor300", NULL, 197},
|
||||||
|
|
||||||
{IT_HEADER, NULL, "Special Thanks <3", NULL, 167},
|
{IT_HEADER, NULL, "Special Thanks <3", NULL, 167},
|
||||||
|
|
||||||
@@ -2508,7 +2501,7 @@ static menuitem_t OP_SaturnCreditsMenu[] =
|
|||||||
{IT_STRING, NULL, "", NULL, 267}, // dummy text II
|
{IT_STRING, NULL, "", NULL, 267}, // dummy text II
|
||||||
};
|
};
|
||||||
|
|
||||||
// sry we dont have space for this anymore :c
|
// sry we dont have space for this anymore :/
|
||||||
/*static const char* OP_CreditTooltips[] =
|
/*static const char* OP_CreditTooltips[] =
|
||||||
{
|
{
|
||||||
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
|
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
|
||||||
@@ -3607,8 +3600,8 @@ static void M_ChangeCvar(INT32 choice)
|
|||||||
char s[20];
|
char s[20];
|
||||||
float increment;
|
float increment;
|
||||||
|
|
||||||
increment = FIXED_TO_FLOAT(cv->value)+(choice)*((currentMenu->menuitems[itemOn].status & IT_CV_BIGFLOAT) ? 0.5f : (1.0f/16.0f));
|
increment = (currentMenu->menuitems[itemOn].status & IT_CV_BIGFLOAT) ? 0.5f : (1.0f/16.0f);
|
||||||
sprintf(s,"%ld%s",(long)increment,M_Ftrim(increment));
|
sprintf(s, "%f",FIXED_TO_FLOAT(cv->value)+(choice)*increment);
|
||||||
CV_Set(cv, s);
|
CV_Set(cv, s);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -5723,16 +5716,8 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
|
|||||||
{
|
{
|
||||||
case LLM_CREATESERVER:
|
case LLM_CREATESERVER:
|
||||||
// Should the map be hidden? <-- well imma wanna toggle it, its just annoying being unable to select hell maps in mapselect
|
// Should the map be hidden? <-- well imma wanna toggle it, its just annoying being unable to select hell maps in mapselect
|
||||||
|
if ((mapheaderinfo[mapnum]->menuflags & LF2_HIDEINMENU && mapnum+1 != gamemap) && (gt == GT_RACE && (mapheaderinfo[mapnum]->typeoflevel & TOL_RACE))) // map hell
|
||||||
if (mapheaderinfo[mapnum]->menuflags & LF2_HIDEINMENU && mapnum+1 != gamemap)
|
return cv_showallmaps.value;
|
||||||
{
|
|
||||||
if (cv_showallmaps.value &&
|
|
||||||
((gt == GT_RACE && (mapheaderinfo[mapnum]->typeoflevel & TOL_RACE)) || // race map hell
|
|
||||||
((gt == GT_MATCH || gt == GT_TEAMMATCH) && (mapheaderinfo[mapnum]->typeoflevel & TOL_MATCH)))) // battle map hell
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// same goes here, just show every map if i want to
|
// same goes here, just show every map if i want to
|
||||||
if (M_MapLocked(mapnum+1)) // not unlocked
|
if (M_MapLocked(mapnum+1)) // not unlocked
|
||||||
@@ -6074,8 +6059,8 @@ static void M_AddonsOptions(INT32 choice)
|
|||||||
M_SetupNextMenu(&OP_AddonsOptionsDef);
|
M_SetupNextMenu(&OP_AddonsOptionsDef);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LOCATIONSTRING1 "Visit \x83mb.srb2.org/addons\x80 to get & make addons!"
|
#define LOCATIONSTRING1 "Visit \x83SRB2.ORG/MODS\x80 to get & make addons!"
|
||||||
#define LOCATIONSTRING2 "Visit \x88mb.srb2.org/addons\x80 to get & make addons!"
|
#define LOCATIONSTRING2 "Visit \x88SRB2.ORG/MODS\x80 to get & make addons!"
|
||||||
|
|
||||||
static void M_AddonsInternal(void)
|
static void M_AddonsInternal(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1965,25 +1965,6 @@ char *M_GetToken(const char *inputString)
|
|||||||
return texturesToken;
|
return texturesToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char * M_Ftrim (double f)
|
|
||||||
{
|
|
||||||
static char dig[9];/* "0." + 6 digits (6 is printf's default) */
|
|
||||||
int i;
|
|
||||||
/* I know I said it's the default, but just in case... */
|
|
||||||
sprintf(dig, "%.6f", fabs(modf(f, &f)));
|
|
||||||
/* trim trailing zeroes */
|
|
||||||
for (i = strlen(dig)-1; dig[i] == '0'; --i)
|
|
||||||
;
|
|
||||||
if (dig[i] == '.')/* :NOTHING: */
|
|
||||||
return "";
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dig[i + 1] = '\0';
|
|
||||||
return &dig[1];/* skip the 0 */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Count bits in a number.
|
/** Count bits in a number.
|
||||||
*/
|
*/
|
||||||
UINT8 M_CountBits(UINT32 num, UINT8 size)
|
UINT8 M_CountBits(UINT32 num, UINT8 size)
|
||||||
|
|||||||
@@ -104,12 +104,6 @@ boolean M_IsPathAbsolute (const char *path);
|
|||||||
void M_MkdirEach (const char *path, int start, int mode);
|
void M_MkdirEach (const char *path, int start, int mode);
|
||||||
void M_MkdirEachUntil (const char *path, int start, int end, int mode);
|
void M_MkdirEachUntil (const char *path, int start, int end, int mode);
|
||||||
|
|
||||||
/*
|
|
||||||
Return dot and then the fractional part of a float, without
|
|
||||||
trailing zeros, or "" if the fractional part is zero.
|
|
||||||
*/
|
|
||||||
const char * M_Ftrim (double);
|
|
||||||
|
|
||||||
// counting bits, for weapon ammo code, usually
|
// counting bits, for weapon ammo code, usually
|
||||||
FUNCMATH UINT8 M_CountBits(UINT32 num, UINT8 size);
|
FUNCMATH UINT8 M_CountBits(UINT32 num, UINT8 size);
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,6 @@
|
|||||||
|
|
||||||
#if defined (STDC_HEADERS) || defined (_LIBC)
|
#if defined (STDC_HEADERS) || defined (_LIBC)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#else
|
|
||||||
#ifndef HAVE_MEMCPY
|
|
||||||
#if !(defined (_WIN32) && !defined (__CYGWIN__)) && !defined (__APPLE__)
|
|
||||||
#define memcpy(d, s, n) bcopy ((s), (d), (n))
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
|
|||||||
+1
-3
@@ -1542,17 +1542,15 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
|||||||
{
|
{
|
||||||
if (target->target->hnext)
|
if (target->target->hnext)
|
||||||
K_KillBananaChain(target->target->hnext, inflictor, source);
|
K_KillBananaChain(target->target->hnext, inflictor, source);
|
||||||
|
|
||||||
target->target->player->kartstuff[k_itemamount] = 0;
|
target->target->player->kartstuff[k_itemamount] = 0;
|
||||||
}
|
}
|
||||||
else
|
else if (target->target->player->kartstuff[k_itemamount])
|
||||||
target->target->player->kartstuff[k_itemamount]--;
|
target->target->player->kartstuff[k_itemamount]--;
|
||||||
}
|
}
|
||||||
else if ((target->type == MT_ORBINAUT_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_ORBINAUT) // orbit items
|
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->type == MT_JAWZ_SHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_JAWZ))
|
||||||
{
|
{
|
||||||
target->target->player->kartstuff[k_itemamount]--;
|
target->target->player->kartstuff[k_itemamount]--;
|
||||||
|
|
||||||
if (target->lastlook != 0)
|
if (target->lastlook != 0)
|
||||||
{
|
{
|
||||||
K_RepairOrbitChain(target);
|
K_RepairOrbitChain(target);
|
||||||
|
|||||||
@@ -158,8 +158,6 @@ extern consvar_t cv_tiltsmoothing;
|
|||||||
|
|
||||||
extern consvar_t cv_actionmovie;
|
extern consvar_t cv_actionmovie;
|
||||||
|
|
||||||
extern consvar_t cv_screenquake;
|
|
||||||
|
|
||||||
extern consvar_t cv_lookbackmom[MAXSPLITSCREENPLAYERS];
|
extern consvar_t cv_lookbackmom[MAXSPLITSCREENPLAYERS];
|
||||||
|
|
||||||
extern consvar_t cv_verticallook[MAXSPLITSCREENPLAYERS];
|
extern consvar_t cv_verticallook[MAXSPLITSCREENPLAYERS];
|
||||||
|
|||||||
+143
-109
@@ -67,6 +67,8 @@
|
|||||||
#include "lua_script.h"
|
#include "lua_script.h"
|
||||||
#include "lua_hook.h"
|
#include "lua_hook.h"
|
||||||
|
|
||||||
|
#include "y_inter.h"
|
||||||
|
|
||||||
#if !defined (UNDER_CE)
|
#if !defined (UNDER_CE)
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -2747,6 +2749,8 @@ static void P_SetupPlayer(void)
|
|||||||
I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755);
|
I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755);
|
||||||
I_mkdir(va("%s"PATHSEP"replay"PATHSEP"online", srb2home), 0755);
|
I_mkdir(va("%s"PATHSEP"replay"PATHSEP"online", srb2home), 0755);
|
||||||
G_RecordDemo(buf);
|
G_RecordDemo(buf);
|
||||||
|
if (dedicated)
|
||||||
|
G_BeginRecording(); //this has to move here, since dedicated servers dont run got_mapcmd
|
||||||
}
|
}
|
||||||
|
|
||||||
wantedcalcdelay = wantedfrequency*2;
|
wantedcalcdelay = wantedfrequency*2;
|
||||||
@@ -3104,11 +3108,128 @@ boolean P_AddWadFile(const char *wadfilename, boolean local)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for replacement votescreen backgrounds
|
static size_t sreplaces = 0, mreplaces = 0, digmreplaces = 0;
|
||||||
boolean wideracereplaced = false;
|
|
||||||
boolean racereplaced = false;
|
//
|
||||||
boolean widebattlereplaced = false;
|
// search for sound replacements
|
||||||
boolean battlereplaced = false;
|
//
|
||||||
|
static boolean P_CheckSoundReplacements(UINT16 wadnum, char *name, size_t i)
|
||||||
|
{
|
||||||
|
size_t j;
|
||||||
|
lumpnum_t lumpnum = (i|(wadnum<<16));
|
||||||
|
|
||||||
|
if (name[0] == 'D')
|
||||||
|
{
|
||||||
|
if (name[1] == 'S')
|
||||||
|
{
|
||||||
|
for (j = 1; j < NUMSFX; j++)
|
||||||
|
{
|
||||||
|
if (S_sfx[j].name && !strnicmp(S_sfx[j].name, name + 2, 6)
|
||||||
|
&& (S_sfx[j].lumpnum != lumpnum) && (S_sfx[j].lumpnum != LUMPERROR))
|
||||||
|
{
|
||||||
|
// the sound will be reloaded when needed,
|
||||||
|
// since sfx->data will be NULL
|
||||||
|
CONS_Debug(DBG_SETUP, "Sound %.8s replaced\n", name);
|
||||||
|
|
||||||
|
I_FreeSfx(&S_sfx[j]);
|
||||||
|
|
||||||
|
// Re-cache it
|
||||||
|
if (S_PrecacheSound())
|
||||||
|
S_sfx[j].data = I_GetSfx(&S_sfx[j]);
|
||||||
|
|
||||||
|
sreplaces++;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (name[1] == '_')
|
||||||
|
{
|
||||||
|
CONS_Debug(DBG_SETUP, "Music %.8s ignored\n", name);
|
||||||
|
mreplaces++;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (name[0] == 'O' && name[1] == '_')
|
||||||
|
{
|
||||||
|
CONS_Debug(DBG_SETUP, "Music %.8s replaced\n", name);
|
||||||
|
digmreplaces++;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// search for maps
|
||||||
|
//
|
||||||
|
static boolean P_CheckMapReplacements(char *name)
|
||||||
|
{
|
||||||
|
if (memcmp(name, "MAP", 3) == 0) // Ignore the headers
|
||||||
|
{
|
||||||
|
INT16 num;
|
||||||
|
|
||||||
|
if (name[5] != '\0')
|
||||||
|
return false;
|
||||||
|
|
||||||
|
num = (INT16)M_MapNumber(name[3], name[4]);
|
||||||
|
|
||||||
|
// we want to record whether this map exists. if it doesn't have a header, we can assume it's not relephant
|
||||||
|
if (num <= NUMMAPS && mapheaderinfo[num-1])
|
||||||
|
{
|
||||||
|
if (mapheaderinfo[num-1]->menuflags & LF2_EXISTSHACK)
|
||||||
|
G_SetGameModified(multiplayer, true); // oops, double-defined - no record attack privileges for you
|
||||||
|
mapheaderinfo[num-1]->menuflags |= LF2_EXISTSHACK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (num == gamemap)
|
||||||
|
partadd_replacescurrentmap = true;
|
||||||
|
|
||||||
|
CONS_Printf("%s\n", name);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// check for non Lua votescreen replacements
|
||||||
|
//
|
||||||
|
static boolean P_CheckVoteReplacements(char *name)
|
||||||
|
{
|
||||||
|
// widescreen patch Race
|
||||||
|
if (!VoteScreen.replaced.widerace && !memcmp(name, "INTERSCW", 8))
|
||||||
|
{
|
||||||
|
VoteScreen.replaced.widerace = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!VoteScreen.replaced.race && !memcmp(name, "INTERSCR", 8))
|
||||||
|
{
|
||||||
|
VoteScreen.replaced.race = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// widescreen patch Battle
|
||||||
|
if (!VoteScreen.replaced.widebattle && !memcmp(name, "BATTLSCW", 8))
|
||||||
|
{
|
||||||
|
VoteScreen.replaced.widebattle = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!VoteScreen.replaced.battle && !memcmp(name, "BATTLSCR", 8))
|
||||||
|
{
|
||||||
|
VoteScreen.replaced.battle = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (VoteScreen.replaced.widerace && VoteScreen.replaced.race
|
||||||
|
&& VoteScreen.replaced.widebattle && VoteScreen.replaced.battle)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Add a WAD file and do the per-WAD setup stages.
|
// Add a WAD file and do the per-WAD setup stages.
|
||||||
@@ -3116,12 +3237,15 @@ boolean battlereplaced = false;
|
|||||||
//
|
//
|
||||||
UINT16 P_PartialAddWadFile(const char *wadfilename, boolean local)
|
UINT16 P_PartialAddWadFile(const char *wadfilename, boolean local)
|
||||||
{
|
{
|
||||||
size_t i, j, sreplaces = 0, mreplaces = 0, digmreplaces = 0;
|
size_t i;
|
||||||
UINT16 numlumps, wadnum;
|
UINT16 numlumps, wadnum;
|
||||||
char *name;
|
char *name;
|
||||||
boolean mapsadded = false;
|
boolean mapsadded = false;
|
||||||
|
static boolean allvotereplaced = false;
|
||||||
lumpinfo_t *lumpinfo;
|
lumpinfo_t *lumpinfo;
|
||||||
|
|
||||||
|
sreplaces = mreplaces = digmreplaces = 0;
|
||||||
|
|
||||||
if ((numlumps = W_InitFile(wadfilename, local)) == INT16_MAX)
|
if ((numlumps = W_InitFile(wadfilename, local)) == INT16_MAX)
|
||||||
{
|
{
|
||||||
refreshdirmenu |= REFRESHDIR_NOTLOADED;
|
refreshdirmenu |= REFRESHDIR_NOTLOADED;
|
||||||
@@ -3136,46 +3260,24 @@ UINT16 P_PartialAddWadFile(const char *wadfilename, boolean local)
|
|||||||
|
|
||||||
wadfiles[wadnum]->localfile = local;
|
wadfiles[wadnum]->localfile = local;
|
||||||
|
|
||||||
//
|
|
||||||
// search for sound replacements
|
|
||||||
//
|
|
||||||
lumpinfo = wadfiles[wadnum]->lumpinfo;
|
lumpinfo = wadfiles[wadnum]->lumpinfo;
|
||||||
for (i = 0; i < numlumps; i++, lumpinfo++)
|
for (i = 0; i < numlumps; i++, lumpinfo++)
|
||||||
{
|
{
|
||||||
name = lumpinfo->name;
|
name = lumpinfo->name;
|
||||||
lumpnum_t lumpnum = i|(wadnum<<16);
|
|
||||||
|
|
||||||
if (name[0] == 'D')
|
if (P_CheckSoundReplacements(wadnum, name, i))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (P_CheckMapReplacements(name))
|
||||||
{
|
{
|
||||||
if (name[1] == 'S') for (j = 1; j < NUMSFX; j++)
|
mapsadded = true;
|
||||||
{
|
continue;
|
||||||
if (S_sfx[j].name && !strnicmp(S_sfx[j].name, name + 2, 6) && S_sfx[j].lumpnum != lumpnum && S_sfx[j].lumpnum != LUMPERROR)
|
|
||||||
{
|
|
||||||
// the sound will be reloaded when needed,
|
|
||||||
// since sfx->data will be NULL
|
|
||||||
CONS_Debug(DBG_SETUP, "Sound %.8s replaced\n", name);
|
|
||||||
|
|
||||||
I_FreeSfx(&S_sfx[j]);
|
|
||||||
|
|
||||||
// Re-cache it
|
|
||||||
if (S_PrecacheSound())
|
|
||||||
S_sfx[j].data = I_GetSfx(&S_sfx[j]);
|
|
||||||
|
|
||||||
sreplaces++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (name[1] == '_')
|
|
||||||
{
|
|
||||||
CONS_Debug(DBG_SETUP, "Music %.8s ignored\n", name);
|
|
||||||
mreplaces++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (name[0] == 'O' && name[1] == '_')
|
|
||||||
{
|
|
||||||
CONS_Debug(DBG_SETUP, "Music %.8s replaced\n", name);
|
|
||||||
digmreplaces++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!allvotereplaced && P_CheckVoteReplacements(name))
|
||||||
|
allvotereplaced = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!devparm && sreplaces)
|
if (!devparm && sreplaces)
|
||||||
CONS_Printf(M_GetText("%s sounds replaced\n"), sizeu1(sreplaces));
|
CONS_Printf(M_GetText("%s sounds replaced\n"), sizeu1(sreplaces));
|
||||||
if (!devparm && mreplaces)
|
if (!devparm && mreplaces)
|
||||||
@@ -3183,6 +3285,9 @@ UINT16 P_PartialAddWadFile(const char *wadfilename, boolean local)
|
|||||||
if (!devparm && digmreplaces)
|
if (!devparm && digmreplaces)
|
||||||
CONS_Printf(M_GetText("%s digital musics replaced\n"), sizeu1(digmreplaces));
|
CONS_Printf(M_GetText("%s digital musics replaced\n"), sizeu1(digmreplaces));
|
||||||
|
|
||||||
|
if (!mapsadded)
|
||||||
|
CONS_Printf(M_GetText("No maps added\n"));
|
||||||
|
|
||||||
//
|
//
|
||||||
// search for sprite replacements
|
// search for sprite replacements
|
||||||
//
|
//
|
||||||
@@ -3207,80 +3312,9 @@ UINT16 P_PartialAddWadFile(const char *wadfilename, boolean local)
|
|||||||
//
|
//
|
||||||
S_LoadMusicDefs(wadnum);
|
S_LoadMusicDefs(wadnum);
|
||||||
|
|
||||||
//
|
|
||||||
// search for maps
|
|
||||||
//
|
|
||||||
lumpinfo = wadfiles[wadnum]->lumpinfo;
|
|
||||||
for (i = 0; i < numlumps; i++, lumpinfo++)
|
|
||||||
{
|
|
||||||
name = lumpinfo->name;
|
|
||||||
|
|
||||||
if (name[0] == 'M' && name[1] == 'A' && name[2] == 'P') // Ignore the headers
|
|
||||||
{
|
|
||||||
INT16 num;
|
|
||||||
if (name[5]!='\0')
|
|
||||||
continue;
|
|
||||||
num = (INT16)M_MapNumber(name[3], name[4]);
|
|
||||||
|
|
||||||
// we want to record whether this map exists. if it doesn't have a header, we can assume it's not relephant
|
|
||||||
if (num <= NUMMAPS && mapheaderinfo[num-1])
|
|
||||||
{
|
|
||||||
if (mapheaderinfo[num-1]->menuflags & LF2_EXISTSHACK)
|
|
||||||
G_SetGameModified(multiplayer, true); // oops, double-defined - no record attack privileges for you
|
|
||||||
mapheaderinfo[num-1]->menuflags |= LF2_EXISTSHACK;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (num == gamemap)
|
|
||||||
partadd_replacescurrentmap = true;
|
|
||||||
|
|
||||||
CONS_Printf("%s\n", name);
|
|
||||||
mapsadded = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!mapsadded)
|
|
||||||
CONS_Printf(M_GetText("No maps added\n"));
|
|
||||||
|
|
||||||
// TODO: Experimental SPRTINFO support, test first
|
// TODO: Experimental SPRTINFO support, test first
|
||||||
R_LoadSpriteInfoLumps(wadnum, wadfiles[wadnum]->numlumps);
|
R_LoadSpriteInfoLumps(wadnum, wadfiles[wadnum]->numlumps);
|
||||||
|
|
||||||
//
|
|
||||||
// check for votescreen replacements
|
|
||||||
//
|
|
||||||
if (!wideracereplaced && !racereplaced && !widebattlereplaced && !battlereplaced)
|
|
||||||
{
|
|
||||||
lumpinfo = wadfiles[wadnum]->lumpinfo;
|
|
||||||
for (i = 0; i < numlumps; i++, lumpinfo++)
|
|
||||||
{
|
|
||||||
name = lumpinfo->name;
|
|
||||||
|
|
||||||
// widescreen patch Race
|
|
||||||
if (!wideracereplaced && !strncmp(name, "INTERSCW", 8))
|
|
||||||
{
|
|
||||||
wideracereplaced = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!racereplaced && !strncmp(name, "INTERSCR", 8))
|
|
||||||
{
|
|
||||||
racereplaced = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// widescreen patch Battle
|
|
||||||
if (!widebattlereplaced && !strncmp(name, "BATTLSCW", 8))
|
|
||||||
{
|
|
||||||
widebattlereplaced = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!battlereplaced && !strncmp(name, "BATTLSCR", 8))
|
|
||||||
{
|
|
||||||
battlereplaced = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
refreshdirmenu &= ~REFRESHDIR_GAMEDATA; // Under usual circumstances we'd wait for REFRESHDIR_GAMEDATA to disappear the next frame, but it's a bit too dangerous for that...
|
refreshdirmenu &= ~REFRESHDIR_GAMEDATA; // Under usual circumstances we'd wait for REFRESHDIR_GAMEDATA to disappear the next frame, but it's a bit too dangerous for that...
|
||||||
partadd_stage = 0;
|
partadd_stage = 0;
|
||||||
return wadnum;
|
return wadnum;
|
||||||
|
|||||||
@@ -68,11 +68,6 @@ void HWR_LoadLevel(boolean reloadinggamestate);
|
|||||||
|
|
||||||
boolean P_AddWadFile(const char *wadfilename, boolean local);
|
boolean P_AddWadFile(const char *wadfilename, boolean local);
|
||||||
|
|
||||||
extern boolean wideracereplaced;
|
|
||||||
extern boolean racereplaced;
|
|
||||||
extern boolean widebattlereplaced;
|
|
||||||
extern boolean battlereplaced;
|
|
||||||
|
|
||||||
// WARNING: The following functions should be grouped as follows:
|
// WARNING: The following functions should be grouped as follows:
|
||||||
// any amount of PartialAdds followed by MultiSetups until returned true,
|
// any amount of PartialAdds followed by MultiSetups until returned true,
|
||||||
// as soon as possible.
|
// as soon as possible.
|
||||||
|
|||||||
+3
-4
@@ -573,7 +573,7 @@ static void P_RunQuakes(void)
|
|||||||
{
|
{
|
||||||
fixed_t ir;
|
fixed_t ir;
|
||||||
|
|
||||||
if (!cv_screenquake.value || quake.time <= 0)
|
if (quake.time <= 0)
|
||||||
{
|
{
|
||||||
quake.x = quake.y = quake.z = quake.roll = 0;
|
quake.x = quake.y = quake.z = quake.roll = 0;
|
||||||
return;
|
return;
|
||||||
@@ -618,8 +618,8 @@ static inline void P_ResetSpriteStuff(void)
|
|||||||
if (!mo || (mo->sprite == SPR_NULL) || (mo->flags2 & MF2_DONTDRAW) || (mo->type == MT_SHADOW))
|
if (!mo || (mo->sprite == SPR_NULL) || (mo->flags2 & MF2_DONTDRAW) || (mo->type == MT_SHADOW))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
mo->spritexscale = mo->realxscale;
|
mo->spritexscale = mo->realxscale;
|
||||||
mo->spriteyscale = mo->realyscale;
|
mo->spriteyscale = mo->realyscale;
|
||||||
mo->spritexoffset = mo->realxoffset;
|
mo->spritexoffset = mo->realxoffset;
|
||||||
mo->spriteyoffset = mo->realyoffset;
|
mo->spriteyoffset = mo->realyoffset;
|
||||||
}
|
}
|
||||||
@@ -654,7 +654,6 @@ void P_Ticker(boolean run)
|
|||||||
{
|
{
|
||||||
P_MapStart();
|
P_MapStart();
|
||||||
R_UpdateMobjInterpolators();
|
R_UpdateMobjInterpolators();
|
||||||
R_UpdateLevelInterpolators();
|
|
||||||
OP_ObjectplaceMovement(&players[0]);
|
OP_ObjectplaceMovement(&players[0]);
|
||||||
P_MoveChaseCamera(&players[0], &camera[0], false);
|
P_MoveChaseCamera(&players[0], &camera[0], false);
|
||||||
R_UpdateViewInterpolation();
|
R_UpdateViewInterpolation();
|
||||||
|
|||||||
@@ -3044,8 +3044,6 @@ consvar_t cv_tiltsmoothing = {"tiltsmoothing", "32", CV_SAVE, CV_Natural, NULL,
|
|||||||
|
|
||||||
consvar_t cv_actionmovie = {"actionmovie", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_actionmovie = {"actionmovie", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_screenquake = {"quakescreenshake", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
|
|
||||||
static CV_PossibleValue_t lookbackmom_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Double"}, {0, NULL}};
|
static CV_PossibleValue_t lookbackmom_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Double"}, {0, NULL}};
|
||||||
|
|
||||||
consvar_t cv_lookbackmom[MAXSPLITSCREENPLAYERS] = {
|
consvar_t cv_lookbackmom[MAXSPLITSCREENPLAYERS] = {
|
||||||
|
|||||||
+5
-5
@@ -264,12 +264,12 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec, INT32 *floorlightlevel,
|
|||||||
mobj_t *pviewmobj = viewplayer->mo;
|
mobj_t *pviewmobj = viewplayer->mo;
|
||||||
INT32 heightsec;
|
INT32 heightsec;
|
||||||
boolean underwater;
|
boolean underwater;
|
||||||
camera_t *thiscam = &camera[R_GetViewNumber()];
|
UINT8 i = R_GetViewNumber();
|
||||||
|
|
||||||
if (thiscam->chase)
|
if (viewplayer == &players[displayplayers[i]] && camera[i].chase)
|
||||||
heightsec = thiscam->subsector->sector->heightsec;
|
heightsec = R_PointInSubsector(camera[i].x, camera[i].y)->sector->heightsec;
|
||||||
else if (viewmobj)
|
else if (i > splitscreen && viewmobj)
|
||||||
heightsec = pviewmobj->subsector->sector->heightsec;
|
heightsec = R_PointInSubsector(pviewmobj->x, pviewmobj->y)->sector->heightsec;
|
||||||
else
|
else
|
||||||
return sec;
|
return sec;
|
||||||
|
|
||||||
|
|||||||
+5
-16
@@ -690,15 +690,12 @@ static texpatch_t *R_ParsePatch(boolean actuallyLoadPatch)
|
|||||||
|
|
||||||
// Patch identifier
|
// Patch identifier
|
||||||
texturesToken = M_GetToken(NULL);
|
texturesToken = M_GetToken(NULL);
|
||||||
|
|
||||||
if (texturesToken == NULL)
|
if (texturesToken == NULL)
|
||||||
{
|
{
|
||||||
I_Error("Error parsing TEXTURES lump: Unexpected end of file where patch name should be");
|
I_Error("Error parsing TEXTURES lump: Unexpected end of file where patch name should be");
|
||||||
}
|
}
|
||||||
|
|
||||||
texturesTokenLength = strlen(texturesToken);
|
texturesTokenLength = strlen(texturesToken);
|
||||||
|
if (texturesTokenLength>8)
|
||||||
if (texturesTokenLength > 8)
|
|
||||||
{
|
{
|
||||||
I_Error("Error parsing TEXTURES lump: Patch name \"%s\" exceeds 8 characters",texturesToken);
|
I_Error("Error parsing TEXTURES lump: Patch name \"%s\" exceeds 8 characters",texturesToken);
|
||||||
}
|
}
|
||||||
@@ -716,12 +713,10 @@ static texpatch_t *R_ParsePatch(boolean actuallyLoadPatch)
|
|||||||
// Comma 1
|
// Comma 1
|
||||||
Z_Free(texturesToken);
|
Z_Free(texturesToken);
|
||||||
texturesToken = M_GetToken(NULL);
|
texturesToken = M_GetToken(NULL);
|
||||||
|
|
||||||
if (texturesToken == NULL)
|
if (texturesToken == NULL)
|
||||||
{
|
{
|
||||||
I_Error("Error parsing TEXTURES lump: Unexpected end of file where comma after \"%s\"'s patch name should be",patchName);
|
I_Error("Error parsing TEXTURES lump: Unexpected end of file where comma after \"%s\"'s patch name should be",patchName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(texturesToken,",")!=0)
|
if (strcmp(texturesToken,",")!=0)
|
||||||
{
|
{
|
||||||
I_Error("Error parsing TEXTURES lump: Expected \",\" after %s's patch name, got \"%s\"",patchName,texturesToken);
|
I_Error("Error parsing TEXTURES lump: Expected \",\" after %s's patch name, got \"%s\"",patchName,texturesToken);
|
||||||
@@ -730,17 +725,14 @@ static texpatch_t *R_ParsePatch(boolean actuallyLoadPatch)
|
|||||||
// XPos
|
// XPos
|
||||||
Z_Free(texturesToken);
|
Z_Free(texturesToken);
|
||||||
texturesToken = M_GetToken(NULL);
|
texturesToken = M_GetToken(NULL);
|
||||||
|
|
||||||
if (texturesToken == NULL)
|
if (texturesToken == NULL)
|
||||||
{
|
{
|
||||||
I_Error("Error parsing TEXTURES lump: Unexpected end of file where patch \"%s\"'s x coordinate should be",patchName);
|
I_Error("Error parsing TEXTURES lump: Unexpected end of file where patch \"%s\"'s x coordinate should be",patchName);
|
||||||
}
|
}
|
||||||
|
|
||||||
endPos = NULL;
|
endPos = NULL;
|
||||||
#ifndef AVOID_ERRNO
|
#ifndef AVOID_ERRNO
|
||||||
errno = 0;
|
errno = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
patchXPos = strtol(texturesToken,&endPos,10);
|
patchXPos = strtol(texturesToken,&endPos,10);
|
||||||
(void)patchXPos; //unused for now
|
(void)patchXPos; //unused for now
|
||||||
if (endPos == texturesToken // Empty string
|
if (endPos == texturesToken // Empty string
|
||||||
@@ -756,12 +748,10 @@ static texpatch_t *R_ParsePatch(boolean actuallyLoadPatch)
|
|||||||
// Comma 2
|
// Comma 2
|
||||||
Z_Free(texturesToken);
|
Z_Free(texturesToken);
|
||||||
texturesToken = M_GetToken(NULL);
|
texturesToken = M_GetToken(NULL);
|
||||||
|
|
||||||
if (texturesToken == NULL)
|
if (texturesToken == NULL)
|
||||||
{
|
{
|
||||||
I_Error("Error parsing TEXTURES lump: Unexpected end of file where comma after patch \"%s\"'s x coordinate should be",patchName);
|
I_Error("Error parsing TEXTURES lump: Unexpected end of file where comma after patch \"%s\"'s x coordinate should be",patchName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(texturesToken,",")!=0)
|
if (strcmp(texturesToken,",")!=0)
|
||||||
{
|
{
|
||||||
I_Error("Error parsing TEXTURES lump: Expected \",\" after patch \"%s\"'s x coordinate, got \"%s\"",patchName,texturesToken);
|
I_Error("Error parsing TEXTURES lump: Expected \",\" after patch \"%s\"'s x coordinate, got \"%s\"",patchName,texturesToken);
|
||||||
@@ -770,7 +760,6 @@ static texpatch_t *R_ParsePatch(boolean actuallyLoadPatch)
|
|||||||
// YPos
|
// YPos
|
||||||
Z_Free(texturesToken);
|
Z_Free(texturesToken);
|
||||||
texturesToken = M_GetToken(NULL);
|
texturesToken = M_GetToken(NULL);
|
||||||
|
|
||||||
if (texturesToken == NULL)
|
if (texturesToken == NULL)
|
||||||
{
|
{
|
||||||
I_Error("Error parsing TEXTURES lump: Unexpected end of file where patch \"%s\"'s y coordinate should be",patchName);
|
I_Error("Error parsing TEXTURES lump: Unexpected end of file where patch \"%s\"'s y coordinate should be",patchName);
|
||||||
@@ -1142,9 +1131,9 @@ static void R_InitExtraColormaps(void)
|
|||||||
lumpnum_t R_GetFlatNumForName(const char *name)
|
lumpnum_t R_GetFlatNumForName(const char *name)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
lumpnum_t lump = LUMPERROR;
|
lumpnum_t lump;
|
||||||
lumpnum_t start = LUMPERROR;
|
lumpnum_t start;
|
||||||
lumpnum_t end = LUMPERROR;
|
lumpnum_t end;
|
||||||
|
|
||||||
// Scan wad files backwards so patched flats take preference.
|
// Scan wad files backwards so patched flats take preference.
|
||||||
for (i = numwadfiles - 1; i >= 0; i--)
|
for (i = numwadfiles - 1; i >= 0; i--)
|
||||||
@@ -1619,7 +1608,7 @@ const char *R_ColormapNameForNum(INT32 num)
|
|||||||
if (num == -1)
|
if (num == -1)
|
||||||
return "NONE";
|
return "NONE";
|
||||||
|
|
||||||
if (num < 0 || num >= MAXCOLORMAPS)
|
if (num < 0 || num > MAXCOLORMAPS)
|
||||||
I_Error("R_ColormapNameForNum: num %d is invalid!\n", num);
|
I_Error("R_ColormapNameForNum: num %d is invalid!\n", num);
|
||||||
|
|
||||||
if (foundcolormaps[num] == LUMPERROR)
|
if (foundcolormaps[num] == LUMPERROR)
|
||||||
|
|||||||
+20
-8
@@ -42,13 +42,13 @@ static CV_PossibleValue_t fpscap_cons_t[] = {
|
|||||||
{0, NULL}
|
{0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
consvar_t cv_fpscap = {"fpscap", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_fpscap = {"fpscap", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_fpscapbg = {"fpscapbackground", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_fpscapbg = {"fpscapbackground", "Match refresh rate", CV_SAVE, fpscap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_precipinterp = {"precipinterpolation", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_precipinterp = {"precipinterpolation", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
ps_metric_t ps_interp_frac = {0};
|
ps_metric_t ps_interp_frac = {0};
|
||||||
ps_metric_t ps_interp_lag = {0};
|
ps_metric_t ps_interp_lag = {0};
|
||||||
|
|
||||||
static boolean R_UseBackgroundFramerateCap(void)
|
static boolean R_UseBackgroundFramerateCap(void)
|
||||||
{
|
{
|
||||||
@@ -67,21 +67,21 @@ static boolean R_UseBackgroundFramerateCap(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static UINT32 R_GetFrameCap(INT32 val)
|
static UINT32 R_GetBackgroundFramerateCap(void)
|
||||||
{
|
{
|
||||||
if (val == 0)
|
if (cv_fpscapbg.value == 0)
|
||||||
{
|
{
|
||||||
// 0: Match refresh rate
|
// 0: Match refresh rate
|
||||||
return I_GetRefreshRate();
|
return I_GetRefreshRate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val < 0)
|
if (cv_fpscapbg.value < 0)
|
||||||
{
|
{
|
||||||
// -1: Unlimited
|
// -1: Unlimited
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return val;
|
return cv_fpscapbg.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 R_GetFramerateCap(void)
|
UINT32 R_GetFramerateCap(void)
|
||||||
@@ -95,10 +95,22 @@ UINT32 R_GetFramerateCap(void)
|
|||||||
|
|
||||||
if (R_UseBackgroundFramerateCap())
|
if (R_UseBackgroundFramerateCap())
|
||||||
{
|
{
|
||||||
return R_GetFrameCap(cv_fpscapbg.value);
|
return R_GetBackgroundFramerateCap();
|
||||||
}
|
}
|
||||||
|
|
||||||
return R_GetFrameCap(cv_fpscap.value);
|
if (cv_fpscap.value == 0)
|
||||||
|
{
|
||||||
|
// 0: Match refresh rate
|
||||||
|
return I_GetRefreshRate();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cv_fpscap.value < 0)
|
||||||
|
{
|
||||||
|
// -1: Unlimited
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return cv_fpscap.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean R_UsingFrameInterpolation(void)
|
boolean R_UsingFrameInterpolation(void)
|
||||||
|
|||||||
+27
-30
@@ -125,23 +125,24 @@ static CV_PossibleValue_t drawdist_cons_t[] = {
|
|||||||
{8192, "8192"}, {12288, "12288"}, {20480, "20480"},
|
{8192, "8192"}, {12288, "12288"}, {20480, "20480"},
|
||||||
{24576, "24576"},{0, "Infinite"}, {0, NULL}};
|
{24576, "24576"},{0, "Infinite"}, {0, NULL}};
|
||||||
|
|
||||||
#if defined(__x86_64__) || defined(__amd64__) || defined(__aarch64__) || defined(__arm64__) // only for 64bit (idk how else to proper check lmao)
|
#if __SIZEOF_POINTER__ < 8 // only for 64bit
|
||||||
static CV_PossibleValue_t drawdist_precip_cons_t[] = {
|
static CV_PossibleValue_t drawdist_precip_cons_t[] = {
|
||||||
{256, "256"}, {512, "512"}, {768, "768"},
|
{256, "256"}, {512, "512"}, {768, "768"},
|
||||||
{1024, "1024"}, {1536, "1536"}, {2048, "2048"},
|
{1024, "1024"}, {1536, "1536"}, {2048, "2048"},
|
||||||
{3072, "3072"}, {4096, "4096"}, {0, "None"}, {0, NULL}};
|
{0, "None"}, {0, NULL}};
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static CV_PossibleValue_t drawdist_precip_cons_t[] = {
|
static CV_PossibleValue_t drawdist_precip_cons_t[] = {
|
||||||
{256, "256"}, {512, "512"}, {768, "768"},
|
{256, "256"}, {512, "512"}, {768, "768"},
|
||||||
{1024, "1024"}, {1536, "1536"}, {2048, "2048"},
|
{1024, "1024"}, {1536, "1536"}, {2048, "2048"},
|
||||||
{0, "None"}, {0, NULL}};
|
{3072, "3072"}, {4096, "4096"}, {0, "None"}, {0, NULL}};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static CV_PossibleValue_t maxinterpdist_cons_t[] = {
|
static CV_PossibleValue_t maxinterpdist_cons_t[] = {
|
||||||
/*{256, "256"},*/ {512, "512"}, {768, "768"},
|
/*{256, "256"},*/ {512, "512"}, {768, "768"},
|
||||||
{1024, "1024"}, {1536, "1536"}, {2048, "2048"},
|
{1024, "1024"}, {1536, "1536"}, {2048, "2048"},
|
||||||
{3072, "3072"}, {4096, "4096"}, {6144, "6144"},
|
{3072, "3072"}, {4096, "4096"}, {6144, "6144"},
|
||||||
{8192, "8192"}, {0, "Infinite"}, {0, NULL}};
|
{8192, "8192"}, {0, "Infinite"}, {0, NULL}};
|
||||||
|
|
||||||
static CV_PossibleValue_t fov_cons_t[] = {{MINFOV*FRACUNIT, "MIN"}, {MAXFOV*FRACUNIT, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t fov_cons_t[] = {{MINFOV*FRACUNIT, "MIN"}, {MAXFOV*FRACUNIT, "MAX"}, {0, NULL}};
|
||||||
|
|
||||||
@@ -171,14 +172,14 @@ consvar_t cv_tailspickup = {"tailspickup", "On", CV_NETVAR|CV_NOSHOWHELP, CV_OnO
|
|||||||
consvar_t cv_precachetextures = {"precachetextures", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_precachetextures = {"precachetextures", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_chasecam[MAXSPLITSCREENPLAYERS] = {
|
consvar_t cv_chasecam[MAXSPLITSCREENPLAYERS] = {
|
||||||
{"chasecam", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
{"chasecam", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"chasecam2", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
{"chasecam2", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"chasecam3", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
{"chasecam3", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"chasecam4", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}
|
{"chasecam4", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
consvar_t cv_flipcam[MAXSPLITSCREENPLAYERS] = {
|
consvar_t cv_flipcam[MAXSPLITSCREENPLAYERS] = {
|
||||||
{"flipcam", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, FlipCam_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
{"flipcam", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, FlipCam_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"flipcam2", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, FlipCam2_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
{"flipcam2", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, FlipCam2_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"flipcam3", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, FlipCam3_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
{"flipcam3", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, FlipCam3_OnChange, 0, NULL, NULL, 0, 0, NULL},
|
||||||
{"flipcam4", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, FlipCam4_OnChange, 0, NULL, NULL, 0, 0, NULL}
|
{"flipcam4", "No", CV_SAVE|CV_CALL|CV_NOINIT, CV_YesNo, FlipCam4_OnChange, 0, NULL, NULL, 0, 0, NULL}
|
||||||
@@ -200,7 +201,6 @@ consvar_t cv_drawdist = {"drawdist", "Infinite", CV_SAVE, drawdist_cons_t, NULL,
|
|||||||
consvar_t cv_drawdist_precip = {"drawdist_precip", "1024", CV_SAVE|CV_CALL|CV_NOINIT, drawdist_precip_cons_t, Precipstuff_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_drawdist_precip = {"drawdist_precip", "1024", CV_SAVE|CV_CALL|CV_NOINIT, drawdist_precip_cons_t, Precipstuff_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_lessprecip = {"lessweathereffects", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, Precipstuff_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_lessprecip = {"lessweathereffects", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, Precipstuff_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_mobjscaleprecip = {"scaleprecipmobjscale", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, Precipstuff_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_mobjscaleprecip = {"scaleprecipmobjscale", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, Precipstuff_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_playerfade = {"playerfade", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
|
|
||||||
consvar_t cv_maxinterpdist = {"maxinterpdist", "Infinite", CV_SAVE, maxinterpdist_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_maxinterpdist = {"maxinterpdist", "Infinite", CV_SAVE, maxinterpdist_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
@@ -403,8 +403,7 @@ angle_t R_PlayerSliptideAngle(player_t *player)
|
|||||||
sprframe = &sprdef->spriteframes[rot];
|
sprframe = &sprdef->spriteframes[rot];
|
||||||
|
|
||||||
// No sprite frame? I guess it is possible
|
// No sprite frame? I guess it is possible
|
||||||
if (!sprframe)
|
if (!sprframe) return 0;
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (sprframe->rotate != SRF_SINGLE || (mo->frame & FF_PAPERSPRITE))
|
if (sprframe->rotate != SRF_SINGLE || (mo->frame & FF_PAPERSPRITE))
|
||||||
ang = R_PointToAngle(mo->x, mo->y) - mo->angle;
|
ang = R_PointToAngle(mo->x, mo->y) - mo->angle;
|
||||||
@@ -464,7 +463,6 @@ boolean R_DoCulling(line_t *cullheight, line_t *viewcullheight, fixed_t vz, fixe
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
cullplane = cullheight->frontsector->floorheight;
|
cullplane = cullheight->frontsector->floorheight;
|
||||||
|
|
||||||
if (cullheight->flags & ML_NOCLIMB) // Group culling
|
if (cullheight->flags & ML_NOCLIMB) // Group culling
|
||||||
{
|
{
|
||||||
if (!viewcullheight)
|
if (!viewcullheight)
|
||||||
@@ -1065,7 +1063,7 @@ static void R_SetupCommonFrame(player_t * player, sector_t * sector)
|
|||||||
|
|
||||||
static void R_SetupAimingFrame(player_t *player, camera_t *thiscam)
|
static void R_SetupAimingFrame(player_t *player, camera_t *thiscam)
|
||||||
{
|
{
|
||||||
if (player->awayviewtics && player->awayviewmobj)
|
if (player->awayviewtics)
|
||||||
{
|
{
|
||||||
newview->aim = player->awayviewaiming;
|
newview->aim = player->awayviewaiming;
|
||||||
newview->angle = player->awayviewmobj->angle;
|
newview->angle = player->awayviewmobj->angle;
|
||||||
@@ -1171,7 +1169,7 @@ void R_SkyboxFrame(int s)
|
|||||||
{
|
{
|
||||||
mapheader_t *mh = mapheaderinfo[gamemap-1];
|
mapheader_t *mh = mapheaderinfo[gamemap-1];
|
||||||
|
|
||||||
if (player->awayviewtics && player->awayviewmobj)
|
if (player->awayviewtics)
|
||||||
{
|
{
|
||||||
SETUPSKYVIEW(player->awayviewmobj, (player->awayviewmobj->z + 20*FRACUNIT));
|
SETUPSKYVIEW(player->awayviewmobj, (player->awayviewmobj->z + 20*FRACUNIT));
|
||||||
}
|
}
|
||||||
@@ -1228,7 +1226,7 @@ void R_SetupFrame(int s, boolean skybox)
|
|||||||
|
|
||||||
R_SetupAimingFrame(player, thiscam);
|
R_SetupAimingFrame(player, thiscam);
|
||||||
|
|
||||||
if (player->awayviewtics && player->awayviewmobj) // cut-away view stuff
|
if (player->awayviewtics) // cut-away view stuff
|
||||||
{
|
{
|
||||||
viewmobj = player->awayviewmobj; // should be a MT_ALTVIEWMAN
|
viewmobj = player->awayviewmobj; // should be a MT_ALTVIEWMAN
|
||||||
I_Assert(viewmobj != NULL);
|
I_Assert(viewmobj != NULL);
|
||||||
@@ -1237,7 +1235,7 @@ void R_SetupFrame(int s, boolean skybox)
|
|||||||
newview->y = viewmobj->y;
|
newview->y = viewmobj->y;
|
||||||
newview->z = viewmobj->z + 20*FRACUNIT;
|
newview->z = viewmobj->z + 20*FRACUNIT;
|
||||||
|
|
||||||
if (viewmobj->subsector && viewmobj->subsector->sector)
|
if (!P_MobjWasRemoved(viewmobj) && viewmobj->subsector && viewmobj->subsector->sector)
|
||||||
sector = viewmobj->subsector->sector;
|
sector = viewmobj->subsector->sector;
|
||||||
|
|
||||||
R_SetupCommonFrame(player, sector);
|
R_SetupCommonFrame(player, sector);
|
||||||
@@ -1255,7 +1253,7 @@ void R_SetupFrame(int s, boolean skybox)
|
|||||||
|
|
||||||
R_SetupCommonFrame(player, sector);
|
R_SetupCommonFrame(player, sector);
|
||||||
}
|
}
|
||||||
else if (player->mo) // use the player's eyes view
|
else // use the player's eyes view
|
||||||
{
|
{
|
||||||
viewmobj = player->mo;
|
viewmobj = player->mo;
|
||||||
I_Assert(viewmobj != NULL);
|
I_Assert(viewmobj != NULL);
|
||||||
@@ -1264,7 +1262,7 @@ void R_SetupFrame(int s, boolean skybox)
|
|||||||
newview->y = viewmobj->y;
|
newview->y = viewmobj->y;
|
||||||
newview->z = player->viewz;
|
newview->z = player->viewz;
|
||||||
|
|
||||||
if (viewmobj->subsector && viewmobj->subsector->sector)
|
if (!P_MobjWasRemoved(viewmobj) && viewmobj->subsector && viewmobj->subsector->sector)
|
||||||
sector = viewmobj->subsector->sector;
|
sector = viewmobj->subsector->sector;
|
||||||
|
|
||||||
R_SetupCommonFrame(player, sector);
|
R_SetupCommonFrame(player, sector);
|
||||||
@@ -1352,10 +1350,10 @@ void R_RenderPlayerView(player_t *player)
|
|||||||
|
|
||||||
for (UINT8 j = 0; j <= splitscreen; j++)
|
for (UINT8 j = 0; j <= splitscreen; j++)
|
||||||
{
|
{
|
||||||
if (player == &players[displayplayers[j]]
|
if (player == &players[displayplayers[i]]
|
||||||
&& viewfov[j] != fov)
|
&& viewfov[i] != fov)
|
||||||
{
|
{
|
||||||
viewfov[j] = fov;
|
viewfov[i] = fov;
|
||||||
R_SetFov(fov);
|
R_SetFov(fov);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1525,6 +1523,10 @@ void R_RegisterEngineStuff(void)
|
|||||||
CV_RegisterVar(&cv_fovchange);
|
CV_RegisterVar(&cv_fovchange);
|
||||||
CV_RegisterVar(&cv_fov);
|
CV_RegisterVar(&cv_fov);
|
||||||
|
|
||||||
|
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||||
|
{
|
||||||
|
CV_RegisterVar(&cv_chasecam[i]);
|
||||||
|
}
|
||||||
CV_RegisterVar(&cv_shadow);
|
CV_RegisterVar(&cv_shadow);
|
||||||
CV_RegisterVar(&cv_shadowoffs);
|
CV_RegisterVar(&cv_shadowoffs);
|
||||||
CV_RegisterVar(&cv_skybox);
|
CV_RegisterVar(&cv_skybox);
|
||||||
@@ -1533,8 +1535,6 @@ void R_RegisterEngineStuff(void)
|
|||||||
|
|
||||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||||
{
|
{
|
||||||
CV_RegisterVar(&cv_chasecam[i]);
|
|
||||||
|
|
||||||
CV_RegisterVar(&cv_cam_dist[i]);
|
CV_RegisterVar(&cv_cam_dist[i]);
|
||||||
CV_RegisterVar(&cv_cam_still[i]);
|
CV_RegisterVar(&cv_cam_still[i]);
|
||||||
CV_RegisterVar(&cv_cam_height[i]);
|
CV_RegisterVar(&cv_cam_height[i]);
|
||||||
@@ -1551,8 +1551,6 @@ void R_RegisterEngineStuff(void)
|
|||||||
CV_RegisterVar(&cv_tiltsmoothing);
|
CV_RegisterVar(&cv_tiltsmoothing);
|
||||||
CV_RegisterVar(&cv_actionmovie);
|
CV_RegisterVar(&cv_actionmovie);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_screenquake);
|
|
||||||
|
|
||||||
CV_RegisterVar(&cv_driftsparkpulse);
|
CV_RegisterVar(&cv_driftsparkpulse);
|
||||||
CV_RegisterVar(&cv_gravstretch);
|
CV_RegisterVar(&cv_gravstretch);
|
||||||
CV_RegisterVar(&cv_sloperoll);
|
CV_RegisterVar(&cv_sloperoll);
|
||||||
@@ -1570,7 +1568,6 @@ void R_RegisterEngineStuff(void)
|
|||||||
CV_RegisterVar(&cv_randomdirlight);
|
CV_RegisterVar(&cv_randomdirlight);
|
||||||
|
|
||||||
CV_RegisterVar(&cv_maxinterpdist);
|
CV_RegisterVar(&cv_maxinterpdist);
|
||||||
CV_RegisterVar(&cv_playerfade);
|
|
||||||
|
|
||||||
CV_RegisterVar(&cv_ripplewater);
|
CV_RegisterVar(&cv_ripplewater);
|
||||||
|
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ extern consvar_t cv_fov, cv_fovchange;
|
|||||||
extern consvar_t cv_skybox;
|
extern consvar_t cv_skybox;
|
||||||
extern consvar_t cv_tailspickup;
|
extern consvar_t cv_tailspickup;
|
||||||
extern consvar_t cv_maxinterpdist;
|
extern consvar_t cv_maxinterpdist;
|
||||||
extern consvar_t cv_playerfade;
|
|
||||||
extern consvar_t cv_ripplewater;
|
extern consvar_t cv_ripplewater;
|
||||||
|
|
||||||
extern consvar_t cv_randomdirlight;
|
extern consvar_t cv_randomdirlight;
|
||||||
|
|||||||
+2
-38
@@ -716,13 +716,6 @@ static void R_DrawFlippedMaskedColumn(column_t *column)
|
|||||||
dc_texturemid = basetexturemid;
|
dc_texturemid = basetexturemid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Based off of R_GetLinedefTransTable
|
|
||||||
static transnum_t R_GetThingTransTable(fixed_t alpha, transnum_t transmap)
|
|
||||||
{
|
|
||||||
return (20*(FRACUNIT - ((alpha * (10 - transmap))/10) - 1) + FRACUNIT) >> (FRACBITS+1);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// R_DrawVisSprite
|
// R_DrawVisSprite
|
||||||
// mfloorclip and mceilingclip should also be set.
|
// mfloorclip and mceilingclip should also be set.
|
||||||
@@ -830,8 +823,8 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||||||
frac = vis->startfrac;
|
frac = vis->startfrac;
|
||||||
windowtop = windowbottom = sprbotscreen = INT32_MAX;
|
windowtop = windowbottom = sprbotscreen = INT32_MAX;
|
||||||
|
|
||||||
//if ((vis->mobj->skin || vis->mobj->localskin) && K_GetMobjSkin(vis->mobj)->flags & SF_HIRES)
|
if ((vis->mobj->skin || vis->mobj->localskin) && K_GetMobjSkin(vis->mobj)->flags & SF_HIRES)
|
||||||
// this_scale = FixedMul(this_scale, K_GetMobjSkin(vis->mobj)->highresscale);
|
this_scale = FixedMul(this_scale, K_GetMobjSkin(vis->mobj)->highresscale);
|
||||||
|
|
||||||
if (this_scale <= 0)
|
if (this_scale <= 0)
|
||||||
this_scale = 1;
|
this_scale = 1;
|
||||||
@@ -1586,9 +1579,6 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||||||
else
|
else
|
||||||
trans = 0;
|
trans = 0;
|
||||||
|
|
||||||
if (cv_playerfade.value && oldthing->player)
|
|
||||||
trans = R_GetThingTransTable(R_DoPlayerFade(oldthing), trans);
|
|
||||||
|
|
||||||
//SoM: 3/17/2000: Disregard sprites that are out of view..
|
//SoM: 3/17/2000: Disregard sprites that are out of view..
|
||||||
if (vflip)
|
if (vflip)
|
||||||
{
|
{
|
||||||
@@ -2898,32 +2888,6 @@ boolean R_ThingWithinDist(mobj_t *thing, INT32 limit_dist)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
fixed_t R_DoPlayerFade(mobj_t *thing)
|
|
||||||
{
|
|
||||||
fixed_t fadealpha = FRACUNIT;
|
|
||||||
static const tic_t countdownstarttime = (15 * TICRATE) / 4; // starttime - (3*TICRATE)
|
|
||||||
|
|
||||||
if (thing->player == viewplayer || viewplayer->exiting || camera[R_GetViewNumber()].freecam || leveltime < countdownstarttime)
|
|
||||||
return fadealpha;
|
|
||||||
|
|
||||||
const INT32 playerdist = (FixedMul((thing->x - viewx), viewcos) + FixedMul((thing->y - viewy), viewsin)) >> FRACBITS;
|
|
||||||
const INT32 viewplayerdist = (FixedMul((viewplayer->mo->x - viewx), viewcos) + FixedMul((viewplayer->mo->y - viewy), viewsin)) >> FRACBITS;
|
|
||||||
|
|
||||||
if (playerdist < viewplayerdist)
|
|
||||||
{
|
|
||||||
if (playerdist < viewplayerdist / 2) // stronger fade when very close
|
|
||||||
{
|
|
||||||
fadealpha = (playerdist * FRACUNIT) / (viewplayerdist / 2) / 3;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fadealpha = (playerdist * FRACUNIT) / viewplayerdist;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return fadealpha;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean R_ThingIsFullBright(mobj_t *thing)
|
boolean R_ThingIsFullBright(mobj_t *thing)
|
||||||
{
|
{
|
||||||
return ((thing->frame & FF_BRIGHTMASK) == FF_FULLBRIGHT);
|
return ((thing->frame & FF_BRIGHTMASK) == FF_FULLBRIGHT);
|
||||||
|
|||||||
@@ -76,8 +76,6 @@ void R_InitSprites(void);
|
|||||||
void R_ClearSprites(void);
|
void R_ClearSprites(void);
|
||||||
void R_DrawMasked(void);
|
void R_DrawMasked(void);
|
||||||
|
|
||||||
fixed_t R_DoPlayerFade(mobj_t *thing);
|
|
||||||
|
|
||||||
boolean R_ThingVisible (mobj_t *thing);
|
boolean R_ThingVisible (mobj_t *thing);
|
||||||
boolean R_ThingWithinDist (mobj_t *thing, INT32 limit_dist);
|
boolean R_ThingWithinDist (mobj_t *thing, INT32 limit_dist);
|
||||||
|
|
||||||
|
|||||||
+8
-9
@@ -2010,7 +2010,7 @@ void S_KeepMusic(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sets up the map music in case it should be reloaded
|
// Sets up the map music in case it should be reloaded
|
||||||
// Special case for keepmusic
|
// Special case for keep music
|
||||||
void S_HandleReloadResetMusic(void)
|
void S_HandleReloadResetMusic(void)
|
||||||
{
|
{
|
||||||
if (!(mapmusic.flags & MUSIC_RELOADRESET))
|
if (!(mapmusic.flags & MUSIC_RELOADRESET))
|
||||||
@@ -2035,24 +2035,23 @@ void S_HandleReloadResetMusic(void)
|
|||||||
|
|
||||||
static boolean S_SkipIntroMusic(void)
|
static boolean S_SkipIntroMusic(void)
|
||||||
{
|
{
|
||||||
if (!cv_skipintromusic.value)
|
boolean skip = cv_skipintromusic.value;
|
||||||
return false;
|
|
||||||
|
|
||||||
// check if menu music is playing, otherwise it may continue playing
|
if (!skip)
|
||||||
if (!stricmp(music.name, "titles"))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
char *maptitle = G_BuildMapTitle(gamemap); // Zzz...
|
char *maptitle = G_BuildMapTitle(gamemap); // Zzz...
|
||||||
|
|
||||||
if (maptitle && !stricmp(maptitle, "Wandering Falls")) // wandering balls changes its song when the race starts Zzz...
|
if (maptitle)
|
||||||
{
|
{
|
||||||
Z_Free(maptitle);
|
// check if menu music is playing, otherwise it may continue playing
|
||||||
return false;
|
if (!stricmp(music.name, "titles") || (maptitle && (!stricmp(maptitle, "Wandering Falls")))) // wandering balls changes its song when the race starts Zzz...
|
||||||
|
skip = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Z_Free(maptitle);
|
Z_Free(maptitle);
|
||||||
|
|
||||||
return true;
|
return skip;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-5
@@ -80,9 +80,7 @@ static void Highreshudscale_OnChange(void)
|
|||||||
|
|
||||||
static void SCR_ChangeFullscreen (void);
|
static void SCR_ChangeFullscreen (void);
|
||||||
|
|
||||||
static CV_PossibleValue_t fullscreen_cons_t[] = {{0, "No"}, {1, "Yes"}, {2, "Borderless Window"}, {0, NULL}};
|
consvar_t cv_fullscreen = {"fullscreen", "Yes", CV_SAVE|CV_CALL, CV_YesNo, SCR_ChangeFullscreen, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_fullscreen = {"fullscreen", "Yes", CV_SAVE|CV_CALL, fullscreen_cons_t, SCR_ChangeFullscreen, 0, NULL, NULL, 0, 0, NULL};
|
|
||||||
|
|
||||||
static CV_PossibleValue_t accuratefps_cons_t[] = {{0, "Inaccurate"}, {1, "Accurate"}, {0, NULL}};
|
static CV_PossibleValue_t accuratefps_cons_t[] = {{0, "Inaccurate"}, {1, "Accurate"}, {0, NULL}};
|
||||||
consvar_t cv_accuratefps = {"fpssampling", "1", CV_SAVE, accuratefps_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_accuratefps = {"fpssampling", "1", CV_SAVE, accuratefps_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
@@ -312,8 +310,6 @@ void SCR_SetDefaultMode(void)
|
|||||||
void SCR_ChangeFullscreen(void)
|
void SCR_ChangeFullscreen(void)
|
||||||
{
|
{
|
||||||
#ifdef DIRECTFULLSCREEN
|
#ifdef DIRECTFULLSCREEN
|
||||||
I_SetBorderlessWindow(); // Running this here so we can have borderless window at startup
|
|
||||||
|
|
||||||
// allow_fullscreen is set by VID_PrepareModeList
|
// allow_fullscreen is set by VID_PrepareModeList
|
||||||
// it is used to prevent switching to fullscreen during startup
|
// it is used to prevent switching to fullscreen during startup
|
||||||
if (!allow_fullscreen)
|
if (!allow_fullscreen)
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
|
#ifdef __unix__
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -110,11 +110,8 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(UNIXCOMMON)
|
|
||||||
#include <poll.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (__unix__) || (defined (UNIXCOMMON) && !defined (__APPLE__))
|
#if defined (__unix__) || (defined (UNIXCOMMON) && !defined (__APPLE__))
|
||||||
|
#include <poll.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#define NEWSIGNALHANDLER
|
#define NEWSIGNALHANDLER
|
||||||
|
|||||||
+1
-8
@@ -150,7 +150,7 @@ UINT8 graphics_started = 0; // Is used in console.c and screen.c
|
|||||||
// To disable fullscreen at startup; is set in VID_PrepareModeList
|
// To disable fullscreen at startup; is set in VID_PrepareModeList
|
||||||
boolean allow_fullscreen = false;
|
boolean allow_fullscreen = false;
|
||||||
static SDL_bool disable_fullscreen = SDL_FALSE;
|
static SDL_bool disable_fullscreen = SDL_FALSE;
|
||||||
#define USE_FULLSCREEN (disable_fullscreen||!allow_fullscreen)? 0: (cv_fullscreen.value == 1)
|
#define USE_FULLSCREEN (disable_fullscreen||!allow_fullscreen)?0:cv_fullscreen.value
|
||||||
static SDL_bool disable_mouse = SDL_FALSE;
|
static SDL_bool disable_mouse = SDL_FALSE;
|
||||||
#define USE_MOUSEINPUT (!disable_mouse && cv_usemouse.value && havefocus)
|
#define USE_MOUSEINPUT (!disable_mouse && cv_usemouse.value && havefocus)
|
||||||
#define MOUSE_MENU false //(!disable_mouse && cv_usemouse.value && menuactive && !USE_FULLSCREEN)
|
#define MOUSE_MENU false //(!disable_mouse && cv_usemouse.value && menuactive && !USE_FULLSCREEN)
|
||||||
@@ -273,7 +273,6 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen)
|
|||||||
{
|
{
|
||||||
wasfullscreen = SDL_TRUE;
|
wasfullscreen = SDL_TRUE;
|
||||||
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||||
I_SetBorderlessWindow();
|
|
||||||
}
|
}
|
||||||
else // windowed mode
|
else // windowed mode
|
||||||
{
|
{
|
||||||
@@ -2290,10 +2289,4 @@ static void Impl_SetVsync(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_SetBorderlessWindow(void)
|
|
||||||
{
|
|
||||||
SDL_bool borderless = (cv_fullscreen.value == 2) ? SDL_FALSE : SDL_TRUE;
|
|
||||||
SDL_SetWindowBordered(window, borderless);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
+12
-2
@@ -214,9 +214,19 @@ void I_StartupSound(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDL_version SDLmixcompiled;
|
||||||
|
const SDL_version *SDLmixlinked;
|
||||||
|
SDL_MIXER_VERSION(&SDLmixcompiled)
|
||||||
|
SDLmixlinked = Mix_Linked_Version();
|
||||||
|
|
||||||
|
I_OutputMsg("Compiled for SDL_mixer version: %d.%d.%d\n",
|
||||||
|
SDLmixcompiled.major, SDLmixcompiled.minor, SDLmixcompiled.patch);
|
||||||
|
I_OutputMsg("Linked with SDL_mixer version: %d.%d.%d\n",
|
||||||
|
SDLmixlinked->major, SDLmixlinked->minor, SDLmixlinked->patch);
|
||||||
|
|
||||||
#ifdef HAVE_OPENMPT
|
#ifdef HAVE_OPENMPT
|
||||||
CONS_Printf("libopenmpt version: %s\n", openmpt_get_string("library_version"));
|
I_OutputMsg("libopenmpt version: %s\n", openmpt_get_string("library_version"));
|
||||||
CONS_Printf("libopenmpt build date: %s\n", openmpt_get_string("build"));
|
I_OutputMsg("libopenmpt build date: %s\n", openmpt_get_string("build"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sound_started = true;
|
sound_started = true;
|
||||||
|
|||||||
@@ -1037,7 +1037,6 @@ sfxenum_t S_AddSoundFx(const char *name, boolean singular, INT32 flags, boolean
|
|||||||
S_sfx[i].data = I_GetSfx(&S_sfx[i]);
|
S_sfx[i].data = I_GetSfx(&S_sfx[i]);
|
||||||
else
|
else
|
||||||
S_sfx[i].data = NULL;
|
S_sfx[i].data = NULL;
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-17
@@ -418,28 +418,27 @@ static void ST_drawDebugInfo(void)
|
|||||||
|
|
||||||
static void ST_drawLevelTitle(void)
|
static void ST_drawLevelTitle(void)
|
||||||
{
|
{
|
||||||
char *lvlttl, *subttl, *zonttl, *actnum;
|
char *lvlttl = mapheaderinfo[gamemap-1]->lvlttl;
|
||||||
INT32 lvlttlxpos, ttlnumxpos, zonexpos;
|
char *subttl = mapheaderinfo[gamemap-1]->subttl;
|
||||||
INT32 dupcalc;
|
char *zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
|
||||||
UINT8 gtc;
|
char *actnum = mapheaderinfo[gamemap-1]->actnum;
|
||||||
|
INT32 lvlttlxpos;
|
||||||
|
INT32 ttlnumxpos;
|
||||||
|
INT32 zonexpos;
|
||||||
|
INT32 dupcalc = (vid.width/vid.dupx);
|
||||||
|
UINT8 gtc = G_GetGametypeColor(gametype);
|
||||||
INT32 sub = 0;
|
INT32 sub = 0;
|
||||||
INT32 bary;
|
INT32 bary = (splitscreen)
|
||||||
|
? BASEVIDHEIGHT/2
|
||||||
|
: 163;
|
||||||
INT32 lvlw;
|
INT32 lvlw;
|
||||||
|
|
||||||
if (!cv_stagetitle.value || (timeinmap > 113))
|
if (!cv_stagetitle.value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (*mapheaderinfo[gamemap-1]->lvlttl == '\0')
|
if (timeinmap > 113)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lvlttl = mapheaderinfo[gamemap-1]->lvlttl;
|
|
||||||
subttl = mapheaderinfo[gamemap-1]->subttl;
|
|
||||||
zonttl = mapheaderinfo[gamemap-1]->zonttl; // SRB2kart
|
|
||||||
actnum = mapheaderinfo[gamemap-1]->actnum;
|
|
||||||
dupcalc = (vid.width/vid.dupx);
|
|
||||||
gtc = G_GetGametypeColor(gametype);
|
|
||||||
bary = (splitscreen) ? BASEVIDHEIGHT/2 : 163;
|
|
||||||
|
|
||||||
lvlw = V_LevelNameWidth(lvlttl);
|
lvlw = V_LevelNameWidth(lvlttl);
|
||||||
|
|
||||||
if (actnum[0])
|
if (actnum[0])
|
||||||
@@ -603,7 +602,7 @@ static void ST_overlayDrawer(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// draw level title Tails
|
// draw level title Tails
|
||||||
if (!(hu_showscores && (netgame || multiplayer) && !mapreset) && LUA_HudEnabled(hud_stagetitle) && !forceshowhud)
|
if (*mapheaderinfo[gamemap-1]->lvlttl != '\0' && !(hu_showscores && (netgame || multiplayer) && !mapreset) && LUA_HudEnabled(hud_stagetitle) && !forceshowhud)
|
||||||
ST_drawLevelTitle();
|
ST_drawLevelTitle();
|
||||||
|
|
||||||
if (!hu_showscores && netgame && !mapreset)
|
if (!hu_showscores && netgame && !mapreset)
|
||||||
@@ -740,7 +739,7 @@ void ST_Drawer(void)
|
|||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
if (UNLIKELY(cv_seenames.value && cv_allowseenames.value && displayplayers[0] == consoleplayer && seenplayer && seenplayer->mo && !mapreset))
|
if (cv_seenames.value && cv_allowseenames.value && displayplayers[0] == consoleplayer && seenplayer && seenplayer->mo && !mapreset)
|
||||||
{
|
{
|
||||||
if (cv_seenames.value == 1)
|
if (cv_seenames.value == 1)
|
||||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF, player_names[seenplayer-players]);
|
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF, player_names[seenplayer-players]);
|
||||||
|
|||||||
+2
-35
@@ -2039,7 +2039,8 @@ static lumpchecklist_t folderblacklist[] =
|
|||||||
{NULL, 0},
|
{NULL, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int W_VerifyPK3(FILE *fp, lumpchecklist_t *checklist, boolean status)
|
static int
|
||||||
|
W_VerifyPK3 (FILE *fp, lumpchecklist_t *checklist, boolean status)
|
||||||
{
|
{
|
||||||
int verified = true;
|
int verified = true;
|
||||||
|
|
||||||
@@ -2081,10 +2082,7 @@ static int W_VerifyPK3(FILE *fp, lumpchecklist_t *checklist, boolean status)
|
|||||||
char *cdir = (char*)(malloc(LONG(zend.cdirsize)));
|
char *cdir = (char*)(malloc(LONG(zend.cdirsize)));
|
||||||
|
|
||||||
if (fread(cdir, 1, LONG(zend.cdirsize), fp) < (UINT32)(LONG(zend.cdirsize)))
|
if (fread(cdir, 1, LONG(zend.cdirsize), fp) < (UINT32)(LONG(zend.cdirsize)))
|
||||||
{
|
|
||||||
free(cdir);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
|
|
||||||
@@ -2096,10 +2094,7 @@ static int W_VerifyPK3(FILE *fp, lumpchecklist_t *checklist, boolean status)
|
|||||||
char* dotpos;
|
char* dotpos;
|
||||||
|
|
||||||
if (memcmp(zentry->signature, pat_central, 4) != 0)
|
if (memcmp(zentry->signature, pat_central, 4) != 0)
|
||||||
{
|
|
||||||
free(cdir);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
if (verified == true)
|
if (verified == true)
|
||||||
{
|
{
|
||||||
@@ -2137,16 +2132,10 @@ static int W_VerifyPK3(FILE *fp, lumpchecklist_t *checklist, boolean status)
|
|||||||
sizeof *zentry + SHORT(zentry->namelen) + SHORT(zentry->xtralen) + SHORT(zentry->commlen);
|
sizeof *zentry + SHORT(zentry->namelen) + SHORT(zentry->xtralen) + SHORT(zentry->commlen);
|
||||||
|
|
||||||
if (fseek(fp, LONG(zentry->offset), SEEK_SET) != 0)
|
if (fseek(fp, LONG(zentry->offset), SEEK_SET) != 0)
|
||||||
{
|
|
||||||
free(cdir);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
if (fread(&zlentry, 1, sizeof(zlentry_t), fp) < sizeof (zlentry_t))
|
if (fread(&zlentry, 1, sizeof(zlentry_t), fp) < sizeof (zlentry_t))
|
||||||
{
|
|
||||||
free(cdir);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
data_size +=
|
data_size +=
|
||||||
sizeof zlentry + SHORT(zlentry.namelen) + SHORT(zlentry.xtralen) + LONG(zlentry.compsize);
|
sizeof zlentry + SHORT(zlentry.namelen) + SHORT(zlentry.xtralen) + LONG(zlentry.compsize);
|
||||||
@@ -2197,9 +2186,7 @@ static int W_VerifyFile(const char *filename, lumpchecklist_t *checklist,
|
|||||||
goodfile = W_VerifyWAD(handle, checklist, status);
|
goodfile = W_VerifyWAD(handle, checklist, status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(handle);
|
fclose(handle);
|
||||||
|
|
||||||
return goodfile;
|
return goodfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2354,10 +2341,7 @@ static int W_CheckPK3Contains(FILE *fp, lumpchecklist_t *checklist)
|
|||||||
char *cdir = (char*)(malloc(LONG(zend.cdirsize)));
|
char *cdir = (char*)(malloc(LONG(zend.cdirsize)));
|
||||||
|
|
||||||
if (fread(cdir, 1, LONG(zend.cdirsize), fp) < (UINT32)(LONG(zend.cdirsize)))
|
if (fread(cdir, 1, LONG(zend.cdirsize), fp) < (UINT32)(LONG(zend.cdirsize)))
|
||||||
{
|
|
||||||
free(cdir);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
|
|
||||||
@@ -2369,10 +2353,7 @@ static int W_CheckPK3Contains(FILE *fp, lumpchecklist_t *checklist)
|
|||||||
char* dotpos;
|
char* dotpos;
|
||||||
|
|
||||||
if (memcmp(zentry->signature, pat_central, 4) != 0)
|
if (memcmp(zentry->signature, pat_central, 4) != 0)
|
||||||
{
|
|
||||||
free(cdir);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
fullname = (char*)(malloc(SHORT(zentry->namelen) + 1));
|
fullname = (char*)(malloc(SHORT(zentry->namelen) + 1));
|
||||||
strlcpy(fullname, (char*)(zentry + 1), SHORT(zentry->namelen) + 1);
|
strlcpy(fullname, (char*)(zentry + 1), SHORT(zentry->namelen) + 1);
|
||||||
@@ -2392,19 +2373,11 @@ static int W_CheckPK3Contains(FILE *fp, lumpchecklist_t *checklist)
|
|||||||
strncpy(lumpname, trimname, min(8, dotpos - trimname));
|
strncpy(lumpname, trimname, min(8, dotpos - trimname));
|
||||||
|
|
||||||
if (W_NameStartsWith(lumpname, checklist))
|
if (W_NameStartsWith(lumpname, checklist))
|
||||||
{
|
|
||||||
free(fullname);
|
|
||||||
free(cdir);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (W_NameStartsWith(fullname, checklist))
|
if (W_NameStartsWith(fullname, checklist))
|
||||||
{
|
|
||||||
free(fullname);
|
|
||||||
free(cdir);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
free(fullname);
|
free(fullname);
|
||||||
|
|
||||||
@@ -2414,16 +2387,10 @@ static int W_CheckPK3Contains(FILE *fp, lumpchecklist_t *checklist)
|
|||||||
sizeof *zentry + SHORT(zentry->namelen) + SHORT(zentry->xtralen) + SHORT(zentry->commlen);
|
sizeof *zentry + SHORT(zentry->namelen) + SHORT(zentry->xtralen) + SHORT(zentry->commlen);
|
||||||
|
|
||||||
if (fseek(fp, LONG(zentry->offset), SEEK_SET) != 0)
|
if (fseek(fp, LONG(zentry->offset), SEEK_SET) != 0)
|
||||||
{
|
|
||||||
free(cdir);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
if (fread(&zlentry, 1, sizeof(zlentry_t), fp) < sizeof (zlentry_t))
|
if (fread(&zlentry, 1, sizeof(zlentry_t), fp) < sizeof (zlentry_t))
|
||||||
{
|
|
||||||
free(cdir);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
data_size +=
|
data_size +=
|
||||||
sizeof zlentry + SHORT(zlentry.namelen) + SHORT(zlentry.xtralen) + LONG(zlentry.compsize);
|
sizeof zlentry + SHORT(zlentry.namelen) + SHORT(zlentry.xtralen) + LONG(zlentry.compsize);
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#include <winuser.h>
|
||||||
|
|
||||||
//Microsoft Developer Studio generated resource script.
|
//Microsoft Developer Studio generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|||||||
+145
-133
@@ -57,30 +57,15 @@ typedef struct
|
|||||||
|
|
||||||
static y_data_t data;
|
static y_data_t data;
|
||||||
|
|
||||||
|
|
||||||
// graphics
|
// graphics
|
||||||
static patch_t *bgpatch = NULL; // INTERSCR
|
|
||||||
static patch_t *widebgpatch = NULL; // INTERSCW
|
|
||||||
static patch_t *bgtile = NULL; // SPECTILE/SRB2BACK
|
static patch_t *bgtile = NULL; // SPECTILE/SRB2BACK
|
||||||
|
|
||||||
static INT32 timer;
|
static INT32 timer;
|
||||||
|
|
||||||
static INT32 intertic;
|
static INT32 intertic;
|
||||||
static INT32 endtic = -1;
|
static INT32 endtic = -1;
|
||||||
static INT32 sorttic = -1;
|
static INT32 sorttic = -1;
|
||||||
|
|
||||||
patch_t *animVoteFramesPatches = NULL;
|
|
||||||
// VEXTRN - Vote (V) Extra (EXT) Race (R) Normal (N - Normal sized patch)
|
|
||||||
// VEXTBN - Vote (V) Extra (EXT) Battle (B) Normal (N - Normal sized patch)
|
|
||||||
// VEXTBW - Vote (V) Extra (EXT) Battle (B) Normal (W - Wide patch used in software)
|
|
||||||
// VEXTRW - Vote (V) Extra (EXT) Race (R) Normal (W - Wide patch used in software)
|
|
||||||
char animPrefix[] = "INTSC";
|
|
||||||
char animWidePrefix[] = "INTSW";
|
|
||||||
char *luaVoteScreen = NULL;
|
|
||||||
|
|
||||||
INT32 currentAnimFrame = 0;
|
|
||||||
static INT32 foundAnimVoteFrames = 0;
|
|
||||||
static INT32 foundAnimVoteWideFrames = 0;
|
|
||||||
|
|
||||||
intertype_t intertype = int_none;
|
intertype_t intertype = int_none;
|
||||||
|
|
||||||
static huddrawlist_h luahuddrawlist_intermission = NULL;
|
static huddrawlist_h luahuddrawlist_intermission = NULL;
|
||||||
@@ -118,17 +103,13 @@ typedef struct
|
|||||||
boolean loaded;
|
boolean loaded;
|
||||||
} y_voteclient;
|
} y_voteclient;
|
||||||
|
|
||||||
|
// votescreen stuff
|
||||||
|
votescreen_t VoteScreen = {0};
|
||||||
|
|
||||||
static y_votelvlinfo levelinfo[5];
|
static y_votelvlinfo levelinfo[5];
|
||||||
static y_voteclient voteclient;
|
static y_voteclient voteclient;
|
||||||
static INT32 votetic;
|
static INT32 votetic;
|
||||||
static INT32 voteendtic = -1;
|
static INT32 voteendtic = -1;
|
||||||
static patch_t *cursor = NULL;
|
|
||||||
static patch_t *cursor1 = NULL;
|
|
||||||
static patch_t *cursor2 = NULL;
|
|
||||||
static patch_t *cursor3 = NULL;
|
|
||||||
static patch_t *cursor4 = NULL;
|
|
||||||
static patch_t *randomlvl = NULL;
|
|
||||||
static patch_t *rubyicon = NULL;
|
|
||||||
|
|
||||||
static void Y_UnloadVoteData(void);
|
static void Y_UnloadVoteData(void);
|
||||||
|
|
||||||
@@ -287,49 +268,6 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Y_AnimatedVoteScreenCheck
|
|
||||||
//
|
|
||||||
// Check if the lumps exist (checking for VEXTR(N|W)xx for race and VEXTRB(N|W)xx for battle)
|
|
||||||
static void Y_AnimatedVoteScreenCheck(void)
|
|
||||||
{
|
|
||||||
char tmpPrefix[] = "INTS";
|
|
||||||
|
|
||||||
if (luaVoteScreen)
|
|
||||||
strncpy(tmpPrefix, luaVoteScreen, 4);
|
|
||||||
else if (G_BattleGametype())
|
|
||||||
strcpy(tmpPrefix, "BTLS");
|
|
||||||
|
|
||||||
strncpy(animPrefix, tmpPrefix, 4);
|
|
||||||
animPrefix[4] = 'C';
|
|
||||||
strncpy(animWidePrefix, tmpPrefix, 4);
|
|
||||||
animWidePrefix[4] = 'W';
|
|
||||||
|
|
||||||
foundAnimVoteFrames = foundAnimVoteWideFrames = 0;
|
|
||||||
currentAnimFrame = 0;
|
|
||||||
|
|
||||||
INT32 i = 1;
|
|
||||||
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
boolean normalLumpExists = W_LumpExists(va("%sC%d", tmpPrefix, i));
|
|
||||||
boolean wideLumpExists = W_LumpExists(va("%sW%d", tmpPrefix, i));
|
|
||||||
|
|
||||||
if (normalLumpExists || wideLumpExists)
|
|
||||||
{
|
|
||||||
if (normalLumpExists)
|
|
||||||
foundAnimVoteFrames++;
|
|
||||||
|
|
||||||
if (wideLumpExists)
|
|
||||||
foundAnimVoteWideFrames++;
|
|
||||||
}
|
|
||||||
else // If we don't find at least frame 1 (e.g VEXTRN1), let's just stop looking
|
|
||||||
break;
|
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Y_PlayerStandingsDrawer
|
// Y_PlayerStandingsDrawer
|
||||||
//
|
//
|
||||||
// Handles drawing the center-of-screen player standings.
|
// Handles drawing the center-of-screen player standings.
|
||||||
@@ -863,7 +801,8 @@ void Y_StartIntermission(void)
|
|||||||
//
|
//
|
||||||
void Y_EndIntermission(void)
|
void Y_EndIntermission(void)
|
||||||
{
|
{
|
||||||
Y_UnloadData();
|
if (!dedicated)
|
||||||
|
Y_UnloadData();
|
||||||
|
|
||||||
endtic = -1;
|
endtic = -1;
|
||||||
sorttic = -1;
|
sorttic = -1;
|
||||||
@@ -881,28 +820,72 @@ static void Y_FollowIntermission(void)
|
|||||||
G_AfterIntermission();
|
G_AfterIntermission();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define UNLOAD(x) if (x) {Patch_Free(x);} x = NULL;
|
#define UNLOAD(x) {if ((x) != NULL) {Patch_Free(x);} x = NULL;}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Y_UnloadData
|
// Y_UnloadData
|
||||||
//
|
//
|
||||||
static void Y_UnloadData(void)
|
static void Y_UnloadData(void)
|
||||||
{
|
{
|
||||||
// In hardware mode, don't Z_ChangeTag a pointer returned by W_CachePatchName().
|
|
||||||
// It doesn't work and is unnecessary.
|
|
||||||
if (rendermode != render_soft)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// unload the background patches
|
// unload the background patches
|
||||||
UNLOAD(bgpatch);
|
UNLOAD(VoteScreen.bgpatch);
|
||||||
UNLOAD(widebgpatch);
|
UNLOAD(VoteScreen.widebgpatch);
|
||||||
UNLOAD(bgtile);
|
UNLOAD(bgtile);
|
||||||
//UNLOAD(interpic);
|
//UNLOAD(interpic);
|
||||||
}
|
}
|
||||||
|
|
||||||
// SRB2Kart: Voting!
|
// SRB2Kart: Voting!
|
||||||
|
|
||||||
static void Y_DrawVoteBackground(patch_t *patch)
|
//
|
||||||
|
// Y_VoteScreenCheck
|
||||||
|
//
|
||||||
|
static void Y_VoteScreenCheck(void)
|
||||||
|
{
|
||||||
|
strcpy(VoteScreen.Prefix, "INTS");
|
||||||
|
|
||||||
|
if (VoteScreen.luaPrefix[0] != 0)
|
||||||
|
strlcpy(VoteScreen.Prefix, VoteScreen.luaPrefix, sizeof(VoteScreen.Prefix));
|
||||||
|
else if (G_BattleGametype())
|
||||||
|
strcpy(VoteScreen.Prefix, "BTLS");
|
||||||
|
|
||||||
|
VoteScreen.foundLuaVoteFrames = VoteScreen.foundLuaVoteWideFrames = 0;
|
||||||
|
VoteScreen.currentAnimFrame = 0;
|
||||||
|
|
||||||
|
INT32 i = 1;
|
||||||
|
|
||||||
|
// check for lua vote background replacements
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
// Check if the lumps exist (checking for VEXTR(N|W)xx for race and VEXTRB(N|W)xx for battle)
|
||||||
|
boolean normalLumpExists = W_LumpExists(va("%sC%d", VoteScreen.Prefix, i));
|
||||||
|
boolean wideLumpExists = W_LumpExists(va("%sW%d", VoteScreen.Prefix, i));
|
||||||
|
|
||||||
|
if (normalLumpExists || wideLumpExists)
|
||||||
|
{
|
||||||
|
if (normalLumpExists)
|
||||||
|
VoteScreen.foundLuaVoteFrames++;
|
||||||
|
|
||||||
|
if (wideLumpExists)
|
||||||
|
VoteScreen.foundLuaVoteWideFrames++;
|
||||||
|
}
|
||||||
|
else // If we don't find at least frame 1 (e.g VEXTRN1), let's just stop looking
|
||||||
|
break;
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// non lua vote background handling
|
||||||
|
boolean prefbattletype = ((votelevels[0][1] & ~0x80) == GT_MATCH);
|
||||||
|
VoteScreen.widebgpatch = W_CachePatchName((prefbattletype ? "BATTLSCW" : "INTERSCW"), PU_PATCH);
|
||||||
|
VoteScreen.bgpatch = W_CachePatchName((prefbattletype ? "BATTLSCR" : "INTERSCR"), PU_PATCH);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Y_VoteBackgroundDrawer
|
||||||
|
//
|
||||||
|
// Determines which patch drawer to use for scaling
|
||||||
|
//
|
||||||
|
static void Y_VoteBackgroundDrawer(patch_t *patch)
|
||||||
{
|
{
|
||||||
switch (cv_votebgscaling.value)
|
switch (cv_votebgscaling.value)
|
||||||
{
|
{
|
||||||
@@ -924,57 +907,74 @@ static void Y_DrawVoteBackground(patch_t *patch)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Y_DrawAnimatedVoteScreenPatch
|
|
||||||
//
|
//
|
||||||
// Draw animated patch based on frame counter on vote screen
|
// Y_DrawLuaVoteScreenPatch
|
||||||
//
|
//
|
||||||
static void Y_DrawAnimatedVoteScreenPatch(boolean widePatch)
|
// Handles votebackgrounds set by "setVoteBackground"
|
||||||
|
// Aswell as animated patches
|
||||||
|
//
|
||||||
|
static void Y_DrawLuaVoteScreenPatch(boolean widePatch)
|
||||||
{
|
{
|
||||||
INT32 nextframe = 0;
|
INT32 nextframe = 0;
|
||||||
patch_t *votebg = NULL;
|
patch_t *votebg = NULL;
|
||||||
char tempAnimPrefix[7];
|
char tempPrefix[6];
|
||||||
const INT32 tempFoundAnimVoteFrames = ((widePatch ? foundAnimVoteWideFrames : foundAnimVoteFrames) - 1);
|
const INT32 tempfoundAnimLuaVoteFrames = ((widePatch ? VoteScreen.foundLuaVoteWideFrames : VoteScreen.foundLuaVoteFrames) - 1);
|
||||||
|
|
||||||
strcpy(tempAnimPrefix, (widePatch ? animWidePrefix : animPrefix));
|
strcpy(tempPrefix, va("%s%s", VoteScreen.Prefix, (widePatch ? "W" : "C")));
|
||||||
|
|
||||||
|
// Draw non animated patch
|
||||||
|
if (!tempfoundAnimLuaVoteFrames)
|
||||||
|
{
|
||||||
|
votebg = W_CachePatchName(va("%s1", tempPrefix), PU_PATCH);
|
||||||
|
Y_VoteBackgroundDrawer(votebg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw animated patch based on frame counter on vote screen
|
||||||
|
|
||||||
// Just in case someone provides LESS widescreen frames than normal frames or vice versa, reset the frame counter to 0
|
// Just in case someone provides LESS widescreen frames than normal frames or vice versa, reset the frame counter to 0
|
||||||
if (currentAnimFrame > tempFoundAnimVoteFrames)
|
if (VoteScreen.currentAnimFrame > tempfoundAnimLuaVoteFrames)
|
||||||
currentAnimFrame = 0;
|
VoteScreen.currentAnimFrame = 0;
|
||||||
|
|
||||||
nextframe = (currentAnimFrame + 1);
|
nextframe = (VoteScreen.currentAnimFrame + 1);
|
||||||
|
|
||||||
votebg = W_CachePatchName(va("%s%d", (widePatch ? animWidePrefix : animPrefix), nextframe), PU_PATCH);
|
votebg = W_CachePatchName(va("%s%d", tempPrefix, nextframe), PU_PATCH);
|
||||||
|
|
||||||
Y_DrawVoteBackground(votebg);
|
Y_VoteBackgroundDrawer(votebg);
|
||||||
|
|
||||||
if (renderisnewtic && (votetic % 2 == 0) && !paused)
|
if (renderisnewtic && (votetic % 2 == 0) && !paused)
|
||||||
currentAnimFrame = (nextframe > tempFoundAnimVoteFrames) ? 0 : nextframe;
|
VoteScreen.currentAnimFrame = (nextframe > tempfoundAnimLuaVoteFrames) ? 0 : nextframe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Y_DrawVoteScreenPatch
|
||||||
|
//
|
||||||
static void Y_DrawVoteScreenPatch(void)
|
static void Y_DrawVoteScreenPatch(void)
|
||||||
{
|
{
|
||||||
patch_t *votebg = NULL;
|
patch_t *votebg = NULL;
|
||||||
const boolean widescreen = (vid.width / vid.dupx > 320);
|
const boolean widescreen = (vid.width / vid.dupx > 320);
|
||||||
|
|
||||||
if (foundAnimVoteWideFrames || foundAnimVoteFrames)
|
if (VoteScreen.foundLuaVoteWideFrames || VoteScreen.foundLuaVoteFrames)
|
||||||
{
|
{
|
||||||
Y_DrawAnimatedVoteScreenPatch((foundAnimVoteWideFrames && widescreen));
|
Y_DrawLuaVoteScreenPatch(((widescreen && VoteScreen.foundLuaVoteWideFrames) || !VoteScreen.foundLuaVoteFrames));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
votebg = bgpatch; // non widescreen patch
|
// non widescreen patch
|
||||||
|
votebg = VoteScreen.bgpatch;
|
||||||
|
|
||||||
UINT8 prefgametype = (votelevels[0][1] & ~0x80);
|
UINT8 prefgametype = (votelevels[0][1] & ~0x80);
|
||||||
const boolean widebgreplaced = (prefgametype == GT_MATCH) ? widebattlereplaced : wideracereplaced;
|
const boolean widebgreplaced = (prefgametype == GT_MATCH) ? VoteScreen.replaced.widebattle : VoteScreen.replaced.widerace;
|
||||||
const boolean bgreplaced = (prefgametype == GT_MATCH) ? battlereplaced : racereplaced;
|
const boolean bgreplaced = (prefgametype == GT_MATCH) ? VoteScreen.replaced.battle : VoteScreen.replaced.race;
|
||||||
|
|
||||||
|
// we check a bunch of stuff to always have a "valid" fallback
|
||||||
if ((widescreen && (widebgreplaced || !bgreplaced))
|
if ((widescreen && (widebgreplaced || !bgreplaced))
|
||||||
|| (!widescreen && (widebgreplaced && !bgreplaced)))
|
|| (!widescreen && (widebgreplaced && !bgreplaced)))
|
||||||
{
|
{
|
||||||
votebg = widebgpatch;
|
votebg = VoteScreen.widebgpatch; // widescreen patch
|
||||||
}
|
}
|
||||||
|
|
||||||
Y_DrawVoteBackground(votebg);
|
Y_VoteBackgroundDrawer(votebg);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -1037,7 +1037,7 @@ void Y_VoteDrawer(void)
|
|||||||
if (i == 3)
|
if (i == 3)
|
||||||
{
|
{
|
||||||
str = "RANDOM";
|
str = "RANDOM";
|
||||||
pic = randomlvl;
|
pic = VoteScreen.randomlvl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1061,7 +1061,7 @@ void Y_VoteDrawer(void)
|
|||||||
|
|
||||||
if (!splitscreen)
|
if (!splitscreen)
|
||||||
{
|
{
|
||||||
thiscurs = cursor;
|
thiscurs = VoteScreen.cursor[0];
|
||||||
p = consoleplayer;
|
p = consoleplayer;
|
||||||
color = levelinfo[i].gtc;
|
color = levelinfo[i].gtc;
|
||||||
colormap = NULL;
|
colormap = NULL;
|
||||||
@@ -1071,19 +1071,19 @@ void Y_VoteDrawer(void)
|
|||||||
switch (j)
|
switch (j)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
thiscurs = cursor2;
|
thiscurs = VoteScreen.cursor[2];
|
||||||
p = displayplayers[1];
|
p = displayplayers[1];
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
thiscurs = cursor3;
|
thiscurs = VoteScreen.cursor[3];
|
||||||
p = displayplayers[2];
|
p = displayplayers[2];
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
thiscurs = cursor4;
|
thiscurs = VoteScreen.cursor[4];
|
||||||
p = displayplayers[3];
|
p = displayplayers[3];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
thiscurs = cursor1;
|
thiscurs = VoteScreen.cursor[1];
|
||||||
p = displayplayers[0];
|
p = displayplayers[0];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1111,7 +1111,7 @@ void Y_VoteDrawer(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
V_DrawFixedPatch((BASEVIDWIDTH-20)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, V_FLIP|V_SNAPTORIGHT, pic, 0);
|
V_DrawFixedPatch((BASEVIDWIDTH-20)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, V_FLIP|V_SNAPTORIGHT, pic, 0);
|
||||||
V_DrawFixedPatch((BASEVIDWIDTH-60)<<FRACBITS, ((y+25)<<FRACBITS) - (rubyheight<<1), FRACUNIT, V_SNAPTORIGHT, rubyicon, NULL);
|
V_DrawFixedPatch((BASEVIDWIDTH-60)<<FRACBITS, ((y+25)<<FRACBITS) - (rubyheight<<1), FRACUNIT, V_SNAPTORIGHT, VoteScreen.rubyicon, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
V_DrawRightAlignedThinString(BASEVIDWIDTH-21, 40+y, V_SNAPTORIGHT|V_6WIDTHSPACE, str);
|
V_DrawRightAlignedThinString(BASEVIDWIDTH-21, 40+y, V_SNAPTORIGHT|V_6WIDTHSPACE, str);
|
||||||
@@ -1135,7 +1135,7 @@ void Y_VoteDrawer(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
V_DrawFixedPatch((BASEVIDWIDTH-20)<<FRACBITS, y<<FRACBITS, FRACUNIT/4, V_FLIP|V_SNAPTORIGHT, pic, 0);
|
V_DrawFixedPatch((BASEVIDWIDTH-20)<<FRACBITS, y<<FRACBITS, FRACUNIT/4, V_FLIP|V_SNAPTORIGHT, pic, 0);
|
||||||
V_DrawFixedPatch((BASEVIDWIDTH-40)<<FRACBITS, (y<<FRACBITS) + (25<<(FRACBITS-1)) - rubyheight, FRACUNIT/2, V_SNAPTORIGHT, rubyicon, NULL);
|
V_DrawFixedPatch((BASEVIDWIDTH-40)<<FRACBITS, (y<<FRACBITS) + (25<<(FRACBITS-1)) - rubyheight, FRACUNIT/2, V_SNAPTORIGHT, VoteScreen.rubyicon, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (levelinfo[i].gts)
|
if (levelinfo[i].gts)
|
||||||
@@ -1164,13 +1164,13 @@ void Y_VoteDrawer(void)
|
|||||||
patch_t *pic;
|
patch_t *pic;
|
||||||
|
|
||||||
if (votes[i] >= 3 && (i != pickedvote || voteendtic == -1))
|
if (votes[i] >= 3 && (i != pickedvote || voteendtic == -1))
|
||||||
pic = randomlvl;
|
pic = VoteScreen.randomlvl;
|
||||||
else
|
else
|
||||||
pic = levelinfo[votes[i]].pic;
|
pic = levelinfo[votes[i]].pic;
|
||||||
|
|
||||||
if (!timer && i == voteclient.ranim)
|
if (!timer && i == voteclient.ranim)
|
||||||
{
|
{
|
||||||
V_DrawScaledPatch(x-18, y+9, V_SNAPTOLEFT, cursor);
|
V_DrawScaledPatch(x-18, y+9, V_SNAPTOLEFT, VoteScreen.cursor[0]);
|
||||||
if (voteendtic != -1 && !(votetic % 4))
|
if (voteendtic != -1 && !(votetic % 4))
|
||||||
V_DrawFill(x-1, y-1, 42, 27, 120|V_SNAPTOLEFT);
|
V_DrawFill(x-1, y-1, 42, 27, 120|V_SNAPTOLEFT);
|
||||||
else
|
else
|
||||||
@@ -1182,7 +1182,7 @@ void Y_VoteDrawer(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
V_DrawFixedPatch((x+40)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, V_SNAPTOLEFT|V_FLIP, pic, 0);
|
V_DrawFixedPatch((x+40)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, V_SNAPTOLEFT|V_FLIP, pic, 0);
|
||||||
V_DrawFixedPatch((x+20)<<FRACBITS, (y<<FRACBITS) + (25<<(FRACBITS-1)) - rubyheight, FRACUNIT/2, V_SNAPTOLEFT, rubyicon, NULL);
|
V_DrawFixedPatch((x+20)<<FRACBITS, (y<<FRACBITS) + (25<<(FRACBITS-1)) - rubyheight, FRACUNIT/2, V_SNAPTOLEFT, VoteScreen.rubyicon, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (levelinfo[votes[i]].gts)
|
if (levelinfo[votes[i]].gts)
|
||||||
@@ -1471,10 +1471,28 @@ void Y_VoteTicker(void)
|
|||||||
//
|
//
|
||||||
// MK online style voting screen, appears after intermission
|
// MK online style voting screen, appears after intermission
|
||||||
//
|
//
|
||||||
|
|
||||||
|
static void Y_InitVoteDrawing(void)
|
||||||
|
{
|
||||||
|
if (dedicated)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// setup the background patches
|
||||||
|
Y_VoteScreenCheck();
|
||||||
|
|
||||||
|
VoteScreen.cursor[0] = W_CachePatchName("M_CURSOR", PU_PATCH);
|
||||||
|
VoteScreen.cursor[1] = W_CachePatchName("P1CURSOR", PU_PATCH);
|
||||||
|
VoteScreen.cursor[2] = W_CachePatchName("P2CURSOR", PU_PATCH);
|
||||||
|
VoteScreen.cursor[3] = W_CachePatchName("P3CURSOR", PU_PATCH);
|
||||||
|
VoteScreen.cursor[4] = W_CachePatchName("P4CURSOR", PU_PATCH);
|
||||||
|
|
||||||
|
VoteScreen.randomlvl = W_CachePatchName("RANDOMLV", PU_PATCH);
|
||||||
|
VoteScreen.rubyicon = W_CachePatchName("RUBYICON", PU_PATCH);
|
||||||
|
}
|
||||||
|
|
||||||
void Y_StartVote(void)
|
void Y_StartVote(void)
|
||||||
{
|
{
|
||||||
INT32 i = 0;
|
INT32 i = 0;
|
||||||
UINT8 prefgametype = (votelevels[0][1] & ~0x80);
|
|
||||||
|
|
||||||
votetic = -1;
|
votetic = -1;
|
||||||
|
|
||||||
@@ -1483,17 +1501,8 @@ void Y_StartVote(void)
|
|||||||
I_Error("voteendtic is dirty");
|
I_Error("voteendtic is dirty");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Y_AnimatedVoteScreenCheck();
|
// cache vote patches
|
||||||
|
Y_InitVoteDrawing();
|
||||||
widebgpatch = W_CachePatchName(((prefgametype == GT_MATCH) ? "BATTLSCW" : "INTERSCW"), PU_PATCH);
|
|
||||||
bgpatch = W_CachePatchName(((prefgametype == GT_MATCH) ? "BATTLSCR" : "INTERSCR"), PU_PATCH);
|
|
||||||
cursor = W_CachePatchName("M_CURSOR", PU_PATCH);
|
|
||||||
cursor1 = W_CachePatchName("P1CURSOR", PU_PATCH);
|
|
||||||
cursor2 = W_CachePatchName("P2CURSOR", PU_PATCH);
|
|
||||||
cursor3 = W_CachePatchName("P3CURSOR", PU_PATCH);
|
|
||||||
cursor4 = W_CachePatchName("P4CURSOR", PU_PATCH);
|
|
||||||
randomlvl = W_CachePatchName("RANDOMLV", PU_PATCH);
|
|
||||||
rubyicon = W_CachePatchName("RUBYICON", PU_PATCH);
|
|
||||||
|
|
||||||
timer = cv_votetime.value*TICRATE;
|
timer = cv_votetime.value*TICRATE;
|
||||||
pickedvote = -1;
|
pickedvote = -1;
|
||||||
@@ -1559,11 +1568,14 @@ void Y_StartVote(void)
|
|||||||
levelinfo[i].gts = NULL;
|
levelinfo[i].gts = NULL;
|
||||||
|
|
||||||
// set up the pic
|
// set up the pic
|
||||||
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(votelevels[i][0]+1)));
|
if (!dedicated)
|
||||||
if (lumpnum != LUMPERROR)
|
{
|
||||||
levelinfo[i].pic = W_CachePatchName(va("%sP", G_BuildMapName(votelevels[i][0]+1)), PU_PATCH);
|
lumpnum = W_CheckNumForName(va("%sP", G_BuildMapName(votelevels[i][0]+1)));
|
||||||
else
|
if (lumpnum != LUMPERROR)
|
||||||
levelinfo[i].pic = W_CachePatchName("BLANKLVL", PU_PATCH);
|
levelinfo[i].pic = W_CachePatchName(va("%sP", G_BuildMapName(votelevels[i][0]+1)), PU_PATCH);
|
||||||
|
else
|
||||||
|
levelinfo[i].pic = W_CachePatchName("BLANKLVL", PU_PATCH);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
voteclient.loaded = true;
|
voteclient.loaded = true;
|
||||||
@@ -1588,18 +1600,18 @@ static void Y_UnloadVoteData(void)
|
|||||||
{
|
{
|
||||||
voteclient.loaded = false;
|
voteclient.loaded = false;
|
||||||
|
|
||||||
if (rendermode != render_soft)
|
if (dedicated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
UNLOAD(widebgpatch);
|
UNLOAD(VoteScreen.widebgpatch);
|
||||||
UNLOAD(bgpatch);
|
UNLOAD(VoteScreen.bgpatch);
|
||||||
UNLOAD(cursor);
|
UNLOAD(VoteScreen.cursor[0]);
|
||||||
UNLOAD(cursor1);
|
UNLOAD(VoteScreen.cursor[1]);
|
||||||
UNLOAD(cursor2);
|
UNLOAD(VoteScreen.cursor[2]);
|
||||||
UNLOAD(cursor3);
|
UNLOAD(VoteScreen.cursor[3]);
|
||||||
UNLOAD(cursor4);
|
UNLOAD(VoteScreen.cursor[4]);
|
||||||
UNLOAD(randomlvl);
|
UNLOAD(VoteScreen.randomlvl);
|
||||||
UNLOAD(rubyicon);
|
UNLOAD(VoteScreen.rubyicon);
|
||||||
|
|
||||||
UNLOAD(levelinfo[3].pic);
|
UNLOAD(levelinfo[3].pic);
|
||||||
UNLOAD(levelinfo[2].pic);
|
UNLOAD(levelinfo[2].pic);
|
||||||
|
|||||||
+34
-1
@@ -10,7 +10,6 @@
|
|||||||
/// \brief Tally screens, or "Intermissions" as they were formally called in Doom
|
/// \brief Tally screens, or "Intermissions" as they were formally called in Doom
|
||||||
|
|
||||||
extern boolean usebuffer;
|
extern boolean usebuffer;
|
||||||
extern char *luaVoteScreen;
|
|
||||||
|
|
||||||
void Y_IntermissionDrawer(void);
|
void Y_IntermissionDrawer(void);
|
||||||
void Y_Ticker(void);
|
void Y_Ticker(void);
|
||||||
@@ -55,3 +54,37 @@ typedef enum
|
|||||||
int_classicrace, // Competition
|
int_classicrace, // Competition
|
||||||
} intertype_t;
|
} intertype_t;
|
||||||
extern intertype_t intertype;
|
extern intertype_t intertype;
|
||||||
|
|
||||||
|
// Votescreen stuff
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
boolean race; // non lua race patch replaced
|
||||||
|
boolean widerace; // non lua widescreen race patch replaced
|
||||||
|
boolean battle; // non lua battle patch replaced
|
||||||
|
boolean widebattle; // non lua widescreen battle patch replaced
|
||||||
|
} votereplace_t;
|
||||||
|
|
||||||
|
// VEXTRN - Vote (V) Extra (EXT) Race (R) Normal (N - Normal sized patch)
|
||||||
|
// VEXTRW - Vote (V) Extra (EXT) Race (R) Normal (W - Wide patch)
|
||||||
|
// VEXTBN - Vote (V) Extra (EXT) Battle (B) Normal (N - Normal sized patch)
|
||||||
|
// VEXTBW - Vote (V) Extra (EXT) Battle (B) Normal (W - Wide patch)
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char Prefix[5]; // Race = INTSX, Battle = BTLSX
|
||||||
|
char luaPrefix[5]; // prefix for lua votescreens
|
||||||
|
|
||||||
|
INT32 currentAnimFrame; // current animated background frame
|
||||||
|
|
||||||
|
INT32 foundLuaVoteFrames; // normal lua patch frames
|
||||||
|
INT32 foundLuaVoteWideFrames; // widescreen lua patch frames
|
||||||
|
|
||||||
|
votereplace_t replaced; // checks which non lua patch has been replaced
|
||||||
|
|
||||||
|
patch_t *bgpatch; // votebackground patch
|
||||||
|
patch_t *widebgpatch; // wide votebackground patch
|
||||||
|
|
||||||
|
patch_t *cursor[5]; // cursor patches
|
||||||
|
patch_t *randomlvl; // randomlevel patch
|
||||||
|
patch_t *rubyicon; // encore ruby patch
|
||||||
|
} votescreen_t;
|
||||||
|
extern votescreen_t VoteScreen;
|
||||||
+10
-63
@@ -149,12 +149,9 @@ void Z_Free(void *ptr)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ZDEBUG2
|
#ifdef ZDEBUG
|
||||||
// Write every Z_Free call to a debug file.
|
// Write every Z_Free call to a debug file.
|
||||||
CONS_Debug(DBG_MEMORY, "Z_Free at %s:%d\n", file, line);
|
CONS_Debug(DBG_MEMORY, "Z_Free at %s:%d\n", file, line);
|
||||||
#elif defined(ZDEBUG)
|
|
||||||
(void)file;
|
|
||||||
(void)line;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// anything that isn't by lua gets passed to lua just in case.
|
// anything that isn't by lua gets passed to lua just in case.
|
||||||
@@ -361,10 +358,8 @@ void *Z_ReallocAlign(void *ptr, size_t size, INT32 tag, void *user, INT32 alignb
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
#ifdef ZDEBUG
|
#ifdef ZDEBUG
|
||||||
#ifdef ZDEBUG2
|
|
||||||
// Write every Z_Realloc call to a debug file.
|
// Write every Z_Realloc call to a debug file.
|
||||||
DEBFILE(va("Z_Realloc at %s:%d\n", file, line));
|
DEBFILE(va("Z_Realloc at %s:%d\n", file, line));
|
||||||
#endif
|
|
||||||
rez = Z_Malloc2(size, tag, user, alignbits, file, line);
|
rez = Z_Malloc2(size, tag, user, alignbits, file, line);
|
||||||
#else
|
#else
|
||||||
rez = Z_MallocAlign(size, tag, user, alignbits);
|
rez = Z_MallocAlign(size, tag, user, alignbits);
|
||||||
@@ -399,19 +394,11 @@ void *Z_ReallocAlign(void *ptr, size_t size, INT32 tag, void *user, INT32 alignb
|
|||||||
* \param lowtag The lowest tag to consider.
|
* \param lowtag The lowest tag to consider.
|
||||||
* \param hightag The highest tag to consider.
|
* \param hightag The highest tag to consider.
|
||||||
*/
|
*/
|
||||||
#ifdef ZDEBUG
|
|
||||||
void Z_FreeTags2(INT32 lowtag, INT32 hightag, const char *file, INT32 line)
|
|
||||||
#else
|
|
||||||
void Z_FreeTags(INT32 lowtag, INT32 hightag)
|
void Z_FreeTags(INT32 lowtag, INT32 hightag)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
memblock_t *block, *next;
|
memblock_t *block, *next;
|
||||||
|
|
||||||
#ifdef ZDEBUG
|
|
||||||
Z_CheckHeap2(file, line);
|
|
||||||
#else
|
|
||||||
Z_CheckHeap(420);
|
Z_CheckHeap(420);
|
||||||
#endif
|
|
||||||
for (block = head.next; block != &head; block = next)
|
for (block = head.next; block != &head; block = next)
|
||||||
{
|
{
|
||||||
next = block->next; // get link before freeing
|
next = block->next; // get link before freeing
|
||||||
@@ -481,20 +468,12 @@ void Z_CheckMemCleanup(void)
|
|||||||
* \param i Identifies from where in the code Z_CheckHeap was called.
|
* \param i Identifies from where in the code Z_CheckHeap was called.
|
||||||
* \author Graue <graue@oceanbase.org>
|
* \author Graue <graue@oceanbase.org>
|
||||||
*/
|
*/
|
||||||
#ifdef ZDEBUG
|
void Z_CheckHeap(INT32 i)
|
||||||
void Z_CheckHeap2(const char *file, INT32 line)
|
|
||||||
#else
|
|
||||||
void Z_CheckHeap(INT32 tag)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
memblock_t *block;
|
memblock_t *block;
|
||||||
UINT32 blocknumon = 0;
|
UINT32 blocknumon = 0;
|
||||||
void *given;
|
void *given;
|
||||||
|
|
||||||
#ifndef ZDEBUG
|
|
||||||
(void)tag;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (block = head.next; block != &head; block = block->next)
|
for (block = head.next; block != &head; block = block->next)
|
||||||
{
|
{
|
||||||
blocknumon++;
|
blocknumon++;
|
||||||
@@ -519,19 +498,11 @@ void Z_CheckHeap(INT32 tag)
|
|||||||
#endif
|
#endif
|
||||||
if (block->user != NULL && *(block->user) != given)
|
if (block->user != NULL && *(block->user) != given)
|
||||||
{
|
{
|
||||||
I_Error("Z_CheckHeap"
|
I_Error("Z_CheckHeap %d: block %u"
|
||||||
#ifdef ZDEBUG
|
|
||||||
"at %s %d :"
|
|
||||||
#endif
|
|
||||||
"block %u"
|
|
||||||
#ifdef ZDEBUG
|
#ifdef ZDEBUG
|
||||||
"(owned by %s:%d)"
|
"(owned by %s:%d)"
|
||||||
#endif
|
#endif
|
||||||
" doesn't have a proper user"
|
" doesn't have a proper user", i, blocknumon
|
||||||
#ifdef ZDEBUG
|
|
||||||
, file, line
|
|
||||||
#endif
|
|
||||||
, blocknumon
|
|
||||||
#ifdef ZDEBUG
|
#ifdef ZDEBUG
|
||||||
, block->ownerfile, block->ownerline
|
, block->ownerfile, block->ownerline
|
||||||
#endif
|
#endif
|
||||||
@@ -539,19 +510,11 @@ void Z_CheckHeap(INT32 tag)
|
|||||||
}
|
}
|
||||||
if (block->next->prev != block)
|
if (block->next->prev != block)
|
||||||
{
|
{
|
||||||
I_Error("Z_CheckHeap"
|
I_Error("Z_CheckHeap %d: block %u"
|
||||||
#ifdef ZDEBUG
|
|
||||||
"at %s %d :"
|
|
||||||
#endif
|
|
||||||
"block %u"
|
|
||||||
#ifdef ZDEBUG
|
#ifdef ZDEBUG
|
||||||
"(owned by %s:%d)"
|
"(owned by %s:%d)"
|
||||||
#endif
|
#endif
|
||||||
" lacks proper backlink"
|
" lacks proper backlink", i, blocknumon
|
||||||
#ifdef ZDEBUG
|
|
||||||
, file, line
|
|
||||||
#endif
|
|
||||||
, blocknumon
|
|
||||||
#ifdef ZDEBUG
|
#ifdef ZDEBUG
|
||||||
, block->ownerfile, block->ownerline
|
, block->ownerfile, block->ownerline
|
||||||
#endif
|
#endif
|
||||||
@@ -559,19 +522,11 @@ void Z_CheckHeap(INT32 tag)
|
|||||||
}
|
}
|
||||||
if (block->prev->next != block)
|
if (block->prev->next != block)
|
||||||
{
|
{
|
||||||
I_Error("Z_CheckHeap"
|
I_Error("Z_CheckHeap %d: block %u"
|
||||||
#ifdef ZDEBUG
|
|
||||||
"at %s %d :"
|
|
||||||
#endif
|
|
||||||
"block %u"
|
|
||||||
#ifdef ZDEBUG
|
#ifdef ZDEBUG
|
||||||
"(owned by %s:%d)"
|
"(owned by %s:%d)"
|
||||||
#endif
|
#endif
|
||||||
" lacks proper forward link"
|
" lacks proper forward link", i, blocknumon
|
||||||
#ifdef ZDEBUG
|
|
||||||
, file, line
|
|
||||||
#endif
|
|
||||||
, blocknumon
|
|
||||||
#ifdef ZDEBUG
|
#ifdef ZDEBUG
|
||||||
, block->ownerfile, block->ownerline
|
, block->ownerfile, block->ownerline
|
||||||
#endif
|
#endif
|
||||||
@@ -579,19 +534,11 @@ void Z_CheckHeap(INT32 tag)
|
|||||||
}
|
}
|
||||||
if (block->id != ZONEID)
|
if (block->id != ZONEID)
|
||||||
{
|
{
|
||||||
I_Error("Z_CheckHeap"
|
I_Error("Z_CheckHeap %d: block %u"
|
||||||
#ifdef ZDEBUG
|
|
||||||
"at %s %d :"
|
|
||||||
#endif
|
|
||||||
"block %u"
|
|
||||||
#ifdef ZDEBUG
|
#ifdef ZDEBUG
|
||||||
"(owned by %s:%d)"
|
"(owned by %s:%d)"
|
||||||
#endif
|
#endif
|
||||||
" have the wrong ID"
|
" have the wrong ID", i, blocknumon
|
||||||
#ifdef ZDEBUG
|
|
||||||
, file, line
|
|
||||||
#endif
|
|
||||||
, blocknumon
|
|
||||||
#ifdef ZDEBUG
|
#ifdef ZDEBUG
|
||||||
, block->ownerfile, block->ownerline
|
, block->ownerfile, block->ownerline
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+2
-14
@@ -28,7 +28,7 @@
|
|||||||
#define FUNCALLOC(x)
|
#define FUNCALLOC(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ZDEBUG
|
//#define ZDEBUG
|
||||||
|
|
||||||
//
|
//
|
||||||
// Purge tags
|
// Purge tags
|
||||||
@@ -110,14 +110,8 @@ void *Z_ReallocAlign(void *ptr, size_t size, INT32 tag, void *user, INT32 alignb
|
|||||||
// Free all memory by tag
|
// Free all memory by tag
|
||||||
// these don't give line numbers for ZDEBUG currently though
|
// these don't give line numbers for ZDEBUG currently though
|
||||||
// (perhaps this should be changed in future?)
|
// (perhaps this should be changed in future?)
|
||||||
#ifdef ZDEBUG
|
|
||||||
#define Z_FreeTag(tagnum) Z_FreeTags2(tagnum, tagnum, __FILE__, __LINE__)
|
|
||||||
#define Z_FreeTags(tagnum, tagnum2) Z_FreeTags2(tagnum, tagnum2, __FILE__, __LINE__)
|
|
||||||
void Z_FreeTags2(INT32 lowtag, INT32 hightag, const char *file, INT32 line);
|
|
||||||
#else
|
|
||||||
#define Z_FreeTag(tagnum) Z_FreeTags(tagnum, tagnum)
|
#define Z_FreeTag(tagnum) Z_FreeTags(tagnum, tagnum)
|
||||||
void Z_FreeTags(INT32 lowtag, INT32 hightag);
|
void Z_FreeTags(INT32 lowtag, INT32 hightag);
|
||||||
#endif
|
|
||||||
|
|
||||||
// Iterate memory by tag
|
// Iterate memory by tag
|
||||||
#define Z_IterateTag(tagnum, func) Z_IterateTags(tagnum, tagnum, func)
|
#define Z_IterateTag(tagnum, func) Z_IterateTags(tagnum, tagnum, func)
|
||||||
@@ -127,13 +121,7 @@ void Z_IterateTags(INT32 lowtag, INT32 hightag, boolean (*iterfunc)(void *));
|
|||||||
// Utility functions
|
// Utility functions
|
||||||
//
|
//
|
||||||
void Z_CheckMemCleanup(void);
|
void Z_CheckMemCleanup(void);
|
||||||
|
void Z_CheckHeap(INT32 i);
|
||||||
#ifdef ZDEBUG
|
|
||||||
#define Z_CheckHeap(tag) Z_CheckHeap2(__FILE__, __LINE__)
|
|
||||||
void Z_CheckHeap2(const char *file, INT32 line);
|
|
||||||
#else
|
|
||||||
void Z_CheckHeap(INT32 tag);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Zone memory modification
|
// Zone memory modification
|
||||||
|
|||||||
Reference in new issue
Block a user