- '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:
helixhorned 2012-01-15 22:39:38 +00:00
parent 340b2f7647
commit 260bbc1f92
6 changed files with 29 additions and 39 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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