mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 20:00:49 +00:00
- removed global variables that were only being used by the automap drawer plus a few other obsolete things.
This commit is contained in:
parent
30f4e2b29d
commit
fedfc2cfa4
6 changed files with 7 additions and 66 deletions
|
@ -648,21 +648,12 @@ static FORCE_INLINE int32_t spriteheightofs(int16_t i, int32_t *height, int32_t
|
||||||
|
|
||||||
int videoCaptureScreen();
|
int videoCaptureScreen();
|
||||||
|
|
||||||
struct OutputFileCounter {
|
|
||||||
uint16_t count = 0;
|
|
||||||
FileWriter *opennextfile(char *, char *);
|
|
||||||
FileWriter *opennextfile_withext(char *, const char *);
|
|
||||||
};
|
|
||||||
|
|
||||||
// PLAG: line utility functions
|
// PLAG: line utility functions
|
||||||
typedef struct s_equation
|
typedef struct s_equation
|
||||||
{
|
{
|
||||||
float a, b, c;
|
float a, b, c;
|
||||||
} _equation;
|
} _equation;
|
||||||
|
|
||||||
#define STATUS2DSIZ 144
|
|
||||||
#define STATUS2DSIZ2 26
|
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
void renderSetRollAngle(float rolla);
|
void renderSetRollAngle(float rolla);
|
||||||
#endif
|
#endif
|
||||||
|
@ -670,21 +661,6 @@ void renderSetRollAngle(float rolla);
|
||||||
void PrecacheHardwareTextures(int nTile);
|
void PrecacheHardwareTextures(int nTile);
|
||||||
void Polymost_Startup();
|
void Polymost_Startup();
|
||||||
|
|
||||||
typedef uint16_t polytintflags_t;
|
|
||||||
|
|
||||||
enum cutsceneflags {
|
|
||||||
CUTSCENE_FORCEFILTER = 1,
|
|
||||||
CUTSCENE_FORCENOFILTER = 2,
|
|
||||||
CUTSCENE_TEXTUREFILTER = 4,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
TEXFILTER_OFF = 0, // GL_NEAREST
|
|
||||||
TEXFILTER_ON = 5, // GL_LINEAR_MIPMAP_LINEAR
|
|
||||||
};
|
|
||||||
|
|
||||||
extern int32_t gltexmaxsize;
|
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, hw_animsmoothing)
|
EXTERN_CVAR(Bool, hw_animsmoothing)
|
||||||
EXTERN_CVAR(Bool, hw_hightile)
|
EXTERN_CVAR(Bool, hw_hightile)
|
||||||
EXTERN_CVAR(Bool, hw_models)
|
EXTERN_CVAR(Bool, hw_models)
|
||||||
|
@ -696,7 +672,6 @@ EXTERN_CVAR(Bool, hw_useindexedcolortextures)
|
||||||
EXTERN_CVAR(Bool, hw_parallaxskypanning)
|
EXTERN_CVAR(Bool, hw_parallaxskypanning)
|
||||||
EXTERN_CVAR(Bool, r_voxels)
|
EXTERN_CVAR(Bool, r_voxels)
|
||||||
|
|
||||||
extern int32_t r_downsize;
|
|
||||||
extern int32_t mdtims, omdtims;
|
extern int32_t mdtims, omdtims;
|
||||||
|
|
||||||
extern int32_t r_rortexture;
|
extern int32_t r_rortexture;
|
||||||
|
@ -709,8 +684,6 @@ int32_t md_loadmodel(const char *fn);
|
||||||
int32_t md_setmisc(int32_t modelid, float scale, int32_t shadeoff, float zadd, float yoffset, int32_t flags);
|
int32_t md_setmisc(int32_t modelid, float scale, int32_t shadeoff, float zadd, float yoffset, int32_t flags);
|
||||||
// int32_t md_tilehasmodel(int32_t tilenume, int32_t pal);
|
// int32_t md_tilehasmodel(int32_t tilenume, int32_t pal);
|
||||||
|
|
||||||
extern TArray<FString> g_clipMapFiles;
|
|
||||||
|
|
||||||
EXTERN int32_t nextvoxid;
|
EXTERN int32_t nextvoxid;
|
||||||
EXTERN int8_t voxreserve[(MAXVOXELS+7)>>3];
|
EXTERN int8_t voxreserve[(MAXVOXELS+7)>>3];
|
||||||
EXTERN int8_t voxrotate[(MAXVOXELS+7)>>3];
|
EXTERN int8_t voxrotate[(MAXVOXELS+7)>>3];
|
||||||
|
@ -764,10 +737,6 @@ int32_t md_undefinemodel(int32_t modelid);
|
||||||
|
|
||||||
int32_t loaddefinitionsfile(const char *fn, bool loadadds = false);
|
int32_t loaddefinitionsfile(const char *fn, bool loadadds = false);
|
||||||
|
|
||||||
// if loadboard() fails with -2 return, try loadoldboard(). if it fails with
|
|
||||||
// -2, board is dodgy
|
|
||||||
int32_t engineLoadBoardV5V6(const char *filename, char fromwhere, vec3_t *dapos, int16_t *daang, int16_t *dacursectnum);
|
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
# include "polymost.h"
|
# include "polymost.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "printf.h"
|
#include "printf.h"
|
||||||
#include "gamefuncs.h"
|
#include "gamefuncs.h"
|
||||||
|
|
||||||
|
enum { MAXCLIPDIST = 1024 };
|
||||||
|
|
||||||
static int16_t clipnum;
|
static int16_t clipnum;
|
||||||
static linetype clipit[MAXCLIPNUM];
|
static linetype clipit[MAXCLIPNUM];
|
||||||
|
|
|
@ -72,10 +72,6 @@ int32_t globalflags;
|
||||||
|
|
||||||
static int8_t tempbuf[MAXWALLS];
|
static int8_t tempbuf[MAXWALLS];
|
||||||
|
|
||||||
// referenced from asm
|
|
||||||
intptr_t asm1, asm2;
|
|
||||||
int32_t globalx1, globaly2, globalx3, globaly3;
|
|
||||||
|
|
||||||
static int32_t no_radarang2 = 0;
|
static int32_t no_radarang2 = 0;
|
||||||
static int16_t radarang[1280];
|
static int16_t radarang[1280];
|
||||||
static int32_t qradarang[10240];
|
static int32_t qradarang[10240];
|
||||||
|
@ -144,10 +140,7 @@ static void getclosestpointonwall_internal(vec2_t const p, int32_t const dawall,
|
||||||
*closest = { (int32_t)(w.x + ((d.x * i) >> 30)), (int32_t)(w.y + ((d.y * i) >> 30)) };
|
*closest = { (int32_t)(w.x + ((d.x * i) >> 30)), (int32_t)(w.y + ((d.y * i) >> 30)) };
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t xb1[MAXWALLSB]; // Polymost uses this as a temp array
|
|
||||||
int32_t rx1[MAXWALLSB], ry1[MAXWALLSB];
|
|
||||||
int16_t bunchp2[MAXWALLSB], thesector[MAXWALLSB];
|
int16_t bunchp2[MAXWALLSB], thesector[MAXWALLSB];
|
||||||
|
|
||||||
int16_t bunchfirst[MAXWALLSB], bunchlast[MAXWALLSB];
|
int16_t bunchfirst[MAXWALLSB], bunchlast[MAXWALLSB];
|
||||||
|
|
||||||
|
|
||||||
|
@ -178,8 +171,6 @@ static int32_t globaly1, globalx2;
|
||||||
int16_t sectorborder[256];
|
int16_t sectorborder[256];
|
||||||
int16_t pointhighlight=-1, linehighlight=-1, highlightcnt=0;
|
int16_t pointhighlight=-1, linehighlight=-1, highlightcnt=0;
|
||||||
|
|
||||||
int32_t halfxdim16, midydim16;
|
|
||||||
|
|
||||||
static_assert(MAXWALLSB < INT16_MAX);
|
static_assert(MAXWALLSB < INT16_MAX);
|
||||||
int16_t numscans, numbunches;
|
int16_t numscans, numbunches;
|
||||||
static int16_t numhits;
|
static int16_t numhits;
|
||||||
|
@ -187,8 +178,6 @@ static int16_t numhits;
|
||||||
char inpreparemirror = 0;
|
char inpreparemirror = 0;
|
||||||
static int32_t mirrorsx1, mirrorsy1, mirrorsx2, mirrorsy2;
|
static int32_t mirrorsx1, mirrorsy1, mirrorsx2, mirrorsy2;
|
||||||
|
|
||||||
#define MAXSETVIEW 4
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Internal Engine Functions
|
// Internal Engine Functions
|
||||||
|
|
|
@ -13,28 +13,6 @@
|
||||||
#ifndef ENGINE_PRIV_H
|
#ifndef ENGINE_PRIV_H
|
||||||
#define ENGINE_PRIV_H
|
#define ENGINE_PRIV_H
|
||||||
|
|
||||||
#define MAXARTFILES_BASE 200
|
|
||||||
#define MAXARTFILES_TOTAL 220
|
|
||||||
#define MAXCLIPDIST 1024
|
|
||||||
|
|
||||||
// Uncomment to clear the screen before each top-level draw (classic only).
|
|
||||||
// FIXME: doesn't work with mirrors.
|
|
||||||
//#define ENGINE_CLEAR_SCREEN
|
|
||||||
|
|
||||||
extern intptr_t asm1, asm2;
|
|
||||||
extern int32_t globalx1, globaly2;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static inline int32_t getclipmask(int32_t a, int32_t b, int32_t c, int32_t d)
|
|
||||||
{
|
|
||||||
// Ken did this
|
|
||||||
d = ((a<0)<<3) + ((b<0)<<2) + ((c<0)<<1) + (d<0);
|
|
||||||
return (((d<<4)^0xf0)|d);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern int16_t thesector[MAXWALLSB], thewall[MAXWALLSB];
|
extern int16_t thesector[MAXWALLSB], thewall[MAXWALLSB];
|
||||||
extern int16_t bunchfirst[MAXWALLSB], bunchlast[MAXWALLSB];
|
extern int16_t bunchfirst[MAXWALLSB], bunchlast[MAXWALLSB];
|
||||||
extern int16_t maskwall[MAXWALLSB], maskwallcnt;
|
extern int16_t maskwall[MAXWALLSB], maskwallcnt;
|
||||||
|
@ -58,8 +36,6 @@ extern char inpreparemirror;
|
||||||
extern int16_t sectorborder[256];
|
extern int16_t sectorborder[256];
|
||||||
extern int32_t hitallsprites;
|
extern int32_t hitallsprites;
|
||||||
|
|
||||||
extern int32_t xb1[MAXWALLSB];
|
|
||||||
extern int32_t rx1[MAXWALLSB], ry1[MAXWALLSB];
|
|
||||||
extern int16_t bunchp2[MAXWALLSB];
|
extern int16_t bunchp2[MAXWALLSB];
|
||||||
extern int16_t numscans, numbunches;
|
extern int16_t numscans, numbunches;
|
||||||
|
|
||||||
|
|
|
@ -256,6 +256,7 @@ void HWFlat::ProcessSector(HWDrawInfo *di, sectortype * frontsector, int which)
|
||||||
if (alpha != 0.f)
|
if (alpha != 0.f)
|
||||||
{
|
{
|
||||||
int tilenum = frontsector->floorpicnum;
|
int tilenum = frontsector->floorpicnum;
|
||||||
|
setgotpic(tilenum);
|
||||||
tileUpdatePicnum(&tilenum, tilenum, 0);
|
tileUpdatePicnum(&tilenum, tilenum, 0);
|
||||||
texture = tileGetTexture(tilenum);
|
texture = tileGetTexture(tilenum);
|
||||||
if (texture && texture->isValid())
|
if (texture && texture->isValid())
|
||||||
|
@ -296,6 +297,7 @@ void HWFlat::ProcessSector(HWDrawInfo *di, sectortype * frontsector, int which)
|
||||||
//iboindex = frontsector->iboindex[sector_t::ceiling];
|
//iboindex = frontsector->iboindex[sector_t::ceiling];
|
||||||
|
|
||||||
int tilenum = frontsector->ceilingpicnum;
|
int tilenum = frontsector->ceilingpicnum;
|
||||||
|
setgotpic(tilenum);
|
||||||
tileUpdatePicnum(&tilenum, tilenum, 0);
|
tileUpdatePicnum(&tilenum, tilenum, 0);
|
||||||
texture = tileGetTexture(tilenum);
|
texture = tileGetTexture(tilenum);
|
||||||
if (texture && texture->isValid())
|
if (texture && texture->isValid())
|
||||||
|
|
|
@ -984,6 +984,7 @@ void HWWall::Process(HWDrawInfo *di, walltype *wal, sectortype* frontsector, sec
|
||||||
// normal texture
|
// normal texture
|
||||||
|
|
||||||
int tilenum = (wal->cstat & CSTAT_WALL_1WAY) ? wal->overpicnum : wal->picnum;
|
int tilenum = (wal->cstat & CSTAT_WALL_1WAY) ? wal->overpicnum : wal->picnum;
|
||||||
|
setgotpic(tilenum);
|
||||||
tileUpdatePicnum(&tilenum, int(wal-wall) + 16384, wal->cstat);
|
tileUpdatePicnum(&tilenum, int(wal-wall) + 16384, wal->cstat);
|
||||||
texture = tileGetTexture(tilenum);
|
texture = tileGetTexture(tilenum);
|
||||||
if (texture && texture->isValid())
|
if (texture && texture->isValid())
|
||||||
|
@ -1021,6 +1022,7 @@ void HWWall::Process(HWDrawInfo *di, walltype *wal, sectortype* frontsector, sec
|
||||||
if (bch1a < fch1 || bch2a < fch2)
|
if (bch1a < fch1 || bch2a < fch2)
|
||||||
{
|
{
|
||||||
int tilenum = wal->picnum;
|
int tilenum = wal->picnum;
|
||||||
|
setgotpic(tilenum);
|
||||||
tileUpdatePicnum(&tilenum, int(wal - wall) + 16384, wal->cstat);
|
tileUpdatePicnum(&tilenum, int(wal - wall) + 16384, wal->cstat);
|
||||||
texture = tileGetTexture(tilenum);
|
texture = tileGetTexture(tilenum);
|
||||||
if (texture && texture->isValid())
|
if (texture && texture->isValid())
|
||||||
|
@ -1045,6 +1047,7 @@ void HWWall::Process(HWDrawInfo *di, walltype *wal, sectortype* frontsector, sec
|
||||||
if (wal->cstat & (CSTAT_WALL_MASKED | CSTAT_WALL_1WAY))
|
if (wal->cstat & (CSTAT_WALL_MASKED | CSTAT_WALL_1WAY))
|
||||||
{
|
{
|
||||||
int tilenum = wal->overpicnum;
|
int tilenum = wal->overpicnum;
|
||||||
|
setgotpic(tilenum);
|
||||||
tileUpdatePicnum(&tilenum, int(wal - wall) + 16384, wal->cstat);
|
tileUpdatePicnum(&tilenum, int(wal - wall) + 16384, wal->cstat);
|
||||||
texture = tileGetTexture(tilenum);
|
texture = tileGetTexture(tilenum);
|
||||||
if (texture && texture->isValid())
|
if (texture && texture->isValid())
|
||||||
|
@ -1067,6 +1070,7 @@ void HWWall::Process(HWDrawInfo *di, walltype *wal, sectortype* frontsector, sec
|
||||||
{
|
{
|
||||||
auto w = (wal->cstat & CSTAT_WALL_BOTTOM_SWAP) ? backwall : wal;
|
auto w = (wal->cstat & CSTAT_WALL_BOTTOM_SWAP) ? backwall : wal;
|
||||||
int tilenum = w->picnum;
|
int tilenum = w->picnum;
|
||||||
|
setgotpic(tilenum);
|
||||||
tileUpdatePicnum(&tilenum, int(wal - wall) + 16384, w->cstat);
|
tileUpdatePicnum(&tilenum, int(wal - wall) + 16384, w->cstat);
|
||||||
texture = tileGetTexture(tilenum);
|
texture = tileGetTexture(tilenum);
|
||||||
if (texture && texture->isValid())
|
if (texture && texture->isValid())
|
||||||
|
|
Loading…
Reference in a new issue