mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
A couple of meaning-preserving rewrites of picanm[]-touching code.
git-svn-id: https://svn.eduke32.com/eduke32@3204 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
dd424fac70
commit
6abb63670c
2 changed files with 56 additions and 58 deletions
|
@ -10893,6 +10893,7 @@ int32_t krecip(int32_t num)
|
|||
void spriteheightofs(int16_t i, int32_t *height, int32_t *zofs, int32_t alsotileyofs)
|
||||
{
|
||||
int32_t hei, flooraligned=((sprite[i].cstat&48)==32);
|
||||
int32_t picnum = sprite[i].picnum;
|
||||
|
||||
if (zofs)
|
||||
*zofs = 0;
|
||||
|
@ -10904,16 +10905,17 @@ void spriteheightofs(int16_t i, int32_t *height, int32_t *zofs, int32_t alsotile
|
|||
return;
|
||||
}
|
||||
|
||||
hei = (tilesizy[sprite[i].picnum]*sprite[i].yrepeat)<<2;
|
||||
hei = (tilesizy[picnum]*sprite[i].yrepeat)<<2;
|
||||
if (zofs)
|
||||
{
|
||||
if (sprite[i].cstat&128)
|
||||
*zofs = hei>>1;
|
||||
|
||||
if (alsotileyofs && (unsigned)sprite[i].picnum < MAXTILES)
|
||||
if (picanm[sprite[i].picnum].yofs)
|
||||
*zofs -= picanm[sprite[i].picnum].yofs*sprite[i].yrepeat<<2;
|
||||
if (alsotileyofs)
|
||||
if (picanm[picnum].yofs)
|
||||
*zofs -= picanm[picnum].yofs*sprite[i].yrepeat<<2;
|
||||
}
|
||||
|
||||
*height = hei;
|
||||
}
|
||||
|
||||
|
@ -12558,7 +12560,8 @@ int32_t pushmove(vec3_t *vect, int16_t *sectnum,
|
|||
clipsectcnt = 0; clipsectnum = 1;
|
||||
do
|
||||
{
|
||||
/*Push FACE sprites
|
||||
#if 0
|
||||
// Push FACE sprites
|
||||
for(i=headspritesect[clipsectorlist[clipsectcnt]];i>=0;i=nextspritesect[i])
|
||||
{
|
||||
spr = &sprite[i];
|
||||
|
@ -12590,8 +12593,8 @@ int32_t pushmove(vec3_t *vect, int16_t *sectnum,
|
|||
updatesector(vect->x,vect->y,sectnum);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
#endif
|
||||
sec = §or[clipsectorlist[clipsectcnt]];
|
||||
if (dir > 0)
|
||||
startwall = sec->wallptr, endwall = startwall + sec->wallnum;
|
||||
|
|
|
@ -47,16 +47,15 @@ static int32_t g_precacheCount;
|
|||
|
||||
extern int32_t g_levelTextTime;
|
||||
|
||||
static void tloadtile(int32_t tilenume, int32_t type)
|
||||
static void flag_precache(int32_t tile, int32_t type)
|
||||
{
|
||||
if (picanm[tilenume].num < 1)
|
||||
{
|
||||
if (!(gotpic[tilenume>>3] & pow2char[tilenume&7])) g_precacheCount++;
|
||||
gotpic[tilenume>>3] |= pow2char[tilenume&7];
|
||||
precachehightile[(uint8_t)type][tilenume>>3] |= pow2char[tilenume&7];
|
||||
return;
|
||||
if (!(gotpic[tile>>3] & pow2char[tile&7]))
|
||||
g_precacheCount++;
|
||||
gotpic[tile>>3] |= pow2char[tile&7];
|
||||
precachehightile[type][tile>>3] |= pow2char[tile&7];
|
||||
}
|
||||
|
||||
static void tloadtile(int32_t tilenume, int32_t type)
|
||||
{
|
||||
int32_t i,j;
|
||||
|
||||
|
@ -70,13 +69,9 @@ static void tloadtile(int32_t tilenume, int32_t type)
|
|||
i = tilenume;
|
||||
j = tilenume + picanm[tilenume].num;
|
||||
}
|
||||
|
||||
for (; i<=j; i++)
|
||||
{
|
||||
if (!(gotpic[i>>3] & pow2char[i&7])) g_precacheCount++;
|
||||
gotpic[i>>3] |= pow2char[i&7];
|
||||
precachehightile[(uint8_t)type][i>>3] |= pow2char[i&7];
|
||||
}
|
||||
}
|
||||
flag_precache(i, type);
|
||||
}
|
||||
|
||||
static void G_CacheSpriteNum(int32_t i)
|
||||
|
|
Loading…
Reference in a new issue