From 55161d90444354d7f1d3560a2bc0fa5df2294fc1 Mon Sep 17 00:00:00 2001 From: terminx Date: Mon, 7 Aug 2006 20:08:59 +0000 Subject: [PATCH] Fix building with USE_OPENGL = 0 and POLYMOST = 1, because some people in the world are retarded and we don't want to give them a hard time. git-svn-id: https://svn.eduke32.com/eduke32@260 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/polymost.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/polymer/build/src/polymost.c b/polymer/build/src/polymost.c index 9527d7d24..ee37235c5 100644 --- a/polymer/build/src/polymost.c +++ b/polymer/build/src/polymost.c @@ -2455,12 +2455,14 @@ static void polymost_drawalls (long bunch) } domostpolymethod = (globalorientation>>7)&3; if (globalposz >= getflorzofslope(sectnum,globalposx,globalposy)) domostpolymethod = -1; //Back-face culling +#ifdef USE_OPENGL if(!nofog) { int i = klabs(sec->floorshade); if(i > 30) i = 30; bglFogf(GL_FOG_DENSITY,gvisibility/(sec->floorshade<0?(shadetable[i]-glnegshadeoffset)*glnegshadescale:1)*(sec->floorshade<0?1:shadetable[i]*glshadescale)*((float)((unsigned char)(sec->visibility<240?sec->visibility+16:sec->visibility-239)))); } +#endif pow2xsplit = 0; domost(x0,fy0,x1,fy1); //flor domostpolymethod = 0; } @@ -2821,12 +2823,14 @@ static void polymost_drawalls (long bunch) } domostpolymethod = (globalorientation>>7)&3; if (globalposz <= getceilzofslope(sectnum,globalposx,globalposy)) domostpolymethod = -1; //Back-face culling +#ifdef USE_OPENGL if(!nofog) { int i = klabs(sec->ceilingshade); if(i > 30) i = 30; bglFogf(GL_FOG_DENSITY,gvisibility/(sec->ceilingshade<0?(shadetable[i]-glnegshadeoffset)*glnegshadescale:1)*(sec->ceilingshade<0?1:shadetable[i]*glshadescale)*((float)((unsigned char)(sec->visibility<240?sec->visibility+16:sec->visibility-239)))); } +#endif pow2xsplit = 0; domost(x1,cy1,x0,cy0); //ceil domostpolymethod = 0; } @@ -3158,13 +3162,14 @@ static void polymost_drawalls (long bunch) guo = gdo*t - guo; } if (wal->cstat&256) { gvx = -gvx; gvy = -gvy; gvo = -gvo; } //yflip - +#ifdef USE_OPENGL if(!nofog) { int i = klabs(wal->shade); if(i > 30) i = 30; bglFogf(GL_FOG_DENSITY,gvisibility/(wal->shade<0?(shadetable[i]-glnegshadeoffset)*glnegshadescale:1)*(wal->shade<0?1:shadetable[i]*glshadescale)*((float)((unsigned char)(sec->visibility<240?sec->visibility+16:sec->visibility-239)))); } +#endif pow2xsplit = 1; domost(x1,ocy1,x0,ocy0); if (wal->cstat&8) { gux = ogux; guy = oguy; guo = oguo; } } @@ -3199,13 +3204,14 @@ static void polymost_drawalls (long bunch) guo = gdo*t - guo; } if (nwal->cstat&256) { gvx = -gvx; gvy = -gvy; gvo = -gvo; } //yflip - +#ifdef USE_OPENGL if(!nofog) { int i = klabs(nwal->shade); if(i > 30) i = 30; bglFogf(GL_FOG_DENSITY,gvisibility/(nwal->shade<0?(shadetable[i]-glnegshadeoffset)*glnegshadescale:1)*(nwal->shade<0?1:shadetable[i]*glshadescale)*((float)((unsigned char)(sec->visibility<240?sec->visibility+16:sec->visibility-239)))); } +#endif pow2xsplit = 1; domost(x0,ofy0,x1,ofy1); if (wal->cstat&(2+8)) { guo = oguo; gux = ogux; guy = oguy; } } @@ -3236,13 +3242,14 @@ static void polymost_drawalls (long bunch) guo = gdo*t - guo; } if (wal->cstat&256) { gvx = -gvx; gvy = -gvy; gvo = -gvo; } //yflip - +#ifdef USE_OPENGL if(!nofog) { int i = klabs(wal->shade); if(i > 30) i = 30; bglFogf(GL_FOG_DENSITY,gvisibility/(wal->shade<0?(shadetable[i]-glnegshadeoffset)*glnegshadescale:1)*(wal->shade<0?1:shadetable[i]*glshadescale)*((float)((unsigned char)(sec->visibility<240?sec->visibility+16:sec->visibility-239)))); } +#endif pow2xsplit = 1; domost(x0,-10000,x1,-10000); }