whitespace cleanup

This commit is contained in:
Alam Ed Arias 2025-01-21 23:26:47 -05:00
parent 62e8da196d
commit 4258e898ff
38 changed files with 110 additions and 116 deletions

View file

@ -41,7 +41,7 @@ linetagindicatesectors = true;
// The format interface handles the map data format - DoomMapSetIO for SRB2DB2, SRB2MapSetIO for Zone Builder // The format interface handles the map data format - DoomMapSetIO for SRB2DB2, SRB2MapSetIO for Zone Builder
formatinterface = "SRB2MapSetIO"; formatinterface = "SRB2MapSetIO";
//Maximum safe map size check (0 means skip check) //Maximum safe map size check (0 means skip check)
safeboundary = 0; safeboundary = 0;
@ -502,7 +502,7 @@ gen_sectortypes
{ {
0 = "Normal"; 0 = "Normal";
512 = "Wind/Current <deprecated>"; 512 = "Wind/Current <deprecated>";
1024 = "Conveyor Belt <deprecated>"; 1024 = "Conveyor Belt <deprecated>";
1280 = "Speed Pad"; 1280 = "Speed Pad";
1536 = "Flip Gravity on Jump"; 1536 = "Flip Gravity on Jump";
} }
@ -3730,7 +3730,7 @@ thingtypes
3328 = "3D Mode Start"; 3328 = "3D Mode Start";
} }
starts starts
{ {
color = 1; // Blue color = 1; // Blue

View file

@ -96,7 +96,7 @@ mapformat_udmf
{ {
include("SRB222_misc.cfg", "universalfields"); include("SRB222_misc.cfg", "universalfields");
} }
// Disable Doom-related modes that don't make sense for SRB2 // Disable Doom-related modes that don't make sense for SRB2
soundsupport = false; soundsupport = false;
automapsupport = false; automapsupport = false;
@ -195,4 +195,4 @@ mapformat_udmf
{ {
include("SRB222_linedefs.cfg", "udmf"); include("SRB222_linedefs.cfg", "udmf");
} }
} }

View file

@ -8,7 +8,7 @@ udmf
{ {
title = "None"; title = "None";
} }
6 6
{ {
title = "Sector Set Portal"; title = "Sector Set Portal";
@ -897,7 +897,7 @@ udmf
} }
} }
} }
190 190
{ {
title = "Rising"; title = "Rising";

View file

@ -240,7 +240,7 @@ universalfields
type = 1; type = 1;
default = 1.0; default = 1.0;
} }
comment comment
{ {
type = 2; type = 2;
@ -252,19 +252,19 @@ universalfields
type = 2; type = 2;
default = ""; default = "";
} }
stringarg0 stringarg0
{ {
type = 2; type = 2;
default = ""; default = "";
} }
stringarg1 stringarg1
{ {
type = 2; type = 2;
default = ""; default = "";
} }
executordelay executordelay
{ {
type = 0; type = 0;
@ -279,19 +279,19 @@ universalfields
type = 2; type = 2;
default = ""; default = "";
} }
light light
{ {
type = 0; type = 0;
default = 0; default = 0;
} }
lightabsolute lightabsolute
{ {
type = 3; type = 3;
default = false; default = false;
} }
//light_top //light_top
//{ //{
// type = 0; // type = 0;
@ -326,8 +326,8 @@ universalfields
//{ //{
// type = 3; // type = 3;
// default = false; // default = false;
//} //}
offsetx_bottom offsetx_bottom
{ {
type = 1; type = 1;
@ -339,7 +339,7 @@ universalfields
type = 1; type = 1;
default = 0.0; default = 0.0;
} }
offsetx_top offsetx_top
{ {
type = 1; type = 1;
@ -357,43 +357,43 @@ universalfields
type = 1; type = 1;
default = 0.0; default = 0.0;
} }
offsety_top offsety_top
{ {
type = 1; type = 1;
default = 0.0; default = 0.0;
} }
scalex_bottom scalex_bottom
{ {
type = 1; type = 1;
default = 1.0; default = 1.0;
} }
scalex_mid scalex_mid
{ {
type = 1; type = 1;
default = 1.0; default = 1.0;
} }
scalex_top scalex_top
{ {
type = 1; type = 1;
default = 1.0; default = 1.0;
} }
scaley_bottom scaley_bottom
{ {
type = 1; type = 1;
default = 1.0; default = 1.0;
} }
scaley_mid scaley_mid
{ {
type = 1; type = 1;
default = 1.0; default = 1.0;
} }
scaley_top scaley_top
{ {
type = 1; type = 1;
@ -408,41 +408,41 @@ universalfields
type = 2; type = 2;
default = ""; default = "";
} }
pitch pitch
{ {
type = 0; type = 0;
} }
roll roll
{ {
type = 0; type = 0;
} }
scalex scalex
{ {
type = 1; type = 1;
default = 1.0; default = 1.0;
} }
scaley scaley
{ {
type = 1; type = 1;
default = 1.0; default = 1.0;
} }
stringarg0 stringarg0
{ {
type = 2; type = 2;
default = ""; default = "";
} }
stringarg1 stringarg1
{ {
type = 2; type = 2;
default = ""; default = "";
} }
mobjscale mobjscale
{ {
type = 1; type = 1;
@ -450,7 +450,7 @@ universalfields
managed = false; managed = false;
} }
} }
sector sector
{ {
comment comment
@ -530,7 +530,7 @@ universalfields
type = 1; type = 1;
default = 1.0; default = 1.0;
} }
yscalefloor yscalefloor
{ {
type = 1; type = 1;
@ -542,7 +542,7 @@ universalfields
type = 0; type = 0;
default = 0; default = 0;
} }
lightfloorabsolute lightfloorabsolute
{ {
type = 3; type = 3;
@ -572,7 +572,7 @@ universalfields
type = 1; type = 1;
default = 1.0; default = 1.0;
} }
yscaleceiling yscaleceiling
{ {
type = 1; type = 1;
@ -584,7 +584,7 @@ universalfields
type = 0; type = 0;
default = 0; default = 0;
} }
lightceilingabsolute lightceilingabsolute
{ {
type = 3; type = 3;

View file

@ -1127,12 +1127,12 @@ udmf
} }
} }
} }
bossinvisibles bossinvisibles
{ {
title = "Misc. Invisible"; title = "Misc. Invisible";
color = 15; // White color = 15; // White
290 290
{ {
arrow = 0; arrow = 0;
@ -2021,7 +2021,7 @@ udmf
} }
} }
} }
hazards hazards
{ {
color = 17; // Orange color = 17; // Orange
@ -2983,7 +2983,7 @@ udmf
{ {
title = "Mace Spawnpoints"; title = "Mace Spawnpoints";
color = 11; color = 11;
1104 1104
{ {
title = "Mace Spawn"; title = "Mace Spawn";
@ -3188,7 +3188,7 @@ udmf
title = "Flags"; title = "Flags";
type = 12; type = 12;
enum = "maceflags"; enum = "maceflags";
} }
} }
1108 1108
@ -3320,7 +3320,7 @@ udmf
} }
} }
} }
1100 1100
{ {
title = "Chain (Decorative)"; title = "Chain (Decorative)";
@ -3570,12 +3570,12 @@ udmf
color = 2; // Green color = 2; // Green
title = "Arid Canyon"; title = "Arid Canyon";
cacti cacti
{ {
title = "Cacti"; title = "Cacti";
color = 17; color = 17;
1203 1203
{ {
title = "Tiny Red Flower Cactus"; title = "Tiny Red Flower Cactus";
@ -3654,12 +3654,12 @@ udmf
height = 60; height = 60;
} }
} }
minecarts minecarts
{ {
title = "Minecart"; title = "Minecart";
color = 11; color = 11;
1219 1219
{ {
title = "Minecart Spawner"; title = "Minecart Spawner";
@ -3706,7 +3706,7 @@ udmf
} }
} }
} }
1200 1200
{ {
title = "Tumbleweed (Big)"; title = "Tumbleweed (Big)";
@ -4611,7 +4611,7 @@ udmf
title = "Botanic Serenity"; title = "Botanic Serenity";
width = 16; width = 16;
height = 32; height = 32;
flowers flowers
{ {
title = "Flowers"; title = "Flowers";
@ -4706,7 +4706,7 @@ udmf
sprite = "BSZ3F0"; sprite = "BSZ3F0";
} }
} }
tulips tulips
{ {
title = "Tulips"; title = "Tulips";
@ -4771,7 +4771,7 @@ udmf
sprite = "BSZ5F0"; sprite = "BSZ5F0";
} }
} }
bushes bushes
{ {
title = "Bushes"; title = "Bushes";
@ -4806,7 +4806,7 @@ udmf
sprite = "BSZ6F0"; sprite = "BSZ6F0";
} }
} }
vines vines
{ {
title = "Vines"; title = "Vines";
@ -5063,7 +5063,7 @@ udmf
} }
} }
} }
mario mario
{ {
color = 2; // Green color = 2; // Green
@ -5574,7 +5574,7 @@ udmf
} }
} }
} }
editor editor
{ {
color = 15; // White color = 15; // White
@ -5587,4 +5587,4 @@ udmf
3328 = "3D Mode Start"; 3328 = "3D Mode Start";
} }
} }

View file

@ -41,7 +41,7 @@ linetagindicatesectors = true;
// The format interface handles the map data format - DoomMapSetIO for SRB2DB2, SRB2MapSetIO for Zone Builder // The format interface handles the map data format - DoomMapSetIO for SRB2DB2, SRB2MapSetIO for Zone Builder
formatinterface = "DoomMapSetIO"; formatinterface = "DoomMapSetIO";
//Maximum safe map size check (0 means skip check) //Maximum safe map size check (0 means skip check)
safeboundary = 0; safeboundary = 0;
@ -502,7 +502,7 @@ gen_sectortypes
{ {
0 = "Normal"; 0 = "Normal";
512 = "Wind/Current <deprecated>"; 512 = "Wind/Current <deprecated>";
1024 = "Conveyor Belt <deprecated>"; 1024 = "Conveyor Belt <deprecated>";
1280 = "Speed Pad"; 1280 = "Speed Pad";
1536 = "Flip Gravity on Jump"; 1536 = "Flip Gravity on Jump";
} }
@ -3636,7 +3636,7 @@ thingtypes
3328 = "3D Mode Start"; 3328 = "3D Mode Start";
} }
starts starts
{ {
color = 1; // Blue color = 1; // Blue

View file

@ -705,7 +705,7 @@ static void add_alias(char *newname, char *newcmd)
{ {
if (!stricmp(newname, a->name)) if (!stricmp(newname, a->name))
{ {
Z_Free(a->value); // Free old cmd Z_Free(a->value); // Free old cmd
a->value = newcmd; a->value = newcmd;
return; return;
} }

View file

@ -158,7 +158,7 @@ typedef enum
PF_FORCESTRAFE = 1<<28, // Turning inputs are translated into strafing inputs PF_FORCESTRAFE = 1<<28, // Turning inputs are translated into strafing inputs
PF_CANCARRY = 1<<29, // Can carry another player? PF_CANCARRY = 1<<29, // Can carry another player?
PF_FINISHED = 1<<30, // The player finished the level. NOT the same as exiting PF_FINISHED = 1<<30, // The player finished the level. NOT the same as exiting
// True if shield button down last tic // True if shield button down last tic
// This may be the final flag, but 2.3 could free up the others // This may be the final flag, but 2.3 could free up the others
PF_SHIELDDOWN = 1<<31, PF_SHIELDDOWN = 1<<31,

View file

@ -28,7 +28,7 @@ typedef enum
{ {
// First 3 bits are weapon change info, DO NOT USE! // First 3 bits are weapon change info, DO NOT USE!
BT_WEAPONMASK = 0x07, //our first three bits. BT_WEAPONMASK = 0x07, //our first three bits.
BT_SHIELD = 1<<3, // shield or super action BT_SHIELD = 1<<3, // shield or super action
BT_WEAPONNEXT = 1<<4, // select next weapon BT_WEAPONNEXT = 1<<4, // select next weapon
@ -41,7 +41,7 @@ typedef enum
BT_TOSSFLAG = 1<<10, // toss flag or emeralds BT_TOSSFLAG = 1<<10, // toss flag or emeralds
BT_JUMP = 1<<11, // jump action BT_JUMP = 1<<11, // jump action
BT_FIRENORMAL = 1<<12, // fire a normal ring no matter what BT_FIRENORMAL = 1<<12, // fire a normal ring no matter what
// custom lua buttons // custom lua buttons
BT_CUSTOM1 = 1<<13, BT_CUSTOM1 = 1<<13,
BT_CUSTOM2 = 1<<14, BT_CUSTOM2 = 1<<14,

View file

@ -1573,4 +1573,3 @@ boolean I_GetTextInputMode(void)
} }
#include "../sdl/dosstr.c" #include "../sdl/dosstr.c"

View file

@ -1,4 +1,4 @@
#include "../doomdef.h" #include "../doomdef.h"
#include "../command.h" #include "../command.h"
#include "../i_video.h" #include "../i_video.h"
@ -76,4 +76,3 @@ void I_ReadScreen(UINT8 *scr)
void I_BeginRead(void){} void I_BeginRead(void){}
void I_EndRead(void){} void I_EndRead(void){}

View file

@ -3371,7 +3371,7 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
"S_SPEEDWINGS", "S_SPEEDWINGS",
"S_SPEEDWINGSD", "S_SPEEDWINGSD",
"S_PARTICLEPICKUP1", "S_PARTICLEPICKUP1",
"S_PARTICLEPICKUP2", "S_PARTICLEPICKUP2",
"S_1000SCOREAWARD", "S_1000SCOREAWARD",

View file

@ -698,7 +698,7 @@ static void initdirpath(char *dirpath, size_t *dirpathindex, int depthleft)
dirpathindex[depthleft]--; dirpathindex[depthleft]--;
} }
//sortdir by name? //sortdir by name?
static int lumpnamecompare(const void *A, const void *B) static int lumpnamecompare(const void *A, const void *B)
{ {
const lumpinfo_t *pA = A; const lumpinfo_t *pA = A;

View file

@ -2491,16 +2491,16 @@ static void HWR_Subsector(size_t num)
rover; rover = rover->next) rover; rover = rover->next)
{ {
fixed_t bottomCullHeight, topCullHeight, centerHeight; fixed_t bottomCullHeight, topCullHeight, centerHeight;
if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES)) if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES))
continue; continue;
if (sub->validcount == validcount) if (sub->validcount == validcount)
continue; continue;
// rendering heights for bottom and top planes // rendering heights for bottom and top planes
bottomCullHeight = P_GetFFloorBottomZAt(rover, viewx, viewy); bottomCullHeight = P_GetFFloorBottomZAt(rover, viewx, viewy);
topCullHeight = P_GetFFloorTopZAt(rover, viewx, viewy); topCullHeight = P_GetFFloorTopZAt(rover, viewx, viewy);
if (gl_frontsector->cullheight) if (gl_frontsector->cullheight)
{ {
if (HWR_DoCulling(gl_frontsector->cullheight, viewsector->cullheight, gl_viewz, FIXED_TO_FLOAT(*rover->bottomheight), FIXED_TO_FLOAT(*rover->topheight))) if (HWR_DoCulling(gl_frontsector->cullheight, viewsector->cullheight, gl_viewz, FIXED_TO_FLOAT(*rover->bottomheight), FIXED_TO_FLOAT(*rover->topheight)))
@ -3105,7 +3105,7 @@ static void HWR_SplitSprite(gl_vissprite_t *spr)
// baseWallVerts is used to know the final shape to easily get the vertex // baseWallVerts is used to know the final shape to easily get the vertex
// co-ordinates // co-ordinates
memcpy(wallVerts, baseWallVerts, sizeof(baseWallVerts)); memcpy(wallVerts, baseWallVerts, sizeof(baseWallVerts));
fixed_t newalpha = spr->mobj->alpha; fixed_t newalpha = spr->mobj->alpha;
// if sprite has linkdraw, then dont write to z-buffer (by not using PF_Occlude) // if sprite has linkdraw, then dont write to z-buffer (by not using PF_Occlude)
@ -3150,7 +3150,7 @@ static void HWR_SplitSprite(gl_vissprite_t *spr)
blend = HWR_GetBlendModeFlag(blendmode)|occlusion; blend = HWR_GetBlendModeFlag(blendmode)|occlusion;
if (!occlusion) use_linkdraw_hack = true; if (!occlusion) use_linkdraw_hack = true;
} }
Surf.PolyColor.s.alpha = FixedMul(newalpha, Surf.PolyColor.s.alpha); Surf.PolyColor.s.alpha = FixedMul(newalpha, Surf.PolyColor.s.alpha);
if (HWR_UseShader()) if (HWR_UseShader())
@ -3349,7 +3349,7 @@ static void HWR_DrawBoundingBox(gl_vissprite_t *vis)
v[15].y = v[16].y = v[17].y = v[21].y = v[22].y = v[23].y = vis->gzt; // top v[15].y = v[16].y = v[17].y = v[21].y = v[22].y = v[23].y = vis->gzt; // top
Surf.PolyColor = V_GetColor(R_GetBoundingBoxColor(vis->mobj)); Surf.PolyColor = V_GetColor(R_GetBoundingBoxColor(vis->mobj));
HWR_ProcessPolygon(&Surf, v, 24, (cv_renderhitboxgldepth.value ? 0 : PF_NoDepthTest)|PF_Modulated|PF_NoTexture|PF_WireFrame, SHADER_NONE, false); HWR_ProcessPolygon(&Surf, v, 24, (cv_renderhitboxgldepth.value ? 0 : PF_NoDepthTest)|PF_Modulated|PF_NoTexture|PF_WireFrame, SHADER_NONE, false);
} }
@ -3645,7 +3645,7 @@ static void HWR_DrawSprite(gl_vissprite_t *spr)
blend = HWR_GetBlendModeFlag(blendmode)|occlusion; blend = HWR_GetBlendModeFlag(blendmode)|occlusion;
if (!occlusion) use_linkdraw_hack = true; if (!occlusion) use_linkdraw_hack = true;
} }
Surf.PolyColor.s.alpha = FixedMul(newalpha, Surf.PolyColor.s.alpha); Surf.PolyColor.s.alpha = FixedMul(newalpha, Surf.PolyColor.s.alpha);
if (spr->renderflags & RF_SHADOWEFFECTS) if (spr->renderflags & RF_SHADOWEFFECTS)

View file

@ -1373,7 +1373,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
// Apparently people don't like jump frames like that, so back it goes // Apparently people don't like jump frames like that, so back it goes
if (tics > durs) if (tics > durs)
durs = tics; durs = tics;
// Make linkdraw objects use their tracer's alpha value // Make linkdraw objects use their tracer's alpha value
fixed_t newalpha = spr->mobj->alpha; fixed_t newalpha = spr->mobj->alpha;
if ((spr->mobj->flags2 & MF2_LINKDRAW) && spr->mobj->tracer) if ((spr->mobj->flags2 & MF2_LINKDRAW) && spr->mobj->tracer)
@ -1392,7 +1392,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
Surf.PolyColor.s.alpha = (spr->mobj->flags2 & MF2_SHADOW) ? 0x40 : 0xff; Surf.PolyColor.s.alpha = (spr->mobj->flags2 & MF2_SHADOW) ? 0x40 : 0xff;
Surf.PolyFlags = HWR_GetBlendModeFlag(blendmode); Surf.PolyFlags = HWR_GetBlendModeFlag(blendmode);
} }
Surf.PolyColor.s.alpha = FixedMul(newalpha, Surf.PolyColor.s.alpha); Surf.PolyColor.s.alpha = FixedMul(newalpha, Surf.PolyColor.s.alpha);
// don't forget to enable the depth test because we can't do this // don't forget to enable the depth test because we can't do this

View file

@ -713,7 +713,7 @@ EXPORT boolean HWRAPI(InitShaders) (void)
#ifdef GL_SHADERS #ifdef GL_SHADERS
if (!pglUseProgram) if (!pglUseProgram)
return false; return false;
gl_fallback_shader.vertex_shader = Z_StrDup(GLSL_FALLBACK_VERTEX_SHADER); gl_fallback_shader.vertex_shader = Z_StrDup(GLSL_FALLBACK_VERTEX_SHADER);
gl_fallback_shader.fragment_shader = Z_StrDup(GLSL_FALLBACK_FRAGMENT_SHADER); gl_fallback_shader.fragment_shader = Z_StrDup(GLSL_FALLBACK_FRAGMENT_SHADER);

View file

@ -1289,7 +1289,7 @@ static void HU_drawMiniChat(void)
V_DrawChatCharacter(x + dx + 2, y+dy, msg[j] |V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_MONOSPACE|transflag, true, colormap); V_DrawChatCharacter(x + dx + 2, y+dy, msg[j] |V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_MONOSPACE|transflag, true, colormap);
dx += charwidth; dx += charwidth;
if (dx >= boxw-charwidth-2) if (dx >= boxw-charwidth-2)
{ {
dx = 0; dx = 0;
@ -1540,9 +1540,9 @@ static void HU_DrawChat(void)
else if ((n == 1) && !(w_chat[3] == '0') && (!((i == 1) || ((i >= 10) && (i <= 19))))) else if ((n == 1) && !(w_chat[3] == '0') && (!((i == 1) || ((i >= 10) && (i <= 19)))))
continue; continue;
else if ((n == 2) && !(w_chat[3] == '0') && (!((i == 2) || ((i >= 20) && (i <= 29))))) else if ((n == 2) && !(w_chat[3] == '0') && (!((i == 2) || ((i >= 20) && (i <= 29)))))
continue; continue;
else if ((n == 3) && !(w_chat[3] == '0') && (!((i == 3) || ((i >= 30) && (i <= 31))))) else if ((n == 3) && !(w_chat[3] == '0') && (!((i == 3) || ((i >= 30) && (i <= 31)))))
continue; continue;
else // general case. else // general case.
if (i != n) continue; if (i != n) continue;
} }

View file

@ -3395,7 +3395,7 @@ state_t states[NUMSTATES] =
{SPR_MSWB, 3, 1, {NULL}, 0, 0, S_HORIZBLUETRAMPOLINE4, 0}, // S_HORIZBLUETRAMPOLINE3 {SPR_MSWB, 3, 1, {NULL}, 0, 0, S_HORIZBLUETRAMPOLINE4, 0}, // S_HORIZBLUETRAMPOLINE3
{SPR_MSWB, 2, 1, {NULL}, 0, 0, S_HORIZBLUETRAMPOLINE5, 0}, // S_HORIZBLUETRAMPOLINE4 {SPR_MSWB, 2, 1, {NULL}, 0, 0, S_HORIZBLUETRAMPOLINE5, 0}, // S_HORIZBLUETRAMPOLINE4
{SPR_MSWB, 1, 1, {NULL}, 0, 0, S_HORIZBLUETRAMPOLINE, 0}, // S_HORIZBLUETRAMPOLINE5 {SPR_MSWB, 1, 1, {NULL}, 0, 0, S_HORIZBLUETRAMPOLINE, 0}, // S_HORIZBLUETRAMPOLINE5
// Yellow diagonal trampoline // Yellow diagonal trampoline
{SPR_MDIY, 0, -1, {NULL}, 0, 0, S_NULL, 0}, // S_DIAGYELLOWTRAMPOLINE {SPR_MDIY, 0, -1, {NULL}, 0, 0, S_NULL, 0}, // S_DIAGYELLOWTRAMPOLINE
{SPR_MDIY, 4, 4, {A_Pain}, 0, 0, S_DIAGYELLOWTRAMPOLINE3, 0}, // S_DIAGYELLOWTRAMPOLINE2 {SPR_MDIY, 4, 4, {A_Pain}, 0, 0, S_DIAGYELLOWTRAMPOLINE3, 0}, // S_DIAGYELLOWTRAMPOLINE2

View file

@ -4231,7 +4231,7 @@ typedef enum state
S_SPEEDWINGS, S_SPEEDWINGS,
S_SPEEDWINGSD, S_SPEEDWINGSD,
S_PARTICLEPICKUP1, S_PARTICLEPICKUP1,
S_PARTICLEPICKUP2, S_PARTICLEPICKUP2,
S_1000SCOREAWARD, S_1000SCOREAWARD,

View file

@ -1987,7 +1987,7 @@ static int lib_pLineIsBlocking(lua_State *L)
return LUA_ErrInvalid(L, "mobj_t"); return LUA_ErrInvalid(L, "mobj_t");
if (!line) if (!line)
return LUA_ErrInvalid(L, "line_t"); return LUA_ErrInvalid(L, "line_t");
// P_LineOpening in P_LineIsBlocking sets these variables. // P_LineOpening in P_LineIsBlocking sets these variables.
// We want to keep their old values after so that whatever // We want to keep their old values after so that whatever
// map collision code uses them doesn't get messed up. // map collision code uses them doesn't get messed up.
@ -2000,9 +2000,9 @@ static int lib_pLineIsBlocking(lua_State *L)
pslope_t *oldopenbottomslope = openbottomslope; pslope_t *oldopenbottomslope = openbottomslope;
ffloor_t *oldopenfloorrover = openfloorrover; ffloor_t *oldopenfloorrover = openfloorrover;
ffloor_t *oldopenceilingrover = openceilingrover; ffloor_t *oldopenceilingrover = openceilingrover;
lua_pushboolean(L, P_LineIsBlocking(mo, line)); lua_pushboolean(L, P_LineIsBlocking(mo, line));
opentop = oldopentop; opentop = oldopentop;
openbottom = oldopenbottom; openbottom = oldopenbottom;
openrange = oldopenrange; openrange = oldopenrange;
@ -2012,7 +2012,7 @@ static int lib_pLineIsBlocking(lua_State *L)
openbottomslope = oldopenbottomslope; openbottomslope = oldopenbottomslope;
openfloorrover = oldopenfloorrover; openfloorrover = oldopenfloorrover;
openceilingrover = oldopenceilingrover; openceilingrover = oldopenceilingrover;
return 1; return 1;
} }

View file

@ -475,7 +475,7 @@ UINT8 M_MapLocked(INT32 mapnum, gamedata_t *data)
// that's better than making dedicated server's lives hell. // that's better than making dedicated server's lives hell.
return false; return false;
} }
if (cv_debug || devparm) if (cv_debug || devparm)
return false; // Unlock every level when in devmode. return false; // Unlock every level when in devmode.

View file

@ -193,9 +193,9 @@ INT32 M_RandomKey(INT32 a)
*/ */
INT32 M_RandomRange(INT32 a, INT32 b) INT32 M_RandomRange(INT32 a, INT32 b)
{ {
if (b < a) if (b < a)
{ {
INT32 temp; INT32 temp;
temp = a; temp = a;
a = b; a = b;

View file

@ -3922,7 +3922,7 @@ static void P_DoBoss5Death(mobj_t *mo)
pole->angle = mo->tracer->angle; pole->angle = mo->tracer->angle;
pole->momx = P_ReturnThrustX(pole, pole->angle, speed); pole->momx = P_ReturnThrustX(pole, pole->angle, speed);
pole->momy = P_ReturnThrustY(pole, pole->angle, speed); pole->momy = P_ReturnThrustY(pole, pole->angle, speed);
P_SetTarget(&pole->tracer, P_SpawnMobj( P_SetTarget(&pole->tracer, P_SpawnMobj(
pole->x, pole->y, pole->x, pole->y,
pole->z - 256*FRACUNIT, pole->z - 256*FRACUNIT,
@ -8333,7 +8333,7 @@ void A_Shockwave(mobj_t *actor)
ang += interval; ang += interval;
sprev = shock; sprev = shock;
} }
S_StartSound(actor, shock->info->seesound); S_StartSound(actor, shock->info->seesound);
} }

View file

@ -538,14 +538,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if ((P_MobjFlip(toucher)*toucher->momz < 0) && (elementalpierce != 1) && (!(player->powers[pw_strong] & STR_HEAVY))) if ((P_MobjFlip(toucher)*toucher->momz < 0) && (elementalpierce != 1) && (!(player->powers[pw_strong] & STR_HEAVY)))
{ {
fixed_t setmomz = -toucher->momz; // Store this, momz get changed by P_DoJump within P_DoBubbleBounce fixed_t setmomz = -toucher->momz; // Store this, momz get changed by P_DoJump within P_DoBubbleBounce
if (elementalpierce == 2) // Reset bubblewrap, part 1 if (elementalpierce == 2) // Reset bubblewrap, part 1
P_DoBubbleBounce(player); P_DoBubbleBounce(player);
toucher->momz = setmomz; toucher->momz = setmomz;
if (elementalpierce == 2) // Reset bubblewrap, part 2 if (elementalpierce == 2) // Reset bubblewrap, part 2
{ {
boolean underwater = toucher->eflags & MFE_UNDERWATER; boolean underwater = toucher->eflags & MFE_UNDERWATER;
if (underwater) if (underwater)
toucher->momz /= 2; toucher->momz /= 2;
toucher->momz -= (toucher->momz/(underwater ? 8 : 4)); // Cap the height! toucher->momz -= (toucher->momz/(underwater ? 8 : 4)); // Cap the height!
@ -2572,7 +2572,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
if (!(target->flags2 & MF2_DONTRESPAWN)) if (!(target->flags2 & MF2_DONTRESPAWN))
{ {
if (!(netgame || multiplayer)) if (!(netgame || multiplayer))
target->fuse = atoi(cv_itemrespawntime.defaultvalue)*TICRATE + 2; target->fuse = atoi(cv_itemrespawntime.defaultvalue)*TICRATE + 2;
else if (cv_itemrespawn.value) else if (cv_itemrespawn.value)
target->fuse = cv_itemrespawntime.value*TICRATE + 2; target->fuse = cv_itemrespawntime.value*TICRATE + 2;
} }

View file

@ -6660,12 +6660,12 @@ static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield)
if (scale < 1) { if (scale < 1) {
P_SetScale(thing, thing->target->scale, true); P_SetScale(thing, thing->target->scale, true);
thing->old_scale = thing->target->old_scale; thing->old_scale = thing->target->old_scale;
thing->flags2 |= (MF2_DONTDRAW|MF2_JUSTATTACKED); //Hide and indicate we're hidden thing->flags2 |= (MF2_DONTDRAW|MF2_JUSTATTACKED); //Hide and indicate we're hidden
} else { } else {
P_SetScale(thing, scale, true); P_SetScale(thing, scale, true);
thing->old_scale = FixedMul(thing->target->old_scale, thing->target->player->shieldscale); thing->old_scale = FixedMul(thing->target->old_scale, thing->target->player->shieldscale);
//Only unhide if we were hidden by the above code //Only unhide if we were hidden by the above code
if (thing->flags2 & MF2_JUSTATTACKED) if (thing->flags2 & MF2_JUSTATTACKED)
thing->flags2 &= ~(MF2_DONTDRAW|MF2_JUSTATTACKED); thing->flags2 &= ~(MF2_DONTDRAW|MF2_JUSTATTACKED);

View file

@ -181,7 +181,7 @@ void T_DynamicSlopeLine (dynlineplanethink_t* th)
{ {
pslope_t* slope = th->slope; pslope_t* slope = th->slope;
line_t* srcline = th->sourceline; line_t* srcline = th->sourceline;
fixed_t zdelta, oldoz = slope->o.z; fixed_t zdelta, oldoz = slope->o.z;
switch(th->type) { switch(th->type) {

View file

@ -2406,7 +2406,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
z = line->args[4] << FRACBITS; z = line->args[4] << FRACBITS;
P_SetOrigin(mo, mo->x + x, mo->y + y, mo->z + z); P_SetOrigin(mo, mo->x + x, mo->y + y, mo->z + z);
if (mo->player) if (mo->player)
{ {
if (bot) // This might put poor Tails in a wall if he's too far behind! D: But okay, whatever! >:3 if (bot) // This might put poor Tails in a wall if he's too far behind! D: But okay, whatever! >:3

View file

@ -978,7 +978,7 @@ boolean P_PlayerInPain(player_t *player)
{ {
if (P_MobjWasRemoved(player->mo)) if (P_MobjWasRemoved(player->mo))
return false; return false;
// no silly, sliding isn't pain // no silly, sliding isn't pain
if (!(player->pflags & PF_SLIDING) && player->mo->state == &states[player->mo->info->painstate] && player->powers[pw_flashing]) if (!(player->pflags & PF_SLIDING) && player->mo->state == &states[player->mo->info->painstate] && player->powers[pw_flashing])
return true; return true;

View file

@ -275,7 +275,7 @@ boolean R_ThingBoundingBoxVisible(mobj_t *thing)
switch (thing->type) switch (thing->type)
{ {
default: default:
// First person / awayviewmobj -- rendering a bbox // First person / awayviewmobj -- rendering a bbox
// too close to the viewpoint causes anomalies // too close to the viewpoint causes anomalies
// and these are exactly on the viewpoint! // and these are exactly on the viewpoint!
if (thing != r_viewmobj) if (thing != r_viewmobj)

View file

@ -1095,7 +1095,7 @@ void R_SetupFrame(player_t *player)
camera_t *thiscam; camera_t *thiscam;
boolean chasecam = R_ViewpointHasChasecam(player); boolean chasecam = R_ViewpointHasChasecam(player);
boolean ispaused = paused || P_AutoPause(); boolean ispaused = paused || P_AutoPause();
if (splitscreen && player == &players[secondarydisplayplayer] && player != &players[consoleplayer]) if (splitscreen && player == &players[secondarydisplayplayer] && player != &players[consoleplayer])
thiscam = &camera2; thiscam = &camera2;
else else
@ -1375,7 +1375,7 @@ boolean R_ViewpointHasChasecam(player_t *player)
chasecam = true; // force chasecam on chasecam = true; // force chasecam on
else if (player->spectator) // no spectator chasecam else if (player->spectator) // no spectator chasecam
chasecam = false; // force chasecam off chasecam = false; // force chasecam off
if (chasecam && !thiscam->chase) if (chasecam && !thiscam->chase)
{ {
P_ResetCamera(player, thiscam); P_ResetCamera(player, thiscam);
@ -1386,7 +1386,7 @@ boolean R_ViewpointHasChasecam(player_t *player)
P_ResetCamera(player, thiscam); P_ResetCamera(player, thiscam);
thiscam->chase = false; thiscam->chase = false;
} }
if (isplayer2) if (isplayer2)
{ {
R_SetViewContext(VIEWCONTEXT_PLAYER2); R_SetViewContext(VIEWCONTEXT_PLAYER2);

View file

@ -1110,7 +1110,7 @@ static lumpnum_t W_GetTexPatchLumpNum(const char *name)
lumpnum_t lump = LUMPERROR; lumpnum_t lump = LUMPERROR;
INT32 lump_type_it; INT32 lump_type_it;
for (lump_type_it = 0; lump_type_it < USE__MAX; lump_type_it++) for (lump_type_it = 0; lump_type_it < USE__MAX; lump_type_it++)
{ {
@ -1716,7 +1716,7 @@ const char *R_CheckTextureNameForNum(INT32 num)
{ {
if (num > 0 && num < numtextures) if (num > 0 && num < numtextures)
return textures[num]->name; return textures[num]->name;
return "-"; return "-";
} }

View file

@ -2822,7 +2822,7 @@ static void ST_overlayDrawer(void)
} }
else if (cv_powerupdisplay.value == 2 && LUA_HudEnabled(hud_powerups)) else if (cv_powerupdisplay.value == 2 && LUA_HudEnabled(hud_powerups))
ST_drawPowerupHUD(); // same as it ever was... ST_drawPowerupHUD(); // same as it ever was...
} }
else if (!(netgame || multiplayer) && cv_powerupdisplay.value == 2 && LUA_HudEnabled(hud_powerups)) else if (!(netgame || multiplayer) && cv_powerupdisplay.value == 2 && LUA_HudEnabled(hud_powerups))
ST_drawPowerupHUD(); // same as it ever was... ST_drawPowerupHUD(); // same as it ever was...

View file

@ -83,7 +83,7 @@ char *xstrtok(char *line, const char *delims)
return NULL; return NULL;
p = saveline; // save start of this token p = saveline; // save start of this token
saveline += strcspn(saveline, delims); // get the number of non-delims characters, go past delimiter saveline += strcspn(saveline, delims); // get the number of non-delims characters, go past delimiter
if(*saveline != '\0') // trash the delim if necessary if(*saveline != '\0') // trash the delim if necessary
@ -91,4 +91,3 @@ char *xstrtok(char *line, const char *delims)
return p; return p;
} }

View file

@ -1137,7 +1137,7 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
} }
#endif #endif
if (splitscreen && (c & V_PERPLAYER)) if (splitscreen && (c & V_PERPLAYER))
{ {
@ -1953,7 +1953,7 @@ char *V_FontWordWrap(INT32 x, INT32 w, INT32 option, fixed_t scale, const char *
INT32 spacewidth = font.spacewidth, charwidth = 0; INT32 spacewidth = font.spacewidth, charwidth = 0;
slen = strlen(string); slen = strlen(string);
if (w == 0) if (w == 0)
w = BASEVIDWIDTH; w = BASEVIDWIDTH;
w -= x; w -= x;
@ -2131,7 +2131,7 @@ void V_DrawAlignedFontStringAtFixed(fixed_t x, fixed_t y, INT32 option, fixed_t
lx = x - (V_FontStringWidth(line, option, font)*pscale); lx = x - (V_FontStringWidth(line, option, font)*pscale);
break; break;
} }
V_DrawFontStringAtFixed(lx, ly, option, pscale, vscale, line, font); V_DrawFontStringAtFixed(lx, ly, option, pscale, vscale, line, font);
ly += FixedMul(((option & V_RETURN8) ? 8 : font.linespacing)<<FRACBITS, vscale); ly += FixedMul(((option & V_RETURN8) ? 8 : font.linespacing)<<FRACBITS, vscale);
@ -2422,7 +2422,7 @@ INT32 V_FontStringWidth(const char *string, INT32 option, fontdef_t font)
if (wline < w) wline = w; if (wline < w) wline = w;
w = 0; w = 0;
continue; continue;
} }
if (string[i] & 0x80) if (string[i] & 0x80)
continue; continue;
@ -2455,7 +2455,7 @@ INT32 V_FontStringHeight(const char *string, INT32 option, fontdef_t font)
{ {
result += (option & V_RETURN8) ? 8 : font.linespacing; result += (option & V_RETURN8) ? 8 : font.linespacing;
h = 0; h = 0;
} }
continue; continue;
} }

View file

@ -2067,7 +2067,7 @@ static void Y_AwardCoopBonuses(void)
(bonuses_list[bonusnum][j])(&players[i], &localbonuses[j]); (bonuses_list[bonusnum][j])(&players[i], &localbonuses[j]);
else else
Y_SetNullBonus(&players[i], &localbonuses[j]); Y_SetNullBonus(&players[i], &localbonuses[j]);
players[i].score += localbonuses[j].points; players[i].score += localbonuses[j].points;
if (players[i].score > MAXSCORE) if (players[i].score > MAXSCORE)
players[i].score = MAXSCORE; players[i].score = MAXSCORE;

View file

@ -55,4 +55,3 @@ else()
endif() endif()
FetchContent_MakeAvailable(curl) FetchContent_MakeAvailable(curl)

View file

@ -36,4 +36,3 @@ FetchContent_Declare(
) )
FetchContent_MakeAvailable(SDL2_mixer_ext) FetchContent_MakeAvailable(SDL2_mixer_ext)

View file

@ -33,4 +33,3 @@ FetchContent_MakeAvailable(ZLIB)
add_library(ZLIB::ZLIB ALIAS zlibstatic) add_library(ZLIB::ZLIB ALIAS zlibstatic)
set(ZLIB_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/zlib" "${zlib_BINARY_DIR}" CACHE PATH "" FORCE) set(ZLIB_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/zlib" "${zlib_BINARY_DIR}" CACHE PATH "" FORCE)