mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
cleanup:
- 'whitecol' was defined in the engine and in build.c, use only the engine one - make cachesize, artsize, artversion static in engine.c - undo some formatting havoc presumably done by astyle git-svn-id: https://svn.eduke32.com/eduke32@2260 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
340b2f7647
commit
260bbc1f92
6 changed files with 29 additions and 39 deletions
|
@ -194,6 +194,7 @@ extern void showspritedata(int16_t spritenum, int16_t small);
|
|||
|
||||
extern void drawsmallabel(const char *text, char col, char backcol, int32_t dax, int32_t day, int32_t daz);
|
||||
|
||||
extern int32_t whitecol;
|
||||
extern int32_t circlewall;
|
||||
|
||||
int32_t loadsetup(const char *fn); // from config.c
|
||||
|
|
|
@ -63,11 +63,10 @@ int32_t xdim2d = 640, ydim2d = 480, xdimgame = 640, ydimgame = 480, bppgame = 8;
|
|||
int32_t forcesetup = 1;
|
||||
|
||||
int32_t g_maxCacheSize = 24<<20;
|
||||
//extern int32_t cachesize, artsize;
|
||||
|
||||
static int16_t oldmousebstatus = 0;
|
||||
char game_executable[BMAX_PATH] = DEFAULT_GAME_LOCAL_EXEC;
|
||||
int32_t zlock = 0x7fffffff, zmode = 0, whitecol, kensplayerheight = 32;
|
||||
int32_t zlock = 0x7fffffff, zmode = 0, kensplayerheight = 32;
|
||||
//int16_t defaultspritecstat = 0;
|
||||
|
||||
int16_t localartfreq[MAXTILES];
|
||||
|
@ -445,7 +444,7 @@ int32_t app_main(int32_t argc, const char **argv)
|
|||
char cmdsetup = 0;
|
||||
#endif
|
||||
char quitflag;
|
||||
int32_t i, j, k;
|
||||
int32_t i, k;
|
||||
|
||||
pathsearchmode = 1; // unrestrict findfrompath so that full access to the filesystem can be had
|
||||
|
||||
|
@ -584,12 +583,7 @@ int32_t app_main(int32_t argc, const char **argv)
|
|||
Bfree (g_defModules);
|
||||
g_defModules = NULL; // be defensive...
|
||||
|
||||
k = 0;
|
||||
for (i=0; i<256; i++)
|
||||
{
|
||||
j = ((int32_t)palette[i*3])+((int32_t)palette[i*3+1])+((int32_t)palette[i*3+2]);
|
||||
if (j > k) { k = j; whitecol = i; }
|
||||
}
|
||||
// Here used to be the 'whitecol' calculation
|
||||
|
||||
k = clipmapinfo_load("_clipshape0.map");
|
||||
if (k>0)
|
||||
|
@ -779,8 +773,6 @@ CANCEL:
|
|||
// clearfilenames();
|
||||
uninitengine();
|
||||
|
||||
// Bprintf("Memory status: %d(%d) bytes\n",cachesize,artsize);
|
||||
// Bprintf("%s\n",kensig);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,8 @@ static intptr_t slopalookup[16384]; // was 2048
|
|||
palette_t palookupfog[MAXPALOOKUPS];
|
||||
#endif
|
||||
|
||||
int32_t artversion, mapversion=7; // JBF 20040211: default mapversion to 7
|
||||
static int32_t artversion;
|
||||
int32_t mapversion=7; // JBF 20040211: default mapversion to 7
|
||||
char picsiz[MAXTILES];
|
||||
static void *pic = NULL;
|
||||
static char permanentlock = 255;
|
||||
|
@ -132,7 +133,7 @@ static char tilefilenum[MAXTILES];
|
|||
static int32_t tilefileoffs[MAXTILES];
|
||||
static int32_t lastageclock;
|
||||
|
||||
int32_t artsize = 0, cachesize = 0;
|
||||
static int32_t artsize = 0, cachesize = 0;
|
||||
|
||||
// maximum number of ART files
|
||||
static char *artptrs[MAXTILEFILES];
|
||||
|
@ -164,7 +165,7 @@ int32_t showfirstwall=0;
|
|||
int32_t showheightindicators=2;
|
||||
int32_t circlewall=-1;
|
||||
|
||||
char cachedebug = 0;
|
||||
//char cachedebug = 0;
|
||||
|
||||
qlz_state_compress *state_compress = NULL;
|
||||
qlz_state_decompress *state_decompress = NULL;
|
||||
|
@ -5040,32 +5041,32 @@ static void drawvox(int32_t dasprx, int32_t daspry, int32_t dasprz, int32_t dasp
|
|||
switch (i)
|
||||
{
|
||||
case 6:
|
||||
case 7:
|
||||
x1 = 0; y1 = 0; break;
|
||||
case 7:
|
||||
x1 = 0; y1 = 0; break;
|
||||
case 8:
|
||||
case 5:
|
||||
x1 = gxinc; y1 = gyinc; break;
|
||||
case 5:
|
||||
x1 = gxinc; y1 = gyinc; break;
|
||||
case 0:
|
||||
case 3:
|
||||
x1 = gyinc; y1 = -gxinc; break;
|
||||
case 3:
|
||||
x1 = gyinc; y1 = -gxinc; break;
|
||||
case 2:
|
||||
case 1:
|
||||
x1 = gxinc+gyinc; y1 = gyinc-gxinc; break;
|
||||
case 1:
|
||||
x1 = gxinc+gyinc; y1 = gyinc-gxinc; break;
|
||||
}
|
||||
switch (i)
|
||||
{
|
||||
case 2:
|
||||
case 5:
|
||||
x2 = 0; y2 = 0; break;
|
||||
case 5:
|
||||
x2 = 0; y2 = 0; break;
|
||||
case 0:
|
||||
case 1:
|
||||
x2 = gxinc; y2 = gyinc; break;
|
||||
case 1:
|
||||
x2 = gxinc; y2 = gyinc; break;
|
||||
case 8:
|
||||
case 7:
|
||||
x2 = gyinc; y2 = -gxinc; break;
|
||||
case 7:
|
||||
x2 = gyinc; y2 = -gxinc; break;
|
||||
case 6:
|
||||
case 3:
|
||||
x2 = gxinc+gyinc; y2 = gyinc-gxinc; break;
|
||||
case 3:
|
||||
x2 = gxinc+gyinc; y2 = gyinc-gxinc; break;
|
||||
}
|
||||
oand = pow2char[(xs<backx)+0]+pow2char[(ys<backy)+2];
|
||||
oand16 = oand+16;
|
||||
|
@ -7292,7 +7293,7 @@ static void loadpalette(void)
|
|||
|
||||
if ((palookup[0] = (char *)Bmalloc(numpalookups<<8)) == NULL)
|
||||
allocache((intptr_t *)&palookup[0],numpalookups<<8,&permanentlock);
|
||||
if ((transluc = (char *)Bmalloc(65536L)) == NULL)
|
||||
if ((transluc = (char *)Bmalloc(65536)) == NULL)
|
||||
allocache((intptr_t *)&transluc,65536,&permanentlock);
|
||||
|
||||
globalpalwritten = palookup[0]; globalpal = 0;
|
||||
|
@ -7317,13 +7318,13 @@ static void loadpalette(void)
|
|||
|
||||
kclose(fil);
|
||||
|
||||
initfastcolorlookup(30L,59L,11L);
|
||||
initfastcolorlookup(30, 59, 11);
|
||||
|
||||
{
|
||||
int32_t i, j, k = 0;
|
||||
for (i=0; i<256; i++)
|
||||
{
|
||||
j = ((int32_t)palette[i*3])+((int32_t)palette[i*3+1])+((int32_t)palette[i*3+2]);
|
||||
j = palette[i*3] + palette[i*3+1] + palette[i*3+2];
|
||||
if (j > k) { k = j; whitecol = i; }
|
||||
}
|
||||
}
|
||||
|
@ -10275,7 +10276,7 @@ int32_t loadpics(const char *filename, int32_t askedsize)
|
|||
|
||||
while ((pic = Bmalloc(cachesize)) == NULL)
|
||||
{
|
||||
cachesize -= 65536L;
|
||||
cachesize -= 65536;
|
||||
if (cachesize < 65536) return(-1);
|
||||
}
|
||||
initcache((intptr_t)pic, cachesize);
|
||||
|
@ -10332,7 +10333,7 @@ void loadtile(int16_t tilenume)
|
|||
faketimerhandler();
|
||||
}
|
||||
|
||||
if (cachedebug) OSD_Printf("Tile:%d\n",tilenume);
|
||||
// if (cachedebug) OSD_Printf("Tile:%d\n",tilenume);
|
||||
|
||||
// dummy tiles for highres replacements and tilefromtexture definitions
|
||||
if (faketilesiz[tilenume])
|
||||
|
|
|
@ -8545,8 +8545,6 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
|
|||
if (argc > i+1)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
extern char TEXCACHEFILE[BMAX_PATH];
|
||||
|
||||
Bsnprintf(tempbuf,sizeof(tempbuf),"%s/%s",argv[i+1],TEXCACHEFILE);
|
||||
Bstrncpy(TEXCACHEFILE,tempbuf, sizeof(TEXCACHEFILE));
|
||||
TEXCACHEFILE[sizeof(TEXCACHEFILE)-1] = 0;
|
||||
|
|
|
@ -39,7 +39,6 @@ uint8_t default_buildkeys[NUMBUILDKEYS] =
|
|||
0x9c,0x1c,0xd,0xc,0xf,0x29
|
||||
};
|
||||
|
||||
extern int32_t whitecol;
|
||||
extern char changechar(char dachar, int32_t dadir, char smooshyalign, char boundcheck);
|
||||
extern void updatenumsprites(void);
|
||||
|
||||
|
|
|
@ -2033,7 +2033,6 @@ int32_t G_EnterLevel(int32_t g)
|
|||
allignwarpelevators();
|
||||
resetpspritevars(g);
|
||||
|
||||
//cachedebug = 0;
|
||||
// automapping = 0;
|
||||
|
||||
G_FadeLoad(0,0,0, 63,0, -7, 4);
|
||||
|
|
Loading…
Reference in a new issue