Set face/wall/floor flags from Build sprites

This commit is contained in:
Randy Heit 2014-07-31 22:18:08 -05:00
parent a600a816c3
commit 15251e7a21
1 changed files with 10 additions and 11 deletions

View File

@ -732,11 +732,10 @@ static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites,
if (sprites[i].xrepeat == 0 || sprites[i].yrepeat == 0) continue;
mapthings[count].type = 9988;
mapthings[count].args[0] = sprites[i].picnum & 255;
mapthings[count].args[1] = sprites[i].picnum >> 8;
mapthings[count].args[0] = sprites[i].picnum;
mapthings[count].args[2] = sprites[i].xrepeat;
mapthings[count].args[3] = sprites[i].yrepeat;
mapthings[count].args[4] = (sprites[i].cstat & 14) | ((sprites[i].cstat >> 9) & 1);
mapthings[count].args[4] = sprites[i].cstat;
}
count++;
}
@ -874,22 +873,22 @@ void ACustomSprite::BeginPlay ()
char name[9];
Super::BeginPlay ();
mysnprintf (name, countof(name), "BTIL%04d", (args[0] + args[1]*256) & 0xffff);
mysnprintf (name, countof(name), "BTIL%04d", args[0] & 0xffff);
picnum = TexMan.GetTexture (name, FTexture::TEX_Build);
scaleX = args[2] * (FRACUNIT/64);
scaleY = args[3] * (FRACUNIT/64);
if (args[4] & 2)
int cstat = args[4];
if (cstat & 2)
{
RenderStyle = STYLE_Translucent;
if (args[4] & 1)
alpha = TRANSLUC66;
else
alpha = TRANSLUC33;
alpha = (cstat & 512) ? TRANSLUC66 : TRANSLUC33;
}
if (args[4] & 4)
if (cstat & 4)
renderflags |= RF_XFLIP;
if (args[4] & 8)
if (cstat & 8)
renderflags |= RF_YFLIP;
// set face/wall/floor flags
renderflags |= ((cstat >> 4) & 3) << 12;
}