git-svn-id: https://svn.eduke32.com/eduke32@885 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-07-22 05:13:20 +00:00
parent 2e447a3c1d
commit de25cb4392
3 changed files with 31 additions and 16 deletions

View file

@ -4426,7 +4426,8 @@ char cullmodel[MAXSPRITES];
int polymost_checkcoordinates(int x, int y, spritetype *tspr) int polymost_checkcoordinates(int x, int y, spritetype *tspr)
{ {
short datempsectnum; short datempsectnum = tspr->sectnum;
int i;
updatesector(tspr->x+x,tspr->y+y,&datempsectnum); updatesector(tspr->x+x,tspr->y+y,&datempsectnum);
if (datempsectnum == -1) if (datempsectnum == -1)
@ -4440,6 +4441,15 @@ int polymost_checkcoordinates(int x, int y, spritetype *tspr)
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x+x, tspr->y+y, tspr->z, datempsectnum)) tspr->x+x, tspr->y+y, tspr->z, datempsectnum))
return 1; return 1;
for (i=5;i>-1;i--)
{
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x+x, tspr->y+y, tspr->z-((tilesizy[tspr->picnum]*tspr->yrepeat)*i), datempsectnum))
return 1;
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x+x, tspr->y+y, tspr->z+((tilesizy[tspr->picnum]*tspr->yrepeat)*i), datempsectnum))
return 1;
}
return 0; return 0;
} }
@ -4504,26 +4514,28 @@ void polymost_drawsprite(int snum)
if (totalclock < lastcullcheck[tspr->owner]) if (totalclock < lastcullcheck[tspr->owner])
break; break;
cullmodel[tspr->owner] = 1; cullmodel[tspr->owner] = 1;
if (cansee(globalposx, globalposy, sector[globalcursectnum].ceilingz, globalcursectnum, if (tspr->statnum == 99)
{ cullmodel[tspr->owner] = 0; break; }
/* if (cansee(globalposx, globalposy, sector[globalcursectnum].ceilingz, globalcursectnum,
tspr->x, tspr->y, tspr->z, tspr->sectnum)) tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; } { cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y, tspr->z-((tilesizy[tspr->picnum]*tspr->yrepeat)<<2),tspr->sectnum)) tspr->x, tspr->y, tspr->z-((tilesizy[tspr->picnum]*tspr->yrepeat)<<2),tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; } { cullmodel[tspr->owner] = 0; break; } */
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y, tspr->z,tspr->sectnum)) tspr->x, tspr->y, tspr->z,tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; } { cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, globalposz, globalcursectnum, if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y, globalposz,tspr->sectnum)) tspr->x, tspr->y, globalposz,tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; } { cullmodel[tspr->owner] = 0; break; }
if (cansee(globalposx, globalposy, sector[globalcursectnum].floorz, globalcursectnum, /* if (cansee(globalposx, globalposy, sector[globalcursectnum].floorz, globalcursectnum,
tspr->x, tspr->y, tspr->z, tspr->sectnum)) tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; } { cullmodel[tspr->owner] = 0; break; } */
if (polymost_checkcoordinates(0, 0, tspr)) if (polymost_checkcoordinates(0, 0, tspr))
{ cullmodel[tspr->owner] = 0; break; } { cullmodel[tspr->owner] = 0; break; }
i = 768; i = 640;
if (polymost_checkcoordinates(-i, 0, tspr)) if (polymost_checkcoordinates(-i, 0, tspr))
{ cullmodel[tspr->owner] = 0; break; } { cullmodel[tspr->owner] = 0; break; }
if (polymost_checkcoordinates(-i, -i, tspr)) if (polymost_checkcoordinates(-i, -i, tspr))

View file

@ -7106,12 +7106,15 @@ PALONLY:
t->xrepeat = t->yrepeat = 0; t->xrepeat = t->yrepeat = 0;
} }
for (j=0;j < spritesortcnt; j++) for (j=0;j < spritesortcnt; j++)
{
if (display_mirror) tsprite[j].statnum = 99;
if (tsprite[j].owner > 0 && tsprite[j].owner < MAXSPRITES && spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS) if (tsprite[j].owner > 0 && tsprite[j].owner < MAXSPRITES && spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS)
{ {
OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1); OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1);
spriteext[tsprite[j].owner].tspr = NULL; spriteext[tsprite[j].owner].tspr = NULL;
} }
} }
}
#ifdef _MSC_VER #ifdef _MSC_VER
//#pragma auto_inline() //#pragma auto_inline()
#pragma optimize("",on) #pragma optimize("",on)

View file

@ -2430,15 +2430,15 @@ cheat_for_port_credits:
"-", "-",
"Anisotropic filtering", "Anisotropic filtering",
"-", "-",
"Hightile textures", "Enable hires textures",
"Precache textures", "Precache hires textures",
"GL texture compression", "GL texture compression",
"Cache textures on disk", "Cache textures on disk",
"Compress disk cache", "Compress disk cache",
"Detail mapping", "Use detail textures",
"Glow mapping", "Use glow textures",
"-", "-",
"Models", "Use models",
"-", "-",
"-", "-",
"-", "-",
@ -2502,7 +2502,7 @@ cheat_for_port_credits:
case 2: case 2:
if (x==io) usehightile = 1-usehightile; if (x==io) usehightile = 1-usehightile;
modval(0,1,(int *)&usehightile,1,probey==io); modval(0,1,(int *)&usehightile,1,probey==io);
gametextpal(d,yy, usehightile ? "On" : "Off", MENUHIGHLIGHT(io), 0); gametextpal(d,yy, usehightile ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
break; break;
case 3: case 3:
enabled = usehightile; enabled = usehightile;
@ -2532,18 +2532,18 @@ cheat_for_port_credits:
enabled = usehightile; enabled = usehightile;
if (enabled && x==io) r_detailmapping = !r_detailmapping; if (enabled && x==io) r_detailmapping = !r_detailmapping;
if (enabled) modval(0,1,(int *)&r_detailmapping,1,probey==io); if (enabled) modval(0,1,(int *)&r_detailmapping,1,probey==io);
gametextpal(d,yy, r_detailmapping && enabled ? "On" : "Off", enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE, 0); gametextpal(d,yy, r_detailmapping && enabled ? "Yes" : "No", enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE, 0);
break; break;
case 8: case 8:
enabled = usehightile; enabled = usehightile;
if (enabled && x==io) r_glowmapping = !r_glowmapping; if (enabled && x==io) r_glowmapping = !r_glowmapping;
if (enabled) modval(0,1,(int *)&r_glowmapping,1,probey==io); if (enabled) modval(0,1,(int *)&r_glowmapping,1,probey==io);
gametextpal(d,yy, r_glowmapping && enabled ? "On" : "Off", enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE, 0); gametextpal(d,yy, r_glowmapping && enabled ? "Yes" : "No", enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE, 0);
break; break;
case 9: case 9:
if (x==io) usemodels = 1-usemodels; if (x==io) usemodels = 1-usemodels;
modval(0,1,(int *)&usemodels,1,probey==io); modval(0,1,(int *)&usemodels,1,probey==io);
gametextpal(d,yy, usemodels ? "On" : "Off", MENUHIGHLIGHT(io), 0); gametextpal(d,yy, usemodels ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
break; break;
default: default:
break; break;
@ -3333,7 +3333,7 @@ cheat_for_port_credits:
#if defined(POLYMOST) && defined(USE_OPENGL) #if defined(POLYMOST) && defined(USE_OPENGL)
else else
{ {
menutext(c,50+62+16+16,MENUHIGHLIGHT(5),bpp==8,"TEX FILTERING"); menutext(c,50+62+16+16,MENUHIGHLIGHT(5),bpp==8,"FILTERING");
switch (gltexfiltermode) switch (gltexfiltermode)
{ {
case 0: case 0: