Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 881 → Rev 882

/polymer/build/include/build.h
546,6 → 546,7
extern int r_animsmoothing;
extern int r_parallaxskyclamping;
extern int r_parallaxskypanning;
extern int r_cullobstructedmodels;
extern int mdtims, omdtims;
#endif
 
/polymer/build/src/polymost.c
176,6 → 176,7
 
// line of sight checks before mddraw()
int r_cullobstructedmodels = 0;
#define CULL_DELAY 5
 
static float fogresult, fogcol[4];
 
4416,6 → 4417,9
drawpoly(dpx,dpy,n,method);
}
 
int lastcullcheck[MAXSPRITES];
char cullmodel[MAXSPRITES];
 
void polymost_drawsprite(int snum)
{
double px[6], py[6];
4473,44 → 4477,79
{
if (r_cullobstructedmodels)
{
i = 0;
do // this is so gay
{
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, globalposz+6144, globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, globalposz-6144, globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, sector[globalcursectnum].ceilingz, globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, sector[globalcursectnum].floorz, globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ i++; break; }
if (totalclock < lastcullcheck[tspr->owner])
break;
if (cansee(globalposx, globalposy, sector[globalcursectnum].ceilingz,
globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, sector[globalcursectnum].floorz,
globalcursectnum, tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; }
 
if (cansee(globalposx, globalposy, globalposz+6144, globalcursectnum,
tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz-6144, globalcursectnum,
tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; }
 
updatesector(tspr->x+384,tspr->y,&datempsectnum);
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x+384, tspr->y, sector[datempsectnum].ceilingz, datempsectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x+384, tspr->y, sector[datempsectnum].floorz, datempsectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x+384, tspr->y, sector[datempsectnum].floorz, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x+384, tspr->y, sector[datempsectnum].ceilingz, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x+384, tspr->y, tspr->z, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
 
updatesector(tspr->x-384,tspr->y,&datempsectnum);
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x-384, tspr->y, sector[datempsectnum].ceilingz, datempsectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x-384, tspr->y, sector[datempsectnum].floorz, datempsectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x-384, tspr->y, sector[datempsectnum].floorz, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x-384, tspr->y, sector[datempsectnum].ceilingz, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x-384, tspr->y, tspr->z, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
 
updatesector(tspr->x,tspr->y+384,&datempsectnum);
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x, tspr->y+384, sector[datempsectnum].ceilingz, datempsectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x, tspr->y+384, sector[datempsectnum].floorz, datempsectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y+384, sector[datempsectnum].floorz, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y+384, sector[datempsectnum].ceilingz, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y+384, tspr->z, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
 
updatesector(tspr->x,tspr->y-384,&datempsectnum);
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x, tspr->y-384, sector[datempsectnum].ceilingz, datempsectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, tspr->x, tspr->y-384, sector[datempsectnum].floorz, datempsectnum))
{ i++; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y-384, sector[datempsectnum].floorz, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y-384, sector[datempsectnum].ceilingz, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y-384, tspr->z, datempsectnum))
{ cullmodel[tspr->owner] = 0; break; }
cullmodel[tspr->owner] = 1;
break;
} while (1);
} else i = 1;
if (totalclock > lastcullcheck[tspr->owner])
lastcullcheck[tspr->owner] = totalclock + CULL_DELAY;
}
else cullmodel[tspr->owner] = 0;
 
if (i && mddraw(tspr)) return;
if (!cullmodel[tspr->owner] && mddraw(tspr)) return;
break; // else, render as flat sprite
}
if (usevoxels && (tspr->cstat&48)!=48 && tiletovox[tspr->picnum] >= 0 && voxmodels[ tiletovox[tspr->picnum] ])
/polymer/eduke32/source/config.c
695,6 → 695,7
 
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLParallaxSkyClamping", &r_parallaxskyclamping);
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLParallaxSkyPanning", &r_parallaxskypanning);
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLCullObstructedModels", &r_cullobstructedmodels);
dummy = usemodels;
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "UseModels",&dummy);
usemodels = dummy != 0;
903,6 → 904,7
 
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLParallaxSkyClamping",r_parallaxskyclamping,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLParallaxSkyPanning",r_parallaxskypanning,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLCullObstructedModels", r_cullobstructedmodels,false,false);
#endif
#ifdef RENDERTYPEWIN
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false);
/polymer/eduke32/source/osdfuncs.c
33,11 → 33,11
// use the format byte if the text falls within the bounds of the console buffer
if (ch > ptr && ch < (ptr + TEXTSIZE))
{
rotatesprite(x<<16, (y<<3)<<16, 65536l, 0, ac, (*(ch-ptr+fmt)&~0x1F)>>4,
rotatesprite(x<<16, (y<<3)<<16, 65536, 0, ac, (*(ch-ptr+fmt)&~0x1F)>>4,
*(ch-ptr+fmt)&~0xE0, 8|16, 0, 0, xdim-1, ydim-1);
}
else
rotatesprite(x<<16, (y<<3)<<16, 65536l, 0, ac, shade,
rotatesprite(x<<16, (y<<3)<<16, 65536, 0, ac, shade,
pal, 8|16, 0, 0, xdim-1, ydim-1);
x += OSDCHAR_WIDTH;
}