From 2a07159c8d91914c0d49aced06aad47e47256db6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 6 Dec 2021 19:35:27 +0100 Subject: [PATCH] - removed some unused and obsolete content from engine files. --- source/build/include/build.h | 51 ----------------------------------- source/build/src/engine.cpp | 44 ------------------------------ source/build/src/polymost.cpp | 6 ++--- 3 files changed, 3 insertions(+), 98 deletions(-) diff --git a/source/build/include/build.h b/source/build/include/build.h index 1659a8c28..eef0be4a6 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -248,8 +248,6 @@ enum { GLOBAL_NO_GL_FOGSHADE = 1<<2, }; -extern const char *engineerrstr; - EXTERN int32_t editorzrange[2]; enum { @@ -261,55 +259,6 @@ enum { EXTERN int32_t enginecompatibility_mode; -/************************************************************************* -POSITION VARIABLES: - - POSX is your x - position ranging from 0 to 65535 - POSY is your y - position ranging from 0 to 65535 - (the length of a side of the grid in EDITBORD would be 1024) - POSZ is your z - position (height) ranging from 0 to 65535, 0 highest. - ANG is your angle ranging from 0 to 2047. Instead of 360 degrees, or - 2 * PI radians, I use 2048 different angles, so 90 degrees would - be 512 in my system. - -SPRITE VARIABLES: - - EXTERN short headspritesect[MAXSECTORS+1], headspritestat[MAXSTATUS+1]; - EXTERN short prevspritesect[MAXSPRITES], prevspritestat[MAXSPRITES]; - EXTERN short nextspritesect[MAXSPRITES], nextspritestat[MAXSPRITES]; - - Example: if the linked lists look like the following: - ???????????????? - Sector lists: Status lists: - ????????????????J - Sector0: 4, 5, 8 Status0: 2, 0, 8 - Sector1: 16, 2, 0, 7 Status1: 4, 5, 16, 7, 3, 9 - Sector2: 3, 9 - ???????????????? - Notice that each number listed above is shown exactly once on both the - left and right side. This is because any sprite that exists must - be in some sector, and must have some kind of status that you define. - - -OTHER VARIABLES: - - SINTABLE[2048] is a sin table with 2048 angles rather than the - normal 360 angles for higher precision. Also since SINTABLE is in - all integers, the range is multiplied by 16383, so instead of the - normal -1 sector; TArray wall; -int32_t r_rortexture = 0; -int32_t r_rortexturerange = 0; -int32_t r_rorphase = 0; int32_t mdtims, omdtims; float fcosglobalang, fsinglobalang; @@ -55,48 +52,8 @@ float fydimen, fviewingrange; uint8_t globalr = 255, globalg = 255, globalb = 255; int16_t pskybits_override = -1; - -static int32_t beforedrawrooms = 1; - -static int32_t no_radarang2 = 0; static int16_t radarang[1280]; -const char *engineerrstr = "No error"; - -int32_t showfirstwall=0; -int32_t showheightindicators=1; -int32_t circlewall=-1; - -fixed_t global100horiz; // (-100..300)-scale horiz (the one passed to drawrooms) - -static FString printcoords(void) -{ - FString str; - - str.Format( - "pos.x: %d\n" - "pos.y: %d\n" - "pos.z: %d\n" - "ang : %d\n" - "horiz: %d\n", - globalposx, globalposy, - globalposz, globalang, - FixedToInt(global100horiz) - ); - - return str; -} - -CCMD(printcoords) -{ - Printf("%s", printcoords().GetChars()); -} - -ADD_STAT(printcoords) -{ - return printcoords(); -} - // adapted from build.c static void getclosestpointonwall_internal(vec2_t const p, int32_t const dawall, vec2_t *const closest) { @@ -139,7 +96,6 @@ int32_t cosviewingrangeglobalang, sinviewingrangeglobalang; int32_t viewingrangerecip; -static int32_t globalxpanning, globalypanning; int32_t globalshade, globalorientation; int16_t globalpicnum; diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index de077520c..49107f147 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -43,6 +43,9 @@ typedef struct { static_assert(sizeof(vec3d_t) == sizeof(double) * 3); int32_t xyaspect = -1; bool inpreparemirror = 0; +int32_t r_rortexture = 0; +int32_t r_rortexturerange = 0; +int32_t r_rorphase = 0; @@ -65,7 +68,6 @@ int pm_smoothratio; CVAR(Int, skytile, 0, 0) CVAR(Bool, testnewrenderer, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) -extern fixed_t global100horiz; // (-100..300)-scale horiz (the one passed to drawrooms) static vec3_t spritesxyz[MAXSPRITESONSCREEN + 1]; static int16_t thewall[MAXWALLSB]; static int16_t bunchp2[MAXWALLSB], thesector[MAXWALLSB]; @@ -3291,8 +3293,6 @@ int32_t renderDrawRoomsQ16(int32_t daposx, int32_t daposy, int32_t daposz, set_globalpos(daposx, daposy, daposz); Polymost::set_globalang(daang); - global100horiz = dahoriz; - gotsector.Zero(); qglobalhoriz = MulScale(dahoriz, DivScale(xdimenscale, viewingrange, 16), 16) + IntToFixed(ydimen >> 1); globalcursectnum = dacursectnum;