gzdoom/src/thingdef.h
Christoph Oelckers 3f90f1655c - Used the new explosion handling to clean up the old style projectile
definitions. The SimpleProjectile class is gone and it uses the meta
  data and A_ExplodeParms instead now.
- Removed the deprecation warnings for explosion parameters again because 
  the new system is fully inheritable and therefore useful.
- Changed the explosion properties into meta data and adjusted A_ExplodeParams
  to use these when called without any parameters. Also removed all special
  parsing for A_Explode so now this function can be called with expressions
  like any other function.
- Changed DECORATE parsing so that functions with completely optional 
  parameter lists don't create an empty list when called without parameters.

SVN r274 (trunk)
2006-07-29 10:47:14 +00:00

62 lines
1.3 KiB
C++

#ifndef __THINGDEF_H
#define __THINGDEF_H
// This class is for storing a name inside a const PClass* field without
// generating compiler warnings. It does not manipulate data in any other
// way.
class fuglyname : public FName
{
public:
fuglyname() : FName() {}
fuglyname(const char *foo) : FName(foo) {}
operator const PClass *()
{
return reinterpret_cast<const PClass *>(size_t(int(*this)));
}
fuglyname &operator= (const PClass *foo)
{
FName *p = this;
*p = ENamedName(reinterpret_cast<size_t>(foo));
return *this;
}
};
int ParseExpression (bool _not);
int EvalExpressionI (int id, AActor *self);
float EvalExpressionF (int id, AActor *self);
bool EvalExpressionN (int id, AActor *self);
struct FDropItem
{
FName Name;
int probability;
int amount;
FDropItem * Next;
};
FDropItem *GetDropItems(AActor * actor);
// A truly awful hack to get to the state that called an action function
// without knowing whether it has been called from a weapon or actor.
extern FState * CallingState;
int CheckIndex(int paramsize, FState ** pcallstate=NULL);
void A_ExplodeParms(AActor * self);
enum
{
ACMETA_BASE = 0x83000,
ACMETA_DropItems, // Int (index into DropItemList)
ACMETA_ExplosionDamage,
ACMETA_ExplosionRadius,
ACMETA_DontHurtShooter,
};
#endif