vkdoom_m/src/g_shared/a_artifacts.h
Christoph Oelckers bb617dfbfd - Changed: The decision whether blood splatter sprites are spawned is no
longer determined by game. Instead there's a new flag, MF5_BLOODSPLATTER
  which is deciding what to do. To keep backwards compatibility this flag
  is unset for projectiles in Doom and Strife and set for them in Heretic 
  and Hexen. The same applies to DECORATE but of course the flag can be
  manipulated here.
- BLODxx sprites are now globally renamed to BLUDxx when not playing Doom. 
  This allows using the same states in every game, including the 
  Raven-specific blood actors.
- Gave the bullet puff and the axe blood masses of 5 so that the make small
  splashes.
- Added A_Light(value) code pointer for DECORATE to generalize the weapon
  light effect.
- Added 'noskillmenu' option to MAPINFO episode definitions. This is for
  WADs that want to implement a skill selection level.
- Added APROP_ChaseGoal and APROP_Frightened actor properties for ACS.
- Added MF5_CHASEGOAL flag that makes monsters to go after their goal even
  if they have a valid target.
- Fixed some issues with the changes to P_NewChaseDir I made to include
  MBF's dropoff logic.
- Added a PowerFrightener powerup class. It seemed like such a waste to
  have this cool feature but no means to use it in a decent fashion.
- Fixed: S_Init and S_ParseSndInfo should call atterm only once but not
  each time they are called.

SVN r112 (trunk)
2006-05-13 12:41:15 +00:00

199 lines
4.3 KiB
C++

#ifndef __A_ARTIFACTS_H__
#define __A_ARTIFACTS_H__
#include "farchive.h"
#include "a_pickups.h"
#define INVERSECOLOR 0x00345678
#define GOLDCOLOR 0x009abcde
#define STREAM_ENUM(e) \
inline FArchive &operator<< (FArchive &arc, e &i) \
{ \
BYTE val = (BYTE)i; \
arc << val; \
i = (e)val; \
return arc; \
}
class player_s;
// A powerup is a pseudo-inventory item that applies an effect to its
// owner while it is present.
class APowerup : public AInventory
{
DECLARE_STATELESS_ACTOR (APowerup, AInventory)
public:
virtual void Tick ();
virtual void Destroy ();
virtual bool HandlePickup (AInventory *item);
virtual AInventory *CreateCopy (AActor *other);
virtual AInventory *CreateTossable ();
virtual void Serialize (FArchive &arc);
virtual PalEntry GetBlend ();
virtual bool DrawPowerup (int x, int y);
int EffectTics;
PalEntry BlendColor;
protected:
virtual void InitEffect ();
virtual void DoEffect ();
virtual void EndEffect ();
};
// An artifact is an item that gives the player a powerup when activated.
class APowerupGiver : public AInventory
{
DECLARE_STATELESS_ACTOR (APowerupGiver, AInventory)
public:
virtual bool Use (bool pickup);
virtual void Serialize (FArchive &arc);
const PClass *PowerupType;
int EffectTics; // Non-0 to override the powerup's default tics
PalEntry BlendColor; // Non-0 to override the powerup's default blend
};
class APowerInvulnerable : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerInvulnerable, APowerup)
protected:
void InitEffect ();
void DoEffect ();
void EndEffect ();
void AlterWeaponSprite (vissprite_t *vis);
};
class APowerStrength : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerStrength, APowerup)
public:
PalEntry GetBlend ();
protected:
void InitEffect ();
void DoEffect ();
bool HandlePickup (AInventory *item);
};
class APowerInvisibility : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerInvisibility, APowerup)
protected:
void InitEffect ();
void EndEffect ();
void AlterWeaponSprite (vissprite_t *vis);
};
class APowerGhost : public APowerInvisibility
{
DECLARE_STATELESS_ACTOR (APowerGhost, APowerInvisibility)
protected:
void InitEffect ();
};
class APowerShadow : public APowerInvisibility
{
DECLARE_STATELESS_ACTOR (APowerShadow, APowerInvisibility)
protected:
void InitEffect ();
};
class APowerIronFeet : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerIronFeet, APowerup)
public:
void AbsorbDamage (int damage, int damageType, int &newdamage);
};
class APowerMask : public APowerIronFeet
{
DECLARE_STATELESS_ACTOR (APowerMask, APowerIronFeet)
public:
void AbsorbDamage (int damage, int damageType, int &newdamage);
void DoEffect ();
};
class APowerLightAmp : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerLightAmp, APowerup)
protected:
void DoEffect ();
void EndEffect ();
};
class APowerTorch : public APowerLightAmp
{
DECLARE_STATELESS_ACTOR (APowerTorch, APowerLightAmp)
public:
void Serialize (FArchive &arc);
protected:
void DoEffect ();
int NewTorch, NewTorchDelta;
};
class APowerFlight : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerFlight, APowerup)
public:
bool DrawPowerup (int x, int y);
void Serialize (FArchive &arc);
protected:
void InitEffect ();
void DoEffect ();
void EndEffect ();
bool HitCenterFrame;
};
class APowerWeaponLevel2 : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerWeaponLevel2, APowerup)
protected:
void InitEffect ();
void EndEffect ();
};
class APowerSpeed : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerSpeed, APowerup)
protected:
void InitEffect ();
void DoEffect ();
void EndEffect ();
};
class APowerMinotaur : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerMinotaur, APowerup)
};
class APowerScanner : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerScanner, APowerup)
};
class APowerTargeter : public APowerup
{
DECLARE_ACTOR (APowerTargeter, APowerup)
protected:
void InitEffect ();
void DoEffect ();
void EndEffect ();
void PositionAccuracy ();
void Travelled ();
};
class APowerFrightener : public APowerup
{
DECLARE_STATELESS_ACTOR (APowerFrightener, APowerup)
protected:
void InitEffect ();
void EndEffect ();
};
class player_s;
#endif //__A_ARTIFACTS_H__