gzdoom/src/g_shared/a_sharedglobal.h

233 lines
5.1 KiB
C
Raw Normal View History

#ifndef __A_SHAREDGLOBAL_H__
#define __A_SHAREDGLOBAL_H__
#include "dobject.h"
#include "info.h"
#include "actor.h"
2006-04-12 01:50:09 +00:00
class FDecalTemplate;
struct vertex_s;
struct side_s;
extern void P_SpawnDirt (AActor *actor, fixed_t radius);
class AUnknown : public AActor
{
DECLARE_ACTOR (AUnknown, AActor)
};
class APatrolPoint : public AActor
{
DECLARE_STATELESS_ACTOR (APatrolPoint, AActor)
};
class APatrolSpecial : public AActor
{
DECLARE_STATELESS_ACTOR (APatrolSpecial, AActor)
};
class ABlood : public AActor
{
DECLARE_ACTOR (ABlood, AActor)
public:
void SetDamage (int damage);
};
class AMapSpot : public AActor
{
DECLARE_STATELESS_ACTOR (AMapSpot, AActor)
};
class AMapSpotGravity : public AMapSpot
{
DECLARE_STATELESS_ACTOR (AMapSpotGravity, AMapSpot)
};
class ARealGibs : public AActor
{
DECLARE_ACTOR (ARealGibs, AActor)
};
struct side_s;
2006-04-12 01:50:09 +00:00
class DBaseDecal : public DThinker
{
2006-04-12 01:50:09 +00:00
DECLARE_CLASS (DBaseDecal, DThinker)
public:
2006-04-12 01:50:09 +00:00
DBaseDecal ();
DBaseDecal (fixed_t z);
DBaseDecal (int statnum, fixed_t z);
2006-04-12 01:50:09 +00:00
DBaseDecal (const AActor *actor);
DBaseDecal (const DBaseDecal *basis);
void Serialize (FArchive &arc);
void Destroy ();
int StickToWall (side_s *wall, fixed_t x, fixed_t y);
fixed_t GetRealZ (const side_s *wall) const;
2006-04-12 01:50:09 +00:00
void SetShade (DWORD rgb);
void SetShade (int r, int g, int b);
void Spread (const FDecalTemplate *tpl, side_s *wall, fixed_t x, fixed_t y, fixed_t z);
void GetXY (side_s *side, fixed_t &x, fixed_t &y) const;
2006-04-12 01:50:09 +00:00
static void SerializeChain (FArchive &arc, DBaseDecal **firstptr);
2006-04-12 01:50:09 +00:00
DBaseDecal *WallNext, **WallPrev;
fixed_t LeftDistance;
fixed_t Z;
fixed_t ScaleX, ScaleY;
fixed_t Alpha;
2006-04-12 01:50:09 +00:00
DWORD AlphaColor;
WORD Translation;
WORD PicNum;
May 3, 2006 (Changes by Graf Zahl) - Removed doom.x, heretic.x and strife.x from the SVN repository. These are generated files. - Fixed: A_PainDie has to check whether a valid target exists before calling IsFriend. - Fixed: FDecalLib::FindAnimator needs a signed counter to work properly. May 1, 2006 (Changes by Graf Zahl) - Added support for game specific pickup messages, if only to be able to define Raven's invulnerability item in DECORATE. - Removed A_TreeDeath because it is no longer used. - Fixed: When picking up a PowerupGiver for an active powerup the blend color and the duration were transferred to a temorary item and never took effect. They have to be trnasferred to the newly created powerup item before trying to give it to the player, not afterward. - Made the colormap of the InvulnerabilitySphere item specific. The base power class still needs to have its color adjusted per game though and since Raven's invulnerability item is used in both Hexen and Heretic it can't define its own colormap/blend. - Separated the invulnerability colormaps from the game being played and made them item specific. They can also be specified as regular blend colors in DECORATE now. - Converted a_hereticarmor.cpp and most of a_doomartifacts.cpp, a_hereticartifacts.cpp and a_heretickeys.cpp to DECORATE. - Changed the Soulsphere to be a real health item with the Dehacked modifications made in d_dehacked.cpp as for most other items which need to be adjusted. - Added IF_BIGPOWERUP flag to AInventory to expose the RESPAWN_SUPER dmflag to DECORATE. Also removed the now obsolete ShouldRespawn methods from AInvulnerabilitySphere and ABlurSphere. - Converted a_splashes.cpp to DECORATE. - Converted most of a_debris.cpp to DECORATE. SVN r73 (trunk)
2006-05-03 14:54:48 +00:00
DWORD RenderFlags;
2006-04-12 01:50:09 +00:00
BYTE RenderStyle;
protected:
2006-04-12 01:50:09 +00:00
virtual DBaseDecal *CloneSelf (const FDecalTemplate *tpl, fixed_t x, fixed_t y, fixed_t z, side_s *wall) const;
void CalcFracPos (side_s *wall, fixed_t x, fixed_t y);
void Remove ();
2006-04-12 01:50:09 +00:00
static void SpreadLeft (fixed_t r, vertex_s *v1, side_s *feelwall);
static void SpreadRight (fixed_t r, side_s *feelwall, fixed_t wallsize);
};
2006-04-12 01:50:09 +00:00
class DImpactDecal : public DBaseDecal
{
2006-04-12 01:50:09 +00:00
DECLARE_CLASS (DImpactDecal, DBaseDecal)
public:
DImpactDecal (fixed_t z);
2006-04-12 01:50:09 +00:00
DImpactDecal (side_s *wall, const FDecalTemplate *templ);
static DImpactDecal *StaticCreate (const char *name, fixed_t x, fixed_t y, fixed_t z, side_s *wall, PalEntry color=0);
static DImpactDecal *StaticCreate (const FDecalTemplate *tpl, fixed_t x, fixed_t y, fixed_t z, side_s *wall, PalEntry color=0);
void BeginPlay ();
void Destroy ();
void Serialize (FArchive &arc);
static void SerializeTime (FArchive &arc);
protected:
2006-04-12 01:50:09 +00:00
DBaseDecal *CloneSelf (const FDecalTemplate *tpl, fixed_t x, fixed_t y, fixed_t z, side_s *wall) const;
static void CheckMax ();
2006-04-12 01:50:09 +00:00
private:
DImpactDecal();
};
class AAmbientSound : public AActor
{
DECLARE_STATELESS_ACTOR (AAmbientSound, AActor)
public:
void Serialize (FArchive &arc);
void BeginPlay ();
void Tick ();
void Activate (AActor *activator);
void Deactivate (AActor *activator);
protected:
bool bActive;
private:
void SetTicker (struct AmbientSound *ambient);
int NextCheck;
};
class ATeleportFog : public AActor
{
DECLARE_ACTOR (ATeleportFog, AActor)
public:
void PostBeginPlay ();
};
class ATeleportDest : public AActor
{
DECLARE_STATELESS_ACTOR (ATeleportDest, AActor)
};
class ASkyViewpoint : public AActor
{
DECLARE_STATELESS_ACTOR (ASkyViewpoint, AActor)
public:
void Serialize (FArchive &arc);
void BeginPlay ();
bool bInSkybox;
bool bAlways;
ASkyViewpoint *Mate;
fixed_t PlaneAlpha;
};
class DFlashFader : public DThinker
{
DECLARE_CLASS (DFlashFader, DThinker)
HAS_OBJECT_POINTERS
public:
DFlashFader (float r1, float g1, float b1, float a1,
float r2, float g2, float b2, float a2,
float time, AActor *who);
~DFlashFader ();
void Serialize (FArchive &arc);
void Tick ();
AActor *WhoFor() { return ForWho; }
void Cancel ();
protected:
float Blends[2][4];
int TotalTics;
int StartTic;
AActor *ForWho;
void SetBlend (float time);
DFlashFader ();
};
class DEarthquake : public DThinker
{
DECLARE_CLASS (DEarthquake, DThinker)
HAS_OBJECT_POINTERS
public:
DEarthquake (AActor *center, int intensity, int duration, int damrad, int tremrad);
void Serialize (FArchive &arc);
void Tick ();
AActor *m_Spot;
fixed_t m_TremorRadius, m_DamageRadius;
int m_Intensity;
int m_Countdown;
int m_QuakeSFX;
static int StaticGetQuakeIntensity (AActor *viewer);
private:
DEarthquake ();
};
class AMorphProjectile : public AActor
{
DECLARE_ACTOR (AMorphProjectile, AActor)
public:
int DoSpecialDamage (AActor *target, int damage);
void Serialize (FArchive &arc);
2006-08-31 00:16:12 +00:00
FNameNoInit PlayerClass, MonsterClass;
};
class AMorphedMonster : public AActor
{
DECLARE_ACTOR (AMorphedMonster, AActor)
HAS_OBJECT_POINTERS
public:
void Tick ();
void Serialize (FArchive &arc);
void Die (AActor *source, AActor *inflictor);
void Destroy ();
AActor *UnmorphedMe;
int UnmorphTime;
DWORD FlagsSave;
};
#endif //__A_SHAREDGLOBAL_H__