Fix building with USE_OPENGL = 0 and POLYMOST = 0

git-svn-id: https://svn.eduke32.com/eduke32@259 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-08-07 19:57:53 +00:00
parent 660815a3fd
commit 897bfa7a0e
4 changed files with 8 additions and 6 deletions

View file

@ -688,7 +688,7 @@ static void scansector(short sectnum);
#include "polymost.c"
#else
void hicsetpalettetint(long palnum, unsigned char r, unsigned char g, unsigned char b, unsigned char effect) { }
int hicsetsubsttex(long picnum, long palnum, char *filen, float alphacut) { return 0; }
int hicsetsubsttex(long picnum, long palnum, char *filen, float alphacut, char flags) { return 0; }
int hicsetskybox(long picnum, long palnum, char *faces[6]) { return 0; }
int hicclearsubst(long picnum, long palnum) { return 0; }
long polymost_drawtilescreen (long tilex, long tiley, long wallnum, long dimen) { return -1; }

View file

@ -657,10 +657,10 @@ int32 CONFIG_ReadSetup( void )
useprecache = glusetexcompr = glusetexcache = glusetexcachecompression = 1;
else glusetexcache = glusetexcachecompression = 0;
}
#endif
dummy = usemodels; SCRIPT_GetNumber( scripthandle, "Screen Setup", "UseModels",&dummy); usemodels = dummy != 0;
dummy = usehightile; SCRIPT_GetNumber( scripthandle, "Screen Setup", "UseHightile",&dummy); usehightile = dummy != 0;
#endif
SCRIPT_GetNumber( scripthandle, "Misc", "Executions",&ud.executions);
SCRIPT_GetNumber( scripthandle, "Setup", "ForceSetup",&ForceSetup);
SCRIPT_GetNumber( scripthandle, "Misc", "RunMode",&RunMode);
@ -806,9 +806,10 @@ void CONFIG_WriteSetup( void )
SCRIPT_PutNumber( scripthandle, "Screen Setup", "ScreenWidth",ScreenWidth,false,false); // JBF 20031206
SCRIPT_PutNumber( scripthandle, "Screen Setup", "Shadows",ud.shadows,false,false);
SCRIPT_PutNumber( scripthandle, "Screen Setup", "Tilt",ud.screen_tilting,false,false);
#if defined(POLYMOST) && defined(USE_OPENGL)
SCRIPT_PutNumber( scripthandle, "Screen Setup", "UseHightile",usehightile,false,false);
SCRIPT_PutNumber( scripthandle, "Screen Setup", "UseModels",usemodels,false,false);
#endif
SCRIPT_PutNumber( scripthandle, "Sound Setup", "AmbienceToggle",AmbienceToggle,false,false);
SCRIPT_PutNumber( scripthandle, "Sound Setup", "FXVolume",FXVolume,false,false);
SCRIPT_PutNumber( scripthandle, "Sound Setup", "MusicToggle",MusicToggle,false,false);

View file

@ -326,6 +326,7 @@ void cacheit(void)
if (waloff[i] == 0)
loadtile((short)i);
#ifdef POLYMOST
if (useprecache) {
if (precachehightile[0][i>>3] & pow2char[i&7])
for (k=0; k<MAXPALOOKUPS; k++)
@ -335,7 +336,7 @@ void cacheit(void)
for (k=0; k<MAXPALOOKUPS; k++)
polymost_precache(i,k,1);
}
#endif
j++;
pc++;
} else continue;

View file

@ -3190,7 +3190,7 @@ void checksectors(short snum)
else
{
ud.level_number++;
if( (ud.volume_number && ud.level_number > 10 ) || ud.level_number > 5 )
if( (ud.volume_number && ud.level_number > 10 ) || ( ud.volume_number == 0 && ud.level_number > 5 ) )
ud.level_number = 0;
ud.m_level_number = ud.level_number;
}