From ce20870e213a5d6b14199c44ecef1b6ee8d5eaed Mon Sep 17 00:00:00 2001 From: plagman Date: Sun, 13 Dec 2009 01:23:44 +0000 Subject: [PATCH] Fix the build with POLYMER=0 or USE_OPENGL=0. git-svn-id: https://svn.eduke32.com/eduke32@1564 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/m32script.h | 1 + polymer/eduke32/build/src/baselayer.c | 8 +++----- polymer/eduke32/source/game.c | 9 ++++++++- polymer/eduke32/source/startwin.game.c | 4 ++++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/polymer/eduke32/build/include/m32script.h b/polymer/eduke32/build/include/m32script.h index 36cf28662..e2ba1abc8 100644 --- a/polymer/eduke32/build/include/m32script.h +++ b/polymer/eduke32/build/include/m32script.h @@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _m32script_h_ #include "compat.h" +#include "baselayer.h" #include "build.h" #include "editor.h" diff --git a/polymer/eduke32/build/src/baselayer.c b/polymer/eduke32/build/src/baselayer.c index 7a00ff4e9..25047f2e5 100644 --- a/polymer/eduke32/build/src/baselayer.c +++ b/polymer/eduke32/build/src/baselayer.c @@ -255,12 +255,10 @@ int32_t baselayer_init(void) #endif , osdfunc_setrendermode); - -#ifdef DEBUGGINGAIDS - OSD_RegisterFunction("hicsetpalettetint","hicsetpalettetint: sets palette tinting values",osdcmd_hicsetpalettetint); -#endif - #ifdef USE_OPENGL +# ifdef DEBUGGINGAIDS + OSD_RegisterFunction("hicsetpalettetint","hicsetpalettetint: sets palette tinting values",osdcmd_hicsetpalettetint); +# endif OSD_RegisterFunction("glinfo","glinfo: shows OpenGL information about the current OpenGL mode",osdcmd_glinfo); #endif polymost_initosdfuncs(); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 5e9773694..0ed81c112 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -958,8 +958,11 @@ process: l = packbuf[j++]; while (l--) { - int16_t i, sect, statnum, osect, ostatnum, jj, lightid = -1, opicnum; + int16_t i, sect, statnum, osect, ostatnum, jj, opicnum; +#ifdef POLYMER + int16_t lightid = -1; _prlight *mylight = NULL; +#endif Bmemcpy(&i, &packbuf[j], sizeof(int16_t)); j += sizeof(int16_t); @@ -989,8 +992,10 @@ process: sprite[i].statnum = ostatnum; if (sect != osect) changespritesect(i, sect); if (statnum != ostatnum) changespritestat(i, statnum); +#ifdef POLYMER mylight = ActorExtra[i].lightptr; lightid = ActorExtra[i].lightId; +#endif } j += sizeof(spritetype); @@ -1002,8 +1007,10 @@ process: j += sizeof(ActorData_t)-sizeof(ActorExtra[0].filler)-sizeof(ActorExtra[0].projectile)-sizeof(ActorExtra[0].lightptr); ActorExtra[i].projectile = &SpriteProjectile[i]; +#ifdef POLYMER ActorExtra[i].lightptr = mylight; ActorExtra[i].lightId = lightid; +#endif if (packbuf[jj] & 1) T2 += (intptr_t)&script[0]; if (packbuf[jj] & 2) T5 += (intptr_t)&script[0]; diff --git a/polymer/eduke32/source/startwin.game.c b/polymer/eduke32/source/startwin.game.c index 577d7210c..798297624 100644 --- a/polymer/eduke32/source/startwin.game.c +++ b/polymer/eduke32/source/startwin.game.c @@ -698,7 +698,9 @@ int32_t startwin_run(void) settings.flags = 0; if (ud.config.ScreenMode) settings.flags |= 1; +#ifdef POLYMER if (glrendmode == 4) settings.flags |= 2; +#endif if (ud.config.NoAutoLoad) settings.flags |= 4; settings.xdim = ud.config.ScreenWidth; settings.ydim = ud.config.ScreenHeight; @@ -736,8 +738,10 @@ int32_t startwin_run(void) int32_t i; ud.config.ScreenMode = (settings.flags&1); +#ifdef POLYMER if (settings.flags & 2) glrendmode = 4; else glrendmode = 3; +#endif if (settings.flags & 4) ud.config.NoAutoLoad = 1; else ud.config.NoAutoLoad = 0; ud.config.ScreenWidth = settings.xdim;