From 59f5ab835f71665e64c8c807eb8b27c3a3351281 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 29 Oct 2006 20:18:04 +0000 Subject: [PATCH] Fix building without GL and Polymost git-svn-id: https://svn.eduke32.com/eduke32@324 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/engine.c | 2 +- polymer/build/src/polymer.c | 3 ++- polymer/eduke32/source/astub.c | 2 ++ polymer/eduke32/source/game.c | 13 +++++++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/polymer/build/src/engine.c b/polymer/build/src/engine.c index e1d7d2b82..e7cb17399 100644 --- a/polymer/build/src/engine.c +++ b/polymer/build/src/engine.c @@ -5684,6 +5684,7 @@ void drawrooms(long daposx, long daposy, long daposz, umost[0] = shortptr1[0]-windowy1; dmost[0] = shortptr2[0]-windowy1; +#ifdef POLYMOST if (rendmode == 4) { polymer_glinit(); @@ -5693,7 +5694,6 @@ void drawrooms(long daposx, long daposy, long daposz, } //============================================================================= //POLYMOST BEGINS -#ifdef POLYMOST polymost_drawrooms(); if (rendmode) { return; } #endif //============================================================================= //POLYMOST ENDS diff --git a/polymer/build/src/polymer.c b/polymer/build/src/polymer.c index de761e92d..caa0967f8 100644 --- a/polymer/build/src/polymer.c +++ b/polymer/build/src/polymer.c @@ -1,5 +1,5 @@ // blah - +#ifdef POLYMOST #include "polymer.h" // CVARS @@ -1166,3 +1166,4 @@ void polymer_drawartsky(short tilenum) i++; } } +#endif diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 26991c88b..513331dee 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -4143,6 +4143,7 @@ int ExtInit(void) loadgroupfiles(defsfilename); bpp = 8; +#if defined(POLYMOST) && defined(USE_OPENGL) glusetexcache = glusetexcachecompression = -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; else glusetexcache = glusetexcachecompression = 0; } +#endif Bmemcpy((void *)buildkeys,(void *)keys,NUMBUILDKEYS); //Trick to make build use setup.dat keys diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index d1cfa5a4c..64ba5542e 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -3480,7 +3480,9 @@ void displayrooms(short snum,long smoothratio) long tposx,tposy,i; short tang; long tiltcx,tiltcy,tiltcs=0; // JBF 20030807 +#ifdef POLYMOST extern long rendmode; +#endif p = &ps[snum]; @@ -3490,7 +3492,11 @@ void displayrooms(short snum,long smoothratio) pub = 0; } +#ifdef POLYMOST 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; 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; sect = p->cursectnum; + +#ifdef POLYMOST if(rendmode != 4) +#endif if(sect < 0 || sect >= MAXSECTORS) return; dointerpolations(smoothratio); @@ -9000,6 +9009,7 @@ void app_main(int argc,char **argv) } } +#if defined(POLYMOST) && defined(USE_OPENGL) glusetexcache = glusetexcachecompression = -1; i = CONFIG_ReadSetup(); @@ -9018,6 +9028,7 @@ void app_main(int argc,char **argv) useprecache = glusetexcompr = glusetexcache = glusetexcachecompression = 1; else glusetexcache = glusetexcachecompression = 0; } +#endif if (preinitengine()) { wm_msgbox("Build Engine Initialisation Error", @@ -10571,7 +10582,9 @@ char domovethings(void) } //polymer invalidate +#if defined(POLYMOST) && defined(USE_OPENGL) updatesectors = 1; +#endif return 0; }