mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
A couple of stylistic cleanups and missed DAMETH_* flags substitutions.
git-svn-id: https://svn.eduke32.com/eduke32@4489 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
89bbfcbdea
commit
95a6c01045
3 changed files with 17 additions and 14 deletions
|
@ -1344,7 +1344,7 @@ void polymer_inb4rotatesprite(int16_t tilenum, char pal, int8_t s
|
|||
{
|
||||
_prmaterial rotatespritematerial;
|
||||
|
||||
polymer_getbuildmaterial(&rotatespritematerial, tilenum, pal, shade, 0, 4);
|
||||
polymer_getbuildmaterial(&rotatespritematerial, tilenum, pal, shade, 0, DAMETH_CLAMPED);
|
||||
|
||||
rotatespritematerialbits = polymer_bindmaterial(rotatespritematerial, NULL, 0);
|
||||
}
|
||||
|
@ -3621,7 +3621,7 @@ void polymer_updatesprite(int32_t snum)
|
|||
}
|
||||
|
||||
polymer_getbuildmaterial(&s->plane.material, curpicnum, tspr->pal, tspr->shade,
|
||||
sector[tspr->sectnum].visibility, 4);
|
||||
sector[tspr->sectnum].visibility, DAMETH_CLAMPED);
|
||||
|
||||
if (tspr->cstat & 2)
|
||||
{
|
||||
|
@ -4001,7 +4001,7 @@ static void polymer_drawskybox(int16_t tilenum, char palnum, int8_t shad
|
|||
while (i < 6)
|
||||
{
|
||||
drawingskybox = i + 1;
|
||||
pth = texcache_fetch(tilenum, palnum, 0, 4);
|
||||
pth = texcache_fetch(tilenum, palnum, 0, DAMETH_CLAMPED);
|
||||
|
||||
color[0] = color[1] = color[2] = getshadefactor(shade);
|
||||
|
||||
|
|
|
@ -1433,7 +1433,7 @@ void drawpoly(double *dpx, double *dpy, int32_t n, int32_t method)
|
|||
pthtyp *pth, *detailpth, *glowpth;
|
||||
int32_t texunits = GL_TEXTURE0_ARB;
|
||||
|
||||
if (skyclamphack) method |= 4;
|
||||
if (skyclamphack) method |= DAMETH_CLAMPED;
|
||||
pth = our_texcache_fetch(method&(~3));
|
||||
|
||||
if (!pth)
|
||||
|
@ -4843,7 +4843,7 @@ int32_t polymost_drawtilescreen(int32_t tilex, int32_t tiley, int32_t wallnum, i
|
|||
{
|
||||
int32_t ousehightile = usehightile;
|
||||
usehightile = usehitile && usehightile;
|
||||
pth = texcache_fetch(wallnum,0,0,4);
|
||||
pth = texcache_fetch(wallnum, 0, 0, DAMETH_CLAMPED);
|
||||
if (usehightile)
|
||||
loadedhitile[wallnum>>3] |= (1<<(wallnum&7));
|
||||
usehightile = ousehightile;
|
||||
|
@ -5292,7 +5292,7 @@ void polymost_precache(int32_t dapicnum, int32_t dapalnum, int32_t datype)
|
|||
hicprecaching = 1;
|
||||
|
||||
|
||||
texcache_fetch(dapicnum, dapalnum, 0, (datype & 1) << 2);
|
||||
texcache_fetch(dapicnum, dapalnum, 0, (datype & 1)*DAMETH_CLAMPED);
|
||||
hicprecaching = 0;
|
||||
|
||||
if (datype == 0 || !usemodels) return;
|
||||
|
|
|
@ -30,17 +30,15 @@ static const char *texcache_errorstr[TEXCACHEERRORS] = {
|
|||
// <dashade>: ignored if not in Polymost+r_usetileshades
|
||||
pthtyp *texcache_fetch(int32_t dapicnum, int32_t dapalnum, int32_t dashade, int32_t dameth)
|
||||
{
|
||||
int32_t i, j;
|
||||
hicreplctyp *si;
|
||||
pthtyp *pth, *pth2;
|
||||
int32_t i;
|
||||
pthtyp *pth;
|
||||
|
||||
j = (dapicnum&(GLTEXCACHEADSIZ-1));
|
||||
const int32_t j = dapicnum&(GLTEXCACHEADSIZ-1);
|
||||
hicreplctyp *const si = usehightile ? hicfindsubst(dapicnum,dapalnum,drawingskybox) : NULL;
|
||||
|
||||
if (getrendermode() != REND_POLYMOST || !r_usetileshades)
|
||||
dashade = 0;
|
||||
|
||||
si = usehightile ? hicfindsubst(dapicnum,dapalnum,drawingskybox) : NULL;
|
||||
|
||||
if (!si)
|
||||
{
|
||||
if (drawingskybox || dapalnum >= (MAXPALOOKUPS - RESERVEDPALS)) return NULL;
|
||||
|
@ -86,6 +84,9 @@ pthtyp *texcache_fetch(int32_t dapicnum, int32_t dapalnum, int32_t dashade, int3
|
|||
// possibly fetch an already loaded multitexture :_)
|
||||
if (dapalnum >= (MAXPALOOKUPS - RESERVEDPALS))
|
||||
for (i = (GLTEXCACHEADSIZ - 1); i >= 0; i--)
|
||||
{
|
||||
const pthtyp *pth2;
|
||||
|
||||
for (pth2=texcache.list[i]; pth2; pth2=pth2->next)
|
||||
{
|
||||
if (pth2->hicr && pth2->hicr->filename && Bstrcasecmp(pth2->hicr->filename, si->filename) == 0)
|
||||
|
@ -96,12 +97,14 @@ pthtyp *texcache_fetch(int32_t dapicnum, int32_t dapalnum, int32_t dashade, int3
|
|||
if (pth2->flags & PTH_HASALPHA)
|
||||
pth->flags |= PTH_HASALPHA;
|
||||
pth->hicr = si;
|
||||
pth->next = texcache.list[j];
|
||||
|
||||
pth->next = texcache.list[j];
|
||||
texcache.list[j] = pth;
|
||||
|
||||
return(pth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gloadtile_hi(dapicnum,dapalnum,drawingskybox,si,dameth,pth,1, (si->palnum>0) ? 0 : hictinting[dapalnum].f))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue