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

View file

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