Fix building without GL and Polymost

git-svn-id: https://svn.eduke32.com/eduke32@324 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-10-29 20:18:04 +00:00
parent f83fe0c7d3
commit 59f5ab835f
4 changed files with 18 additions and 2 deletions

View File

@ -5684,6 +5684,7 @@ void drawrooms(long daposx, long daposy, long daposz,
umost[0] = shortptr1[0]-windowy1; umost[0] = shortptr1[0]-windowy1;
dmost[0] = shortptr2[0]-windowy1; dmost[0] = shortptr2[0]-windowy1;
#ifdef POLYMOST
if (rendmode == 4) if (rendmode == 4)
{ {
polymer_glinit(); polymer_glinit();
@ -5693,7 +5694,6 @@ void drawrooms(long daposx, long daposy, long daposz,
} }
//============================================================================= //POLYMOST BEGINS //============================================================================= //POLYMOST BEGINS
#ifdef POLYMOST
polymost_drawrooms(); if (rendmode) { return; } polymost_drawrooms(); if (rendmode) { return; }
#endif #endif
//============================================================================= //POLYMOST ENDS //============================================================================= //POLYMOST ENDS

View File

@ -1,5 +1,5 @@
// blah // blah
#ifdef POLYMOST
#include "polymer.h" #include "polymer.h"
// CVARS // CVARS
@ -1166,3 +1166,4 @@ void polymer_drawartsky(short tilenum)
i++; i++;
} }
} }
#endif

View File

@ -4143,6 +4143,7 @@ int ExtInit(void)
loadgroupfiles(defsfilename); loadgroupfiles(defsfilename);
bpp = 8; bpp = 8;
#if defined(POLYMOST) && defined(USE_OPENGL)
glusetexcache = glusetexcachecompression = -1; glusetexcache = glusetexcachecompression = -1;
if (loadsetup("build.cfg") < 0) initprintf("Configuration file not found, using defaults.\n"), rv = 1; if (loadsetup("build.cfg") < 0) initprintf("Configuration file not found, using defaults.\n"), rv = 1;
@ -4162,6 +4163,7 @@ int ExtInit(void)
glusetexcompr = glusetexcache = glusetexcachecompression = 1; glusetexcompr = glusetexcache = glusetexcachecompression = 1;
else glusetexcache = glusetexcachecompression = 0; else glusetexcache = glusetexcachecompression = 0;
} }
#endif
Bmemcpy((void *)buildkeys,(void *)keys,NUMBUILDKEYS); //Trick to make build use setup.dat keys Bmemcpy((void *)buildkeys,(void *)keys,NUMBUILDKEYS); //Trick to make build use setup.dat keys

View File

@ -3480,7 +3480,9 @@ void displayrooms(short snum,long smoothratio)
long tposx,tposy,i; long tposx,tposy,i;
short tang; short tang;
long tiltcx,tiltcy,tiltcs=0; // JBF 20030807 long tiltcx,tiltcy,tiltcs=0; // JBF 20030807
#ifdef POLYMOST
extern long rendmode; extern long rendmode;
#endif
p = &ps[snum]; p = &ps[snum];
@ -3490,7 +3492,11 @@ void displayrooms(short snum,long smoothratio)
pub = 0; pub = 0;
} }
#ifdef POLYMOST
if( ud.overhead_on == 2 || ud.show_help || (p->cursectnum == -1 && rendmode != 4)) if( ud.overhead_on == 2 || ud.show_help || (p->cursectnum == -1 && rendmode != 4))
#else
if( ud.overhead_on == 2 || ud.show_help || p->cursectnum == -1)
#endif
return; return;
smoothratio = min(max(smoothratio,0),65536); smoothratio = min(max(smoothratio,0),65536);
@ -3500,7 +3506,10 @@ void displayrooms(short snum,long smoothratio)
if(ud.pause_on || ps[snum].on_crane > -1) smoothratio = 65536; if(ud.pause_on || ps[snum].on_crane > -1) smoothratio = 65536;
sect = p->cursectnum; sect = p->cursectnum;
#ifdef POLYMOST
if(rendmode != 4) if(rendmode != 4)
#endif
if(sect < 0 || sect >= MAXSECTORS) return; if(sect < 0 || sect >= MAXSECTORS) return;
dointerpolations(smoothratio); dointerpolations(smoothratio);
@ -9000,6 +9009,7 @@ void app_main(int argc,char **argv)
} }
} }
#if defined(POLYMOST) && defined(USE_OPENGL)
glusetexcache = glusetexcachecompression = -1; glusetexcache = glusetexcachecompression = -1;
i = CONFIG_ReadSetup(); i = CONFIG_ReadSetup();
@ -9018,6 +9028,7 @@ void app_main(int argc,char **argv)
useprecache = glusetexcompr = glusetexcache = glusetexcachecompression = 1; useprecache = glusetexcompr = glusetexcache = glusetexcachecompression = 1;
else glusetexcache = glusetexcachecompression = 0; else glusetexcache = glusetexcachecompression = 0;
} }
#endif
if (preinitengine()) { if (preinitengine()) {
wm_msgbox("Build Engine Initialisation Error", wm_msgbox("Build Engine Initialisation Error",
@ -10571,7 +10582,9 @@ char domovethings(void)
} }
//polymer invalidate //polymer invalidate
#if defined(POLYMOST) && defined(USE_OPENGL)
updatesectors = 1; updatesectors = 1;
#endif
return 0; return 0;
} }