- scriptified MorphProjectile and CustomSprite.
This should for now conclude actor class scriptification. The remaining ten classes with the exception of MorphedMonster are all too essential or too closely tied to engine feature so they should remain native.
This commit is contained in:
parent
3c30b59bab
commit
c880b26d98
12 changed files with 83 additions and 160 deletions
|
|
@ -854,45 +854,3 @@ static void Decrypt (void *to_, const void *from_, int len, int key)
|
|||
}
|
||||
|
||||
#endif
|
||||
//==========================================================================
|
||||
//
|
||||
// Just an actor to make the Build sprites show up. It doesn't do anything
|
||||
// with them other than display them.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
class ACustomSprite : public AActor
|
||||
{
|
||||
DECLARE_CLASS (ACustomSprite, AActor);
|
||||
public:
|
||||
void BeginPlay ();
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS(ACustomSprite, false, false)
|
||||
|
||||
void ACustomSprite::BeginPlay ()
|
||||
{
|
||||
char name[9];
|
||||
Super::BeginPlay ();
|
||||
|
||||
mysnprintf (name, countof(name), "BTIL%04d", args[0] & 0xffff);
|
||||
picnum = TexMan.GetTexture (name, FTexture::TEX_Build);
|
||||
|
||||
Scale.X = args[2] / 64.;
|
||||
Scale.Y = args[3] / 64.;
|
||||
|
||||
int cstat = args[4];
|
||||
if (cstat & 2)
|
||||
{
|
||||
RenderStyle = STYLE_Translucent;
|
||||
Alpha = (cstat & 512) ? 0.6666 : 0.3333;
|
||||
}
|
||||
if (cstat & 4)
|
||||
renderflags |= RF_XFLIP;
|
||||
if (cstat & 8)
|
||||
renderflags |= RF_YFLIP;
|
||||
|
||||
// set face/wall/floor flags
|
||||
renderflags |= ActorRenderFlags::FromInt (((cstat >> 4) & 3) << 12);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue