move visual thinker definition into its own header
This commit is contained in:
parent
3622e2bb2a
commit
174344ddf1
9 changed files with 80 additions and 64 deletions
|
|
@ -46,6 +46,8 @@
|
|||
#include "symbols.h"
|
||||
#include "types.h"
|
||||
|
||||
#include "p_visualthinker.h"
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
// TYPES -------------------------------------------------------------------
|
||||
|
|
@ -421,7 +423,7 @@ PClass *PClass::FindClass (FName zaname)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
DObject *PClass::CreateNew()
|
||||
DObject *PClass::CreateNew(int *statnum)
|
||||
{
|
||||
uint8_t *mem = (uint8_t *)M_Malloc (Size);
|
||||
assert (mem != nullptr);
|
||||
|
|
@ -444,6 +446,12 @@ DObject *PClass::CreateNew()
|
|||
|
||||
((DObject *)mem)->SetClass (const_cast<PClass *>(this));
|
||||
InitializeSpecials(mem, Defaults, &PClass::SpecialInits);
|
||||
|
||||
if(statnum && ((DObject *)mem)->IsKindOf(RUNTIME_CLASS(DVisualThinker)))
|
||||
{
|
||||
*statnum = STAT_VISUALTHINKER;
|
||||
}
|
||||
|
||||
return (DObject *)mem;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public:
|
|||
PClass();
|
||||
~PClass();
|
||||
void InsertIntoHash(bool native);
|
||||
DObject *CreateNew();
|
||||
DObject *CreateNew(int *statnum = nullptr);
|
||||
PClass *CreateDerivedClass(FName name, unsigned int size, bool *newlycreated = nullptr, int fileno = 0);
|
||||
|
||||
void InitializeActorInfo();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue