mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
Process ART animations on tspr->picnum early in all three renderers.
This enables ART animations to take effect on voxels in classic, voxels and models in Polymost, and models in Polymer. git-svn-id: https://svn.eduke32.com/eduke32@3580 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e7d8256fc3
commit
b46d4460bc
3 changed files with 12 additions and 5 deletions
|
@ -5537,12 +5537,16 @@ static void drawsprite_classic(int32_t snum)
|
|||
const int32_t spritenum = tspr->owner;
|
||||
const int32_t sectnum = tspr->sectnum;
|
||||
const sectortype *const sec = (sectnum>=0) ? §or[sectnum] : NULL;
|
||||
int32_t tilenum = tspr->picnum;
|
||||
int32_t tilenum;
|
||||
int32_t cstat = tspr->cstat;
|
||||
|
||||
if ((unsigned)tilenum >= MAXTILES || sec==NULL)
|
||||
if ((unsigned)tspr->picnum >= MAXTILES || sec==NULL)
|
||||
return;
|
||||
|
||||
DO_TILE_ANIM(tspr->picnum, spritenum+32768);
|
||||
|
||||
tilenum = tspr->picnum;
|
||||
|
||||
if ((cstat&48)==48)
|
||||
vtilenum = tilenum; // if the game wants voxels, it gets voxels
|
||||
else if (usevoxels && tiletovox[tilenum] != -1
|
||||
|
@ -5559,7 +5563,6 @@ static void drawsprite_classic(int32_t snum)
|
|||
{
|
||||
if (spritenum < 0 || tilesizx[tilenum] <= 0 || tilesizy[tilenum] <= 0)
|
||||
return;
|
||||
DO_TILE_ANIM(tilenum, spritenum+32768);
|
||||
}
|
||||
|
||||
if (tspr->xrepeat <= 0 || tspr->yrepeat <= 0)
|
||||
|
|
|
@ -1350,6 +1350,8 @@ void polymer_drawsprite(int32_t snum)
|
|||
if ((tspr->cstat & 16384) && (!depth || mirrors[depth-1].plane))
|
||||
return;
|
||||
|
||||
DO_TILE_ANIM(tspr->picnum, tspr->owner+32768);
|
||||
|
||||
calc_and_apply_fog(tspr->shade, sector[tspr->sectnum].visibility,
|
||||
sector[tspr->sectnum].floorpal);
|
||||
|
||||
|
|
|
@ -4889,16 +4889,18 @@ void polymost_drawsprite(int32_t snum)
|
|||
tspr = tspriteptr[snum];
|
||||
if (tspr->owner < 0 || tspr->picnum < 0 || tspr->picnum >= MAXTILES) return;
|
||||
|
||||
spritenum = tspr->owner;
|
||||
|
||||
DO_TILE_ANIM(tspr->picnum, spritenum+32768);
|
||||
|
||||
globalpicnum = tspr->picnum;
|
||||
globalshade = tspr->shade;
|
||||
globalpal = tspr->pal;
|
||||
globalorientation = tspr->cstat;
|
||||
spritenum = tspr->owner;
|
||||
|
||||
if ((globalorientation&48) != 48) // only non-voxel sprites should do this
|
||||
{
|
||||
int32_t flag;
|
||||
DO_TILE_ANIM(globalpicnum, spritenum+32768);
|
||||
flag = usehightile && h_xsize[globalpicnum];
|
||||
xoff = (int32_t)tspr->xoffset;
|
||||
yoff = (int32_t)tspr->yoffset;
|
||||
|
|
Loading…
Reference in a new issue