From 1dd52a4d6e37d8823f7e9cd7c180236b46ed1978 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 7 Feb 2013 21:01:24 +0000 Subject: [PATCH] Fix POLYMER=0 build, cleaning up #include discipline on the way. Also taking care that the USE_OPENGL=0 build builds. git-svn-id: https://svn.eduke32.com/eduke32@3467 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/build.h | 2 +- polymer/eduke32/build/include/mdsprite.h | 2 ++ polymer/eduke32/build/src/defs.c | 3 +++ polymer/eduke32/source/premap.c | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index ae4fe6268..6f57c90f2 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -11,6 +11,7 @@ #include "compat.h" #include "pragmas.h" +#include "glbuild.h" #ifdef EXTERNC extern "C" { @@ -1076,7 +1077,6 @@ void hash_delete(hashtable_t *t, const char *s); extern void initialize_engine_globals(void); -// XXX: These assume that glbuild.h is already #include'd static inline void push_nofog(void) { #ifdef USE_OPENGL diff --git a/polymer/eduke32/build/include/mdsprite.h b/polymer/eduke32/build/include/mdsprite.h index 1e2735914..34492466c 100644 --- a/polymer/eduke32/build/include/mdsprite.h +++ b/polymer/eduke32/build/include/mdsprite.h @@ -1,6 +1,7 @@ #ifndef _mdsprite_h_ # define _mdsprite_h_ +#ifdef USE_OPENGL #include "hightile.h" #define SHIFTMOD32(a) ((a)&31) @@ -226,4 +227,5 @@ int32_t voxdraw(voxmodel_t *m, const spritetype *tspr); int md3postload_polymer(md3model_t* m); //int32_t md_thinoutmodel(int32_t modelid, uint8_t *usedframebitmap); +#endif // defined USE_OPENGL #endif // !_mdsprite_h_ diff --git a/polymer/eduke32/build/src/defs.c b/polymer/eduke32/build/src/defs.c index afde7062e..44ca8ca08 100644 --- a/polymer/eduke32/build/src/defs.c +++ b/polymer/eduke32/build/src/defs.c @@ -14,6 +14,7 @@ #include "kplib.h" #include "quicklz.h" #include "common.h" +#include "mdsprite.h" // md3model_t enum scripttoken_t { @@ -699,8 +700,10 @@ static int32_t defsparser(scriptfile *script) break; } md_setmisc(lastmodelid,(float)scale, shadeoffs,0.0,0.0,0); +# ifdef POLYMER if (glrendmode==4) md3postload_polymer((md3model_t *)models[lastmodelid]); +# endif #endif modelskin = lastmodelskin = 0; seenframe = 0; diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index b2a0d04a1..aeb8f7988 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -513,8 +513,9 @@ void G_CacheMapData(void) // this is the CROSSHAIR_COLOR, see comment in game.c if (k == MAXPALOOKUPS-RESERVEDPALS-1) break; - +#ifdef POLYMER if (rendmode!=4 || !polymer_havehighpalookup(0, k)) +#endif polymost_precache(i,k,type); }