1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 03:09:13 +00:00

Obliterate hsBool

This commit is contained in:
2012-07-11 01:28:00 -04:00
parent 5f78b33db4
commit a709e17069
1041 changed files with 7889 additions and 8070 deletions

View File

@ -54,8 +54,8 @@ class plConditionalObject : public hsKeyedObject
private:
// since 'this' is not derived from synchedObject, its synched values must be associated
// with it's logicModifier (which is a synchedObject). Thus it's a synched value 'friend'.
hsBool bSatisfied;
hsBool fToggle;
bool bSatisfied;
bool fToggle;
public:
enum
{
@ -65,7 +65,7 @@ public:
protected:
plLogicModBase* fLogicMod;
hsBitVector fFlags;
hsBool fReset;
bool fReset;
public:
plConditionalObject();
virtual ~plConditionalObject();
@ -78,23 +78,23 @@ public:
virtual void SetLogicMod(plLogicModBase* pMod) { fLogicMod = pMod; }
// virtual hsBool MsgReceive(plMessage* msg) = 0;
// virtual bool MsgReceive(plMessage* msg) = 0;
virtual hsBool Satisfied() { if(HasFlag(kNOT)) return !bSatisfied; else return bSatisfied; }
void SetSatisfied(hsBool b) { bSatisfied=b; }
hsBool IsToggle() { return fToggle; }
void SetToggle(hsBool b) { fToggle = b; }
virtual bool Satisfied() { if(HasFlag(kNOT)) return !bSatisfied; else return bSatisfied; }
void SetSatisfied(bool b) { bSatisfied=b; }
bool IsToggle() { return fToggle; }
void SetToggle(bool b) { fToggle = b; }
// this is used if condtiton 1 is dependent on another condition's state at the
// time of a message coming into condition 1;
virtual hsBool Verify(plMessage* msg) { return true; }
virtual bool Verify(plMessage* msg) { return true; }
virtual void Evaluate() = 0;
virtual void Reset() = 0;
virtual hsBool ResetOnTrigger() { return fReset; }
virtual bool ResetOnTrigger() { return fReset; }
hsBool HasFlag(int f) const { return fFlags.IsBitSet(f); }
bool HasFlag(int f) const { return fFlags.IsBitSet(f); }
void SetFlag(int f) { fFlags.SetBit(f); }
void ClearFlag(int which) { fFlags.ClearBit( which ); }

View File

@ -132,7 +132,7 @@ void plLogicModBase::IUpdateSharedState(bool triggered) const
triggered ? "Triggered" : "UnTriggered", hsTimer::GetSysSeconds());
}
hsBool plLogicModBase::MsgReceive(plMessage* msg)
bool plLogicModBase::MsgReceive(plMessage* msg)
{
// read messages:
plServerReplyMsg* pSMsg = plServerReplyMsg::ConvertNoRef(msg);
@ -159,7 +159,7 @@ hsBool plLogicModBase::MsgReceive(plMessage* msg)
}
else
{
hsBool netRequest=false; // we're triggering as a result of a local activation
bool netRequest=false; // we're triggering as a result of a local activation
PreTrigger(netRequest);
IUpdateSharedState(false /* untriggering */);
}
@ -185,7 +185,7 @@ hsBool plLogicModBase::MsgReceive(plMessage* msg)
return plSingleModifier::MsgReceive(msg);
}
void plLogicModBase::RequestTrigger(hsBool netRequest)
void plLogicModBase::RequestTrigger(bool netRequest)
{
if (HasFlag(kTriggered))
{
@ -225,7 +225,7 @@ void plLogicModBase::RequestTrigger(hsBool netRequest)
//
// return false is counter test fails
//
hsBool plLogicModBase::IEvalCounter()
bool plLogicModBase::IEvalCounter()
{
if (fCounterLimit > 0)
{
@ -239,7 +239,7 @@ hsBool plLogicModBase::IEvalCounter()
return true;
}
void plLogicModBase::PreTrigger(hsBool netRequest)
void plLogicModBase::PreTrigger(bool netRequest)
{
if (fDisabled)
return;
@ -247,7 +247,7 @@ void plLogicModBase::PreTrigger(hsBool netRequest)
Trigger(netRequest);
}
void plLogicModBase::Trigger(hsBool netRequest)
void plLogicModBase::Trigger(bool netRequest)
{
#if 1
plNetClientApp::GetInstance()->DebugMsg("LogicModifier %s is triggering, activatorType=%d\n",
@ -323,7 +323,7 @@ void plLogicModBase::Read(hsStream* stream, hsResMgr* mgr)
fNotify = pNMsg;
fFlags.Read(stream);
fDisabled = stream->Readbool();
fDisabled = stream->ReadBool();
for (int d = 0; d < fNotify->GetNumReceivers(); d++)
fReceiverList.Append(fNotify->GetReceiver(d));
}
@ -336,5 +336,5 @@ void plLogicModBase::Write(hsStream* stream, hsResMgr* mgr)
mgr->WriteCreatable( stream, fCommandList[i] );
mgr->WriteCreatable( stream, fNotify );
fFlags.Write(stream);
stream->Writebool(fDisabled);
stream->WriteBool(fDisabled);
}

View File

@ -75,11 +75,11 @@ protected:
plNotifyMsg* fNotify;
bool fDisabled;
virtual hsBool IEval(double secs, float del, uint32_t dirty) {return false;}
virtual bool IEval(double secs, float del, uint32_t dirty) {return false;}
void IUpdateSharedState(bool triggered) const;
hsBool IEvalCounter();
virtual void PreTrigger(hsBool netRequest);
virtual void Trigger(hsBool netRequest);
bool IEvalCounter();
virtual void PreTrigger(bool netRequest);
virtual void Trigger(bool netRequest);
virtual void UnTrigger();
void CreateNotifyMsg();
@ -95,8 +95,8 @@ public:
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
virtual hsBool MsgReceive(plMessage* msg);
virtual hsBool VerifyConditions(plMessage* msg) { return true;}
virtual bool MsgReceive(plMessage* msg);
virtual bool VerifyConditions(plMessage* msg) { return true;}
virtual void Reset(bool bCounterReset);
@ -106,13 +106,13 @@ public:
plNotifyMsg* GetNotify() { return fNotify; }
void AddCommand(plMessage* msg) { fCommandList.Append(msg); }
void SetOneShot(hsBool b) { if (b) SetFlag(kOneShot); else ClearFlag(kOneShot); }
void SetOneShot(bool b) { if (b) SetFlag(kOneShot); else ClearFlag(kOneShot); }
void RegisterForMessageType(uint16_t hClass);
virtual void RequestTrigger(hsBool netRequest=false);
virtual void RequestTrigger(bool netRequest=false);
virtual void RequestUnTrigger() { UnTrigger(); }
hsBool HasFlag(int f) const { return fFlags.IsBitSet(f); }
bool HasFlag(int f) const { return fFlags.IsBitSet(f); }
void SetFlag(int f) { fFlags.SetBit(f); }
void ClearFlag(int which) { fFlags.ClearBit(which); }

View File

@ -87,7 +87,7 @@ plModifier* plModifier::IGetTargetModifier(int iTarg, int iMod) const
return GetTarget(iTarg) ? GetTarget(iTarg)->GetVolatileModifier(iMod) : nil;
}
hsBool plModifier::MsgReceive(plMessage* msg)
bool plModifier::MsgReceive(plMessage* msg)
{
plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg);
if( eval )

View File

@ -67,7 +67,7 @@ protected:
plObjInterface* IGetTargetGenericInterface(int iTarg, uint32_t classIdx) const;
plModifier* IGetTargetModifier(int iTarg, int iMod) const;
virtual hsBool IEval(double secs, float del, uint32_t dirty) = 0; // called only by owner object's Eval()
virtual bool IEval(double secs, float del, uint32_t dirty) = 0; // called only by owner object's Eval()
friend class plSceneObject;
public:
@ -78,7 +78,7 @@ public:
CLASSNAME_REGISTER( plModifier );
GETINTERFACE_ANY( plModifier, plSynchedObject );
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
virtual int GetNumTargets() const = 0;
virtual plSceneObject* GetTarget(int iTarg) const = 0;

View File

@ -64,7 +64,7 @@ public:
CLASSNAME_REGISTER( plMultiModifier );
GETINTERFACE_ANY( plMultiModifier, plModifier );
virtual hsBool IEval(double secs, float del, uint32_t dirty) = 0;
virtual bool IEval(double secs, float del, uint32_t dirty) = 0;
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
@ -73,7 +73,7 @@ public:
virtual void AddTarget(plSceneObject* so) {fTargets.Append(so);}
virtual void RemoveTarget(plSceneObject* so);
hsBool HasFlag(int f) const { return fFlags.IsBitSet(f); }
bool HasFlag(int f) const { return fFlags.IsBitSet(f); }
plMultiModifier& SetFlag(int f) { fFlags.SetBit(f); return *this; }
};

View File

@ -56,7 +56,7 @@ protected:
plSceneObject* fTarget;
hsBitVector fFlags;
virtual hsBool IEval(double secs, float del, uint32_t dirty) = 0;
virtual bool IEval(double secs, float del, uint32_t dirty) = 0;
public:
plSingleModifier();
@ -77,7 +77,7 @@ public:
virtual plSceneObject* GetTarget() const { return fTarget; }
virtual void SetTarget(plSceneObject* so) { fTarget = so; }
hsBool HasFlag(int f) const { return fFlags.IsBitSet(f); }
bool HasFlag(int f) const { return fFlags.IsBitSet(f); }
plSingleModifier& SetFlag(int f) { fFlags.SetBit(f); return *this; }
plSingleModifier& ClearFlag(int f) { fFlags.ClearBit(f); return *this; }