qzdoom-gpl/src/g_shared/a_sharedglobal.h

235 lines
5.5 KiB
C
Raw Normal View History

2016-03-01 15:47:10 +00:00
#ifndef __A_SHAREDGLOBAL_H__
#define __A_SHAREDGLOBAL_H__
#include "info.h"
#include "actor.h"
class FDecalTemplate;
struct vertex_t;
struct side_t;
struct F3DFloor;
2016-03-22 21:07:38 +00:00
class DBaseDecal;
2016-03-01 15:47:10 +00:00
2016-03-22 21:07:38 +00:00
class DBaseDecal *ShootDecal(const FDecalTemplate *tpl, AActor *basisactor, sector_t *sec, double x, double y, double z, DAngle angle, double tracedist, bool permanent);
2016-03-01 15:47:10 +00:00
class DBaseDecal : public DThinker
{
DECLARE_CLASS (DBaseDecal, DThinker)
HAS_OBJECT_POINTERS
public:
DBaseDecal ();
2016-03-22 21:07:38 +00:00
DBaseDecal(double z);
DBaseDecal(int statnum, double z);
2016-03-01 15:47:10 +00:00
DBaseDecal (const AActor *actor);
DBaseDecal (const DBaseDecal *basis);
2016-09-19 22:41:22 +00:00
void Serialize(FSerializer &arc);
void Destroy() override;
2016-03-22 21:07:38 +00:00
FTextureID StickToWall(side_t *wall, double x, double y, F3DFloor * ffloor);
double GetRealZ (const side_t *wall) const;
2016-03-01 15:47:10 +00:00
void SetShade (DWORD rgb);
void SetShade (int r, int g, int b);
2016-03-22 21:07:38 +00:00
void Spread (const FDecalTemplate *tpl, side_t *wall, double x, double y, double z, F3DFloor * ffloor);
void GetXY (side_t *side, double &x, double &y) const;
2016-03-01 15:47:10 +00:00
2016-09-19 22:41:22 +00:00
DBaseDecal *WallNext, *WallPrev;
2016-03-01 15:47:10 +00:00
2016-03-22 21:07:38 +00:00
double LeftDistance;
double Z;
double ScaleX, ScaleY;
double Alpha;
2016-03-01 15:47:10 +00:00
DWORD AlphaColor;
int Translation;
FTextureID PicNum;
DWORD RenderFlags;
FRenderStyle RenderStyle;
2016-09-19 22:41:22 +00:00
side_t *Side;
sector_t *Sector;
2016-03-01 15:47:10 +00:00
protected:
2016-03-22 21:07:38 +00:00
virtual DBaseDecal *CloneSelf(const FDecalTemplate *tpl, double x, double y, double z, side_t *wall, F3DFloor * ffloor) const;
void CalcFracPos(side_t *wall, double x, double y);
2016-03-01 15:47:10 +00:00
void Remove ();
2016-03-22 21:07:38 +00:00
static void SpreadLeft (double r, vertex_t *v1, side_t *feelwall, F3DFloor *ffloor);
static void SpreadRight (double r, side_t *feelwall, double wallsize, F3DFloor *ffloor);
2016-03-01 15:47:10 +00:00
};
class DImpactDecal : public DBaseDecal
{
DECLARE_CLASS (DImpactDecal, DBaseDecal)
public:
2016-03-22 21:07:38 +00:00
DImpactDecal(double z);
2016-03-01 15:47:10 +00:00
DImpactDecal (side_t *wall, const FDecalTemplate *templ);
2016-03-22 21:07:38 +00:00
static DImpactDecal *StaticCreate(const char *name, const DVector3 &pos, side_t *wall, F3DFloor * ffloor, PalEntry color = 0);
static DImpactDecal *StaticCreate(const FDecalTemplate *tpl, const DVector3 &pos, side_t *wall, F3DFloor * ffloor, PalEntry color = 0);
2016-03-01 15:47:10 +00:00
void BeginPlay ();
void Destroy() override;
2016-03-01 15:47:10 +00:00
protected:
2016-03-22 21:07:38 +00:00
DBaseDecal *CloneSelf(const FDecalTemplate *tpl, double x, double y, double z, side_t *wall, F3DFloor * ffloor) const;
2016-03-01 15:47:10 +00:00
static void CheckMax ();
private:
DImpactDecal();
};
class ATeleportFog : public AActor
{
DECLARE_CLASS (ATeleportFog, AActor)
public:
void PostBeginPlay ();
};
class ASkyViewpoint : public AActor
{
DECLARE_CLASS (ASkyViewpoint, AActor)
public:
void BeginPlay ();
void Destroy() override;
2016-03-01 15:47:10 +00:00
};
// For an EE compatible linedef based definition.
class ASkyCamCompat : public ASkyViewpoint
{
DECLARE_CLASS (ASkyCamCompat, ASkyViewpoint)
public:
void BeginPlay();
};
class AStackPoint : public ASkyViewpoint
{
DECLARE_CLASS (AStackPoint, ASkyViewpoint)
public:
void BeginPlay ();
};
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);
void Destroy() override;
2016-09-19 17:58:04 +00:00
void Serialize(FSerializer &arc);
2016-03-01 15:47:10 +00:00
void Tick ();
AActor *WhoFor() { return ForWho; }
void Cancel ();
protected:
float Blends[2][4];
int TotalTics;
int StartTic;
TObjPtr<AActor> ForWho;
void SetBlend (float time);
DFlashFader ();
};
enum
{
QF_RELATIVE = 1,
QF_SCALEDOWN = 1 << 1,
QF_SCALEUP = 1 << 2,
QF_MAX = 1 << 3,
QF_FULLINTENSITY = 1 << 4,
QF_WAVE = 1 << 5,
};
struct FQuakeJiggers
{
2016-03-23 19:45:48 +00:00
DVector3 Intensity;
DVector3 RelIntensity;
DVector3 Offset;
DVector3 RelOffset;
double RollIntensity, RollWave;
2016-03-01 15:47:10 +00:00
};
class DEarthquake : public DThinker
{
DECLARE_CLASS (DEarthquake, DThinker)
HAS_OBJECT_POINTERS
public:
DEarthquake(AActor *center, int intensityX, int intensityY, int intensityZ, int duration,
int damrad, int tremrad, FSoundID quakesfx, int flags,
double waveSpeedX, double waveSpeedY, double waveSpeedZ, int falloff, int highpoint, double rollIntensity, double rollWave);
2016-03-01 15:47:10 +00:00
2016-09-19 17:58:04 +00:00
void Serialize(FSerializer &arc);
2016-03-01 15:47:10 +00:00
void Tick ();
TObjPtr<AActor> m_Spot;
2016-03-23 19:45:48 +00:00
double m_TremorRadius, m_DamageRadius;
2016-03-01 15:47:10 +00:00
int m_Countdown;
int m_CountdownStart;
FSoundID m_QuakeSFX;
int m_Flags;
2016-03-23 19:45:48 +00:00
DVector3 m_Intensity;
DVector3 m_WaveSpeed;
double m_Falloff;
int m_Highpoint, m_MiniCount;
double m_RollIntensity, m_RollWave;
2016-09-04 21:49:57 +00:00
double GetModIntensity(double intensity, bool fake = false) const;
2016-03-23 19:45:48 +00:00
double GetModWave(double waveMultiplier) const;
double GetFalloff(double dist) const;
2016-03-01 15:47:10 +00:00
static int StaticGetQuakeIntensities(AActor *viewer, FQuakeJiggers &jiggers);
private:
DEarthquake ();
};
class AMorphProjectile : public AActor
{
DECLARE_CLASS (AMorphProjectile, AActor)
public:
int DoSpecialDamage (AActor *target, int damage, FName damagetype);
2016-09-19 13:07:53 +00:00
void Serialize(FSerializer &arc);
2016-03-01 15:47:10 +00:00
PClassPlayerPawn *PlayerClass;
PClassActor *MonsterClass, *MorphFlash, *UnMorphFlash;
2016-03-01 15:47:10 +00:00
int Duration, MorphStyle;
};
class AMorphedMonster : public AActor
{
DECLARE_CLASS (AMorphedMonster, AActor)
HAS_OBJECT_POINTERS
public:
void Tick ();
2016-09-19 13:07:53 +00:00
void Serialize(FSerializer &arc);
2016-03-01 15:47:10 +00:00
void Die (AActor *source, AActor *inflictor, int dmgflags);
void Destroy() override;
2016-03-01 15:47:10 +00:00
TObjPtr<AActor> UnmorphedMe;
int UnmorphTime, MorphStyle;
PClassActor *MorphExitFlash;
ActorFlags FlagsSave;
};
class AMapMarker : public AActor
{
DECLARE_CLASS(AMapMarker, AActor)
public:
void BeginPlay ();
void Activate (AActor *activator);
void Deactivate (AActor *activator);
};
class AFastProjectile : public AActor
{
DECLARE_CLASS(AFastProjectile, AActor)
public:
void Tick ();
};
#endif //__A_SHAREDGLOBAL_H__