mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Merge remote-tracking branch 'origin/master' into plString
Conflicts: Sources/Plasma/CoreLib/hsStream.h Sources/Plasma/FeatureLib/pfAudio/plListener.cpp Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.h Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h Sources/Plasma/FeatureLib/pfPython/pyImage.cpp Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/pyNetServerSessionInfo.h Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h Sources/Plasma/NucleusLib/pnMessage/plMessage.h Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h Sources/Plasma/PubUtilLib/plNetCommon/plClientGuid.h Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp
This commit is contained in:
@ -45,8 +45,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "hsUtils.h"
|
||||
#include "HeadSpin.h"
|
||||
|
||||
#include "plUoid.h"
|
||||
#include <string.h>
|
||||
|
||||
@ -63,7 +63,7 @@ struct plKeySeed
|
||||
plFixedKeyId feFixedKey;
|
||||
// NOTE: The following fields are broken out to make adding to the fixed key list easier.
|
||||
// However, what they really are, are just the fields of plUoid (including plLocation)
|
||||
UInt16 fType;
|
||||
uint16_t fType;
|
||||
plString fObj;
|
||||
|
||||
hsBool Match( plKeySeed *p )
|
||||
|
@ -47,12 +47,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plKey.h"
|
||||
#include "plUoid.h"
|
||||
#include <string.h>
|
||||
#include "hsResMgr.h"
|
||||
#include "hsTypes.h"
|
||||
|
||||
#define TRACK_REFS 0 // MEMLEAKFISH
|
||||
|
||||
@ -64,7 +63,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
int mlfTrack = 1;
|
||||
|
||||
static const char* keyNameToLookFor = "AgeSDLHook";
|
||||
static const UInt16 CLASS_TO_TRACK = CLASS_INDEX_SCOPED(plSceneObject);
|
||||
static const uint16_t CLASS_TO_TRACK = CLASS_INDEX_SCOPED(plSceneObject);
|
||||
static const int kCloneID = 0;
|
||||
static const int kClonePlayerID = 0;
|
||||
static plKeyData* lastData = nil;
|
||||
@ -73,7 +72,7 @@ static const int kLocSeq = -1;
|
||||
class keyDataFriend : public plKeyData
|
||||
{
|
||||
public:
|
||||
UInt16 RefCount() const { return fRefCount; }
|
||||
uint16_t RefCount() const { return fRefCount; }
|
||||
};
|
||||
|
||||
static int IsTracked(const plKeyData* keyData)
|
||||
@ -89,7 +88,7 @@ static int IsTracked(const plKeyData* keyData)
|
||||
if( (kLocSeq < 0)
|
||||
||(kLocSeq == keyData->GetUoid().GetLocation().GetSequenceNumber()) )
|
||||
{
|
||||
plConst(UInt16) kMinRefCount(0);
|
||||
plConst(uint16_t) kMinRefCount(0);
|
||||
const keyDataFriend* kdf = (keyDataFriend*)keyData;
|
||||
if( kdf->RefCount() > kMinRefCount )
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plKey_h_inc
|
||||
#define plKey_h_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plRefFlags.h"
|
||||
|
||||
class hsKeyedObject;
|
||||
@ -118,9 +118,9 @@ public:
|
||||
//----------------------
|
||||
virtual void Release(plKey targetKey)=0;
|
||||
|
||||
virtual UInt16 GetActiveRefs() const = 0;
|
||||
virtual uint16_t GetActiveRefs() const = 0;
|
||||
|
||||
virtual UInt16 GetNumNotifyCreated() const = 0;
|
||||
virtual uint16_t GetNumNotifyCreated() const = 0;
|
||||
virtual plRefMsg* GetNotifyCreated(int i) const = 0;
|
||||
virtual const hsBitVector& GetActiveBits() const = 0;
|
||||
|
||||
@ -152,7 +152,7 @@ protected:
|
||||
friend class plKey;
|
||||
|
||||
// Refcount--the number of plKeys that have pointers to us.
|
||||
UInt16 fRefCount;
|
||||
uint16_t fRefCount;
|
||||
};
|
||||
|
||||
#endif // plKey_h_inc
|
||||
|
@ -43,7 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "hsStream.h"
|
||||
#include "hsKeyedObject.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "pnMessage/plRefMsg.h"
|
||||
#include "pnMessage/plSelfDestructMsg.h"
|
||||
#include "hsTimer.h"
|
||||
@ -52,9 +52,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
plProfile_CreateMemCounter("Keys", "Memory", KeyMem);
|
||||
|
||||
static UInt32 CalcKeySize(plKeyImp* key)
|
||||
static uint32_t CalcKeySize(plKeyImp* key)
|
||||
{
|
||||
UInt32 nameLen = 0;
|
||||
uint32_t nameLen = 0;
|
||||
if (!key->GetUoid().GetObjectName().IsNull())
|
||||
nameLen = key->GetUoid().GetObjectName().GetSize() + 1;
|
||||
return sizeof(plKeyImp) + nameLen;
|
||||
@ -64,8 +64,8 @@ static UInt32 CalcKeySize(plKeyImp* key)
|
||||
#ifdef LOG_ACTIVE_REFS
|
||||
#include "plCreatableIndex.h"
|
||||
static const char* kObjName = "GUI_District_OptionsMenuGUI";
|
||||
static UInt16 kClassType = CLASS_INDEX_SCOPED(plSceneNode);
|
||||
static UInt32 kCloneID = 0;
|
||||
static uint16_t kClassType = CLASS_INDEX_SCOPED(plSceneNode);
|
||||
static uint32_t kCloneID = 0;
|
||||
hsBool IsTrackedKey(const plKeyImp* key)
|
||||
{
|
||||
return hsStrEQ(key->GetName(), kObjName) && key->GetUoid().GetClassType() == kClassType && key->GetUoid().GetCloneID() == kCloneID;
|
||||
@ -86,7 +86,7 @@ plKeyImp::plKeyImp() :
|
||||
#endif
|
||||
}
|
||||
|
||||
plKeyImp::plKeyImp(plUoid u, UInt32 pos,UInt32 len):
|
||||
plKeyImp::plKeyImp(plUoid u, uint32_t pos,uint32_t len):
|
||||
fUoid(u),
|
||||
fObjectPtr(nil),
|
||||
fStartPos(pos),
|
||||
@ -159,7 +159,7 @@ hsKeyedObject* plKeyImp::ObjectIsLoaded() const
|
||||
}
|
||||
|
||||
// Copy the contents of p for cloning process
|
||||
void plKeyImp::CopyForClone(const plKeyImp *p, UInt32 playerID, UInt32 cloneID)
|
||||
void plKeyImp::CopyForClone(const plKeyImp *p, uint32_t playerID, uint32_t cloneID)
|
||||
{
|
||||
fObjectPtr = nil; // the clone object start as nil
|
||||
fUoid = p->GetUoid(); // we will set the UOID the same to start
|
||||
@ -213,7 +213,7 @@ void plKeyImp::Write(hsStream* s)
|
||||
fUoid.Write(s);
|
||||
s->WriteLE(fStartPos);
|
||||
s->WriteLE(fDataLen);
|
||||
if (fStartPos == (UInt32)-1)
|
||||
if (fStartPos == (uint32_t)-1)
|
||||
int foo = 0;
|
||||
}
|
||||
|
||||
@ -226,8 +226,8 @@ void plKeyImp::WriteObject(hsStream* stream)
|
||||
if (ko == nil)
|
||||
{
|
||||
// Mark the key as not written
|
||||
fStartPos = (UInt32)-1;
|
||||
fDataLen = (UInt32)-1;
|
||||
fStartPos = (uint32_t)-1;
|
||||
fDataLen = (uint32_t)-1;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ void plKeyImp::UnRefObject(plRefFlags::Type flags)
|
||||
ClearNotifyCreated();
|
||||
|
||||
plKey key=plKey::Make( this ); // for linux build
|
||||
plSelfDestructMsg* nuke = TRACKED_NEW plSelfDestructMsg( key );
|
||||
plSelfDestructMsg* nuke = new plSelfDestructMsg( key );
|
||||
plgDispatch::Dispatch()->MsgSend(nuke);
|
||||
}
|
||||
}
|
||||
@ -405,7 +405,7 @@ void plKeyImp::RemoveClone(plKeyImp* key) const
|
||||
}
|
||||
}
|
||||
|
||||
plKey plKeyImp::GetClone(UInt32 playerID, UInt32 cloneID) const
|
||||
plKey plKeyImp::GetClone(uint32_t playerID, uint32_t cloneID) const
|
||||
{
|
||||
for (int i = 0; i < fClones.GetCount(); i++)
|
||||
{
|
||||
@ -419,12 +419,12 @@ plKey plKeyImp::GetClone(UInt32 playerID, UInt32 cloneID) const
|
||||
return plKey();
|
||||
}
|
||||
|
||||
UInt32 plKeyImp::GetNumClones()
|
||||
uint32_t plKeyImp::GetNumClones()
|
||||
{
|
||||
return fClones.GetCount();
|
||||
}
|
||||
|
||||
plKey plKeyImp::GetCloneByIdx(UInt32 idx)
|
||||
plKey plKeyImp::GetCloneByIdx(uint32_t idx)
|
||||
{
|
||||
if (idx < fClones.GetCount())
|
||||
return plKey::Make(fClones[idx]);
|
||||
@ -444,7 +444,7 @@ void plKeyImp::SatisfyPending() const
|
||||
if (!--fPendingRefs)
|
||||
{
|
||||
#ifdef PL_SEND_SATISFIED
|
||||
plSatisfiedMsg* msg = TRACKED_NEW plSatisfiedMsg(this);
|
||||
plSatisfiedMsg* msg = new plSatisfiedMsg(this);
|
||||
plgDispatch::MsgSend(msg);
|
||||
#endif // PL_SEND_SATISFIED
|
||||
}
|
||||
@ -645,7 +645,7 @@ void plKeyImp::IRelease(plKeyImp* iTargetKey)
|
||||
iTargetKey->ClearNotifyCreated();
|
||||
|
||||
plKey key = plKey::Make(iTargetKey);
|
||||
plSelfDestructMsg* nuke = TRACKED_NEW plSelfDestructMsg(key);
|
||||
plSelfDestructMsg* nuke = new plSelfDestructMsg(key);
|
||||
plgDispatch::Dispatch()->MsgSend(nuke);
|
||||
}
|
||||
else
|
||||
|
@ -55,7 +55,7 @@ class plKeyImp : public plKeyData
|
||||
{
|
||||
public:
|
||||
plKeyImp();
|
||||
plKeyImp(plUoid, UInt32 pos,UInt32 len);
|
||||
plKeyImp(plUoid, uint32_t pos,uint32_t len);
|
||||
virtual ~plKeyImp();
|
||||
|
||||
virtual const plUoid& GetUoid() const { return fUoid; }
|
||||
@ -66,7 +66,7 @@ public:
|
||||
virtual hsKeyedObject* VerifyLoaded();
|
||||
|
||||
// called before writing to disk so that static keys can have faster lookups (int compare instead of string compare)
|
||||
void SetObjectID(UInt32 id) {fUoid.SetObjectID(id);}
|
||||
void SetObjectID(uint32_t id) {fUoid.SetObjectID(id);}
|
||||
|
||||
//----------------------
|
||||
// I/O
|
||||
@ -78,8 +78,8 @@ public:
|
||||
// For when you need to skip over a key in a stream
|
||||
static void SkipRead(hsStream* s);
|
||||
|
||||
UInt32 GetStartPos() const { return fStartPos; } // for ResMgr to read the Objects
|
||||
UInt32 GetDataLen() const { return fDataLen; } // for ResMgr to read the Objects
|
||||
uint32_t GetStartPos() const { return fStartPos; } // for ResMgr to read the Objects
|
||||
uint32_t GetDataLen() const { return fDataLen; } // for ResMgr to read the Objects
|
||||
|
||||
//----------------------
|
||||
// Allow a keyed object to behave as if it has an active ref when in fact the object
|
||||
@ -112,35 +112,35 @@ public:
|
||||
//----------------------
|
||||
void AddClone(plKeyImp* c);
|
||||
void RemoveClone(plKeyImp* c) const;
|
||||
plKey GetClone(UInt32 playerID, UInt32 cloneID) const;
|
||||
void CopyForClone(const plKeyImp* p, UInt32 playerID, UInt32 cloneID); // Copy the contents of p for cloning process
|
||||
plKey GetClone(uint32_t playerID, uint32_t cloneID) const;
|
||||
void CopyForClone(const plKeyImp* p, uint32_t playerID, uint32_t cloneID); // Copy the contents of p for cloning process
|
||||
|
||||
UInt32 GetNumClones();
|
||||
plKey GetCloneByIdx(UInt32 idx);
|
||||
uint32_t GetNumClones();
|
||||
plKey GetCloneByIdx(uint32_t idx);
|
||||
plKey GetCloneOwner() { return fCloneOwner; }
|
||||
|
||||
void NotifyCreated();
|
||||
void ISetupNotify(plRefMsg* msg, plRefFlags::Type flags); // Setup notifcations for reference, don't send anything.
|
||||
|
||||
void AddRef(plKeyImp* key) const;
|
||||
UInt16 GetNumRefs() const { return fRefs.GetCount(); }
|
||||
uint16_t GetNumRefs() const { return fRefs.GetCount(); }
|
||||
plKeyImp* GetRef(int i) const { return fRefs[i]; }
|
||||
void RemoveRef(plKeyImp *key) const;
|
||||
|
||||
virtual UInt16 GetActiveRefs() const { return fNumActiveRefs; }
|
||||
virtual UInt16 GetNumNotifyCreated() const { return fNotifyCreated.GetCount(); }
|
||||
virtual uint16_t GetActiveRefs() const { return fNumActiveRefs; }
|
||||
virtual uint16_t GetNumNotifyCreated() const { return fNotifyCreated.GetCount(); }
|
||||
virtual plRefMsg* GetNotifyCreated(int i) const { return fNotifyCreated[i]; }
|
||||
virtual const hsBitVector& GetActiveBits() const { return fActiveRefs; }
|
||||
|
||||
protected:
|
||||
void AddNotifyCreated(plRefMsg* msg, plRefFlags::Type flags);
|
||||
void ClearNotifyCreated();
|
||||
UInt16 GetNumNotifyCreated() { return fNotifyCreated.GetCount(); }
|
||||
uint16_t GetNumNotifyCreated() { return fNotifyCreated.GetCount(); }
|
||||
plRefMsg* GetNotifyCreated(int i) { return fNotifyCreated[i]; }
|
||||
void RemoveNotifyCreated(int i);
|
||||
|
||||
UInt16 IncActiveRefs() { return ++fNumActiveRefs; }
|
||||
UInt16 DecActiveRefs() { return fNumActiveRefs ? --fNumActiveRefs : 0; }
|
||||
uint16_t IncActiveRefs() { return ++fNumActiveRefs; }
|
||||
uint16_t DecActiveRefs() { return fNumActiveRefs ? --fNumActiveRefs : 0; }
|
||||
|
||||
hsBool IsActiveRef(int i) const { return fActiveRefs.IsBitSet(i) != 0; }
|
||||
void SetActiveRef(int i, hsBool on=true) { fActiveRefs.SetBit(i, on); }
|
||||
@ -160,16 +160,16 @@ protected:
|
||||
|
||||
// These fields are the ones actually saved to disk
|
||||
plUoid fUoid;
|
||||
UInt32 fStartPos; // where I live in the Datafile
|
||||
UInt32 fDataLen; // Length in the Datafile
|
||||
uint32_t fStartPos; // where I live in the Datafile
|
||||
uint32_t fDataLen; // Length in the Datafile
|
||||
|
||||
// Following used by hsResMgr to notify on defered load or when a passive ref is destroyed.
|
||||
UInt16 fNumActiveRefs; // num active refs on me
|
||||
uint16_t fNumActiveRefs; // num active refs on me
|
||||
hsBitVector fActiveRefs; // Which of notify created are active refs
|
||||
hsBitVector fNotified; // which of notifycreated i've already notified.
|
||||
hsTArray<plRefMsg*> fNotifyCreated; // people to notify when I'm created or destroyed
|
||||
mutable hsTArray<plKeyImp*> fRefs; // refs I've made (to be released when I'm unregistered).
|
||||
mutable Int16 fPendingRefs; // Outstanding requests I have out.
|
||||
mutable int16_t fPendingRefs; // Outstanding requests I have out.
|
||||
mutable hsTArray<plKeyImp*> fClones; // clones of me
|
||||
mutable plKey fCloneOwner; // pointer for clones back to the owning key
|
||||
};
|
||||
|
@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
#include "plMsgForwarder.h"
|
||||
#include "hsResMgr.h"
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "pnMessage/plMessage.h"
|
||||
#include "pnKeyedObject/plKey.h"
|
||||
#include "pnNetCommon/plNetApp.h"
|
||||
@ -124,7 +124,7 @@ hsBool plMsgForwarder::IForwardCallbackMsg(plMessage *msg)
|
||||
hsAssert(event, "Message forwarder only supports event callback messages");
|
||||
if (event)
|
||||
{
|
||||
plForwardCallback *fc = TRACKED_NEW plForwardCallback;
|
||||
plForwardCallback *fc = new plForwardCallback;
|
||||
fc->fNumCallbacks = fForwardKeys.Count();
|
||||
|
||||
// Turn off net propagate the callbacks to us will all be local. Only the
|
||||
|
@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
#include "plUoid.h"
|
||||
#include "hsStream.h"
|
||||
#include "hsUtils.h"
|
||||
|
||||
|
||||
//// plLocation //////////////////////////////////////////////////////////////
|
||||
|
||||
@ -82,7 +82,7 @@ hsBool plLocation::operator==(const plLocation& u) const
|
||||
return (fSequenceNumber == u.fSequenceNumber) && ((fFlags & ~kItinerant) == (u.fFlags & ~kItinerant));
|
||||
}
|
||||
|
||||
void plLocation::Set(UInt32 seqNum)
|
||||
void plLocation::Set(uint32_t seqNum)
|
||||
{
|
||||
fSequenceNumber = seqNum;
|
||||
}
|
||||
@ -123,19 +123,19 @@ plString plLocation::StringIze() const // Format to displayable string
|
||||
return plString::Format("S0x%xF0x%x", fSequenceNumber, int(fFlags));
|
||||
}
|
||||
|
||||
plLocation plLocation::MakeReserved(UInt32 number)
|
||||
plLocation plLocation::MakeReserved(uint32_t number)
|
||||
{
|
||||
return plLocation(kReservedLocAvailableStart + number, kReserved);
|
||||
}
|
||||
|
||||
plLocation plLocation::MakeNormal(UInt32 number)
|
||||
plLocation plLocation::MakeNormal(uint32_t number)
|
||||
{
|
||||
return plLocation(kNormalLocStartIdx + number);
|
||||
}
|
||||
|
||||
//// plUoid //////////////////////////////////////////////////////////////////
|
||||
|
||||
plUoid::plUoid(const plLocation& location, UInt16 classType, const plString& objectName, const plLoadMask& m)
|
||||
plUoid::plUoid(const plLocation& location, uint16_t classType, const plString& objectName, const plLoadMask& m)
|
||||
{
|
||||
Invalidate();
|
||||
|
||||
@ -162,7 +162,7 @@ void plUoid::Read(hsStream* s)
|
||||
hsAssert(fObjectName == nil, "Reading over an old uoid? You're just asking for trouble, aren't you?");
|
||||
|
||||
// first read contents flags
|
||||
UInt8 contents = s->ReadByte();
|
||||
uint8_t contents = s->ReadByte();
|
||||
|
||||
fLocation.Read(s);
|
||||
|
||||
@ -181,7 +181,7 @@ void plUoid::Read(hsStream* s)
|
||||
if (contents & kHasCloneIDs)
|
||||
{
|
||||
s->LogReadLE( &fCloneID ,"CloneID");
|
||||
UInt16 dummy;
|
||||
uint16_t dummy;
|
||||
s->LogReadLE(&dummy, "dummy"); // To avoid breaking format
|
||||
s->LogReadLE( &fClonePlayerID ,"ClonePlayerID");
|
||||
}
|
||||
@ -195,7 +195,7 @@ void plUoid::Read(hsStream* s)
|
||||
void plUoid::Write(hsStream* s) const
|
||||
{
|
||||
// first write contents byte
|
||||
UInt8 contents = IsClone() ? kHasCloneIDs : 0;
|
||||
uint8_t contents = IsClone() ? kHasCloneIDs : 0;
|
||||
if (fLoadMask.IsUsed())
|
||||
contents |= kHasLoadMask;
|
||||
s->WriteByte(contents);
|
||||
@ -214,7 +214,7 @@ void plUoid::Write(hsStream* s) const
|
||||
if (contents & kHasCloneIDs)
|
||||
{
|
||||
s->WriteLE(fCloneID);
|
||||
UInt16 dummy = 0;
|
||||
uint16_t dummy = 0;
|
||||
s->WriteLE(dummy); // to avoid breaking format
|
||||
s->WriteLE(fClonePlayerID);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plUoid_h_inc
|
||||
#define plUoid_h_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plFixedKey.h"
|
||||
#include "plLoadMask.h"
|
||||
#include "plString.h"
|
||||
@ -76,8 +76,8 @@ public:
|
||||
};
|
||||
|
||||
protected:
|
||||
UInt32 fSequenceNumber;
|
||||
UInt16 fFlags;
|
||||
uint32_t fSequenceNumber;
|
||||
uint16_t fFlags;
|
||||
|
||||
enum
|
||||
{
|
||||
@ -98,7 +98,7 @@ protected:
|
||||
kInvalidLocIdx = 0xffffffff
|
||||
};
|
||||
|
||||
plLocation(UInt32 seqNum, UInt16 flags=0) : fFlags(flags) { Set(seqNum); }
|
||||
plLocation(uint32_t seqNum, uint16_t flags=0) : fFlags(flags) { Set(seqNum); }
|
||||
|
||||
public:
|
||||
plLocation() { Invalidate(); }
|
||||
@ -109,12 +109,12 @@ public:
|
||||
hsBool IsValid() const;
|
||||
hsBool IsReserved() const;
|
||||
hsBool IsItinerant() const;
|
||||
void Set(UInt32 seqNum);
|
||||
UInt32 GetSequenceNumber() const { return fSequenceNumber; }
|
||||
void Set(uint32_t seqNum);
|
||||
uint32_t GetSequenceNumber() const { return fSequenceNumber; }
|
||||
hsBool IsVirtual() const;
|
||||
|
||||
void SetFlags(UInt16 flags) { fFlags |= flags; }
|
||||
UInt16 GetFlags() const { return fFlags; }
|
||||
void SetFlags(uint16_t flags) { fFlags |= flags; }
|
||||
uint16_t GetFlags() const { return fFlags; }
|
||||
|
||||
void Read(hsStream* s);
|
||||
void Write(hsStream* s) const;
|
||||
@ -127,8 +127,8 @@ public:
|
||||
// THIS SHOULD BE FOR DEBUGGING ONLY <hint hint>
|
||||
plString StringIze() const; // Format to displayable string.
|
||||
|
||||
static plLocation MakeReserved(UInt32 number);
|
||||
static plLocation MakeNormal(UInt32 number);
|
||||
static plLocation MakeReserved(uint32_t number);
|
||||
static plLocation MakeNormal(uint32_t number);
|
||||
|
||||
static const plLocation kGlobalFixedLoc;
|
||||
static const plLocation kSceneViewerLoc;
|
||||
@ -145,13 +145,13 @@ class plUoid
|
||||
{
|
||||
public:
|
||||
plUoid() { Invalidate(); }
|
||||
plUoid(const plLocation& location, UInt16 classType, const plString& objectName, const plLoadMask& m=plLoadMask::kAlways);
|
||||
plUoid(const plLocation& location, uint16_t classType, const plString& objectName, const plLoadMask& m=plLoadMask::kAlways);
|
||||
plUoid(plFixedKeyId fixedKey);
|
||||
plUoid(const plUoid& src);
|
||||
~plUoid();
|
||||
|
||||
const plLocation& GetLocation() const { return fLocation; }
|
||||
UInt16 GetClassType() const { return fClassType; }
|
||||
uint16_t GetClassType() const { return fClassType; }
|
||||
const plString& GetObjectName() const { return fObjectName; }
|
||||
const plLoadMask& GetLoadMask() const { return fLoadMask; }
|
||||
|
||||
@ -166,13 +166,13 @@ public:
|
||||
hsBool operator!=(const plUoid& u) const { return !operator==(u); }
|
||||
|
||||
hsBool IsClone() const { return fCloneID != 0; }
|
||||
UInt32 GetClonePlayerID() const { return fClonePlayerID; }
|
||||
UInt32 GetCloneID() const { return fCloneID; }
|
||||
void SetClone(UInt32 playerID, UInt32 cloneID) { hsAssert(cloneID < 0xffff, "Clone id too high"); fCloneID = UInt16(cloneID); fClonePlayerID = playerID; }
|
||||
uint32_t GetClonePlayerID() const { return fClonePlayerID; }
|
||||
uint32_t GetCloneID() const { return fCloneID; }
|
||||
void SetClone(uint32_t playerID, uint32_t cloneID) { hsAssert(cloneID < 0xffff, "Clone id too high"); fCloneID = uint16_t(cloneID); fClonePlayerID = playerID; }
|
||||
|
||||
UInt32 GetObjectID() const { return fObjectID; }
|
||||
uint32_t GetObjectID() const { return fObjectID; }
|
||||
// Export time only. Only plRegistryKeyList should call this.
|
||||
void SetObjectID(UInt32 id) { fObjectID = id; }
|
||||
void SetObjectID(uint32_t id) { fObjectID = id; }
|
||||
|
||||
// THIS SHOULD BE FOR DEBUGGING ONLY <hint hint>
|
||||
plString StringIze() const; // Format to displayable string
|
||||
@ -184,10 +184,10 @@ protected:
|
||||
kHasLoadMask = 0x2,
|
||||
};
|
||||
|
||||
UInt32 fObjectID;
|
||||
UInt32 fClonePlayerID; // The ID of the player who made this clone
|
||||
UInt16 fCloneID; // The ID of this clone (unique per client)
|
||||
UInt16 fClassType;
|
||||
uint32_t fObjectID;
|
||||
uint32_t fClonePlayerID; // The ID of the player who made this clone
|
||||
uint16_t fCloneID; // The ID of this clone (unique per client)
|
||||
uint16_t fClassType;
|
||||
plString fObjectName;
|
||||
plLocation fLocation;
|
||||
plLoadMask fLoadMask;
|
||||
|
Reference in New Issue
Block a user