Fix the build with POLYMER=0 or USE_OPENGL=0.

git-svn-id: https://svn.eduke32.com/eduke32@1564 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2009-12-13 01:23:44 +00:00
parent a5eb3903b2
commit ce20870e21
4 changed files with 16 additions and 6 deletions

View file

@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define _m32script_h_ #define _m32script_h_
#include "compat.h" #include "compat.h"
#include "baselayer.h"
#include "build.h" #include "build.h"
#include "editor.h" #include "editor.h"

View file

@ -255,12 +255,10 @@ int32_t baselayer_init(void)
#endif #endif
, ,
osdfunc_setrendermode); osdfunc_setrendermode);
#ifdef USE_OPENGL
# ifdef DEBUGGINGAIDS # ifdef DEBUGGINGAIDS
OSD_RegisterFunction("hicsetpalettetint","hicsetpalettetint: sets palette tinting values",osdcmd_hicsetpalettetint); OSD_RegisterFunction("hicsetpalettetint","hicsetpalettetint: sets palette tinting values",osdcmd_hicsetpalettetint);
# endif # endif
#ifdef USE_OPENGL
OSD_RegisterFunction("glinfo","glinfo: shows OpenGL information about the current OpenGL mode",osdcmd_glinfo); OSD_RegisterFunction("glinfo","glinfo: shows OpenGL information about the current OpenGL mode",osdcmd_glinfo);
#endif #endif
polymost_initosdfuncs(); polymost_initosdfuncs();

View file

@ -958,8 +958,11 @@ process:
l = packbuf[j++]; l = packbuf[j++];
while (l--) 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; _prlight *mylight = NULL;
#endif
Bmemcpy(&i, &packbuf[j], sizeof(int16_t)); Bmemcpy(&i, &packbuf[j], sizeof(int16_t));
j += sizeof(int16_t); j += sizeof(int16_t);
@ -989,8 +992,10 @@ process:
sprite[i].statnum = ostatnum; sprite[i].statnum = ostatnum;
if (sect != osect) changespritesect(i, sect); if (sect != osect) changespritesect(i, sect);
if (statnum != ostatnum) changespritestat(i, statnum); if (statnum != ostatnum) changespritestat(i, statnum);
#ifdef POLYMER
mylight = ActorExtra[i].lightptr; mylight = ActorExtra[i].lightptr;
lightid = ActorExtra[i].lightId; lightid = ActorExtra[i].lightId;
#endif
} }
j += sizeof(spritetype); j += sizeof(spritetype);
@ -1002,8 +1007,10 @@ process:
j += sizeof(ActorData_t)-sizeof(ActorExtra[0].filler)-sizeof(ActorExtra[0].projectile)-sizeof(ActorExtra[0].lightptr); j += sizeof(ActorData_t)-sizeof(ActorExtra[0].filler)-sizeof(ActorExtra[0].projectile)-sizeof(ActorExtra[0].lightptr);
ActorExtra[i].projectile = &SpriteProjectile[i]; ActorExtra[i].projectile = &SpriteProjectile[i];
#ifdef POLYMER
ActorExtra[i].lightptr = mylight; ActorExtra[i].lightptr = mylight;
ActorExtra[i].lightId = lightid; ActorExtra[i].lightId = lightid;
#endif
if (packbuf[jj] & 1) T2 += (intptr_t)&script[0]; if (packbuf[jj] & 1) T2 += (intptr_t)&script[0];
if (packbuf[jj] & 2) T5 += (intptr_t)&script[0]; if (packbuf[jj] & 2) T5 += (intptr_t)&script[0];

View file

@ -698,7 +698,9 @@ int32_t startwin_run(void)
settings.flags = 0; settings.flags = 0;
if (ud.config.ScreenMode) settings.flags |= 1; if (ud.config.ScreenMode) settings.flags |= 1;
#ifdef POLYMER
if (glrendmode == 4) settings.flags |= 2; if (glrendmode == 4) settings.flags |= 2;
#endif
if (ud.config.NoAutoLoad) settings.flags |= 4; if (ud.config.NoAutoLoad) settings.flags |= 4;
settings.xdim = ud.config.ScreenWidth; settings.xdim = ud.config.ScreenWidth;
settings.ydim = ud.config.ScreenHeight; settings.ydim = ud.config.ScreenHeight;
@ -736,8 +738,10 @@ int32_t startwin_run(void)
int32_t i; int32_t i;
ud.config.ScreenMode = (settings.flags&1); ud.config.ScreenMode = (settings.flags&1);
#ifdef POLYMER
if (settings.flags & 2) glrendmode = 4; if (settings.flags & 2) glrendmode = 4;
else glrendmode = 3; else glrendmode = 3;
#endif
if (settings.flags & 4) ud.config.NoAutoLoad = 1; if (settings.flags & 4) ud.config.NoAutoLoad = 1;
else ud.config.NoAutoLoad = 0; else ud.config.NoAutoLoad = 0;
ud.config.ScreenWidth = settings.xdim; ud.config.ScreenWidth = settings.xdim;