mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- removed some unused things from engine.cpp.
This commit is contained in:
parent
76682c72e3
commit
a5b3a1dd3e
6 changed files with 6 additions and 57 deletions
|
@ -850,7 +850,6 @@ void markTileForPrecache(int tilenum, int palnum);
|
||||||
void precacheMarkedTiles();
|
void precacheMarkedTiles();
|
||||||
|
|
||||||
extern int32_t(*animateoffs_replace)(int const tilenum, int fakevar);
|
extern int32_t(*animateoffs_replace)(int const tilenum, int fakevar);
|
||||||
extern int32_t(*getpalookup_replace)(int32_t davis, int32_t dashade);
|
|
||||||
extern void(*initspritelists_replace)(void);
|
extern void(*initspritelists_replace)(void);
|
||||||
extern int32_t(*insertsprite_replace)(int16_t sectnum, int16_t statnum);
|
extern int32_t(*insertsprite_replace)(int16_t sectnum, int16_t statnum);
|
||||||
extern int32_t(*deletesprite_replace)(int16_t spritenum);
|
extern int32_t(*deletesprite_replace)(int16_t spritenum);
|
||||||
|
|
|
@ -508,7 +508,7 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int
|
||||||
{
|
{
|
||||||
clipyou = 1;
|
clipyou = 1;
|
||||||
}
|
}
|
||||||
else if (editstatus == 0)
|
else
|
||||||
{
|
{
|
||||||
clipmove_tweak_pos(pos, diff.x, diff.y, p1.x, p1.y, p2.x, p2.y, &v.x, &v.y);
|
clipmove_tweak_pos(pos, diff.x, diff.y, p1.x, p1.y, p2.x, p2.y, &v.x, &v.y);
|
||||||
clipyou = cliptestsector(dasect, wal->nextsector, flordist, ceildist, v, pos->z);
|
clipyou = cliptestsector(dasect, wal->nextsector, flordist, ceildist, v, pos->z);
|
||||||
|
@ -990,11 +990,8 @@ void getzrange(const vec3_t *pos, int16_t sectnum,
|
||||||
if (wall[j].cstat&dawalclipmask) continue; // XXX?
|
if (wall[j].cstat&dawalclipmask) continue; // XXX?
|
||||||
auto const sec = (usectorptr_t)§or[k];
|
auto const sec = (usectorptr_t)§or[k];
|
||||||
|
|
||||||
if (editstatus == 0)
|
if (((sec->ceilingstat&1) == 0) && (pos->z <= sec->ceilingz+(3<<8))) continue;
|
||||||
{
|
if (((sec->floorstat&1) == 0) && (pos->z >= sec->floorz-(3<<8))) continue;
|
||||||
if (((sec->ceilingstat&1) == 0) && (pos->z <= sec->ceilingz+(3<<8))) continue;
|
|
||||||
if (((sec->floorstat&1) == 0) && (pos->z >= sec->floorz-(3<<8))) continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bitmap_test(clipsectormap, k) == 0)
|
if (bitmap_test(clipsectormap, k) == 0)
|
||||||
addclipsect(k);
|
addclipsect(k);
|
||||||
|
|
|
@ -86,7 +86,6 @@ int32_t showfirstwall=0;
|
||||||
int32_t showheightindicators=1;
|
int32_t showheightindicators=1;
|
||||||
int32_t circlewall=-1;
|
int32_t circlewall=-1;
|
||||||
|
|
||||||
int16_t editstatus = 0;
|
|
||||||
static fixed_t global100horiz; // (-100..300)-scale horiz (the one passed to drawrooms)
|
static fixed_t global100horiz; // (-100..300)-scale horiz (the one passed to drawrooms)
|
||||||
|
|
||||||
static FString printcoords(void)
|
static FString printcoords(void)
|
||||||
|
@ -117,8 +116,6 @@ ADD_STAT(printcoords)
|
||||||
return printcoords();
|
return printcoords();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t(*getpalookup_replace)(int32_t davis, int32_t dashade) = NULL;
|
|
||||||
|
|
||||||
// adapted from build.c
|
// adapted from build.c
|
||||||
static void getclosestpointonwall_internal(vec2_t const p, int32_t const dawall, vec2_t *const closest)
|
static void getclosestpointonwall_internal(vec2_t const p, int32_t const dawall, vec2_t *const closest)
|
||||||
{
|
{
|
||||||
|
@ -148,7 +145,6 @@ static void getclosestpointonwall_internal(vec2_t const p, int32_t const dawall,
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t xb1[MAXWALLSB]; // Polymost uses this as a temp array
|
int32_t xb1[MAXWALLSB]; // Polymost uses this as a temp array
|
||||||
static int32_t xb2[MAXWALLSB];
|
|
||||||
int32_t rx1[MAXWALLSB], ry1[MAXWALLSB];
|
int32_t rx1[MAXWALLSB], ry1[MAXWALLSB];
|
||||||
int16_t bunchp2[MAXWALLSB], thesector[MAXWALLSB];
|
int16_t bunchp2[MAXWALLSB], thesector[MAXWALLSB];
|
||||||
|
|
||||||
|
@ -157,7 +153,7 @@ int16_t bunchfirst[MAXWALLSB], bunchlast[MAXWALLSB];
|
||||||
|
|
||||||
static vec3_t spritesxyz[MAXSPRITESONSCREEN+1];
|
static vec3_t spritesxyz[MAXSPRITESONSCREEN+1];
|
||||||
|
|
||||||
int32_t xdimen = -1, xdimenrecip, halfxdimen, xdimenscale, xdimscale;
|
int32_t xdimen = -1, xdimenscale, xdimscale;
|
||||||
float fxdimen = -1.f;
|
float fxdimen = -1.f;
|
||||||
int32_t ydimen;
|
int32_t ydimen;
|
||||||
|
|
||||||
|
@ -190,18 +186,6 @@ static_assert(MAXWALLSB < INT16_MAX);
|
||||||
int16_t numscans, numbunches;
|
int16_t numscans, numbunches;
|
||||||
static int16_t numhits;
|
static int16_t numhits;
|
||||||
|
|
||||||
int16_t searchit;
|
|
||||||
int16_t searchsector, searchwall, searchstat; //search output
|
|
||||||
|
|
||||||
// SEARCHBOTTOMWALL:
|
|
||||||
// When aiming at a the bottom part of a 2-sided wall whose bottom part
|
|
||||||
// is swapped (.cstat&2), searchbottomwall equals that wall's .nextwall. In all
|
|
||||||
// other cases (when aiming at a wall), searchbottomwall equals searchwall.
|
|
||||||
//
|
|
||||||
// SEARCHISBOTTOM:
|
|
||||||
// When aiming at a 2-sided wall, 1 if aiming at the bottom part, 0 else
|
|
||||||
int16_t searchbottomwall, searchisbottom;
|
|
||||||
|
|
||||||
char inpreparemirror = 0;
|
char inpreparemirror = 0;
|
||||||
static int32_t mirrorsx1, mirrorsy1, mirrorsx2, mirrorsy2;
|
static int32_t mirrorsx1, mirrorsy1, mirrorsx2, mirrorsy2;
|
||||||
|
|
||||||
|
@ -795,8 +779,6 @@ int32_t engineInit(void)
|
||||||
|
|
||||||
paletteloaded = 0;
|
paletteloaded = 0;
|
||||||
|
|
||||||
searchit = 0; searchstat = -1;
|
|
||||||
|
|
||||||
g_visibility = 512;
|
g_visibility = 512;
|
||||||
parallaxvisibility = 512;
|
parallaxvisibility = 512;
|
||||||
|
|
||||||
|
@ -2719,8 +2701,7 @@ void videoSetViewableArea(int32_t x1, int32_t y1, int32_t x2, int32_t y2)
|
||||||
windowxy2.x = x2;
|
windowxy2.x = x2;
|
||||||
windowxy2.y = y2;
|
windowxy2.y = y2;
|
||||||
|
|
||||||
xdimen = (x2-x1)+1; halfxdimen = (xdimen>>1);
|
xdimen = (x2-x1)+1;
|
||||||
xdimenrecip = DivScale(1L,xdimen, 32);
|
|
||||||
ydimen = (y2-y1)+1;
|
ydimen = (y2-y1)+1;
|
||||||
|
|
||||||
fxdimen = (float) xdimen;
|
fxdimen = (float) xdimen;
|
||||||
|
|
|
@ -39,7 +39,7 @@ 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;
|
||||||
extern tspriteptr_t tspriteptr[MAXSPRITESONSCREEN + 1];
|
extern tspriteptr_t tspriteptr[MAXSPRITESONSCREEN + 1];
|
||||||
extern int32_t xdimen, xdimenrecip, halfxdimen, xdimenscale, xdimscale, ydimen;
|
extern int32_t xdimen, xdimenscale, xdimscale, ydimen;
|
||||||
extern float fxdimen;
|
extern float fxdimen;
|
||||||
extern int32_t globalposx, globalposy, globalposz;
|
extern int32_t globalposx, globalposy, globalposz;
|
||||||
extern fixed_t qglobalhoriz, qglobalang;
|
extern fixed_t qglobalhoriz, qglobalang;
|
||||||
|
@ -53,12 +53,6 @@ extern int16_t globalpicnum;
|
||||||
|
|
||||||
extern int32_t globalorientation;
|
extern int32_t globalorientation;
|
||||||
|
|
||||||
extern int16_t editstatus;
|
|
||||||
|
|
||||||
extern int16_t searchit;
|
|
||||||
extern int16_t searchsector, searchwall, searchstat;
|
|
||||||
extern int16_t searchbottomwall, searchisbottom;
|
|
||||||
|
|
||||||
extern char inpreparemirror;
|
extern char inpreparemirror;
|
||||||
|
|
||||||
extern int16_t sectorborder[256];
|
extern int16_t sectorborder[256];
|
||||||
|
@ -85,18 +79,6 @@ static FORCE_INLINE int32_t bad_tspr(tspriteptr_t tspr)
|
||||||
return (tspr->owner < 0 || (unsigned)tspr->picnum >= MAXTILES);
|
return (tspr->owner < 0 || (unsigned)tspr->picnum >= MAXTILES);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// getpalookup (internal)
|
|
||||||
//
|
|
||||||
static FORCE_INLINE int32_t getpalookup(int32_t davis, int32_t dashade)
|
|
||||||
{
|
|
||||||
if (getpalookup_replace)
|
|
||||||
return getpalookup_replace(davis, dashade);
|
|
||||||
return min(max(dashade + (davis >> 8), 0), numshades - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static FORCE_INLINE int32_t getpalookupsh(int32_t davis) { return getpalookup(davis, globalshade) << 8; }
|
|
||||||
|
|
||||||
static FORCE_INLINE void setgotpic(int32_t tilenume)
|
static FORCE_INLINE void setgotpic(int32_t tilenume)
|
||||||
{
|
{
|
||||||
gotpic[tilenume>>3] |= pow2char[tilenume&7];
|
gotpic[tilenume>>3] |= pow2char[tilenume&7];
|
||||||
|
|
|
@ -41,7 +41,6 @@ void sub_5571C(char mode);
|
||||||
void sub_557C4(int x, int y, int interpolation);
|
void sub_557C4(int x, int y, int interpolation);
|
||||||
void DrawMirrors(int x, int y, int z, fixed_t a, fixed_t horiz, int smooth, int viewPlayer);
|
void DrawMirrors(int x, int y, int z, fixed_t a, fixed_t horiz, int smooth, int viewPlayer);
|
||||||
int qanimateoffs(int a1, int a2);
|
int qanimateoffs(int a1, int a2);
|
||||||
int32_t qgetpalookup(int32_t a1, int32_t a2);
|
|
||||||
void HookReplaceFunctions();
|
void HookReplaceFunctions();
|
||||||
|
|
||||||
struct QAV;
|
struct QAV;
|
||||||
|
|
|
@ -62,14 +62,6 @@ int qanimateoffs(int a1, int a2)
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t qgetpalookup(int32_t a1, int32_t a2)
|
|
||||||
{
|
|
||||||
if (gFogMode)
|
|
||||||
return ClipHigh(a1 >> 8, 15) * 16 + ClipRange(a2, 0, 15);
|
|
||||||
else
|
|
||||||
return ClipRange((a1 >> 8) + a2, 0, 63);
|
|
||||||
}
|
|
||||||
|
|
||||||
void qinitspritelists();
|
void qinitspritelists();
|
||||||
int32_t qinsertsprite(int16_t nSector, int16_t nStat);
|
int32_t qinsertsprite(int16_t nSector, int16_t nStat);
|
||||||
int32_t qdeletesprite(int16_t nSprite);
|
int32_t qdeletesprite(int16_t nSprite);
|
||||||
|
@ -79,7 +71,6 @@ int32_t qchangespritestat(int16_t nSprite, int16_t nStatus);
|
||||||
void HookReplaceFunctions(void)
|
void HookReplaceFunctions(void)
|
||||||
{
|
{
|
||||||
animateoffs_replace = qanimateoffs;
|
animateoffs_replace = qanimateoffs;
|
||||||
getpalookup_replace = qgetpalookup;
|
|
||||||
initspritelists_replace = qinitspritelists;
|
initspritelists_replace = qinitspritelists;
|
||||||
insertsprite_replace = qinsertsprite;
|
insertsprite_replace = qinsertsprite;
|
||||||
deletesprite_replace = qdeletesprite;
|
deletesprite_replace = qdeletesprite;
|
||||||
|
|
Loading…
Reference in a new issue