mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-30 16:00:55 +00:00
- Added speed factors for texture warp commands.
- Added damage type parameter to A_Die. SVN r942 (trunk)
This commit is contained in:
parent
8de6217f66
commit
dbf4677da9
6 changed files with 29 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
April 26, 2008 (Changes by Graf Zahl)
|
||||||
|
- Added speed factors for texture warp commands.
|
||||||
|
- Added damage type parameter to A_Die.
|
||||||
|
|
||||||
April 25, 2008
|
April 25, 2008
|
||||||
- Re-enabled TiMidity's loop and envelope stripping for instruments that look
|
- Re-enabled TiMidity's loop and envelope stripping for instruments that look
|
||||||
like they weren't really meant to be played by the GUS MIDI library.
|
like they weren't really meant to be played by the GUS MIDI library.
|
||||||
|
|
|
@ -2502,7 +2502,19 @@ void A_Pain (AActor *actor)
|
||||||
// killough 11/98: kill an object
|
// killough 11/98: kill an object
|
||||||
void A_Die (AActor *actor)
|
void A_Die (AActor *actor)
|
||||||
{
|
{
|
||||||
P_DamageMobj (actor, NULL, NULL, actor->health, NAME_None);
|
ENamedName name;
|
||||||
|
|
||||||
|
int index=CheckIndex(1, &CallingState);
|
||||||
|
if (index<0)
|
||||||
|
{
|
||||||
|
name = NAME_None;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
name = ENamedName(StateParameters[index]);
|
||||||
|
}
|
||||||
|
|
||||||
|
P_DamageMobj (actor, NULL, NULL, actor->health, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -340,6 +340,11 @@ static void R_InitAnimDefs ()
|
||||||
TexMan.ReplaceTexture (picnum, warper, false);
|
TexMan.ReplaceTexture (picnum, warper, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sc.CheckFloat())
|
||||||
|
{
|
||||||
|
static_cast<FWarpTexture*>(warper)->SetSpeed(sc.Float);
|
||||||
|
}
|
||||||
|
|
||||||
// No decals on warping textures, by default.
|
// No decals on warping textures, by default.
|
||||||
// Warping information is taken from the last warp
|
// Warping information is taken from the last warp
|
||||||
// definition for this texture.
|
// definition for this texture.
|
||||||
|
|
|
@ -494,12 +494,14 @@ public:
|
||||||
void Unload ();
|
void Unload ();
|
||||||
bool CheckModified ();
|
bool CheckModified ();
|
||||||
int GetSourceLump() { return SourcePic->GetSourceLump(); }
|
int GetSourceLump() { return SourcePic->GetSourceLump(); }
|
||||||
|
void SetSpeed(float fac) { Speed = fac; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
FTexture *SourcePic;
|
FTexture *SourcePic;
|
||||||
BYTE *Pixels;
|
BYTE *Pixels;
|
||||||
Span **Spans;
|
Span **Spans;
|
||||||
DWORD GenTime;
|
DWORD GenTime;
|
||||||
|
float Speed;
|
||||||
|
|
||||||
virtual void MakeTexture (DWORD time);
|
virtual void MakeTexture (DWORD time);
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
|
|
||||||
FWarpTexture::FWarpTexture (FTexture *source)
|
FWarpTexture::FWarpTexture (FTexture *source)
|
||||||
: SourcePic (source), Pixels (0), Spans (0), GenTime (0)
|
: SourcePic (source), Pixels (0), Spans (0), GenTime (0), Speed (0.f)
|
||||||
{
|
{
|
||||||
CopySize(source);
|
CopySize(source);
|
||||||
bNoDecals = source->bNoDecals;
|
bNoDecals = source->bNoDecals;
|
||||||
|
@ -149,7 +149,7 @@ void FWarpTexture::MakeTexture (DWORD time)
|
||||||
ybits--;
|
ybits--;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD timebase = time * 32 / 28;
|
DWORD timebase = DWORD(time * Speed * 32 / 28);
|
||||||
for (y = ysize-1; y >= 0; y--)
|
for (y = ysize-1; y >= 0; y--)
|
||||||
{
|
{
|
||||||
int xt, xf = (finesine[(timebase+y*128)&FINEMASK]>>13) & xmask;
|
int xt, xf = (finesine[(timebase+y*128)&FINEMASK]>>13) & xmask;
|
||||||
|
@ -158,7 +158,7 @@ void FWarpTexture::MakeTexture (DWORD time)
|
||||||
for (xt = xsize; xt; xt--, xf = (xf+1)&xmask, dest += ysize)
|
for (xt = xsize; xt; xt--, xf = (xf+1)&xmask, dest += ysize)
|
||||||
*dest = source[xf << ybits];
|
*dest = source[xf << ybits];
|
||||||
}
|
}
|
||||||
timebase = time * 23 / 28;
|
timebase = DWORD(time * Speed * 23 / 28);
|
||||||
for (x = xsize-1; x >= 0; x--)
|
for (x = xsize-1; x >= 0; x--)
|
||||||
{
|
{
|
||||||
int yt, yf = (finesine[(time+(x+17)*128)&FINEMASK]>>13) & ymask;
|
int yt, yf = (finesine[(time+(x+17)*128)&FINEMASK]>>13) & ymask;
|
||||||
|
@ -205,7 +205,7 @@ void FWarp2Texture::MakeTexture (DWORD time)
|
||||||
ybits--;
|
ybits--;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD timebase = time * 40 / 28;
|
DWORD timebase = DWORD(time * Speed * 40 / 28);
|
||||||
for (x = 0; x < xsize; ++x)
|
for (x = 0; x < xsize; ++x)
|
||||||
{
|
{
|
||||||
BYTE *dest = Pixels + (x << ybits);
|
BYTE *dest = Pixels + (x << ybits);
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Actor extends Thinker
|
||||||
action native A_SpawnSound();
|
action native A_SpawnSound();
|
||||||
action native A_SpawnFly();
|
action native A_SpawnFly();
|
||||||
action native A_BrainExplode();
|
action native A_BrainExplode();
|
||||||
action native A_Die();
|
action native A_Die(optional name damagetype);
|
||||||
action native A_Detonate();
|
action native A_Detonate();
|
||||||
action native A_Mushroom(optional class<Actor> spawntype, optional eval int numspawns);
|
action native A_Mushroom(optional class<Actor> spawntype, optional eval int numspawns);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue