From 4f9699e03b4803dd5f8f525d0f25162d6074aecf Mon Sep 17 00:00:00 2001 From: plagman Date: Sun, 27 Feb 2011 22:11:39 +0000 Subject: [PATCH] Fix the build with USE_OPENGL=0. git-svn-id: https://svn.eduke32.com/eduke32@1810 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/engine.c | 9 +++++---- polymer/eduke32/build/src/sdlayer.c | 9 ++++++--- polymer/eduke32/source/savegame.c | 2 ++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index e52d6b01d..5b2c65ff4 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -7894,9 +7894,9 @@ void delete_maphack_lights() {} // // loadmaphack // -#if defined(POLYMOST) && defined(USE_OPENGL) int32_t loadmaphack(const char *filename) { +#if defined(POLYMOST) && defined(USE_OPENGL) enum { T_EOF = -2, @@ -8178,10 +8178,11 @@ int32_t loadmaphack(const char *filename) scriptfile_close(script); return 0; -} #else -int32_t loadmaphack(char *filename) { UNREFERENCED_PARAMETER(filename); return -1; } + UNREFERENCED_PARAMETER(filename); + return -1; #endif +} // @@ -8519,7 +8520,7 @@ void nextpage(void) if ((totalclock >= lastageclock+CACHEAGETIME) || (totalclock < lastageclock)) { lastageclock = totalclock; agecache(); } -#ifdef USE_OPENGL +#if defined(POLYMOST) && defined(USE_OPENGL) omdtims = mdtims; mdtims = getticks(); { diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index 00bc29a4f..816f85bf3 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -303,7 +303,10 @@ int32_t initsystem(void) } else */ - novideo = nogl = 1; + novideo = 1; +#ifdef USE_OPENGL + nogl = 1; +#endif } signal(SIGSEGV, sighandler); @@ -987,7 +990,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs) if (lockcount) while (lockcount) enddrawing(); -#if defined(USE_OPENGL) +#if defined(POLYMOST) && defined(USE_OPENGL) if (bpp > 8 && sdl_surface) polymost_glreset(); #endif @@ -998,7 +1001,7 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs) gammabrightness = 0; // redetect on next mode switch } -#if defined(USE_OPENGL) +#if defined(POLYMOST) && defined(USE_OPENGL) if (c > 8) { int32_t i, j, multisamplecheck = (glmultisample > 0); diff --git a/polymer/eduke32/source/savegame.c b/polymer/eduke32/source/savegame.c index 77a222f94..9311e11c0 100644 --- a/polymer/eduke32/source/savegame.c +++ b/polymer/eduke32/source/savegame.c @@ -1341,8 +1341,10 @@ static uint32_t calcsz(const dataspec_t *spec) } static void sv_postudload(); +#if defined(POLYMOST) && defined(USE_OPENGL) static void sv_prespriteextsave(); static void sv_postspriteext(); +#endif static void sv_calcbitptrsize(); static void sv_prescriptsave_once(); static void sv_prescriptload_once();