mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-18 00:22:11 +00:00
Set face/wall/floor flags from Build sprites
This commit is contained in:
parent
a600a816c3
commit
15251e7a21
1 changed files with 10 additions and 11 deletions
|
@ -732,11 +732,10 @@ static int LoadSprites (spritetype *sprites, Xsprite *xsprites, int numsprites,
|
||||||
if (sprites[i].xrepeat == 0 || sprites[i].yrepeat == 0) continue;
|
if (sprites[i].xrepeat == 0 || sprites[i].yrepeat == 0) continue;
|
||||||
|
|
||||||
mapthings[count].type = 9988;
|
mapthings[count].type = 9988;
|
||||||
mapthings[count].args[0] = sprites[i].picnum & 255;
|
mapthings[count].args[0] = sprites[i].picnum;
|
||||||
mapthings[count].args[1] = sprites[i].picnum >> 8;
|
|
||||||
mapthings[count].args[2] = sprites[i].xrepeat;
|
mapthings[count].args[2] = sprites[i].xrepeat;
|
||||||
mapthings[count].args[3] = sprites[i].yrepeat;
|
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++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -874,22 +873,22 @@ void ACustomSprite::BeginPlay ()
|
||||||
char name[9];
|
char name[9];
|
||||||
Super::BeginPlay ();
|
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);
|
picnum = TexMan.GetTexture (name, FTexture::TEX_Build);
|
||||||
|
|
||||||
scaleX = args[2] * (FRACUNIT/64);
|
scaleX = args[2] * (FRACUNIT/64);
|
||||||
scaleY = args[3] * (FRACUNIT/64);
|
scaleY = args[3] * (FRACUNIT/64);
|
||||||
|
|
||||||
if (args[4] & 2)
|
int cstat = args[4];
|
||||||
|
if (cstat & 2)
|
||||||
{
|
{
|
||||||
RenderStyle = STYLE_Translucent;
|
RenderStyle = STYLE_Translucent;
|
||||||
if (args[4] & 1)
|
alpha = (cstat & 512) ? TRANSLUC66 : TRANSLUC33;
|
||||||
alpha = TRANSLUC66;
|
|
||||||
else
|
|
||||||
alpha = TRANSLUC33;
|
|
||||||
}
|
}
|
||||||
if (args[4] & 4)
|
if (cstat & 4)
|
||||||
renderflags |= RF_XFLIP;
|
renderflags |= RF_XFLIP;
|
||||||
if (args[4] & 8)
|
if (cstat & 8)
|
||||||
renderflags |= RF_YFLIP;
|
renderflags |= RF_YFLIP;
|
||||||
|
// set face/wall/floor flags
|
||||||
|
renderflags |= ((cstat >> 4) & 3) << 12;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue