2006-02-24 04:48:15 +00:00
|
|
|
#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;
|
2006-02-24 04:48:15 +00:00
|
|
|
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-02-24 04:48:15 +00:00
|
|
|
{
|
2006-04-12 01:50:09 +00:00
|
|
|
DECLARE_CLASS (DBaseDecal, DThinker)
|
2006-02-24 04:48:15 +00:00
|
|
|
public:
|
2006-04-12 01:50:09 +00:00
|
|
|
DBaseDecal ();
|
2006-04-13 02:01:40 +00:00
|
|
|
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);
|
2006-02-24 04:48:15 +00:00
|
|
|
void Destroy ();
|
2006-04-13 02:01:40 +00:00
|
|
|
int StickToWall (side_s *wall, fixed_t x, fixed_t y);
|
2006-02-24 04:48:15 +00:00
|
|
|
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);
|
2006-04-13 02:01:40 +00:00
|
|
|
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-02-24 04:48:15 +00:00
|
|
|
|
2006-04-12 01:50:09 +00:00
|
|
|
static void SerializeChain (FArchive &arc, DBaseDecal **firstptr);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-04-12 01:50:09 +00:00
|
|
|
DBaseDecal *WallNext, **WallPrev;
|
|
|
|
|
2006-04-13 02:01:40 +00:00
|
|
|
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;
|
|
|
|
WORD RenderFlags;
|
|
|
|
BYTE RenderStyle;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
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;
|
2006-04-13 02:01:40 +00:00
|
|
|
void CalcFracPos (side_s *wall, fixed_t x, fixed_t y);
|
2006-02-24 04:48:15 +00:00
|
|
|
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-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
2006-04-12 01:50:09 +00:00
|
|
|
class DImpactDecal : public DBaseDecal
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2006-04-12 01:50:09 +00:00
|
|
|
DECLARE_CLASS (DImpactDecal, DBaseDecal)
|
2006-02-24 04:48:15 +00:00
|
|
|
public:
|
2006-04-13 02:01:40 +00:00
|
|
|
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);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
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;
|
2006-04-13 02:01:40 +00:00
|
|
|
static void CheckMax ();
|
2006-04-12 01:50:09 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DImpactDecal();
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class AWaterSplashBase : public AActor
|
|
|
|
{
|
|
|
|
DECLARE_ACTOR (AWaterSplashBase, AActor)
|
|
|
|
};
|
|
|
|
|
|
|
|
class AWaterSplash : public AActor
|
|
|
|
{
|
|
|
|
DECLARE_ACTOR (AWaterSplash, AActor)
|
|
|
|
};
|
|
|
|
|
|
|
|
class ALavaSplash : public AActor
|
|
|
|
{
|
|
|
|
DECLARE_ACTOR (ALavaSplash, AActor)
|
|
|
|
};
|
|
|
|
|
|
|
|
class ALavaSmoke : public AActor
|
|
|
|
{
|
|
|
|
DECLARE_ACTOR (ALavaSmoke, AActor)
|
|
|
|
};
|
|
|
|
|
|
|
|
class ASludgeSplash : public AActor
|
|
|
|
{
|
|
|
|
DECLARE_ACTOR (ASludgeSplash, AActor)
|
|
|
|
};
|
|
|
|
|
|
|
|
class ASludgeChunk : public AActor
|
|
|
|
{
|
|
|
|
DECLARE_ACTOR (ASludgeChunk, AActor)
|
|
|
|
};
|
|
|
|
|
|
|
|
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 ();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__A_SHAREDGLOBAL_H__
|