mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 18:59:09 +00:00
Obliterate hsBool
This commit is contained in:
@ -59,7 +59,7 @@ void hsKeyedObject::SetKey(plKey k)
|
||||
((plKeyImp*)fpKey)->SetObjectPtr(this);
|
||||
}
|
||||
|
||||
hsBool hsKeyedObject::SendRef(plRefMsg* refMsg, plRefFlags::Type flags)
|
||||
bool hsKeyedObject::SendRef(plRefMsg* refMsg, plRefFlags::Type flags)
|
||||
{
|
||||
plKey key = GetKey(); // for linux build
|
||||
return hsgResMgr::SendRef(key, refMsg, flags);
|
||||
@ -174,7 +174,7 @@ void hsKeyedObject::Write(hsStream* s, hsResMgr* mgr)
|
||||
mgr->WriteKey(s, fpKey);
|
||||
}
|
||||
|
||||
hsBool hsKeyedObject::MsgReceive(plMessage* msg)
|
||||
bool hsKeyedObject::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plSelfDestructMsg* nuke = plSelfDestructMsg::ConvertNoRef(msg);
|
||||
if (nuke)
|
||||
|
@ -65,17 +65,17 @@ public:
|
||||
plString GetKeyName() const;
|
||||
|
||||
virtual void Validate();
|
||||
virtual hsBool IsFinal() { return true; }; // experimental; currently "is ready to process Loads"
|
||||
virtual bool IsFinal() { return true; }; // experimental; currently "is ready to process Loads"
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
//----------------------
|
||||
// Send a reference to GetKey() via enclosed message. See plKey::SendRef()
|
||||
//----------------------
|
||||
hsBool SendRef(plRefMsg* refMsg, plRefFlags::Type flags);
|
||||
bool SendRef(plRefMsg* refMsg, plRefFlags::Type flags);
|
||||
|
||||
//----------------------------------------
|
||||
// Fixed key functions
|
||||
|
@ -66,7 +66,7 @@ struct plKeySeed
|
||||
uint16_t fType;
|
||||
plString fObj;
|
||||
|
||||
hsBool Match( plKeySeed *p )
|
||||
bool Match( plKeySeed *p )
|
||||
{
|
||||
if( ( fType == p->fType ) && p->fObj.Compare( fObj, plString::kCaseInsensitive ) == 0 )
|
||||
{
|
||||
|
@ -143,13 +143,13 @@ plKey::plKey(const plKey& rhs) : fKeyData(rhs.fKeyData)
|
||||
IIncRef();
|
||||
}
|
||||
|
||||
plKey::plKey(plKeyData* data, hsBool ignore) : fKeyData(data)
|
||||
plKey::plKey(plKeyData* data, bool ignore) : fKeyData(data)
|
||||
{
|
||||
#if TRACK_REFS // FOR DEBUGGING ONLY
|
||||
if( IsTracked(fKeyData) )
|
||||
{
|
||||
char msg[ 512 ];
|
||||
sprintf( msg, "C: Key %s %s is being constructed using the plKey(plKeyData*, hsBool) constructor", keyNameToLookFor, CloneString(fKeyData) );
|
||||
sprintf( msg, "C: Key %s %s is being constructed using the plKey(plKeyData*, bool) constructor", keyNameToLookFor, CloneString(fKeyData) );
|
||||
//hsAssert( false, msg );
|
||||
hsStatusMessageF(msg);
|
||||
}
|
||||
@ -208,12 +208,12 @@ plKey &plKey::operator=( const plKey &rhs )
|
||||
return *this;
|
||||
}
|
||||
|
||||
hsBool plKey::operator==( const plKey &rhs ) const
|
||||
bool plKey::operator==( const plKey &rhs ) const
|
||||
{
|
||||
return fKeyData == rhs.fKeyData;
|
||||
}
|
||||
|
||||
hsBool plKey::operator==( const plKeyData *rhs ) const
|
||||
bool plKey::operator==( const plKeyData *rhs ) const
|
||||
{
|
||||
return fKeyData == rhs;
|
||||
}
|
||||
|
@ -67,10 +67,10 @@ public:
|
||||
~plKey();
|
||||
plKey& operator=(const plKey& rhs);
|
||||
|
||||
hsBool operator==(const plKey& rhs) const;
|
||||
hsBool operator==(const plKeyData* rhs) const;
|
||||
hsBool operator!=(const plKey& rhs) const { return !(*this == rhs); }
|
||||
hsBool operator!=(const plKeyData* rhs) const { return !(*this == rhs); }
|
||||
bool operator==(const plKey& rhs) const;
|
||||
bool operator==(const plKeyData* rhs) const;
|
||||
bool operator!=(const plKey& rhs) const { return !(*this == rhs); }
|
||||
bool operator!=(const plKeyData* rhs) const { return !(*this == rhs); }
|
||||
|
||||
plKeyData* operator->() const;
|
||||
plKeyData& operator*() const;
|
||||
@ -86,7 +86,7 @@ protected:
|
||||
void IDecRef();
|
||||
|
||||
// Internal constructor, extra param is to distinguish it from the void* constructor
|
||||
plKey(plKeyData* data, hsBool ignore);
|
||||
plKey(plKeyData* data, bool ignore);
|
||||
};
|
||||
|
||||
//// plKeyData ///////////////////////////////////////////////////////////////
|
||||
|
@ -66,7 +66,7 @@ static uint32_t CalcKeySize(plKeyImp* key)
|
||||
static const char* kObjName = "GUI_District_OptionsMenuGUI";
|
||||
static uint16_t kClassType = CLASS_INDEX_SCOPED(plSceneNode);
|
||||
static uint32_t kCloneID = 0;
|
||||
hsBool IsTrackedKey(const plKeyImp* key)
|
||||
bool IsTrackedKey(const plKeyImp* key)
|
||||
{
|
||||
return (strcmp(key->GetName(), kObjName) == 0) &&
|
||||
key->GetUoid().GetClassType() == kClassType &&
|
||||
@ -603,7 +603,7 @@ void plKeyImp::IRelease(plKeyImp* iTargetKey)
|
||||
// Inspect the target key to find whether it is supposed to send a message
|
||||
// to me on destruction, and to find out if I have an active of passive
|
||||
// ref on this key. Not sure why I don't track my own active/passive ref states
|
||||
hsBool isActive = false;
|
||||
bool isActive = false;
|
||||
int iTarg = -1;
|
||||
for (int i = 0; (iTarg < 0) && (i < iTargetKey->GetNumNotifyCreated()); i++)
|
||||
{
|
||||
|
@ -142,10 +142,10 @@ protected:
|
||||
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); }
|
||||
hsBool IsNotified(int i) const { return fNotified.IsBitSet(i) != 0; }
|
||||
void SetNotified(int i, hsBool on=true) { fNotified.SetBit(i, on); }
|
||||
bool IsActiveRef(int i) const { return fActiveRefs.IsBitSet(i) != 0; }
|
||||
void SetActiveRef(int i, bool on=true) { fActiveRefs.SetBit(i, on); }
|
||||
bool IsNotified(int i) const { return fNotified.IsBitSet(i) != 0; }
|
||||
void SetNotified(int i, bool on=true) { fNotified.SetBit(i, on); }
|
||||
|
||||
void SatisfyPending(plRefMsg* msg) const;
|
||||
void SatisfyPending() const;
|
||||
|
@ -56,7 +56,7 @@ class plForwardCallback
|
||||
public:
|
||||
hsTArray<plKey> fOrigReceivers;
|
||||
int fNumCallbacks;
|
||||
hsBool fNetPropogate;
|
||||
bool fNetPropogate;
|
||||
};
|
||||
|
||||
plMsgForwarder::plMsgForwarder()
|
||||
@ -96,7 +96,7 @@ void plMsgForwarder::Write(hsStream* s, hsResMgr* mgr)
|
||||
mgr->WriteKey(s, fForwardKeys[i]);
|
||||
}
|
||||
|
||||
hsBool plMsgForwarder::MsgReceive(plMessage* msg)
|
||||
bool plMsgForwarder::MsgReceive(plMessage* msg)
|
||||
{
|
||||
// Self destruct messages are for us only
|
||||
plSelfDestructMsg *selfMsg = plSelfDestructMsg::ConvertNoRef(msg);
|
||||
@ -112,7 +112,7 @@ hsBool plMsgForwarder::MsgReceive(plMessage* msg)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plMsgForwarder::IForwardCallbackMsg(plMessage *msg)
|
||||
bool plMsgForwarder::IForwardCallbackMsg(plMessage *msg)
|
||||
{
|
||||
// Only process as a callback message if it is one, AND it has callbacks
|
||||
plMessageWithCallbacks *callbackMsg = plMessageWithCallbacks::ConvertNoRef(msg);
|
||||
@ -172,7 +172,7 @@ hsBool plMsgForwarder::IForwardCallbackMsg(plMessage *msg)
|
||||
fCallbacks.erase(eventMsg);
|
||||
|
||||
plUoid uoid = GetKey()->GetUoid();
|
||||
hsBool locallyOwned = (plNetClientApp::GetInstance()->IsLocallyOwned(uoid) != plSynchedObject::kNo);
|
||||
bool locallyOwned = (plNetClientApp::GetInstance()->IsLocallyOwned(uoid) != plSynchedObject::kNo);
|
||||
|
||||
// If the callback was originally net propagated, and we own this forwarder, net propagate the callback
|
||||
if (fc->fNetPropogate && locallyOwned)
|
||||
|
@ -59,7 +59,7 @@ protected:
|
||||
CallbackMap fCallbacks;
|
||||
|
||||
void IForwardMsg(plMessage *msg);
|
||||
hsBool IForwardCallbackMsg(plMessage *msg);
|
||||
bool IForwardCallbackMsg(plMessage *msg);
|
||||
|
||||
public:
|
||||
plMsgForwarder();
|
||||
@ -71,7 +71,7 @@ public:
|
||||
void Read(hsStream* s, hsResMgr* mgr);
|
||||
void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
hsBool MsgReceive(plMessage* msg);
|
||||
bool MsgReceive(plMessage* msg);
|
||||
|
||||
void AddForwardKey(plKey key);
|
||||
};
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
CLASSNAME_REGISTER( plReceiver );
|
||||
GETINTERFACE_ANY( plReceiver, plCreatable );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg) { return false; }
|
||||
virtual bool MsgReceive(plMessage* msg) { return false; }
|
||||
};
|
||||
|
||||
#endif // plReceiver_inc
|
||||
|
@ -87,22 +87,22 @@ void plLocation::Invalidate()
|
||||
fFlags = 0; // Set to kInvalid?
|
||||
}
|
||||
|
||||
hsBool plLocation::IsValid() const
|
||||
bool plLocation::IsValid() const
|
||||
{
|
||||
return (fSequenceNumber == kInvalidLocIdx) ? false : true;
|
||||
}
|
||||
|
||||
hsBool plLocation::IsReserved() const
|
||||
bool plLocation::IsReserved() const
|
||||
{
|
||||
return hsCheckBits(fFlags, kReserved);
|
||||
}
|
||||
|
||||
hsBool plLocation::IsItinerant() const
|
||||
bool plLocation::IsItinerant() const
|
||||
{
|
||||
return hsCheckBits(fFlags, kItinerant);
|
||||
}
|
||||
|
||||
hsBool plLocation::IsVirtual() const
|
||||
bool plLocation::IsVirtual() const
|
||||
{
|
||||
// This returns whether the location is "virtual", i.e. isn't a true room per se. Like fixed keys
|
||||
if (fSequenceNumber == kGlobalFixedLocIdx)
|
||||
@ -226,7 +226,7 @@ void plUoid::Invalidate()
|
||||
|
||||
}
|
||||
|
||||
hsBool plUoid::IsValid() const
|
||||
bool plUoid::IsValid() const
|
||||
{
|
||||
if (!fLocation.IsValid() || fObjectName.IsNull())
|
||||
return false;
|
||||
@ -234,7 +234,7 @@ hsBool plUoid::IsValid() const
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plUoid::operator==(const plUoid& u) const
|
||||
bool plUoid::operator==(const plUoid& u) const
|
||||
{
|
||||
return fLocation == u.fLocation
|
||||
&& fLoadMask == u.fLoadMask
|
||||
|
@ -105,27 +105,27 @@ public:
|
||||
plLocation(const plLocation& toCopyFrom);
|
||||
~plLocation() {}
|
||||
|
||||
void Invalidate();
|
||||
hsBool IsValid() const;
|
||||
hsBool IsReserved() const;
|
||||
hsBool IsItinerant() const;
|
||||
void Set(uint32_t seqNum);
|
||||
void Invalidate();
|
||||
bool IsValid() const;
|
||||
bool IsReserved() const;
|
||||
bool IsItinerant() const;
|
||||
void Set(uint32_t seqNum);
|
||||
uint32_t GetSequenceNumber() const { return fSequenceNumber; }
|
||||
hsBool IsVirtual() const;
|
||||
bool IsVirtual() const;
|
||||
|
||||
void SetFlags(uint16_t flags) { fFlags |= flags; }
|
||||
void SetFlags(uint16_t flags) { fFlags |= flags; }
|
||||
uint16_t GetFlags() const { return fFlags; }
|
||||
|
||||
void Read(hsStream* s);
|
||||
void Write(hsStream* s) const;
|
||||
|
||||
hsBool operator==(const plLocation& loc) const
|
||||
bool operator==(const plLocation& loc) const
|
||||
{
|
||||
// Ignore the itinerant flag when comparing, because
|
||||
return (fSequenceNumber == loc.fSequenceNumber) &&
|
||||
((fFlags & ~kItinerant) == (loc.fFlags & ~kItinerant));
|
||||
}
|
||||
hsBool operator!=(const plLocation& loc) const { return !(loc == *this); }
|
||||
bool operator!=(const plLocation& loc) const { return !(loc == *this); }
|
||||
plLocation& operator=(const plLocation& loc);
|
||||
bool operator<(const plLocation& loc ) const { return fSequenceNumber < loc.fSequenceNumber; }
|
||||
|
||||
@ -164,13 +164,13 @@ public:
|
||||
void Write(hsStream* s) const;
|
||||
|
||||
void Invalidate();
|
||||
hsBool IsValid() const;
|
||||
bool IsValid() const;
|
||||
|
||||
plUoid& operator=(const plUoid& u);
|
||||
hsBool operator==(const plUoid& u) const;
|
||||
hsBool operator!=(const plUoid& u) const { return !operator==(u); }
|
||||
bool operator==(const plUoid& u) const;
|
||||
bool operator!=(const plUoid& u) const { return !operator==(u); }
|
||||
|
||||
hsBool IsClone() const { return fCloneID != 0; }
|
||||
bool IsClone() const { return fCloneID != 0; }
|
||||
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; }
|
||||
|
Reference in New Issue
Block a user