Add PStatePointer type

This commit is contained in:
Randy Heit 2013-08-14 21:53:03 -05:00
parent 55bec365e8
commit ed1c22186f
2 changed files with 27 additions and 0 deletions

View File

@ -69,6 +69,7 @@ PString *TypeString;
PName *TypeName;
PSound *TypeSound;
PColor *TypeColor;
PStatePointer *TypeState;
// PRIVATE DATA DEFINITIONS ------------------------------------------------
@ -267,6 +268,7 @@ void PType::StaticInit()
TypeTable.AddType(TypeName = new PName);
TypeTable.AddType(TypeSound = new PSound);
TypeTable.AddType(TypeColor = new PColor);
TypeTable.AddType(TypeState = new PStatePointer);
}
@ -447,6 +449,23 @@ PColor::PColor()
assert(sizeof(PalEntry) == __alignof(PalEntry));
}
/* PStatePointer **********************************************************/
IMPLEMENT_CLASS(PStatePointer)
//==========================================================================
//
// PStatePointer Default Constructor
//
//==========================================================================
PStatePointer::PStatePointer()
: PInt(sizeof(FState *), true)
{
Align = __alignof(FState *);
}
/* PPointer ***************************************************************/
IMPLEMENT_POINTY_CLASS(PPointer)

View File

@ -291,6 +291,13 @@ public:
// Pointers -----------------------------------------------------------------
class PStatePointer : public PInt
{
DECLARE_CLASS(PStatePointer, PInt);
public:
PStatePointer();
};
class PPointer : public PInt
{
DECLARE_CLASS(PPointer, PInt);
@ -618,5 +625,6 @@ extern PString *TypeString;
extern PName *TypeName;
extern PSound *TypeSound;
extern PColor *TypeColor;
extern PStatePointer *TypeState;
#endif