minor engine cleanup.

- enclose glbuild.h in #idndef ... sentinels
- engine.c: remove unused variable 'pageoffset', make 'lastx' static
- formatting

git-svn-id: https://svn.eduke32.com/eduke32@2272 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-01-20 13:24:15 +00:00
parent db94366657
commit 7a893b8ec4
4 changed files with 24 additions and 11 deletions

View file

@ -1,3 +1,7 @@
#ifndef BGLBUILD_H_INCLUDED_
#define BGLBUILD_H_INCLUDED_
#ifdef USE_OPENGL
#ifdef RENDERTYPEWIN
@ -340,3 +344,5 @@ int32_t unloadgldriver(void);
int32_t loadglulibrary(const char *driver);
int32_t unloadglulibrary(void);
#endif

View file

@ -2161,11 +2161,15 @@ int32_t globalx, globaly, globalz;
int16_t sectorborder[256], sectorbordercnt;
static char tablesloaded = 0;
int32_t pageoffset, ydim16, qsetmode = 0;
int32_t ydim16, qsetmode = 0;
int32_t startposx, startposy, startposz;
int16_t startang, startsectnum;
int16_t pointhighlight=-1, linehighlight=-1, highlightcnt=0;
#ifndef OBSOLETE_RENDMODES
static int32_t lastx[MAXYDIM];
#else
int32_t lastx[MAXYDIM];
#endif
char *transluc = NULL, paletteloaded = 0;
int32_t halfxdim16, midydim16;
@ -5916,20 +5920,20 @@ static void drawsprite(int32_t snum)
switch (smostwalltype[i])
{
case 0:
if (dalx2 <= darx2)
{
if ((dalx2 == lx) && (darx2 == rx)) return;
//clearbufbyte(&dwall[dalx2],(darx2-dalx2+1)*sizeof(dwall[0]),0L);
for (x=dalx2; x<=darx2; x++) dwall[x] = 0;
}
if (dalx2 <= darx2)
{
if ((dalx2 == lx) && (darx2 == rx)) return;
//clearbufbyte(&dwall[dalx2],(darx2-dalx2+1)*sizeof(dwall[0]),0L);
for (x=dalx2; x<=darx2; x++) dwall[x] = 0;
}
break;
case 1:
k = smoststart[i] - xb1[j];
k = smoststart[i] - xb1[j];
for (x=dalx2; x<=darx2; x++)
if (smost[k+x] > uwall[x]) uwall[x] = smost[k+x];
break;
case 2:
k = smoststart[i] - xb1[j];
k = smoststart[i] - xb1[j];
for (x=dalx2; x<=darx2; x++)
if (smost[k+x] < dwall[x]) dwall[x] = smost[k+x];
break;

View file

@ -17,6 +17,9 @@
# define YAX_MAXDRAWS 8
#endif
//#define OBSOLETE_RENDMODES
extern uint8_t **basepaltableptr;
extern uint8_t basepalcount;
extern uint8_t curbasepal;
@ -54,7 +57,9 @@ extern char inpreparemirror;
extern int32_t curbrightness, gammabrightness;
extern char britable[16][256];
extern char picsiz[MAXTILES];
#ifdef OBSOLETE_RENDMODES
extern int32_t lastx[MAXYDIM];
#endif
extern char *transluc;
extern int16_t sectorborder[256], sectorbordercnt;
extern int32_t qsetmode;

View file

@ -91,8 +91,6 @@ Low priority:
extern int32_t filelength(int h); // kplib.c
#endif
//#define OBSOLETE_RENDMODES
extern char textfont[2048], smalltextfont[2048];
int32_t rendmode=0;