From 664e0dcb9b57c0d5e1d6106fc832c7a8bc4865e0 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 25 Dec 2011 15:33:02 +0000 Subject: [PATCH] Fix non-TROR build and add a warning that such a build is only useful for debugging, i.e. savegames and the like will break. git-svn-id: https://svn.eduke32.com/eduke32@2204 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 3 ++- polymer/eduke32/build/src/engine.c | 14 +++++++++++--- polymer/eduke32/build/src/polymer.c | 10 ++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index e3751050c..3aa2cd534 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -1867,8 +1867,9 @@ static void duplicate_selected_sectors(void) if (miny+dy <= -editorgridextent) dy*=-1; onumsectors = numsectors; +#ifdef YAX_ENABLE onumyaxbunches = numyaxbunches; - +#endif // restore! this will not fail. restore_highlighted_map(&mapinfo, 1); diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 1fbcd57c9..8290714e0 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -255,6 +255,10 @@ void yax_updategrays(int32_t posze) } +#if !defined YAX_ENABLE +# warning Non-TROR builds are supported only for debugging. Expect savegame breakage etc... +#endif + #ifdef YAX_ENABLE // all references to floor/ceiling bunchnums should be through the // get/set functions! @@ -8008,6 +8012,7 @@ void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz, # ifdef POLYMER if (rendmode == 4) { +# ifdef YAX_ENABLE // BEGIN TWEAK ceiling/floor fake 'TROR' pics if (editstatus && showinvisibility) { @@ -8017,7 +8022,7 @@ void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz, yax_tweakpicnums(i, YAX_FLOOR, 0); } } - +# endif polymer_glinit(); polymer_drawrooms(daposx, daposy, daposz, daang, dahoriz, dacursectnum); bglDisable(GL_CULL_FACE); @@ -8494,7 +8499,7 @@ killsprite: #ifdef POLYMER if (rendmode == 4) { polymer_drawmasks(); - +# ifdef YAX_ENABLE // END TWEAK ceiling/floor fake 'TROR' pics if (editstatus && showinvisibility) { @@ -8504,6 +8509,7 @@ killsprite: yax_tweakpicnums(i, YAX_FLOOR, 1); } } +# endif } #endif @@ -10757,7 +10763,9 @@ restart_grand: #endif if ((x1 == x2) && (y1 == y2)) return(sect1 == sect2); +#ifdef YAX_ENABLE pendingsectnum = -1; +#endif x21 = x2-x1; y21 = y2-y1; z21 = z2-z1; sectbitmap[sect1>>3] |= (1<<(sect1&7)); @@ -10782,9 +10790,9 @@ restart_grand: t = y31*x34-x31*y34; if ((unsigned)t >= (unsigned)bot) { +#ifdef YAX_ENABLE if (t >= bot) { -#ifdef YAX_ENABLE int32_t cf, frac, ns; for (cf=0; cf<2; cf++) { diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index f3523edfe..f49647b5e 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -1734,7 +1734,7 @@ static void polymer_displayrooms(int16_t dacursectnum) polymer_drawwall(sectorqueue[front], sec->wallptr + i); } while (--i >= 0); - +#ifdef YAX_ENABLE // queue ROR neighbors if ((sec->floorstat & 1024) && (bunchnum = yax_getbunch(sectorqueue[front], YAX_FLOOR)) >= 0) { @@ -1763,7 +1763,7 @@ static void polymer_displayrooms(int16_t dacursectnum) } } } - +#endif i = sec->wallnum-1; do { @@ -5354,6 +5354,7 @@ static inline void polymer_culllight(int16_t lighti) checkror = TRUE; } +#ifdef YAX_ENABLE // queue ROR neighbors if (checkror && (sec->floorstat & 1024) && (bunchnum = yax_getbunch(sectorqueue[front], YAX_FLOOR)) >= 0) { @@ -5368,7 +5369,7 @@ static inline void polymer_culllight(int16_t lighti) } } } - +#endif checkror = FALSE; zdiff = light->z - s->ceilingz; @@ -5386,6 +5387,7 @@ static inline void polymer_culllight(int16_t lighti) checkror = TRUE; } +#ifdef YAX_ENABLE // queue ROR neighbors if (checkror && (sec->ceilingstat & 1024) && (bunchnum = yax_getbunch(sectorqueue[front], YAX_CEILING)) >= 0) { @@ -5400,7 +5402,7 @@ static inline void polymer_culllight(int16_t lighti) } } } - +#endif i = 0; while (i < sec->wallnum) {