Separate the pointer list from the implement macro

This commit is contained in:
Leonard2 2016-11-05 17:08:54 +01:00
parent 701ffb868b
commit 0b3585c83f
39 changed files with 341 additions and 228 deletions

View file

@ -16,13 +16,15 @@
#include "d_player.h"
IMPLEMENT_POINTY_CLASS(DBot)
DECLARE_POINTER(dest)
DECLARE_POINTER(prev)
DECLARE_POINTER(enemy)
DECLARE_POINTER(missile)
DECLARE_POINTER(mate)
DECLARE_POINTER(last_mate)
END_POINTERS
IMPLEMENT_POINTERS_START(DBot)
IMPLEMENT_POINTER(dest)
IMPLEMENT_POINTER(prev)
IMPLEMENT_POINTER(enemy)
IMPLEMENT_POINTER(missile)
IMPLEMENT_POINTER(mate)
IMPLEMENT_POINTER(last_mate)
IMPLEMENT_POINTERS_END
DBot::DBot ()
: DThinker(STAT_BOT)

View file

@ -231,9 +231,11 @@ DehInfo deh =
// from the original actor's defaults. The original actor is then changed to
// spawn the new class.
IMPLEMENT_POINTY_CLASS (ADehackedPickup)
DECLARE_POINTER (RealPickup)
END_POINTERS
IMPLEMENT_POINTY_CLASS(ADehackedPickup)
IMPLEMENT_POINTERS_START(ADehackedPickup)
IMPLEMENT_POINTER(RealPickup)
IMPLEMENT_POINTERS_END
TArray<PClassActor *> TouchedActors;

View file

@ -119,9 +119,11 @@ protected:
DDecalThinker () : DThinker (STAT_DECALTHINKER) {}
};
IMPLEMENT_POINTY_CLASS (DDecalThinker)
DECLARE_POINTER (TheDecal)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DDecalThinker)
IMPLEMENT_POINTERS_START(DDecalThinker)
IMPLEMENT_POINTER(TheDecal)
IMPLEMENT_POINTERS_END
void DDecalThinker::Serialize(FSerializer &arc)
{

View file

@ -151,11 +151,6 @@ protected: \
#define HAS_FIELDS \
static void InitNativeFields();
// Taking the address of a field in an object at address 1 instead of
// address 0 keeps GCC from complaining about possible misuse of offsetof.
#define DECLARE_POINTER(field) (size_t)&((ThisClass*)1)->field - 1,
#define END_POINTERS ~(size_t)0 };
#if defined(_MSC_VER)
# pragma section(".creg$u",read)
# define _DECLARE_TI(cls) __declspec(allocate(".creg$u")) ClassReg * const cls::RegistrationInfoPtr = &cls::RegistrationInfo;
@ -182,12 +177,10 @@ protected: \
#define IMPLEMENT_POINTY_CLASS(cls) \
_IMP_CREATE_OBJ(cls) \
_IMP_PCLASS(cls,cls::PointerOffsets,cls::InPlaceConstructor, nullptr) \
const size_t cls::PointerOffsets[] = {
#define IMPLEMENT_POINTY_CLASS_WITH_FIELDS(cls) \
_IMP_CREATE_OBJ(cls) \
_IMP_PCLASS(cls,cls::PointerOffsets,cls::InPlaceConstructor, cls::InitNativeFields) \
const size_t cls::PointerOffsets[] = {
#define IMPLEMENT_CLASS(cls) \
_IMP_CREATE_OBJ(cls) \
@ -202,7 +195,12 @@ protected: \
#define IMPLEMENT_ABSTRACT_POINTY_CLASS(cls) \
_IMP_PCLASS(cls,cls::PointerOffsets,nullptr,nullptr) \
const size_t cls::PointerOffsets[] = {
// Taking the address of a field in an object at address 1 instead of
// address 0 keeps GCC from complaining about possible misuse of offsetof.
#define IMPLEMENT_POINTERS_START(cls) const size_t cls::PointerOffsets[] = {
#define IMPLEMENT_POINTER(field) (size_t)&((ThisClass*)1)->field - 1,
#define IMPLEMENT_POINTERS_END ~(size_t)0 };
enum EObjectFlags
{

View file

@ -188,8 +188,10 @@ PClassClass::PClassClass()
/* PType ******************************************************************/
IMPLEMENT_ABSTRACT_POINTY_CLASS(PType)
DECLARE_POINTER(HashNext)
END_POINTERS
IMPLEMENT_POINTERS_START(PType)
IMPLEMENT_POINTER(HashNext)
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -643,8 +645,10 @@ IMPLEMENT_ABSTRACT_CLASS(PCompoundType)
/* PNamedType *************************************************************/
IMPLEMENT_ABSTRACT_POINTY_CLASS(PNamedType)
DECLARE_POINTER(Outer)
END_POINTERS
IMPLEMENT_POINTERS_START(PNamedType)
IMPLEMENT_POINTER(Outer)
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -1457,8 +1461,10 @@ bool PStatePointer::ReadValue(FSerializer &ar, const char *key, void *addr) cons
/* PPointer ***************************************************************/
IMPLEMENT_POINTY_CLASS(PPointer)
DECLARE_POINTER(PointedType)
END_POINTERS
IMPLEMENT_POINTERS_START(PPointer)
IMPLEMENT_POINTER(PointedType)
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -1586,8 +1592,10 @@ PPointer *NewPointer(PType *type, bool isconst)
/* PClassPointer **********************************************************/
IMPLEMENT_POINTY_CLASS(PClassPointer)
DECLARE_POINTER(ClassRestriction)
END_POINTERS
IMPLEMENT_POINTERS_START(PClassPointer)
IMPLEMENT_POINTER(ClassRestriction)
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -1665,8 +1673,10 @@ PClassPointer *NewClassPointer(PClass *restrict)
/* PEnum ******************************************************************/
IMPLEMENT_POINTY_CLASS(PEnum)
DECLARE_POINTER(ValueType)
END_POINTERS
IMPLEMENT_POINTERS_START(PEnum)
IMPLEMENT_POINTER(ValueType)
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -1716,8 +1726,10 @@ PEnum *NewEnum(FName name, PTypeBase *outer)
/* PArray *****************************************************************/
IMPLEMENT_POINTY_CLASS(PArray)
DECLARE_POINTER(ElementType)
END_POINTERS
IMPLEMENT_POINTERS_START(PArray)
IMPLEMENT_POINTER(ElementType)
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -1913,8 +1925,10 @@ PVector *NewVector(unsigned int size)
/* PDynArray **************************************************************/
IMPLEMENT_POINTY_CLASS(PDynArray)
DECLARE_POINTER(ElementType)
END_POINTERS
IMPLEMENT_POINTERS_START(PDynArray)
IMPLEMENT_POINTER(ElementType)
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -1994,9 +2008,11 @@ PDynArray *NewDynArray(PType *type)
/* PMap *******************************************************************/
IMPLEMENT_POINTY_CLASS(PMap)
DECLARE_POINTER(KeyType)
DECLARE_POINTER(ValueType)
END_POINTERS
IMPLEMENT_POINTERS_START(PMap)
IMPLEMENT_POINTER(KeyType)
IMPLEMENT_POINTER(ValueType)
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -2486,8 +2502,10 @@ unsigned PFunction::AddVariant(PPrototype *proto, TArray<DWORD> &argflags, TArra
/* PClass *****************************************************************/
IMPLEMENT_POINTY_CLASS(PClass)
DECLARE_POINTER(ParentClass)
END_POINTERS
IMPLEMENT_POINTERS_START(PClass)
IMPLEMENT_POINTER(ParentClass)
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -3407,12 +3425,18 @@ IMPLEMENT_ABSTRACT_CLASS(PSymbol);
IMPLEMENT_CLASS(PSymbolConst);
IMPLEMENT_CLASS(PSymbolConstNumeric);
IMPLEMENT_CLASS(PSymbolConstString);
IMPLEMENT_POINTY_CLASS(PSymbolType)
DECLARE_POINTER(Type)
END_POINTERS
IMPLEMENT_POINTERS_START(PSymbolType)
IMPLEMENT_POINTER(Type)
IMPLEMENT_POINTERS_END
IMPLEMENT_POINTY_CLASS(PSymbolVMFunction)
DECLARE_POINTER(Function)
END_POINTERS
IMPLEMENT_POINTERS_START(PSymbolVMFunction)
IMPLEMENT_POINTER(Function)
IMPLEMENT_POINTERS_END
IMPLEMENT_CLASS(PSymbolTreeNode)
//==========================================================================

View file

@ -71,9 +71,11 @@ void DSectorEffect::Serialize(FSerializer &arc)
arc("sector", m_Sector);
}
IMPLEMENT_POINTY_CLASS (DMover)
DECLARE_POINTER(interpolation)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DMover)
IMPLEMENT_POINTERS_START(DMover)
IMPLEMENT_POINTER(interpolation)
IMPLEMENT_POINTERS_END
DMover::DMover ()
{

View file

@ -72,8 +72,10 @@
//==========================================================================
IMPLEMENT_POINTY_CLASS(DFsSection)
DECLARE_POINTER(next)
END_POINTERS
IMPLEMENT_POINTERS_START(DFsSection)
IMPLEMENT_POINTER(next)
IMPLEMENT_POINTERS_END
//==========================================================================
//

View file

@ -75,23 +75,23 @@ AActor *trigger_obj;
//
//==========================================================================
#define DECLARE_16_POINTERS(v, i) \
DECLARE_POINTER(v[i]) \
DECLARE_POINTER(v[i+1]) \
DECLARE_POINTER(v[i+2]) \
DECLARE_POINTER(v[i+3]) \
DECLARE_POINTER(v[i+4]) \
DECLARE_POINTER(v[i+5]) \
DECLARE_POINTER(v[i+6]) \
DECLARE_POINTER(v[i+7]) \
DECLARE_POINTER(v[i+8]) \
DECLARE_POINTER(v[i+9]) \
DECLARE_POINTER(v[i+10]) \
DECLARE_POINTER(v[i+11]) \
DECLARE_POINTER(v[i+12]) \
DECLARE_POINTER(v[i+13]) \
DECLARE_POINTER(v[i+14]) \
DECLARE_POINTER(v[i+15]) \
#define IMPLEMENT_16_POINTERS(v, i) \
IMPLEMENT_POINTER(v[i]) \
IMPLEMENT_POINTER(v[i+1]) \
IMPLEMENT_POINTER(v[i+2]) \
IMPLEMENT_POINTER(v[i+3]) \
IMPLEMENT_POINTER(v[i+4]) \
IMPLEMENT_POINTER(v[i+5]) \
IMPLEMENT_POINTER(v[i+6]) \
IMPLEMENT_POINTER(v[i+7]) \
IMPLEMENT_POINTER(v[i+8]) \
IMPLEMENT_POINTER(v[i+9]) \
IMPLEMENT_POINTER(v[i+10]) \
IMPLEMENT_POINTER(v[i+11]) \
IMPLEMENT_POINTER(v[i+12]) \
IMPLEMENT_POINTER(v[i+13]) \
IMPLEMENT_POINTER(v[i+14]) \
IMPLEMENT_POINTER(v[i+15]) \
//==========================================================================
//
@ -100,29 +100,31 @@ AActor *trigger_obj;
//==========================================================================
IMPLEMENT_POINTY_CLASS(DFsScript)
DECLARE_POINTER(parent)
DECLARE_POINTER(trigger)
DECLARE_16_POINTERS(sections, 0)
DECLARE_POINTER(sections[16])
DECLARE_16_POINTERS(variables, 0)
DECLARE_16_POINTERS(children, 0)
DECLARE_16_POINTERS(children, 16)
DECLARE_16_POINTERS(children, 32)
DECLARE_16_POINTERS(children, 48)
DECLARE_16_POINTERS(children, 64)
DECLARE_16_POINTERS(children, 80)
DECLARE_16_POINTERS(children, 96)
DECLARE_16_POINTERS(children, 112)
DECLARE_16_POINTERS(children, 128)
DECLARE_16_POINTERS(children, 144)
DECLARE_16_POINTERS(children, 160)
DECLARE_16_POINTERS(children, 176)
DECLARE_16_POINTERS(children, 192)
DECLARE_16_POINTERS(children, 208)
DECLARE_16_POINTERS(children, 224)
DECLARE_16_POINTERS(children, 240)
DECLARE_POINTER(children[256])
END_POINTERS
IMPLEMENT_POINTERS_START(DFsScript)
IMPLEMENT_POINTER(parent)
IMPLEMENT_POINTER(trigger)
IMPLEMENT_16_POINTERS(sections, 0)
IMPLEMENT_POINTER(sections[16])
IMPLEMENT_16_POINTERS(variables, 0)
IMPLEMENT_16_POINTERS(children, 0)
IMPLEMENT_16_POINTERS(children, 16)
IMPLEMENT_16_POINTERS(children, 32)
IMPLEMENT_16_POINTERS(children, 48)
IMPLEMENT_16_POINTERS(children, 64)
IMPLEMENT_16_POINTERS(children, 80)
IMPLEMENT_16_POINTERS(children, 96)
IMPLEMENT_16_POINTERS(children, 112)
IMPLEMENT_16_POINTERS(children, 128)
IMPLEMENT_16_POINTERS(children, 144)
IMPLEMENT_16_POINTERS(children, 160)
IMPLEMENT_16_POINTERS(children, 176)
IMPLEMENT_16_POINTERS(children, 192)
IMPLEMENT_16_POINTERS(children, 208)
IMPLEMENT_16_POINTERS(children, 224)
IMPLEMENT_16_POINTERS(children, 240)
IMPLEMENT_POINTER(children[256])
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -268,11 +270,13 @@ void DFsScript::ParseScript(char *position)
//==========================================================================
IMPLEMENT_POINTY_CLASS(DRunningScript)
DECLARE_POINTER(prev)
DECLARE_POINTER(next)
DECLARE_POINTER(trigger)
DECLARE_16_POINTERS(variables, 0)
END_POINTERS
IMPLEMENT_POINTERS_START(DRunningScript)
IMPLEMENT_POINTER(prev)
IMPLEMENT_POINTER(next)
IMPLEMENT_POINTER(trigger)
IMPLEMENT_16_POINTERS(variables, 0)
IMPLEMENT_POINTERS_END
//==========================================================================
//
@ -375,10 +379,13 @@ void DRunningScript::Serialize(FSerializer &arc)
// The main thinker
//
//==========================================================================
IMPLEMENT_POINTY_CLASS(DFraggleThinker)
DECLARE_POINTER(RunningScripts)
DECLARE_POINTER(LevelScript)
END_POINTERS
IMPLEMENT_POINTERS_START(DFraggleThinker)
IMPLEMENT_POINTER(RunningScripts)
IMPLEMENT_POINTER(LevelScript)
IMPLEMENT_POINTERS_END
TObjPtr<DFraggleThinker> DFraggleThinker::ActiveThinker;

View file

@ -180,9 +180,11 @@ AActor* actorvalue(const svalue_t &svalue)
//==========================================================================
IMPLEMENT_POINTY_CLASS(DFsVariable)
DECLARE_POINTER (next)
DECLARE_POINTER (actor)
END_POINTERS
IMPLEMENT_POINTERS_START(DFsVariable)
IMPLEMENT_POINTER(next)
IMPLEMENT_POINTER(actor)
IMPLEMENT_POINTERS_END
//==========================================================================
//

View file

@ -31,9 +31,11 @@ public:
TObjPtr<AActor> DirtClump;
};
IMPLEMENT_POINTY_CLASS (AThrustFloor)
DECLARE_POINTER (DirtClump)
END_POINTERS
IMPLEMENT_POINTY_CLASS(AThrustFloor)
IMPLEMENT_POINTERS_START(AThrustFloor)
IMPLEMENT_POINTER(DirtClump)
IMPLEMENT_POINTERS_END
void AThrustFloor::Serialize(FSerializer &arc)
{

View file

@ -305,8 +305,10 @@ private:
};
IMPLEMENT_POINTY_CLASS(DCorpsePointer)
DECLARE_POINTER(Corpse)
END_POINTERS
IMPLEMENT_POINTERS_START(DCorpsePointer)
IMPLEMENT_POINTER(Corpse)
IMPLEMENT_POINTERS_END
CUSTOM_CVAR(Int, sv_corpsequeuesize, 64, CVAR_ARCHIVE|CVAR_SERVERINFO)
{

View file

@ -58,10 +58,12 @@ static int ImpactCount;
CVAR (Bool, cl_spreaddecals, true, CVAR_ARCHIVE)
IMPLEMENT_POINTY_CLASS (DBaseDecal)
DECLARE_POINTER(WallPrev)
DECLARE_POINTER(WallNext)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DBaseDecal)
IMPLEMENT_POINTERS_START(DBaseDecal)
IMPLEMENT_POINTER(WallPrev)
IMPLEMENT_POINTER(WallNext)
IMPLEMENT_POINTERS_END
IMPLEMENT_CLASS (DImpactDecal)

View file

@ -3,9 +3,11 @@
#include "d_player.h"
#include "serializer.h"
IMPLEMENT_POINTY_CLASS (DFlashFader)
DECLARE_POINTER (ForWho)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DFlashFader)
IMPLEMENT_POINTERS_START(DFlashFader)
IMPLEMENT_POINTER(ForWho)
IMPLEMENT_POINTERS_END
DFlashFader::DFlashFader ()
{

View file

@ -650,9 +650,11 @@ void AMorphProjectile::Serialize(FSerializer &arc)
// Morphed Monster (you must subclass this to do something useful) ---------
IMPLEMENT_POINTY_CLASS (AMorphedMonster)
DECLARE_POINTER (UnmorphedMe)
END_POINTERS
IMPLEMENT_POINTY_CLASS(AMorphedMonster)
IMPLEMENT_POINTERS_START(AMorphedMonster)
IMPLEMENT_POINTER(UnmorphedMe)
IMPLEMENT_POINTERS_END
void AMorphedMonster::Serialize(FSerializer &arc)
{

View file

@ -66,9 +66,11 @@ public:
TObjPtr<AInterpolationPoint> Next;
};
IMPLEMENT_POINTY_CLASS (AInterpolationPoint)
DECLARE_POINTER (Next)
END_POINTERS
IMPLEMENT_POINTY_CLASS(AInterpolationPoint)
IMPLEMENT_POINTERS_START(AInterpolationPoint)
IMPLEMENT_POINTER(Next)
IMPLEMENT_POINTERS_END
void AInterpolationPoint::Serialize(FSerializer &arc)
{
@ -176,10 +178,12 @@ protected:
int HoldTime;
};
IMPLEMENT_POINTY_CLASS (APathFollower)
DECLARE_POINTER (PrevNode)
DECLARE_POINTER (CurrNode)
END_POINTERS
IMPLEMENT_POINTY_CLASS(APathFollower)
IMPLEMENT_POINTERS_START(APathFollower)
IMPLEMENT_POINTER(PrevNode)
IMPLEMENT_POINTER(CurrNode)
IMPLEMENT_POINTERS_END
void APathFollower::Serialize(FSerializer &arc)
{
@ -592,9 +596,11 @@ protected:
TObjPtr<AActor> Activator;
};
IMPLEMENT_POINTY_CLASS (AMovingCamera)
DECLARE_POINTER (Activator)
END_POINTERS
IMPLEMENT_POINTY_CLASS(AMovingCamera)
IMPLEMENT_POINTERS_START(AMovingCamera)
IMPLEMENT_POINTER(Activator)
IMPLEMENT_POINTERS_END
void AMovingCamera::Serialize(FSerializer &arc)
{

View file

@ -470,9 +470,11 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialPosition)
int AInventory::StaticLastMessageTic;
const char *AInventory::StaticLastMessage;
IMPLEMENT_POINTY_CLASS (AInventory)
DECLARE_POINTER (Owner)
END_POINTERS
IMPLEMENT_POINTY_CLASS(AInventory)
IMPLEMENT_POINTERS_START(AInventory)
IMPLEMENT_POINTER(Owner)
IMPLEMENT_POINTERS_END
//===========================================================================
//

View file

@ -14,9 +14,11 @@
static FRandom pr_quake ("Quake");
IMPLEMENT_POINTY_CLASS (DEarthquake)
DECLARE_POINTER (m_Spot)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DEarthquake)
IMPLEMENT_POINTERS_START(DEarthquake)
IMPLEMENT_POINTER(m_Spot)
IMPLEMENT_POINTERS_END
//==========================================================================
//

View file

@ -81,8 +81,10 @@ public:
};
IMPLEMENT_POINTY_CLASS(ASoundSequenceSlot)
DECLARE_POINTER(Sequence)
END_POINTERS
IMPLEMENT_POINTERS_START(ASoundSequenceSlot)
IMPLEMENT_POINTER(Sequence)
IMPLEMENT_POINTERS_END
//==========================================================================
//

View file

@ -24,10 +24,11 @@ void AWeaponHolder::Serialize(FSerializer &arc)
("pieceweapon", PieceWeapon);
}
IMPLEMENT_POINTY_CLASS(AWeaponPiece)
IMPLEMENT_POINTY_CLASS (AWeaponPiece)
DECLARE_POINTER (FullWeapon)
END_POINTERS
IMPLEMENT_POINTERS_START(AWeaponPiece)
IMPLEMENT_POINTER(FullWeapon)
IMPLEMENT_POINTERS_END
void AWeaponPiece::Serialize(FSerializer &arc)

View file

@ -21,11 +21,13 @@
#define BONUSADD 6
IMPLEMENT_POINTY_CLASS (AWeapon)
DECLARE_POINTER (Ammo1)
DECLARE_POINTER (Ammo2)
DECLARE_POINTER (SisterWeapon)
END_POINTERS
IMPLEMENT_POINTY_CLASS(AWeapon)
IMPLEMENT_POINTERS_START(AWeapon)
IMPLEMENT_POINTER(Ammo1)
IMPLEMENT_POINTER(Ammo2)
IMPLEMENT_POINTER(SisterWeapon)
IMPLEMENT_POINTERS_END
FString WeaponSection;
TArray<FString> KeyConfWeapons;

View file

@ -44,9 +44,11 @@
EXTERN_CVAR(Int, con_scaletext)
int active_con_scaletext();
IMPLEMENT_POINTY_CLASS (DHUDMessage)
DECLARE_POINTER(Next)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DHUDMessage)
IMPLEMENT_POINTERS_START(DHUDMessage)
IMPLEMENT_POINTER(Next)
IMPLEMENT_POINTERS_END
IMPLEMENT_CLASS (DHUDMessageFadeOut)
IMPLEMENT_CLASS (DHUDMessageFadeInOut)

View file

@ -1532,10 +1532,12 @@ private:
};
IMPLEMENT_POINTY_CLASS(DSBarInfo)
DECLARE_POINTER(ammo1)
DECLARE_POINTER(ammo2)
DECLARE_POINTER(armor)
END_POINTERS
IMPLEMENT_POINTERS_START(DSBarInfo)
IMPLEMENT_POINTER(ammo1)
IMPLEMENT_POINTER(ammo2)
IMPLEMENT_POINTER(armor)
IMPLEMENT_POINTERS_END
DBaseStatusBar *CreateCustomStatusBar (int script)
{

View file

@ -63,10 +63,12 @@
#define POWERUPICONSIZE 32
IMPLEMENT_POINTY_CLASS(DBaseStatusBar)
DECLARE_POINTER(Messages[0])
DECLARE_POINTER(Messages[1])
DECLARE_POINTER(Messages[2])
END_POINTERS
IMPLEMENT_POINTERS_START(DBaseStatusBar)
IMPLEMENT_POINTER(Messages[0])
IMPLEMENT_POINTER(Messages[1])
IMPLEMENT_POINTER(Messages[2])
IMPLEMENT_POINTERS_END
EXTERN_CVAR (Bool, am_showmonsters)
EXTERN_CVAR (Bool, am_showsecrets)

View file

@ -154,8 +154,10 @@ int GetSpriteIndex(const char * spritename, bool add)
}
IMPLEMENT_POINTY_CLASS(PClassActor)
DECLARE_POINTER(DropItems)
END_POINTERS
IMPLEMENT_POINTERS_START(PClassActor)
IMPLEMENT_POINTER(DropItems)
IMPLEMENT_POINTERS_END
//==========================================================================
//

View file

@ -59,9 +59,12 @@ IMPLEMENT_CLASS(DIntermissionScreenFader)
IMPLEMENT_CLASS(DIntermissionScreenText)
IMPLEMENT_CLASS(DIntermissionScreenCast)
IMPLEMENT_CLASS(DIntermissionScreenScroller)
IMPLEMENT_POINTY_CLASS(DIntermissionController)
DECLARE_POINTER(mScreen)
END_POINTERS
IMPLEMENT_POINTERS_START(DIntermissionController)
IMPLEMENT_POINTER(mScreen)
IMPLEMENT_POINTERS_END
extern int NoWipe;

View file

@ -1034,8 +1034,10 @@ public:
};
IMPLEMENT_POINTY_CLASS(DSuicider)
DECLARE_POINTER(Pawn)
END_POINTERS
IMPLEMENT_POINTERS_START(DSuicider)
IMPLEMENT_POINTER(Pawn)
IMPLEMENT_POINTERS_END
void cht_Suicide (player_t *plyr)
{

View file

@ -91,9 +91,11 @@ static bool MenuEnabled = true;
//
//============================================================================
IMPLEMENT_POINTY_CLASS (DMenu)
DECLARE_POINTER(mParentMenu)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DMenu)
IMPLEMENT_POINTERS_START(DMenu)
IMPLEMENT_POINTER(mParentMenu)
IMPLEMENT_POINTERS_END
DMenu::DMenu(DMenu *parent)
{

View file

@ -1369,9 +1369,11 @@ private:
DPlaneWatcher() {}
};
IMPLEMENT_POINTY_CLASS (DPlaneWatcher)
DECLARE_POINTER (Activator)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DPlaneWatcher)
IMPLEMENT_POINTERS_START(DPlaneWatcher)
IMPLEMENT_POINTER(Activator)
IMPLEMENT_POINTERS_END
DPlaneWatcher::DPlaneWatcher (AActor *it, line_t *line, int lineSide, bool ceiling,
int tag, int height, int special,
@ -2858,10 +2860,12 @@ void FBehavior::StaticStopMyScripts (AActor *actor)
//---- The ACS Interpreter ----//
IMPLEMENT_POINTY_CLASS (DACSThinker)
DECLARE_POINTER(LastScript)
DECLARE_POINTER(Scripts)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DACSThinker)
IMPLEMENT_POINTERS_START(DACSThinker)
IMPLEMENT_POINTER(LastScript)
IMPLEMENT_POINTER(Scripts)
IMPLEMENT_POINTERS_END
TObjPtr<DACSThinker> DACSThinker::ActiveThinker;
@ -2987,11 +2991,13 @@ void DACSThinker::StopScriptsFor (AActor *actor)
}
}
IMPLEMENT_POINTY_CLASS (DLevelScript)
DECLARE_POINTER(next)
DECLARE_POINTER(prev)
DECLARE_POINTER(activator)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DLevelScript)
IMPLEMENT_POINTERS_START(DLevelScript)
IMPLEMENT_POINTER(next)
IMPLEMENT_POINTER(prev)
IMPLEMENT_POINTER(activator)
IMPLEMENT_POINTERS_END
//==========================================================================
//

View file

@ -815,10 +815,12 @@ bool EV_DoDonut (int tag, line_t *line, double pillarspeed, double slimespeed)
//
//==========================================================================
IMPLEMENT_POINTY_CLASS (DElevator)
DECLARE_POINTER(m_Interp_Floor)
DECLARE_POINTER(m_Interp_Ceiling)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DElevator)
IMPLEMENT_POINTERS_START(DElevator)
IMPLEMENT_POINTER(m_Interp_Floor)
IMPLEMENT_POINTER(m_Interp_Ceiling)
IMPLEMENT_POINTERS_END
DElevator::DElevator ()
{

View file

@ -132,18 +132,20 @@ CVAR (Int, cl_bloodtype, 0, CVAR_ARCHIVE);
// CODE --------------------------------------------------------------------
IMPLEMENT_POINTY_CLASS_WITH_FIELDS (AActor)
DECLARE_POINTER (target)
DECLARE_POINTER (lastenemy)
DECLARE_POINTER (tracer)
DECLARE_POINTER (goal)
DECLARE_POINTER (LastLookActor)
DECLARE_POINTER (Inventory)
DECLARE_POINTER (LastHeard)
DECLARE_POINTER (master)
DECLARE_POINTER (Poisoner)
DECLARE_POINTER (DamageFunc)
DECLARE_POINTER (alternative)
END_POINTERS
IMPLEMENT_POINTERS_START(AActor)
IMPLEMENT_POINTER(target)
IMPLEMENT_POINTER(lastenemy)
IMPLEMENT_POINTER(tracer)
IMPLEMENT_POINTER(goal)
IMPLEMENT_POINTER(LastLookActor)
IMPLEMENT_POINTER(Inventory)
IMPLEMENT_POINTER(LastHeard)
IMPLEMENT_POINTER(master)
IMPLEMENT_POINTER(Poisoner)
IMPLEMENT_POINTER(DamageFunc)
IMPLEMENT_POINTER(alternative)
IMPLEMENT_POINTERS_END
AActor::~AActor ()
{
@ -6953,9 +6955,12 @@ DEFINE_ACTION_FUNCTION(AActor, Vec3Offset)
// DropItem handling
//
//----------------------------------------------------------------------------
IMPLEMENT_POINTY_CLASS_WITH_FIELDS(DDropItem)
DECLARE_POINTER(Next)
END_POINTERS
IMPLEMENT_POINTERS_START(DDropItem)
IMPLEMENT_POINTER(Next)
IMPLEMENT_POINTERS_END
void DDropItem::InitNativeFields()
{
@ -6967,7 +6972,6 @@ void DDropItem::InitNativeFields()
meta->AddNativeField("Amount", TypeSInt32, myoffsetof(DDropItem, Amount));
}
void PrintMiscActorInfo(AActor *query)
{
if (query)

View file

@ -40,10 +40,12 @@
#include "serializer.h"
#include "r_data/r_interpolate.h"
IMPLEMENT_POINTY_CLASS (DPillar)
DECLARE_POINTER(m_Interp_Floor)
DECLARE_POINTER(m_Interp_Ceiling)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DPillar)
IMPLEMENT_POINTERS_START(DPillar)
IMPLEMENT_POINTER(m_Interp_Floor)
IMPLEMENT_POINTER(m_Interp_Ceiling)
IMPLEMENT_POINTERS_END
DPillar::DPillar ()
{

View file

@ -100,9 +100,11 @@ static const FGenericButtons ButtonChecks[] =
//------------------------------------------------------------------------
IMPLEMENT_POINTY_CLASS(DPSprite)
DECLARE_POINTER(Caller)
DECLARE_POINTER(Next)
END_POINTERS
IMPLEMENT_POINTERS_START(DPSprite)
IMPLEMENT_POINTER(Caller)
IMPLEMENT_POINTER(Next)
IMPLEMENT_POINTERS_END
//------------------------------------------------------------------------
//

View file

@ -74,10 +74,11 @@ protected:
friend bool PIT_PushThing (AActor *thing);
};
IMPLEMENT_POINTY_CLASS(DPusher)
IMPLEMENT_POINTY_CLASS (DPusher)
DECLARE_POINTER (m_Source)
END_POINTERS
IMPLEMENT_POINTERS_START(DPusher)
IMPLEMENT_POINTER(m_Source)
IMPLEMENT_POINTERS_END
DPusher::DPusher ()
{

View file

@ -73,12 +73,13 @@ private:
}
};
IMPLEMENT_POINTY_CLASS(DScroller)
IMPLEMENT_POINTY_CLASS (DScroller)
DECLARE_POINTER (m_Interpolations[0])
DECLARE_POINTER (m_Interpolations[1])
DECLARE_POINTER (m_Interpolations[2])
END_POINTERS
IMPLEMENT_POINTERS_START(DScroller)
IMPLEMENT_POINTER(m_Interpolations[0])
IMPLEMENT_POINTER(m_Interpolations[1])
IMPLEMENT_POINTER(m_Interpolations[2])
IMPLEMENT_POINTERS_END
//-----------------------------------------------------------------------------

View file

@ -622,10 +622,12 @@ void player_t::SendPitchLimits() const
//
//===========================================================================
IMPLEMENT_POINTY_CLASS (APlayerPawn)
DECLARE_POINTER(InvFirst)
DECLARE_POINTER(InvSel)
END_POINTERS
IMPLEMENT_POINTY_CLASS(APlayerPawn)
IMPLEMENT_POINTERS_START(APlayerPawn)
IMPLEMENT_POINTER(InvFirst)
IMPLEMENT_POINTER(InvSel)
IMPLEMENT_POINTERS_END
IMPLEMENT_CLASS (APlayerChunk)

View file

@ -172,9 +172,11 @@ static FPolyNode *FreePolyNodes;
//
//==========================================================================
IMPLEMENT_POINTY_CLASS (DPolyAction)
DECLARE_POINTER(m_Interpolation)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DPolyAction)
IMPLEMENT_POINTERS_START(DPolyAction)
IMPLEMENT_POINTER(m_Interpolation)
IMPLEMENT_POINTERS_END
DPolyAction::DPolyAction ()
{

View file

@ -162,9 +162,12 @@ public:
//==========================================================================
IMPLEMENT_ABSTRACT_POINTY_CLASS(DInterpolation)
DECLARE_POINTER(Next)
DECLARE_POINTER(Prev)
END_POINTERS
IMPLEMENT_POINTERS_START(DInterpolation)
IMPLEMENT_POINTER(Next)
IMPLEMENT_POINTER(Prev)
IMPLEMENT_POINTERS_END
IMPLEMENT_CLASS(DSectorPlaneInterpolation)
IMPLEMENT_CLASS(DSectorScrollInterpolation)
IMPLEMENT_CLASS(DWallScrollInterpolation)

View file

@ -285,12 +285,14 @@ void DSeqNode::SerializeSequences (FSerializer &arc)
arc("sndseqlisthead", SequenceListHead);
}
IMPLEMENT_POINTY_CLASS (DSeqNode)
DECLARE_POINTER(m_ChildSeqNode)
DECLARE_POINTER(m_ParentSeqNode)
DECLARE_POINTER(m_Next)
DECLARE_POINTER(m_Prev)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DSeqNode)
IMPLEMENT_POINTERS_START(DSeqNode)
IMPLEMENT_POINTER(m_ChildSeqNode)
IMPLEMENT_POINTER(m_ParentSeqNode)
IMPLEMENT_POINTER(m_Next)
IMPLEMENT_POINTER(m_Prev)
IMPLEMENT_POINTERS_END
DSeqNode::DSeqNode ()
: m_SequenceChoices(0)
@ -427,9 +429,11 @@ FName DSeqNode::GetSequenceName () const
return Sequences[m_Sequence]->SeqName;
}
IMPLEMENT_POINTY_CLASS (DSeqActorNode)
DECLARE_POINTER (m_Actor)
END_POINTERS
IMPLEMENT_POINTY_CLASS(DSeqActorNode)
IMPLEMENT_POINTERS_START(DSeqActorNode)
IMPLEMENT_POINTER(m_Actor)
IMPLEMENT_POINTERS_END
void DSeqActorNode::Serialize(FSerializer &arc)
{

View file

@ -36,8 +36,11 @@
IMPLEMENT_CLASS(VMException)
IMPLEMENT_ABSTRACT_POINTY_CLASS(VMFunction)
DECLARE_POINTER(Proto)
END_POINTERS
IMPLEMENT_POINTERS_START(VMFunction)
IMPLEMENT_POINTER(Proto)
IMPLEMENT_POINTERS_END
IMPLEMENT_CLASS(VMScriptFunction)
IMPLEMENT_CLASS(VMNativeFunction)