- removed some unused and obsolete content from engine files.

This commit is contained in:
Christoph Oelckers 2021-12-06 19:35:27 +01:00
parent 923a2b6a79
commit 2a07159c8d
3 changed files with 3 additions and 98 deletions

View file

@ -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<sin(x)<1, the range of sintable is -16383<sintable[]<16383
If you use this sintable, you can possibly speed up your code as
well as save space in memory. If you plan to use sintable, 2
identities you may want to keep in mind are:
sintable[ang&2047] = sin(ang * (3.141592/1024)) * 16383
sintable[(ang+512)&2047] = cos(ang * (3.141592/1024)) * 16383
NUMSECTORS - the total number of existing sectors. Modified every time
you call the loadboard function.
***************************************************************************/
typedef struct artheader_t {
int32_t tilestart, tileend, numtiles;
} artheader_t;
#define ARTv1_UNITOFFSET 24 // using sizeof does not work because picanm_t is not the in-file format.
int32_t engineInit(void);
void engineUnInit(void);

View file

@ -44,9 +44,6 @@
TArray<sectortype> sector;
TArray<walltype> 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;

View file

@ -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;