mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-08 05:51:09 +00:00
1bd6ac028b
- Added a PickupMessage property to the internal actor parser, replaced most of the virtual PickupMessages with it and placed the code that reads the metadata into AInventory::PickupMessage. Now the PickupMessage method is truly virtual and I can do: Added a Health.LowMessage property to define double message items like Doom's medikit in DECORATE. - Since defining Mana3 as an ammo type and then overriding the TryPickup method means that this item defeats all ammo checks in the game it might as well be defined as a CustomInventory item. At least this fixes the amount given in easy and very hard skills. - Converted all ammo items to DECORATE. - Changed internal property setting of ammo types and sister weapons to use fuglyname as for DECORATE definitions. This allows to export the ammo definitions into DECORATE definitions without doing it for the weapons themselves. - Replaced obituary methods with actor properties. - Fixed: The secret map check didn't work for maps inside Zips. SVN r196 (trunk)
30 lines
749 B
C++
30 lines
749 B
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);
|
|
|
|
#endif
|