diff --git a/Sources/Plasma/FeatureLib/pfGameScoreMgr/pfGameScoreMgr.h b/Sources/Plasma/FeatureLib/pfGameScoreMgr/pfGameScoreMgr.h index 38b9c4a84e..bb44a7a236 100644 --- a/Sources/Plasma/FeatureLib/pfGameScoreMgr/pfGameScoreMgr.h +++ b/Sources/Plasma/FeatureLib/pfGameScoreMgr/pfGameScoreMgr.h @@ -46,11 +46,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "hsRefCnt.h" +#include + #include "pnKeyedObject/plKey.h" #include "pnNetBase/pnNetBase.h" -namespace ST { class string; } - // TODO: Rank List (seems to be unused in regular gameplay though...) // That's some strange stuff... diff --git a/Sources/Plasma/NucleusLib/inc/plTimerCallbackManager.h b/Sources/Plasma/NucleusLib/inc/plTimerCallbackManager.h index 6c318358b2..6ec1c6ad3d 100644 --- a/Sources/Plasma/NucleusLib/inc/plTimerCallbackManager.h +++ b/Sources/Plasma/NucleusLib/inc/plTimerCallbackManager.h @@ -42,6 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plTimerCallbackManager_Defined #define plTimerCallbackManager_Defined +#include #include "pnKeyedObject/hsKeyedObject.h" diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.h b/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.h index 4ef476911d..19e39f33b2 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.h +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plKey.h @@ -44,12 +44,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "plRefFlags.h" -#include class hsKeyedObject; class plRefMsg; class plUoid; class hsBitVector; +namespace ST { class string; } //// plKey /////////////////////////////////////////////////////////////////// // Pointer to a plKeyData struct, which is a handle to a keyedObject @@ -141,12 +141,6 @@ class plKeyData plKeyData(); virtual ~plKeyData(); -#ifdef HS_DEBUGGING - // Debugging info fields - ST::string fIDName; - const char* fClassType; -#endif - //// RefCount Stuff ////////////////////////////////////////////////////////// // The refcounts on plKeyData/plKeyImps are zero-based. When you first create // a new plKeyImp (which should ONLY ever be done inside the resMgr), it gets diff --git a/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp b/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp index 410200da5e..4f115d2d82 100644 --- a/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp +++ b/Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp @@ -51,6 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plgDispatch.h" #if defined(HS_DEBUGGING) || defined(LOG_ACTIVE_REFS) +#include #include "pnFactory/plFactory.h" #endif @@ -88,11 +89,7 @@ plKeyImp::plKeyImp() : fDataLen(-1), fNumActiveRefs(), fPendingRefs(1) -{ -#ifdef HS_DEBUGGING - fClassType = nullptr; -#endif -} +{} plKeyImp::plKeyImp(plUoid u, uint32_t pos,uint32_t len): fUoid(std::move(u)), @@ -103,24 +100,12 @@ plKeyImp::plKeyImp(plUoid u, uint32_t pos,uint32_t len): fPendingRefs(1) { plProfile_NewMem(KeyMem, CalcKeySize(this)); - -#ifdef HS_DEBUGGING - fIDName = fUoid.GetObjectName(); - fClassType = plFactory::GetNameOfClass( fUoid.GetClassType() ); -#endif } plKeyImp::~plKeyImp() { plProfile_DelMem(KeyMem, CalcKeySize(this)); -#if defined(HS_DEBUGGING) && 0 - // Colin debugging - char buf[512]; - sprintf(buf, "0x%x %s %s\n", this, fIDName, fClassType); - hsStatusMessage(buf); -#endif - hsAssert(fObjectPtr == nullptr, "Deleting non-nil key! Bad idea!"); if (fCloneOwner != nullptr) @@ -144,10 +129,6 @@ plKeyImp::~plKeyImp() void plKeyImp::SetUoid(const plUoid& uoid) { fUoid = uoid; -#ifdef HS_DEBUGGING - fIDName = fUoid.GetObjectName(); - fClassType = plFactory::GetNameOfClass(fUoid.GetClassType()); -#endif } ST::string plKeyImp::GetName() const @@ -171,11 +152,6 @@ void plKeyImp::CopyForClone(const plKeyImp *p, uint32_t playerID, uint32_t clone fObjectPtr = nullptr; // the clone object start as nil fUoid = p->GetUoid(); // we will set the UOID the same to start -#ifdef HS_DEBUGGING - fIDName = fUoid.GetObjectName(); - fClassType = plFactory::GetNameOfClass( fUoid.GetClassType() ); -#endif - fStartPos = p->GetStartPos(); fDataLen = p->GetDataLen(); fUoid.SetClone(playerID, cloneID); @@ -200,11 +176,6 @@ void plKeyImp::Read(hsStream* s) s->ReadLE32(&fDataLen); plProfile_NewMem(KeyMem, CalcKeySize(this)); - -#ifdef HS_DEBUGGING - fIDName = fUoid.GetObjectName(); - fClassType = plFactory::GetNameOfClass(fUoid.GetClassType()); -#endif } void plKeyImp::SkipRead(hsStream* s) @@ -310,14 +281,9 @@ hsKeyedObject* plKeyImp::SetObjectPtr(hsKeyedObject* p) if (p) { #ifdef HS_DEBUGGING - if (fClassType) - { - char str[2048]; - sprintf(str, "Mismatch of class (we are a %s, given a %s)", fClassType, p->ClassName()); - hsAssert(fClassType == p->ClassName() || strcmp(fClassType, p->ClassName()) == 0, str); // points to static + if (fUoid.GetClassType() != p->ClassIndex()) { + hsAssert(false, ST::format("Mismatch of class (we are a {}, given a {})", plFactory::GetNameOfClass(fUoid.GetClassType()), p->ClassName()).c_str()); } - else - fClassType = p->ClassName(); #endif hsAssert(!fObjectPtr, "Setting an ObjectPtr thats already Set!"); diff --git a/Sources/Plasma/NucleusLib/pnMessage/plMessage.h b/Sources/Plasma/NucleusLib/pnMessage/plMessage.h index 4ba9558ca5..204f27c788 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plMessage.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plMessage.h @@ -43,6 +43,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #ifndef plMessage_inc #define plMessage_inc +#include +#include + #include "pnFactory/plCreatable.h" #include "pnKeyedObject/plKey.h" diff --git a/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.h b/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.h index ac0cd2190a..5137bf4782 100644 --- a/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.h +++ b/Sources/Plasma/NucleusLib/pnMessage/plNotifyMsg.h @@ -44,6 +44,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plMessage.h" +#include + #include "hsGeometry3.h" diff --git a/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp b/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp index cdabe2b59e..9a71017c86 100644 --- a/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp +++ b/Sources/Plasma/NucleusLib/pnTimer/plTimerCallbackManager.cpp @@ -42,6 +42,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "HeadSpin.h" #include "plTimerCallbackManager.h" + +#include + #include "pnMessage/plTimeMsg.h" #include "plgDispatch.h" #include "pnKeyedObject/plFixedKey.h" diff --git a/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.h b/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.h index 625f05fa76..42d29e7c00 100644 --- a/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.h +++ b/Sources/Plasma/PubUtilLib/plMessage/plInputEventMsg.h @@ -47,6 +47,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "pnInputCore/plControlDefinition.h" #include "hsGeometry3.h" +#include #include class plKeyEventMsg;