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
This commit is contained in:
helixhorned 2011-12-25 15:33:02 +00:00
parent e1a10b2d57
commit 664e0dcb9b
3 changed files with 19 additions and 8 deletions

View file

@ -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);

View file

@ -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++)
{

View file

@ -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)
{