mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 02:51:27 +00:00
Obliterate hsBool
This commit is contained in:
@ -71,7 +71,7 @@ plAudioInterface::~plAudioInterface()
|
||||
|
||||
}
|
||||
|
||||
void plAudioInterface::SetProperty(int prop, hsBool on)
|
||||
void plAudioInterface::SetProperty(int prop, bool on)
|
||||
{
|
||||
plObjInterface::SetProperty(prop, on);
|
||||
|
||||
@ -192,7 +192,7 @@ void plAudioInterface::IRemoveAudible(plAudible* aud)
|
||||
fAudible = nil;
|
||||
}
|
||||
|
||||
hsBool plAudioInterface::MsgReceive(plMessage* msg)
|
||||
bool plAudioInterface::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plIntRefMsg* intRefMsg = plIntRefMsg::ConvertNoRef(msg);
|
||||
if( intRefMsg )
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
protected:
|
||||
plAudible* fAudible; // references into system pools
|
||||
|
||||
hsBool fRegisteredForASysMsg, fAudibleInited;
|
||||
bool fRegisteredForASysMsg, fAudibleInited;
|
||||
|
||||
void ISetAudible(plAudible* aud);
|
||||
void IRemoveAudible(plAudible* aud);
|
||||
@ -86,13 +86,13 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
void SetProperty(int prop, hsBool on);
|
||||
void SetProperty(int prop, bool on);
|
||||
int32_t GetNumProperties() const { return kNumProps; }
|
||||
|
||||
plSound* GetSound(int i) const;
|
||||
int GetNumSounds() const;
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
// for export only!!!!!
|
||||
plAudible* GetAudible() const { return fAudible; }
|
||||
|
@ -59,7 +59,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plProfile.h"
|
||||
|
||||
uint8_t plCoordinateInterface::fTransformPhase = plCoordinateInterface::kTransformPhaseNormal;
|
||||
hsBool plCoordinateInterface::fDelayedTransformsEnabled = true;
|
||||
bool plCoordinateInterface::fDelayedTransformsEnabled = true;
|
||||
|
||||
plCoordinateInterface::plCoordinateInterface()
|
||||
: fParent(nil),
|
||||
@ -258,7 +258,7 @@ plCoordinateInterface* plCoordinateInterface::IGetRoot()
|
||||
return fParent ? fParent->IGetRoot() : this;
|
||||
}
|
||||
|
||||
void plCoordinateInterface::IRegisterForTransformMessage(hsBool delayed)
|
||||
void plCoordinateInterface::IRegisterForTransformMessage(bool delayed)
|
||||
{
|
||||
if( IGetOwner() )
|
||||
{
|
||||
@ -458,7 +458,7 @@ void plCoordinateInterface::IRecalcTransforms()
|
||||
plProfile_EndTiming(CIRecalcT);
|
||||
}
|
||||
|
||||
void plCoordinateInterface::ITransformChanged(hsBool force, uint16_t reasons, hsBool checkForDelay)
|
||||
void plCoordinateInterface::ITransformChanged(bool force, uint16_t reasons, bool checkForDelay)
|
||||
{
|
||||
plProfile_IncCount(CITrans, 1);
|
||||
plProfile_BeginTiming(CITransT);
|
||||
@ -468,7 +468,7 @@ void plCoordinateInterface::ITransformChanged(hsBool force, uint16_t reasons, hs
|
||||
|
||||
uint16_t propagateReasons = fReason;
|
||||
|
||||
hsBool process = !(checkForDelay && GetProperty(kDelayedTransformEval)) || !fDelayedTransformsEnabled;
|
||||
bool process = !(checkForDelay && GetProperty(kDelayedTransformEval)) || !fDelayedTransformsEnabled;
|
||||
|
||||
if (process)
|
||||
{
|
||||
@ -513,7 +513,7 @@ void plCoordinateInterface::ITransformChanged(hsBool force, uint16_t reasons, hs
|
||||
}
|
||||
}
|
||||
|
||||
void plCoordinateInterface::FlushTransform(hsBool fromRoot)
|
||||
void plCoordinateInterface::FlushTransform(bool fromRoot)
|
||||
{
|
||||
if( fromRoot )
|
||||
IGetRoot()->ITransformChanged(false, 0, false);
|
||||
@ -578,10 +578,8 @@ void plCoordinateInterface::Write(hsStream* stream, hsResMgr* mgr)
|
||||
|
||||
}
|
||||
|
||||
hsBool plCoordinateInterface::MsgReceive(plMessage* msg)
|
||||
bool plCoordinateInterface::MsgReceive(plMessage* msg)
|
||||
{
|
||||
hsBool retVal = false;
|
||||
|
||||
plIntRefMsg* intRefMsg;
|
||||
plCorrectionMsg* corrMsg;
|
||||
|
||||
|
@ -91,13 +91,13 @@ protected:
|
||||
|
||||
// Set by the client in IUpdate(). This tells us where we are in the update loop so that we know
|
||||
// which transform message to register for when our transform is dirtied.
|
||||
static uint8_t fTransformPhase;
|
||||
static uint8_t fTransformPhase;
|
||||
|
||||
// Temp debugging tool, so we can quickly (dis/en)able delayed transforms at runtime.
|
||||
static hsBool fDelayedTransformsEnabled;
|
||||
static bool fDelayedTransformsEnabled;
|
||||
|
||||
uint16_t fState;
|
||||
uint16_t fReason; // why we've changed position (if we have)
|
||||
uint16_t fState;
|
||||
uint16_t fReason; // why we've changed position (if we have)
|
||||
|
||||
hsTArray<plSceneObject*> fChildren;
|
||||
plCoordinateInterface* fParent; // if this changes, marks us as dirty
|
||||
@ -127,10 +127,10 @@ protected:
|
||||
virtual void IUpdateDelayProp(); // Called whenever a child is added/removed
|
||||
|
||||
virtual void IRecalcTransforms(); // Called by ITransformChanged when we need to re-examine our relationship with our parent.
|
||||
virtual void ITransformChanged(hsBool force, uint16_t reasons, hsBool checkForDelay); // called by SceneObject on TransformChanged messsage
|
||||
virtual void ITransformChanged(bool force, uint16_t reasons, bool checkForDelay); // called by SceneObject on TransformChanged messsage
|
||||
|
||||
void IDirtyTransform();
|
||||
void IRegisterForTransformMessage(hsBool delayed);
|
||||
void IRegisterForTransformMessage(bool delayed);
|
||||
void IUnRegisterForTransformMessage();
|
||||
plCoordinateInterface* IGetRoot();
|
||||
|
||||
@ -172,7 +172,7 @@ public:
|
||||
// synced up, so fromRoot=true.
|
||||
// fromRoot=true is always safe, just potentially wasteful, so if you don't know, use fromRoot=true or
|
||||
// preferably, don't use this function.
|
||||
void FlushTransform(hsBool fromRoot=true);
|
||||
void FlushTransform(bool fromRoot=true);
|
||||
|
||||
virtual const hsMatrix44& GetLocalToParent() const { return fLocalToParent; }
|
||||
virtual const hsMatrix44& GetParentToLocal() const { return fParentToLocal; }
|
||||
@ -186,7 +186,7 @@ public:
|
||||
virtual plCoordinateInterface* GetChild(int i) const;
|
||||
virtual plCoordinateInterface* GetParent() const { return fParent; }
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
uint16_t GetReasons();
|
||||
void ClearReasons();
|
||||
@ -195,8 +195,8 @@ public:
|
||||
static uint8_t GetTransformPhase() { return fTransformPhase; }
|
||||
static void SetTransformPhase(uint8_t phase) { fTransformPhase = phase; }
|
||||
|
||||
static hsBool GetDelayedTransformsEnabled() { return fDelayedTransformsEnabled; }
|
||||
static void SetDelayedTransformsEnabled(hsBool val) { fDelayedTransformsEnabled = val; }
|
||||
static bool GetDelayedTransformsEnabled() { return fDelayedTransformsEnabled; }
|
||||
static void SetDelayedTransformsEnabled(bool val) { fDelayedTransformsEnabled = val; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ void plDrawInterface::SetDrawableMeshIndex( uint8_t which, uint32_t index )
|
||||
fDrawableIndices[which] = index;
|
||||
}
|
||||
|
||||
void plDrawInterface::SetProperty(int prop, hsBool on)
|
||||
void plDrawInterface::SetProperty(int prop, bool on)
|
||||
{
|
||||
plObjInterface::SetProperty(prop, on);
|
||||
|
||||
@ -258,7 +258,7 @@ void plDrawInterface::IRemoveDrawable(plDrawable *dr)
|
||||
}
|
||||
}
|
||||
|
||||
void plDrawInterface::ISetVisRegion(hsKeyedObject* reg, hsBool on)
|
||||
void plDrawInterface::ISetVisRegion(hsKeyedObject* reg, bool on)
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < fDrawables.GetCount(); i++ )
|
||||
@ -311,7 +311,7 @@ void plDrawInterface::SetDrawable(uint8_t which, plDrawable *dr)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plDrawInterface::MsgReceive(plMessage* msg)
|
||||
bool plDrawInterface::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plIntRefMsg* intRefMsg = plIntRefMsg::ConvertNoRef(msg);
|
||||
if( intRefMsg )
|
||||
|
@ -73,7 +73,7 @@ protected:
|
||||
hsTArray<hsKeyedObject*> fRegions;
|
||||
|
||||
void ISetVisRegions(int iDraw);
|
||||
void ISetVisRegion(hsKeyedObject* ref, hsBool on);
|
||||
void ISetVisRegion(hsKeyedObject* ref, bool on);
|
||||
void ISetDrawable(uint8_t which, plDrawable* dr);
|
||||
void IRemoveDrawable(plDrawable* dr);
|
||||
void ISetSceneNode(plKey newNode);
|
||||
@ -91,7 +91,7 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
void SetProperty(int prop, hsBool on);
|
||||
void SetProperty(int prop, bool on);
|
||||
int32_t GetNumProperties() const { return kNumProps; }
|
||||
|
||||
// Transform settable only, if you want it get it from the coordinate interface.
|
||||
@ -102,7 +102,7 @@ public:
|
||||
const hsBounds3Ext GetWorldBounds() const;
|
||||
const hsBounds3Ext GetMaxWorldBounds() const;
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void ReleaseData( void );
|
||||
|
||||
|
@ -85,10 +85,8 @@ void plObjInterface::Write(hsStream* s, hsResMgr* mgr)
|
||||
fProps.Write(s);
|
||||
}
|
||||
|
||||
hsBool plObjInterface::MsgReceive(plMessage* msg)
|
||||
bool plObjInterface::MsgReceive(plMessage* msg)
|
||||
{
|
||||
hsBool retVal = false;
|
||||
|
||||
plEnableMsg* enaMsg = plEnableMsg::ConvertNoRef(msg);
|
||||
if( enaMsg )
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
CLASSNAME_REGISTER( plObjInterface );
|
||||
GETINTERFACE_ANY( plObjInterface, plSynchedObject );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
const plSceneObject* GetOwner() const { return IGetOwner(); }
|
||||
plKey GetOwnerKey() const { return IGetOwner() ? IGetOwner()->GetKey() : nil; }
|
||||
@ -101,10 +101,10 @@ public:
|
||||
virtual plKey GetSceneNode() const { return IGetOwner() ? IGetOwner()->GetSceneNode() : nil; }
|
||||
|
||||
// override SetProperty to pass the prop down to the pool objects
|
||||
virtual void SetProperty(int prop, hsBool on) { fProps.SetBit(prop, on); }
|
||||
virtual void SetProperty(int prop, bool on) { fProps.SetBit(prop, on); }
|
||||
|
||||
// shouldn't need to override GetProperty()
|
||||
hsBool GetProperty(int prop) const { return fProps.IsBitSet(prop); }
|
||||
bool GetProperty(int prop) const { return fProps.IsBitSet(prop); }
|
||||
virtual int32_t GetNumProperties() const = 0;
|
||||
|
||||
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) = 0;
|
||||
|
@ -371,9 +371,9 @@ void plSceneObject::IRemoveInterface(int16_t idx, plObjInterface* who)
|
||||
IRemoveGeneric(who);
|
||||
}
|
||||
|
||||
hsBool plSceneObject::IPropagateToModifiers(plMessage* msg)
|
||||
bool plSceneObject::IPropagateToModifiers(plMessage* msg)
|
||||
{
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
int i;
|
||||
int nMods = fModifiers.GetCount();
|
||||
|
||||
@ -382,17 +382,16 @@ hsBool plSceneObject::IPropagateToModifiers(plMessage* msg)
|
||||
if( fModifiers[i] )
|
||||
{
|
||||
plModifier *mod = fModifiers[i];
|
||||
hsBool modRet = mod->MsgReceive(msg);
|
||||
retVal |= modRet;
|
||||
retVal |= mod->MsgReceive(msg);
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
hsBool plSceneObject::Eval(double secs, float delSecs)
|
||||
bool plSceneObject::Eval(double secs, float delSecs)
|
||||
{
|
||||
uint32_t dirty = ~0L;
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
int i;
|
||||
for( i = 0; i < fModifiers.GetCount(); i++ )
|
||||
{
|
||||
@ -462,7 +461,7 @@ const plModifier* plSceneObject::GetModifierByType(uint16_t classIdx) const
|
||||
return nil;
|
||||
}
|
||||
|
||||
hsBool plSceneObject::MsgReceive(plMessage* msg)
|
||||
bool plSceneObject::MsgReceive(plMessage* msg)
|
||||
{
|
||||
|
||||
#if 0 // objects are only in the nil room when they are being paged out
|
||||
@ -474,7 +473,7 @@ hsBool plSceneObject::MsgReceive(plMessage* msg)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
// If it's a bcast, let our own dispatcher find who's interested.
|
||||
plTransformMsg* trans;
|
||||
plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg);
|
||||
@ -543,10 +542,7 @@ hsBool plSceneObject::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plSceneObject* child = (plSceneObject*)ci->GetChild(i)->GetOwner();
|
||||
if (child)
|
||||
{
|
||||
hsBool modRet = child->MsgReceive(msg);
|
||||
retVal |= modRet;
|
||||
}
|
||||
retVal |= child->MsgReceive(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@ -555,7 +551,7 @@ hsBool plSceneObject::MsgReceive(plMessage* msg)
|
||||
return plSynchedObject::MsgReceive(msg);
|
||||
}
|
||||
|
||||
hsBool plSceneObject::IMsgHandle(plMessage* msg)
|
||||
bool plSceneObject::IMsgHandle(plMessage* msg)
|
||||
{
|
||||
// To start with, plSceneObject only handles messages to add or remove
|
||||
// references. Current references are other plSceneObjects and plModifiers
|
||||
@ -841,7 +837,7 @@ void plSceneObject::ISetCoordinateInterface(plCoordinateInterface* ci)
|
||||
//
|
||||
// "is ready to process Loads"? Check base class and modifiers.
|
||||
//
|
||||
hsBool plSceneObject::IsFinal()
|
||||
bool plSceneObject::IsFinal()
|
||||
{
|
||||
if (!plSynchedObject::IsFinal())
|
||||
return false;
|
||||
|
@ -88,7 +88,7 @@ private:
|
||||
friend class plMaxNode;
|
||||
friend class plMaxNodeBase;
|
||||
|
||||
hsBool IMsgHandle(plMessage* msg);
|
||||
bool IMsgHandle(plMessage* msg);
|
||||
protected:
|
||||
|
||||
plDrawInterface* fDrawInterface;
|
||||
@ -113,7 +113,7 @@ protected:
|
||||
|
||||
void IAddModifier(plModifier* mo, int i);
|
||||
void IRemoveModifier(plModifier* mo);
|
||||
hsBool IPropagateToModifiers(plMessage* msg);
|
||||
bool IPropagateToModifiers(plMessage* msg);
|
||||
|
||||
void ISetInterface(plObjInterface* iface);
|
||||
void IRemoveInterface(plObjInterface* iface);
|
||||
@ -146,8 +146,8 @@ public:
|
||||
const plModifier* GetModifier(int i) const { return fModifiers[i]; }
|
||||
const plModifier* GetModifierByType(uint16_t classIdx) const;
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual hsBool Eval(double secs, float del);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
virtual bool Eval(double secs, float del);
|
||||
|
||||
void SetSceneNode(plKey newNode);
|
||||
plKey GetSceneNode() const;
|
||||
@ -166,7 +166,7 @@ public:
|
||||
hsMatrix44 GetLocalToParent() const;
|
||||
hsMatrix44 GetParentToLocal() const;
|
||||
|
||||
hsBool IsFinal(); // "is ready to process Loads"
|
||||
virtual bool IsFinal(); // "is ready to process Loads"
|
||||
|
||||
// Export only
|
||||
virtual void SetDrawInterface(plDrawInterface* di);
|
||||
|
@ -69,7 +69,7 @@ void plSimulationInterface::ISetSceneNode(plKey newNode)
|
||||
fPhysical->SetSceneNode(newNode);
|
||||
}
|
||||
|
||||
void plSimulationInterface::SetProperty(int prop, hsBool on)
|
||||
void plSimulationInterface::SetProperty(int prop, bool on)
|
||||
{
|
||||
plObjInterface::SetProperty(prop, on); // set the property locally
|
||||
|
||||
@ -135,7 +135,7 @@ void plSimulationInterface::ReleaseData()
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plSimulationInterface::MsgReceive(plMessage* msg)
|
||||
bool plSimulationInterface::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plIntRefMsg* intRefMsg = plIntRefMsg::ConvertNoRef(msg);
|
||||
if (intRefMsg)
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
void SetProperty(int prop, hsBool on);
|
||||
void SetProperty(int prop, bool on);
|
||||
int32_t GetNumProperties() const { return kNumProps; }
|
||||
|
||||
// Transform settable only, if you want it get it from the coordinate interface.
|
||||
@ -100,7 +100,7 @@ public:
|
||||
const hsBounds3Ext GetMaxWorldBounds();
|
||||
void ClearLinearVelocity();
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
// Export only.
|
||||
void SetPhysical(plPhysical* phys);
|
||||
|
Reference in New Issue
Block a user