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:
@ -167,7 +167,7 @@ void plCullPoly::Write(hsStream* s, hsResMgr* mgr)
|
||||
#endif // HS_DEBUGGING
|
||||
|
||||
#ifdef MF_VALIDATE_POLYS
|
||||
hsBool plCullPoly::Validate() const
|
||||
bool plCullPoly::Validate() const
|
||||
{
|
||||
const float kMinMag = 1.e-8f;
|
||||
float magSq = fNorm.MagnitudeSquared();
|
||||
@ -194,7 +194,7 @@ hsBool plCullPoly::Validate() const
|
||||
return true;
|
||||
}
|
||||
#else // MF_VALIDATE_POLYS
|
||||
hsBool plCullPoly::Validate() const
|
||||
bool plCullPoly::Validate() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -74,11 +74,11 @@ public:
|
||||
const hsPoint3& GetCenter() const { return fCenter; }
|
||||
float GetRadius() const { return fRadius; }
|
||||
|
||||
void SetHole(hsBool on) { if( on )fFlags |= kHole; else fFlags &= ~kHole; }
|
||||
void SetTwoSided(hsBool on) { if( on )fFlags |= kTwoSided; else fFlags &= ~kTwoSided; }
|
||||
void SetHole(bool on) { if( on )fFlags |= kHole; else fFlags &= ~kHole; }
|
||||
void SetTwoSided(bool on) { if( on )fFlags |= kTwoSided; else fFlags &= ~kTwoSided; }
|
||||
|
||||
hsBool IsHole() const { return fFlags & kHole; } // Assumes kHole is 0x1
|
||||
hsBool IsTwoSided() const { return 0 != (fFlags & kTwoSided); }
|
||||
bool IsHole() const { return fFlags & kHole; } // Assumes kHole is 0x1
|
||||
bool IsTwoSided() const { return 0 != (fFlags & kTwoSided); }
|
||||
|
||||
plCullPoly& Init(const plCullPoly& p) { fClipped.Clear(); fVerts.SetCount(0); fFlags = p.fFlags; fNorm = p.fNorm; fDist = p.fDist; fCenter = p.fCenter; return *this; }
|
||||
plCullPoly& Flip(const plCullPoly& p);
|
||||
@ -90,9 +90,9 @@ public:
|
||||
void Read(hsStream* s, hsResMgr* mgr);
|
||||
void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
hsBool DegenerateVert(const hsPoint3& p) const { return fVerts.GetCount() && (kCullPolyDegen > hsVector3(&p, &fVerts[fVerts.GetCount()-1]).MagnitudeSquared()); }
|
||||
bool DegenerateVert(const hsPoint3& p) const { return fVerts.GetCount() && (kCullPolyDegen > hsVector3(&p, &fVerts[fVerts.GetCount()-1]).MagnitudeSquared()); }
|
||||
|
||||
hsBool Validate() const; // no-op, except for special debugging circumstances.
|
||||
bool Validate() const; // no-op, except for special debugging circumstances.
|
||||
};
|
||||
|
||||
#endif // plCullPoly_inc
|
||||
|
@ -194,7 +194,7 @@ plOccNode* plOccTree::IAddPolyRecur(plOccNode* node, plOccPoly* poly)
|
||||
return node;
|
||||
}
|
||||
|
||||
hsBool plOccTree::BoundsVisible(const hsBounds3Ext& bnd) const
|
||||
bool plOccTree::BoundsVisible(const hsBounds3Ext& bnd) const
|
||||
{
|
||||
if( !fRoot )
|
||||
return true;
|
||||
@ -203,21 +203,21 @@ hsBool plOccTree::BoundsVisible(const hsBounds3Ext& bnd) const
|
||||
}
|
||||
|
||||
|
||||
hsBool plOccNode::IInChildBoundsVisible(const hsBounds3Ext& bnd) const
|
||||
bool plOccNode::IInChildBoundsVisible(const hsBounds3Ext& bnd) const
|
||||
{
|
||||
return fInChild
|
||||
? fInChild->IBoundsVisible(bnd)
|
||||
: false;
|
||||
}
|
||||
|
||||
hsBool plOccNode::IOutChildBoundsVisible(const hsBounds3Ext& bnd) const
|
||||
bool plOccNode::IOutChildBoundsVisible(const hsBounds3Ext& bnd) const
|
||||
{
|
||||
return fOutChild
|
||||
? fOutChild->IBoundsVisible(bnd)
|
||||
: true;
|
||||
}
|
||||
|
||||
hsBool plOccNode::IBoundsVisible(const hsBounds3Ext& bnd) const
|
||||
bool plOccNode::IBoundsVisible(const hsBounds3Ext& bnd) const
|
||||
{
|
||||
hsPoint2 depth;
|
||||
bnd.TestPlane(fPlane.fNormal, depth);
|
||||
|
@ -69,7 +69,7 @@ plOccluder::~plOccluder()
|
||||
delete fProxyGen;
|
||||
}
|
||||
|
||||
hsBool plOccluder::MsgReceive(plMessage* msg)
|
||||
bool plOccluder::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if( refMsg )
|
||||
|
@ -97,12 +97,12 @@ public:
|
||||
CLASSNAME_REGISTER( plOccluder );
|
||||
GETINTERFACE_ANY( plOccluder, plObjInterface);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual float GetPriority() const { return fPriority; }
|
||||
|
||||
hsBool InVisSet(const hsBitVector& visSet) const { return fVisSet.Overlap(visSet); }
|
||||
hsBool InVisNot(const hsBitVector& visNot) const { return fVisNot.Overlap(visNot); }
|
||||
bool InVisSet(const hsBitVector& visSet) const { return fVisSet.Overlap(visSet); }
|
||||
bool InVisNot(const hsBitVector& visNot) const { return fVisNot.Overlap(visNot); }
|
||||
|
||||
virtual const hsBounds3Ext& GetWorldBounds() const { return fWorldBounds; }
|
||||
|
||||
|
@ -57,7 +57,7 @@ plOccluderProxy::~plOccluderProxy()
|
||||
{
|
||||
}
|
||||
|
||||
hsBool plOccluderProxy::Init(plOccluder* occluder)
|
||||
bool plOccluderProxy::Init(plOccluder* occluder)
|
||||
{
|
||||
plProxyGen::Init(occluder);
|
||||
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
plOccluderProxy();
|
||||
virtual ~plOccluderProxy();
|
||||
|
||||
hsBool Init(plOccluder* occluder);
|
||||
bool Init(plOccluder* occluder);
|
||||
};
|
||||
|
||||
#endif // plOccluderProxy_inc
|
||||
|
@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
static hsTArray<hsRadixSortElem> scratchList;
|
||||
|
||||
hsBool plPageTreeMgr::fDisableVisMgr = 0;
|
||||
bool plPageTreeMgr::fDisableVisMgr = 0;
|
||||
|
||||
plProfile_CreateTimer("Object Sort", "Draw", DrawObjSort);
|
||||
plProfile_CreateCounter("Objects Sorted", "Draw", DrawObjSorted);
|
||||
@ -110,7 +110,7 @@ void plPageTreeMgr::ITrashSpaceTree()
|
||||
fSpaceTree = nil;
|
||||
}
|
||||
|
||||
hsBool plPageTreeMgr::Harvest(plVolumeIsect* isect, hsTArray<plDrawVisList>& levList)
|
||||
bool plPageTreeMgr::Harvest(plVolumeIsect* isect, hsTArray<plDrawVisList>& levList)
|
||||
{
|
||||
levList.SetCount(0);
|
||||
if( !(GetSpaceTree() || IBuildSpaceTree()) )
|
||||
@ -235,7 +235,7 @@ int plPageTreeMgr::IRenderVisList(plPipeline* pipe, hsTArray<plDrawVisList>& lev
|
||||
return numDrawn;
|
||||
}
|
||||
|
||||
hsBool plPageTreeMgr::ISortByLevel(plPipeline* pipe, hsTArray<plDrawVisList>& drawList, hsTArray<plDrawVisList>& sortedDrawList)
|
||||
bool plPageTreeMgr::ISortByLevel(plPipeline* pipe, hsTArray<plDrawVisList>& drawList, hsTArray<plDrawVisList>& sortedDrawList)
|
||||
{
|
||||
sortedDrawList.SetCount(0);
|
||||
|
||||
@ -331,7 +331,7 @@ int plPageTreeMgr::IPrepForRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawV
|
||||
return numDrawn;
|
||||
}
|
||||
|
||||
hsBool plPageTreeMgr::IRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawVisList*>& drawList, hsTArray<plDrawSpanPair>& pairs)
|
||||
bool plPageTreeMgr::IRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawVisList*>& drawList, hsTArray<plDrawSpanPair>& pairs)
|
||||
{
|
||||
|
||||
if( !pairs.GetCount() )
|
||||
@ -472,7 +472,7 @@ hsBool plPageTreeMgr::IRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawVisLi
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plPageTreeMgr::IBuildSpaceTree()
|
||||
bool plPageTreeMgr::IBuildSpaceTree()
|
||||
{
|
||||
if( !fNodes.GetCount() )
|
||||
return false;
|
||||
@ -489,7 +489,7 @@ hsBool plPageTreeMgr::IBuildSpaceTree()
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plPageTreeMgr::IRefreshTree(plPipeline* pipe)
|
||||
bool plPageTreeMgr::IRefreshTree(plPipeline* pipe)
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < fNodes.GetCount(); i++ )
|
||||
@ -573,7 +573,7 @@ void plPageTreeMgr::ISortCullPolys(plPipeline* pipe)
|
||||
int i;
|
||||
for( i = 0; i < fCullPolys.GetCount(); i++ )
|
||||
{
|
||||
hsBool backFace = fCullPolys[i]->fNorm.InnerProduct(viewPos) + fCullPolys[i]->fDist <= 0;
|
||||
bool backFace = fCullPolys[i]->fNorm.InnerProduct(viewPos) + fCullPolys[i]->fDist <= 0;
|
||||
if( backFace )
|
||||
{
|
||||
if( !fCullPolys[i]->IsHole() && !fCullPolys[i]->IsTwoSided() )
|
||||
@ -613,7 +613,7 @@ void plPageTreeMgr::ISortCullPolys(plPipeline* pipe)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plPageTreeMgr::IGetCullPolys(plPipeline* pipe)
|
||||
bool plPageTreeMgr::IGetCullPolys(plPipeline* pipe)
|
||||
{
|
||||
if( !fOccluders.GetCount() )
|
||||
return false;
|
||||
@ -673,7 +673,7 @@ hsBool plPageTreeMgr::IGetCullPolys(plPipeline* pipe)
|
||||
return fCullPolys.GetCount() > 0;
|
||||
}
|
||||
|
||||
hsBool plPageTreeMgr::IGetOcclusion(plPipeline* pipe, hsTArray<int16_t>& list)
|
||||
bool plPageTreeMgr::IGetOcclusion(plPipeline* pipe, hsTArray<int16_t>& list)
|
||||
{
|
||||
plProfile_BeginTiming(DrawOccBuild);
|
||||
|
||||
|
@ -84,24 +84,24 @@ protected:
|
||||
plSpaceTree* fSpaceTree;
|
||||
plVisMgr* fVisMgr;
|
||||
|
||||
static hsBool fDisableVisMgr;
|
||||
static bool fDisableVisMgr;
|
||||
|
||||
hsTArray<const plOccluder*> fOccluders;
|
||||
hsTArray<const plCullPoly*> fCullPolys;
|
||||
hsTArray<const plCullPoly*> fSortedCullPolys;
|
||||
|
||||
void ITrashSpaceTree();
|
||||
hsBool IBuildSpaceTree();
|
||||
hsBool IRefreshTree(plPipeline* pipe);
|
||||
bool IBuildSpaceTree();
|
||||
bool IRefreshTree(plPipeline* pipe);
|
||||
void ISortCullPolys(plPipeline* pipe);
|
||||
hsBool IGetOcclusion(plPipeline* pipe, hsTArray<int16_t>& list);
|
||||
hsBool IGetCullPolys(plPipeline* pipe);
|
||||
bool IGetOcclusion(plPipeline* pipe, hsTArray<int16_t>& list);
|
||||
bool IGetCullPolys(plPipeline* pipe);
|
||||
void IResetOcclusion(plPipeline* pipe);
|
||||
void IAddCullPolyList(const hsTArray<plCullPoly>& polyList);
|
||||
|
||||
hsBool ISortByLevel(plPipeline* pipe, hsTArray<plDrawVisList>& drawList, hsTArray<plDrawVisList>& sortedDrawList);
|
||||
bool ISortByLevel(plPipeline* pipe, hsTArray<plDrawVisList>& drawList, hsTArray<plDrawVisList>& sortedDrawList);
|
||||
int IPrepForRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawVisList>& drawVis, int& iDrawStart);
|
||||
hsBool IRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawVisList*>& drawList, hsTArray<plDrawSpanPair>& pairs);
|
||||
bool IRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawVisList*>& drawList, hsTArray<plDrawSpanPair>& pairs);
|
||||
int IRenderVisList(plPipeline* pipe, hsTArray<plDrawVisList>& visList);
|
||||
|
||||
public:
|
||||
@ -113,11 +113,11 @@ public:
|
||||
void AddNode(plSceneNode* node);
|
||||
void RemoveNode(plSceneNode* node);
|
||||
virtual void Reset(); // remove all nodes, nuke the space tree
|
||||
virtual hsBool Empty() const { return !fNodes.GetCount(); }
|
||||
virtual bool Empty() const { return !fNodes.GetCount(); }
|
||||
|
||||
virtual int Render(plPipeline* pipe);
|
||||
|
||||
hsBool Harvest(plVolumeIsect* isect, hsTArray<plDrawVisList>& levList);
|
||||
bool Harvest(plVolumeIsect* isect, hsTArray<plDrawVisList>& levList);
|
||||
|
||||
void AddOccluderList(const hsTArray<plOccluder*> occList);
|
||||
|
||||
@ -126,8 +126,8 @@ public:
|
||||
void SetVisMgr(plVisMgr* visMgr) { fVisMgr = visMgr; }
|
||||
plVisMgr* GetVisMgr() const { return fVisMgr; }
|
||||
|
||||
static void EnableVisMgr(hsBool on) { fDisableVisMgr = !on; }
|
||||
static hsBool VisMgrEnabled() { return !fDisableVisMgr; }
|
||||
static void EnableVisMgr(bool on) { fDisableVisMgr = !on; }
|
||||
static bool VisMgrEnabled() { return !fDisableVisMgr; }
|
||||
};
|
||||
|
||||
#endif // plPageTreeMgr_inc
|
||||
|
@ -130,7 +130,7 @@ void plPostEffectMod::IDestroyRenderRequest()
|
||||
fPageMgr = nil;
|
||||
}
|
||||
|
||||
void plPostEffectMod::IRegisterForRenderMsg(hsBool on)
|
||||
void plPostEffectMod::IRegisterForRenderMsg(bool on)
|
||||
{
|
||||
if( on )
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plRenderMsg::Index(), GetKey());
|
||||
@ -138,7 +138,7 @@ void plPostEffectMod::IRegisterForRenderMsg(hsBool on)
|
||||
plgDispatch::Dispatch()->UnRegisterForExactType(plRenderMsg::Index(), GetKey());
|
||||
}
|
||||
|
||||
void plPostEffectMod::ISetEnable(hsBool on)
|
||||
void plPostEffectMod::ISetEnable(bool on)
|
||||
{
|
||||
if( on )
|
||||
{
|
||||
@ -152,12 +152,12 @@ void plPostEffectMod::ISetEnable(hsBool on)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plPostEffectMod::IIsEnabled() const
|
||||
bool plPostEffectMod::IIsEnabled() const
|
||||
{
|
||||
return /*GetTarget() &&*/ !fPageMgr->Empty() && fState.IsBitSet(kEnabled);
|
||||
}
|
||||
|
||||
hsBool plPostEffectMod::IEval(double secs, float del, uint32_t dirty)
|
||||
bool plPostEffectMod::IEval(double secs, float del, uint32_t dirty)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -240,7 +240,7 @@ void plPostEffectMod::IRemoveFromPageMgr(plSceneNode* node)
|
||||
#include "plProfile.h"
|
||||
plProfile_CreateTimer("PostEffect", "RenderSetup", PostEffect);
|
||||
|
||||
hsBool plPostEffectMod::MsgReceive(plMessage* msg)
|
||||
bool plPostEffectMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plRenderMsg* rend = plRenderMsg::ConvertNoRef(msg);
|
||||
if( rend && IIsEnabled() )
|
||||
|
@ -84,20 +84,20 @@ protected:
|
||||
hsMatrix44 fDefaultW2C, fDefaultC2W;
|
||||
|
||||
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty); // called only by owner object's Eval()
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty); // called only by owner object's Eval()
|
||||
|
||||
void ISetupRenderRequest();
|
||||
void IDestroyRenderRequest();
|
||||
void IUpdateRenderRequest();
|
||||
|
||||
void IRegisterForRenderMsg(hsBool on);
|
||||
void IRegisterForRenderMsg(bool on);
|
||||
void ISubmitRequest();
|
||||
|
||||
void IAddToPageMgr(plSceneNode* node);
|
||||
void IRemoveFromPageMgr(plSceneNode* node);
|
||||
|
||||
void ISetEnable(hsBool on);
|
||||
hsBool IIsEnabled() const;
|
||||
void ISetEnable(bool on);
|
||||
bool IIsEnabled() const;
|
||||
|
||||
public:
|
||||
plPostEffectMod();
|
||||
@ -107,7 +107,7 @@ public:
|
||||
GETINTERFACE_ANY( plPostEffectMod, plSingleModifier );
|
||||
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* pMsg);
|
||||
virtual bool MsgReceive(plMessage* pMsg);
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
@ -98,7 +98,7 @@ void plRelevanceMgr::SetRegionVectors(const hsPoint3 &pos, hsBitVector ®ionsI
|
||||
regionsICareAbout.Clear();
|
||||
regionsICareAbout.SetBit(0, true); // Always care about region zero, the special "No region" node
|
||||
|
||||
hsBool inAnyRegion = false;
|
||||
bool inAnyRegion = false;
|
||||
|
||||
int i;
|
||||
for (i = 0; i < fRegions.GetCount(); i++)
|
||||
@ -129,7 +129,7 @@ uint32_t plRelevanceMgr::GetNumRegions() const
|
||||
}
|
||||
|
||||
|
||||
hsBool plRelevanceMgr::MsgReceive(plMessage* msg)
|
||||
bool plRelevanceMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg *genMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (genMsg)
|
||||
@ -161,7 +161,7 @@ uint32_t plRelevanceMgr::GetIndex(const plString ®ionName)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void plRelevanceMgr::MarkRegion(uint32_t localIdx, uint32_t remoteIdx, hsBool doICare)
|
||||
void plRelevanceMgr::MarkRegion(uint32_t localIdx, uint32_t remoteIdx, bool doICare)
|
||||
{
|
||||
if (localIdx == (uint32_t)-1 || remoteIdx == (uint32_t)-1)
|
||||
return;
|
||||
@ -202,7 +202,7 @@ void plRelevanceMgr::ParseCsvInput(hsStream *s)
|
||||
char buff[kBufSize];
|
||||
hsTArray<plRegionInfo*> regions;
|
||||
hsStringTokenizer toke;
|
||||
hsBool firstLine = true;
|
||||
bool firstLine = true;
|
||||
|
||||
while (!s->AtEnd())
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
|
||||
protected:
|
||||
hsTArray<plRelevanceRegion*> fRegions;
|
||||
hsBool fEnabled;
|
||||
bool fEnabled;
|
||||
|
||||
void IAddRegion(plRelevanceRegion *);
|
||||
void IRemoveRegion(plRelevanceRegion *);
|
||||
@ -75,13 +75,13 @@ public:
|
||||
CLASSNAME_REGISTER( plRelevanceMgr );
|
||||
GETINTERFACE_ANY( plRelevanceMgr, hsKeyedObject );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
hsBool GetEnabled() { return fEnabled; }
|
||||
void SetEnabled(hsBool val) { fEnabled = val; }
|
||||
bool GetEnabled() { return fEnabled; }
|
||||
void SetEnabled(bool val) { fEnabled = val; }
|
||||
|
||||
uint32_t GetIndex(const plString ®ionName);
|
||||
void MarkRegion(uint32_t localIdx, uint32_t remoteIdx, hsBool doICare);
|
||||
void MarkRegion(uint32_t localIdx, uint32_t remoteIdx, bool doICare);
|
||||
void SetRegionVectors(const hsPoint3 &pos, hsBitVector ®ionsImIn, hsBitVector ®ionsICareAbout);
|
||||
uint32_t GetNumRegions() const; // includes the secret 0 region in its count
|
||||
void ParseCsvInput(hsStream *s);
|
||||
|
@ -66,7 +66,7 @@ void plRelevanceRegion::Write(hsStream* s, hsResMgr* mgr)
|
||||
mgr->WriteKey(s, fRegion);
|
||||
}
|
||||
|
||||
hsBool plRelevanceRegion::MsgReceive(plMessage* msg)
|
||||
bool plRelevanceRegion::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg *genMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (genMsg)
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
CLASSNAME_REGISTER( plRelevanceRegion );
|
||||
GETINTERFACE_ANY( plRelevanceRegion, plObjInterface );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) {}
|
||||
virtual int32_t GetNumProperties() const { return 1; }
|
||||
|
@ -164,7 +164,7 @@ void plRenderRequest::SetVisForce(const hsBitVector& b)
|
||||
fVisForce = b;
|
||||
}
|
||||
|
||||
hsBool plRenderRequest::GetRenderCharacters() const
|
||||
bool plRenderRequest::GetRenderCharacters() const
|
||||
{
|
||||
return fVisForce.IsBitSet(plVisMgr::kCharacter);
|
||||
}
|
||||
|
@ -93,14 +93,14 @@ protected:
|
||||
hsBitVector fVisForce;
|
||||
|
||||
uint32_t fUserData;
|
||||
hsBool fIgnoreOccluders;
|
||||
bool fIgnoreOccluders;
|
||||
|
||||
public:
|
||||
plRenderRequest();
|
||||
~plRenderRequest();
|
||||
|
||||
hsBool GetRenderSelect() const { return !fVisForce.Empty(); }
|
||||
hsBool GetRenderCharacters() const;
|
||||
bool GetRenderSelect() const { return !fVisForce.Empty(); }
|
||||
bool GetRenderCharacters() const;
|
||||
|
||||
void SetRenderState(uint32_t st) { fRenderState = st; }
|
||||
uint32_t GetRenderState() const { return fRenderState; }
|
||||
@ -168,8 +168,8 @@ public:
|
||||
|
||||
void SetCameraTransform(const hsMatrix44& w2c, const hsMatrix44& c2w) { fViewTransform.SetCameraTransform(w2c, c2w); }
|
||||
|
||||
void SetPerspective(hsBool on=true) { fViewTransform.SetPerspective(on); }
|
||||
void SetOrthogonal(hsBool on=true) { fViewTransform.SetOrthogonal(on); }
|
||||
void SetPerspective(bool on=true) { fViewTransform.SetPerspective(on); }
|
||||
void SetOrthogonal(bool on=true) { fViewTransform.SetOrthogonal(on); }
|
||||
|
||||
void SetHither(float f) { fViewTransform.SetHither(f); }
|
||||
void SetYon(float f) { fViewTransform.SetYon(f); }
|
||||
@ -197,8 +197,8 @@ public:
|
||||
void SetUserData(uint32_t n) { fUserData = n; }
|
||||
uint32_t GetUserData() const { return fUserData; }
|
||||
|
||||
void SetIgnoreOccluders(hsBool b) { fIgnoreOccluders = b; }
|
||||
hsBool GetIgnoreOccluders() { return fIgnoreOccluders; }
|
||||
void SetIgnoreOccluders(bool b) { fIgnoreOccluders = b; }
|
||||
bool GetIgnoreOccluders() { return fIgnoreOccluders; }
|
||||
|
||||
// This function is called after the render request is processed by the client
|
||||
virtual void Render(plPipeline* pipe, plPageTreeMgr* pageMgr);
|
||||
|
@ -374,7 +374,7 @@ void plSceneNode::IRemoveGeneric(hsKeyedObject* k)
|
||||
fGenericPool.Remove(idx);
|
||||
}
|
||||
|
||||
hsBool plSceneNode::IOnRemove(plNodeRefMsg* refMsg)
|
||||
bool plSceneNode::IOnRemove(plNodeRefMsg* refMsg)
|
||||
{
|
||||
|
||||
switch( refMsg->fType )
|
||||
@ -407,7 +407,7 @@ hsBool plSceneNode::IOnRemove(plNodeRefMsg* refMsg)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plSceneNode::IOnAdd(plNodeRefMsg* refMsg)
|
||||
bool plSceneNode::IOnAdd(plNodeRefMsg* refMsg)
|
||||
{
|
||||
int which = refMsg->fWhich;
|
||||
|
||||
@ -437,7 +437,7 @@ hsBool plSceneNode::IOnAdd(plNodeRefMsg* refMsg)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plSceneNode::MsgReceive(plMessage* msg)
|
||||
bool plSceneNode::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plNodeCleanupMsg *cleanMsg = plNodeCleanupMsg::ConvertNoRef( msg );
|
||||
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
};
|
||||
|
||||
protected:
|
||||
hsBool fFilterGenerics; // Export only
|
||||
bool fFilterGenerics; // Export only
|
||||
|
||||
int16_t fDepth;
|
||||
|
||||
@ -110,8 +110,8 @@ protected:
|
||||
void ISetOccluder(plOccluder* o);
|
||||
void ISetGeneric(hsKeyedObject* k);
|
||||
|
||||
hsBool IOnRemove(plNodeRefMsg* refMsg);
|
||||
hsBool IOnAdd(plNodeRefMsg* refMsg);
|
||||
bool IOnRemove(plNodeRefMsg* refMsg);
|
||||
bool IOnAdd(plNodeRefMsg* refMsg);
|
||||
|
||||
// Export only: Clean up empty drawables
|
||||
void ICleanUp( void );
|
||||
@ -131,7 +131,7 @@ public:
|
||||
|
||||
virtual void SubmitOccluders(plPageTreeMgr* pageMgr) const;
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
int16_t GetDepth() { return fDepth; }
|
||||
int16_t IncDepth() { return ++fDepth; }
|
||||
@ -147,7 +147,7 @@ public:
|
||||
// Export only: Optimize all my stinkin' drawables
|
||||
virtual void OptimizeDrawables( void );
|
||||
|
||||
void SetFilterGenericsOnly(hsBool b) { fFilterGenerics = b; }
|
||||
void SetFilterGenericsOnly(bool b) { fFilterGenerics = b; }
|
||||
|
||||
const hsTArray<plDrawable*>& GetDrawPool() const { return fDrawPool; }
|
||||
};
|
||||
|
@ -59,7 +59,7 @@ plVisMgr::~plVisMgr()
|
||||
{
|
||||
}
|
||||
|
||||
hsBool plVisMgr::MsgReceive(plMessage* msg)
|
||||
bool plVisMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
|
||||
return hsKeyedObject::MsgReceive(msg);
|
||||
@ -76,7 +76,7 @@ void plVisMgr::Write(hsStream* s, hsResMgr* mgr)
|
||||
hsKeyedObject::Write(s, mgr);
|
||||
}
|
||||
|
||||
void plVisMgr::Register(plVisRegion* reg, hsBool bnot)
|
||||
void plVisMgr::Register(plVisRegion* reg, bool bnot)
|
||||
{
|
||||
// This should happen pretty infrequently, or
|
||||
// I wouldn't be doing it so cloth-headed-ly.
|
||||
@ -100,7 +100,7 @@ void plVisMgr::Register(plVisRegion* reg, hsBool bnot)
|
||||
hsAssert(false, "Infinite bitvector has all bits set?");
|
||||
}
|
||||
|
||||
void plVisMgr::UnRegister(plVisRegion* reg, hsBool bnot)
|
||||
void plVisMgr::UnRegister(plVisRegion* reg, bool bnot)
|
||||
{
|
||||
// Mark our index for recycling
|
||||
hsBitVector& indices= bnot ? fIdxNot : fIdxSet;
|
||||
@ -173,27 +173,27 @@ void plVisMgr::DisableNormal()
|
||||
fOffBitNot.Set(fMaxNot);
|
||||
}
|
||||
|
||||
void plVisMgr::EnableVisSet(int idx, hsBool isNot)
|
||||
void plVisMgr::EnableVisSet(int idx, bool isNot)
|
||||
{
|
||||
hsBitVector& offs = isNot ? fOffBitNot : fOffBitSet;
|
||||
|
||||
offs.ClearBit(idx);
|
||||
}
|
||||
|
||||
void plVisMgr::EnableVisSets(const hsBitVector& enabled, hsBool isNot)
|
||||
void plVisMgr::EnableVisSets(const hsBitVector& enabled, bool isNot)
|
||||
{
|
||||
hsBitVector& offs = isNot ? fOffBitNot : fOffBitSet;
|
||||
offs -= enabled;
|
||||
}
|
||||
|
||||
void plVisMgr::ForceVisSet(int idx, hsBool isNot)
|
||||
void plVisMgr::ForceVisSet(int idx, bool isNot)
|
||||
{
|
||||
EnableVisSet(idx, isNot);
|
||||
hsBitVector& ons = isNot ? fOnBitNot : fOnBitSet;
|
||||
ons.SetBit(idx);
|
||||
}
|
||||
|
||||
void plVisMgr::ForceVisSets(const hsBitVector& enabled, hsBool isNot)
|
||||
void plVisMgr::ForceVisSets(const hsBitVector& enabled, bool isNot)
|
||||
{
|
||||
EnableVisSets(enabled, isNot);
|
||||
hsBitVector& ons = isNot ? fOnBitNot : fOnBitSet;
|
||||
|
@ -93,13 +93,13 @@ public:
|
||||
CLASSNAME_REGISTER( plVisMgr );
|
||||
GETINTERFACE_ANY( plVisMgr, hsKeyedObject );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
void Register(plVisRegion* reg, hsBool bnot);
|
||||
void UnRegister(plVisRegion* reg, hsBool bnot);
|
||||
void Register(plVisRegion* reg, bool bnot);
|
||||
void UnRegister(plVisRegion* reg, bool bnot);
|
||||
|
||||
void Eval(const hsPoint3& pos);
|
||||
|
||||
@ -115,13 +115,13 @@ public:
|
||||
|
||||
// Enable drawing of selected sets. Either one index at a time or pass in a bitvector.
|
||||
// The regions are just enabled, they can still say no.
|
||||
void EnableVisSet(int idx, hsBool isNot = false);
|
||||
void EnableVisSets(const hsBitVector& enabled, hsBool isNot = false);
|
||||
void EnableVisSet(int idx, bool isNot = false);
|
||||
void EnableVisSets(const hsBitVector& enabled, bool isNot = false);
|
||||
|
||||
// Make specified regions say yes, no matter where the camera is.
|
||||
// This will implicitly call EnableVisSet for you.
|
||||
void ForceVisSet(int idx, hsBool isNot = false);
|
||||
void ForceVisSets(const hsBitVector& enabled, hsBool isNot = false);
|
||||
void ForceVisSet(int idx, bool isNot = false);
|
||||
void ForceVisSets(const hsBitVector& enabled, bool isNot = false);
|
||||
};
|
||||
|
||||
class plGlobalVisMgr
|
||||
|
@ -67,7 +67,7 @@ plVisRegion::~plVisRegion()
|
||||
fMgr->UnRegister(this, GetProperty(kIsNot));
|
||||
}
|
||||
|
||||
hsBool plVisRegion::Eval(const hsPoint3& pos) const
|
||||
bool plVisRegion::Eval(const hsPoint3& pos) const
|
||||
{
|
||||
if( GetProperty(kDisable) )
|
||||
return false;
|
||||
@ -78,7 +78,7 @@ hsBool plVisRegion::Eval(const hsPoint3& pos) const
|
||||
return fRegion->IsInside(pos);
|
||||
}
|
||||
|
||||
hsBool plVisRegion::MsgReceive(plMessage* msg)
|
||||
bool plVisRegion::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plEnableMsg* enaMsg = plEnableMsg::ConvertNoRef(msg);
|
||||
if( enaMsg )
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
|
||||
virtual int32_t GetNumProperties() const { return 3; } // This is stupid.
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
// Set transform doesn't do anything, because the regions themselves are
|
||||
// object interfaces, so they'll move when their sceneobjects move.
|
||||
@ -95,15 +95,15 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
hsBool Eval(const hsPoint3& pos) const;
|
||||
bool Eval(const hsPoint3& pos) const;
|
||||
|
||||
int32_t GetIndex() const { return fIndex; }
|
||||
|
||||
hsBool Registered() const { return GetIndex() > 0; }
|
||||
bool Registered() const { return GetIndex() > 0; }
|
||||
|
||||
hsBool IsNot() const { return GetProperty(kIsNot); }
|
||||
hsBool ReplaceNormal() const { return GetProperty(kReplaceNormal); }
|
||||
hsBool DisableNormal() const { return GetProperty(kDisableNormal); }
|
||||
bool IsNot() const { return GetProperty(kIsNot); }
|
||||
bool ReplaceNormal() const { return GetProperty(kReplaceNormal); }
|
||||
bool DisableNormal() const { return GetProperty(kDisableNormal); }
|
||||
};
|
||||
|
||||
#endif // plVisRegion_inc
|
||||
|
Reference in New Issue
Block a user