mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Obliterate hsBool
This commit is contained in:
@ -132,7 +132,7 @@ void plAccessGeometry::SetTheIntance(plAccessGeometry* i)
|
||||
// The first couple of these just interpret between the SceneObjects we like to
|
||||
// think about and the clumps of geometry that comprise each one.
|
||||
|
||||
void plAccessGeometry::OpenRO(const plDrawInterface* di, hsTArray<plAccessSpan>& accs, hsBool useSnap) const
|
||||
void plAccessGeometry::OpenRO(const plDrawInterface* di, hsTArray<plAccessSpan>& accs, bool useSnap) const
|
||||
{
|
||||
int numGot = 0;
|
||||
accs.SetCount(di->GetNumDrawables());
|
||||
@ -160,7 +160,7 @@ void plAccessGeometry::OpenRO(const plDrawInterface* di, hsTArray<plAccessSpan>&
|
||||
|
||||
}
|
||||
|
||||
void plAccessGeometry::OpenRW(const plDrawInterface* di, hsTArray<plAccessSpan>& accs, hsBool idxToo) const
|
||||
void plAccessGeometry::OpenRW(const plDrawInterface* di, hsTArray<plAccessSpan>& accs, bool idxToo) const
|
||||
{
|
||||
int numGot = 0;
|
||||
accs.Expand(di->GetNumDrawables());
|
||||
@ -271,7 +271,7 @@ void plAccessGeometry::Close(plAccessSpan& acc) const
|
||||
fPipe->CloseAccess(acc);
|
||||
}
|
||||
|
||||
void plAccessGeometry::IOpen(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, hsBool useSnap, hsBool readOnly, hsBool idxToo) const
|
||||
void plAccessGeometry::IOpen(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, bool useSnap, bool readOnly, bool idxToo) const
|
||||
{
|
||||
acc.SetType(plAccessSpan::kUndefined);
|
||||
|
||||
@ -304,12 +304,12 @@ void plAccessGeometry::IOpen(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc,
|
||||
}
|
||||
}
|
||||
|
||||
void plAccessGeometry::OpenRO(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, hsBool useSnap) const
|
||||
void plAccessGeometry::OpenRO(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, bool useSnap) const
|
||||
{
|
||||
IOpen(d, spanIdx, acc, useSnap, true);
|
||||
}
|
||||
|
||||
void plAccessGeometry::OpenRW(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, hsBool idxToo) const
|
||||
void plAccessGeometry::OpenRW(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, bool idxToo) const
|
||||
{
|
||||
IOpen(drawable, spanIdx, acc, false, false, idxToo);
|
||||
|
||||
@ -399,7 +399,7 @@ void plAccessGeometry::IAccessSpanFromSourceSpan(plAccessSpan& dst, const plGeom
|
||||
acc.fVtxDeviceRef = nil;
|
||||
}
|
||||
|
||||
void plAccessGeometry::IAccessSpanFromSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* span, hsBool useSnap, hsBool readOnly) const
|
||||
void plAccessGeometry::IAccessSpanFromSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* span, bool useSnap, bool readOnly) const
|
||||
{
|
||||
dst.SetType(plAccessSpan::kUndefined);
|
||||
dst.SetSource(const_cast<plSpan*> (span));
|
||||
@ -426,7 +426,7 @@ void plAccessGeometry::IAccessSpanFromSnap(plAccessSpan& dst, plDrawableSpans* d
|
||||
}
|
||||
}
|
||||
|
||||
void plAccessGeometry::IAccessSpanFromVertexSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plVertexSpan* span, hsBool readOnly) const
|
||||
void plAccessGeometry::IAccessSpanFromVertexSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plVertexSpan* span, bool readOnly) const
|
||||
{
|
||||
dst.SetMaterial(drawable->GetMaterial(span->fMaterialIdx));
|
||||
|
||||
@ -436,9 +436,9 @@ void plAccessGeometry::IAccessSpanFromVertexSpan(plAccessSpan& dst, plDrawableSp
|
||||
|
||||
//#define MF_TOSSER
|
||||
#ifndef MF_TOSSER
|
||||
plConst(hsBool) useDev(false);
|
||||
plConst(bool) useDev(false);
|
||||
#else // MF_TOSSER
|
||||
plConst(hsBool) useDev(true);
|
||||
plConst(bool) useDev(true);
|
||||
#endif // MF_TOSSER
|
||||
if( useDev && !drawable->GetNativeProperty(plDrawable::kPropVolatile) && grp->GetVertexBufferRef(span->fVBufferIdx) )
|
||||
{
|
||||
@ -573,7 +573,7 @@ void plAccessGeometry::IAccessConnectivity(plAccessSpan& dst, plDrawableSpans* d
|
||||
|
||||
}
|
||||
|
||||
void plAccessGeometry::IAccessSpanFromIcicle(plAccessSpan& dst, plDrawableSpans* drawable, const plIcicle* span, hsBool readOnly) const
|
||||
void plAccessGeometry::IAccessSpanFromIcicle(plAccessSpan& dst, plDrawableSpans* drawable, const plIcicle* span, bool readOnly) const
|
||||
{
|
||||
dst.SetType(plAccessSpan::kTri);
|
||||
|
||||
@ -588,7 +588,7 @@ void plAccessGeometry::IAccessSpanFromIcicle(plAccessSpan& dst, plDrawableSpans*
|
||||
acc.fIdxDeviceRef = nil;
|
||||
}
|
||||
|
||||
void plAccessGeometry::IAccessSpanFromParticle(plAccessSpan& dst, plDrawableSpans* drawable, const plParticleSpan* span, hsBool readOnly) const
|
||||
void plAccessGeometry::IAccessSpanFromParticle(plAccessSpan& dst, plDrawableSpans* drawable, const plParticleSpan* span, bool readOnly) const
|
||||
{
|
||||
hsAssert(false, "Aint got to it yet");
|
||||
// dst.SetType(plAccessSpan::kParty);
|
||||
|
@ -108,8 +108,8 @@ public:
|
||||
// then take the snapshot if you are going to be performing more modifications.
|
||||
// In ALL MODIFICATION CASES, if the modified data is paged out, and the original paged back in, you will
|
||||
// need to perform your operation again - your modifications aren't saved anywhere.
|
||||
void OpenRO(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, hsBool useSnapShot=true) const;
|
||||
void OpenRW(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, hsBool idxToo=false) const;
|
||||
void OpenRO(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, bool useSnapShot=true) const;
|
||||
void OpenRW(plDrawable* drawable, uint32_t spanIdx, plAccessSpan& acc, bool idxToo=false) const;
|
||||
|
||||
// What do we need to close up here?
|
||||
void Close(plAccessSpan& acc) const;
|
||||
@ -126,8 +126,8 @@ public:
|
||||
// as likely that they will have different underlying formats (number of UVs, etc.).
|
||||
// Again, if you are using the iterators supplied, you probably don't care, but sometimes
|
||||
// you will (like if you are messing with the UVs).
|
||||
void OpenRO(const plDrawInterface* di, hsTArray<plAccessSpan>& accs, hsBool useSnapShot=true) const;
|
||||
void OpenRW(const plDrawInterface* di, hsTArray<plAccessSpan>& accs, hsBool idxToo=false) const;
|
||||
void OpenRO(const plDrawInterface* di, hsTArray<plAccessSpan>& accs, bool useSnapShot=true) const;
|
||||
void OpenRW(const plDrawInterface* di, hsTArray<plAccessSpan>& accs, bool idxToo=false) const;
|
||||
|
||||
void Close(hsTArray<plAccessSpan>& accs) const;
|
||||
|
||||
@ -162,14 +162,14 @@ public:
|
||||
|
||||
protected:
|
||||
void IAccessSpanFromSourceSpan(plAccessSpan& dst, const plGeometrySpan* src) const;
|
||||
void IAccessSpanFromSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* span, hsBool useSnap, hsBool readOnly) const;
|
||||
void IAccessSpanFromVertexSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plVertexSpan* span, hsBool readOnly) const;
|
||||
void IAccessSpanFromSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* span, bool useSnap, bool readOnly) const;
|
||||
void IAccessSpanFromVertexSpan(plAccessSpan& dst, plDrawableSpans* drawable, const plVertexSpan* span, bool readOnly) const;
|
||||
void IAccessConnectivity(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* src) const;
|
||||
void IAccessSpanFromIcicle(plAccessSpan& dst, plDrawableSpans* drawable, const plIcicle* span, hsBool readOnly) const;
|
||||
void IAccessSpanFromParticle(plAccessSpan& dst, plDrawableSpans* drawable, const plParticleSpan* span, hsBool readOnly) const;
|
||||
void IAccessSpanFromIcicle(plAccessSpan& dst, plDrawableSpans* drawable, const plIcicle* span, bool readOnly) const;
|
||||
void IAccessSpanFromParticle(plAccessSpan& dst, plDrawableSpans* drawable, const plParticleSpan* span, bool readOnly) const;
|
||||
void IAccessSpanFromSnap(plAccessSpan& dst, plDrawableSpans* drawable, const plSpan* src) const;
|
||||
|
||||
void IOpen(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, hsBool useSnap, hsBool readOnly, hsBool idxToo=true) const;
|
||||
void IOpen(plDrawable* d, uint32_t spanIdx, plAccessSpan& acc, bool useSnap, bool readOnly, bool idxToo=true) const;
|
||||
};
|
||||
|
||||
#endif // plAccessGeometry_inc
|
||||
|
@ -97,9 +97,9 @@ public:
|
||||
void SetType(AccessType t) { fType = t; }
|
||||
AccessType GetType() const { return fType; }
|
||||
|
||||
hsBool HasAccessTri() const { return fType == kTri; }
|
||||
hsBool HasAccessParty() const { return fType == kParty; }
|
||||
hsBool HasAccessVtx() const { return fType != kUndefined; }
|
||||
bool HasAccessTri() const { return fType == kTri; }
|
||||
bool HasAccessParty() const { return fType == kParty; }
|
||||
bool HasAccessVtx() const { return fType != kUndefined; }
|
||||
|
||||
plAccessTriSpan& AccessTri() { hsAssert(fType == kTri, "Cross type access"); return fAccess.fAccessTri; }
|
||||
plAccessPartySpan& AccessParty() { hsAssert(fType == kParty, "Cross type access"); return fAccess.fAccessParty; }
|
||||
@ -118,7 +118,7 @@ public:
|
||||
void SetLocalBounds(const hsBounds3Ext& bnd) { *fWorldBounds = *fLocalBounds = bnd; fWorldBounds->Transform(fLocalToWorld); }
|
||||
void SetWorldBounds(const hsBounds3Ext& wBnd) { *fWorldBounds = wBnd; }
|
||||
|
||||
hsBool HasWaterHeight() const { return nil != fWaterHeight; }
|
||||
bool HasWaterHeight() const { return nil != fWaterHeight; }
|
||||
float GetWaterHeight() const { hsAssert(HasWaterHeight(), "Check before asking"); return *fWaterHeight; }
|
||||
};
|
||||
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
void Begin();
|
||||
void Advance();
|
||||
void SetTri(int i);
|
||||
hsBool More() const;
|
||||
bool More() const;
|
||||
|
||||
uint32_t NumTris() const { return fAccess->fNumTris; }
|
||||
|
||||
@ -121,7 +121,7 @@ inline void plAccTriIterator::SetTri(int i)
|
||||
fCurrIdx = fAccess->fTris + i * 3;
|
||||
}
|
||||
|
||||
inline hsBool plAccTriIterator::More() const
|
||||
inline bool plAccTriIterator::More() const
|
||||
{
|
||||
return fCurrIdx < fEndIdx;
|
||||
}
|
||||
|
@ -114,16 +114,16 @@ public:
|
||||
// QUERY SECTION
|
||||
// Queries on how much of what we got.
|
||||
uint32_t VertCount() const { return fNumVerts; }
|
||||
hsBool HasChannel(Channel chan) const { return fStrides[chan] > 0; }
|
||||
hsBool HasPositions() const { return HasChannel(kPosition); }
|
||||
hsBool HasWeights() const { return HasChannel(kWeight); }
|
||||
bool HasChannel(Channel chan) const { return fStrides[chan] > 0; }
|
||||
bool HasPositions() const { return HasChannel(kPosition); }
|
||||
bool HasWeights() const { return HasChannel(kWeight); }
|
||||
int NumWeights() const { return fNumWeights; }
|
||||
hsBool HasWgtIndex() const { return HasChannel(kWgtIndex); }
|
||||
hsBool HasNormals() const { return HasChannel(kNormal); }
|
||||
hsBool HasDiffuse() const { return HasChannel(kDiffuse); }
|
||||
hsBool HasSpecular() const { return HasChannel(kSpecular); }
|
||||
hsBool HasUVWs() const { return HasChannel(kUVW); }
|
||||
hsBool HasUVWs(int n) { return HasChannel(kUVW) && (n <= fNumUVWsPerVert); }
|
||||
bool HasWgtIndex() const { return HasChannel(kWgtIndex); }
|
||||
bool HasNormals() const { return HasChannel(kNormal); }
|
||||
bool HasDiffuse() const { return HasChannel(kDiffuse); }
|
||||
bool HasSpecular() const { return HasChannel(kSpecular); }
|
||||
bool HasUVWs() const { return HasChannel(kUVW); }
|
||||
bool HasUVWs(int n) { return HasChannel(kUVW) && (n <= fNumUVWsPerVert); }
|
||||
int NumUVWs() const { return fNumUVWsPerVert; }
|
||||
|
||||
//////////////////////////////////
|
||||
@ -246,7 +246,7 @@ public:
|
||||
|
||||
void Begin() { fValueByte = fAccess->fChannels[fChan]; }
|
||||
void Advance() { fValueByte += fAccess->fStrides[fChan]; }
|
||||
hsBool More() const { return fValueByte < fValueEnd; }
|
||||
bool More() const { return fValueByte < fValueEnd; }
|
||||
};
|
||||
|
||||
class plAccPositionIterator
|
||||
@ -270,7 +270,7 @@ public:
|
||||
|
||||
void Begin() { fPosition.Begin(); }
|
||||
void Advance() { fPosition.Advance(); }
|
||||
hsBool More() const { return fPosition.More(); }
|
||||
bool More() const { return fPosition.More(); }
|
||||
};
|
||||
|
||||
class plAccPosNormIterator
|
||||
@ -297,7 +297,7 @@ public:
|
||||
|
||||
void Begin() { fPosition.Begin(); fNormal.Begin(); }
|
||||
void Advance() { fPosition.Advance(); fNormal.Advance(); }
|
||||
hsBool More() const { return fPosition.More(); }
|
||||
bool More() const { return fPosition.More(); }
|
||||
};
|
||||
|
||||
class plAccPosNormUVWIterator
|
||||
@ -328,7 +328,7 @@ public:
|
||||
|
||||
void Begin() { fPosition.Begin(); fNormal.Begin(); fUVW.Begin(); }
|
||||
void Advance() { fPosition.Advance(); fNormal.Advance(); fUVW.Advance(); }
|
||||
hsBool More() const { return fPosition.More(); }
|
||||
bool More() const { return fPosition.More(); }
|
||||
};
|
||||
|
||||
class plAccUVWIterator
|
||||
@ -350,7 +350,7 @@ public:
|
||||
|
||||
void Begin() { fUVW.Begin(); }
|
||||
void Advance() { fUVW.Advance(); }
|
||||
hsBool More() const { return fUVW.More(); }
|
||||
bool More() const { return fUVW.More(); }
|
||||
};
|
||||
|
||||
class plAccDiffuseIterator
|
||||
@ -373,7 +373,7 @@ public:
|
||||
|
||||
void Begin() { fDiffuse.Begin(); }
|
||||
void Advance() { fDiffuse.Advance(); }
|
||||
hsBool More() const { return fDiffuse.More(); }
|
||||
bool More() const { return fDiffuse.More(); }
|
||||
};
|
||||
|
||||
class plAccDiffSpecIterator
|
||||
@ -402,7 +402,7 @@ public:
|
||||
|
||||
void Begin() { fDiffuse.Begin(); fSpecular.Begin(); }
|
||||
void Advance() { fDiffuse.Advance(); fSpecular.Advance(); }
|
||||
hsBool More() const { return fDiffuse.More(); }
|
||||
bool More() const { return fDiffuse.More(); }
|
||||
};
|
||||
|
||||
|
||||
@ -456,7 +456,7 @@ public:
|
||||
|
||||
void Begin() { fPosition.Begin(); fWeight.Begin(); fNormal.Begin(); fDiffuse.Begin(); fSpecular.Begin(); fUVW.Begin(); }
|
||||
void Advance() { fPosition.Advance(); fWeight.Advance(); fNormal.Advance(); fDiffuse.Begin(); fSpecular.Begin(); fUVW.Advance(); }
|
||||
hsBool More() const { return fPosition.More(); }
|
||||
bool More() const { return fPosition.More(); }
|
||||
};
|
||||
|
||||
|
||||
|
@ -90,7 +90,7 @@ void plActivePrintShape::AddDecalKey(const plKey& k)
|
||||
fDecalMgrs.Append(k);
|
||||
}
|
||||
|
||||
hsBool plActivePrintShape::MsgReceive(plMessage* msg)
|
||||
bool plActivePrintShape::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg);
|
||||
if( eval )
|
||||
@ -101,7 +101,7 @@ hsBool plActivePrintShape::MsgReceive(plMessage* msg)
|
||||
return plPrintShape::MsgReceive(msg);
|
||||
}
|
||||
|
||||
hsBool plActivePrintShape::INotify()
|
||||
bool plActivePrintShape::INotify()
|
||||
{
|
||||
if( !fShapeMsg )
|
||||
ISetupShapeMsg();
|
||||
|
@ -55,7 +55,7 @@ protected:
|
||||
plRippleShapeMsg* fShapeMsg;
|
||||
|
||||
plRippleShapeMsg* ISetupShapeMsg();
|
||||
hsBool INotify();
|
||||
bool INotify();
|
||||
|
||||
public:
|
||||
plActivePrintShape();
|
||||
@ -67,7 +67,7 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
// Export construction
|
||||
void AddDecalKey(const plKey& k);
|
||||
|
@ -176,7 +176,7 @@ void plClusterGroup::ISendToSelf(RefType t, hsKeyedObject* ref)
|
||||
hsgResMgr::ResMgr()->SendRef(ref->GetKey(), refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
hsBool plClusterGroup::IAddVisRegion(plVisRegion* reg)
|
||||
bool plClusterGroup::IAddVisRegion(plVisRegion* reg)
|
||||
{
|
||||
if( reg )
|
||||
{
|
||||
@ -197,7 +197,7 @@ hsBool plClusterGroup::IAddVisRegion(plVisRegion* reg)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plClusterGroup::IRemoveVisRegion(plVisRegion* reg)
|
||||
bool plClusterGroup::IRemoveVisRegion(plVisRegion* reg)
|
||||
{
|
||||
if( reg )
|
||||
{
|
||||
@ -214,7 +214,7 @@ hsBool plClusterGroup::IRemoveVisRegion(plVisRegion* reg)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plClusterGroup::IAddLight(plLightInfo* li)
|
||||
bool plClusterGroup::IAddLight(plLightInfo* li)
|
||||
{
|
||||
int idx = fLights.Find(li);
|
||||
if( fLights.kMissingIndex == idx )
|
||||
@ -224,7 +224,7 @@ hsBool plClusterGroup::IAddLight(plLightInfo* li)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plClusterGroup::IRemoveLight(plLightInfo* li)
|
||||
bool plClusterGroup::IRemoveLight(plLightInfo* li)
|
||||
{
|
||||
int idx = fLights.Find(li);
|
||||
if( fLights.kMissingIndex != idx )
|
||||
@ -234,7 +234,7 @@ hsBool plClusterGroup::IRemoveLight(plLightInfo* li)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plClusterGroup::IOnReceive(plGenRefMsg* ref)
|
||||
bool plClusterGroup::IOnReceive(plGenRefMsg* ref)
|
||||
{
|
||||
switch( ref->fType )
|
||||
{
|
||||
@ -249,7 +249,7 @@ hsBool plClusterGroup::IOnReceive(plGenRefMsg* ref)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plClusterGroup::IOnRemove(plGenRefMsg* ref)
|
||||
bool plClusterGroup::IOnRemove(plGenRefMsg* ref)
|
||||
{
|
||||
int idx = -1;
|
||||
switch( ref->fType )
|
||||
@ -265,7 +265,7 @@ hsBool plClusterGroup::IOnRemove(plGenRefMsg* ref)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plClusterGroup::IOnRef(plGenRefMsg* ref)
|
||||
bool plClusterGroup::IOnRef(plGenRefMsg* ref)
|
||||
{
|
||||
if( ref->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) )
|
||||
{
|
||||
@ -275,7 +275,7 @@ hsBool plClusterGroup::IOnRef(plGenRefMsg* ref)
|
||||
return IOnRemove(ref);
|
||||
}
|
||||
|
||||
hsBool plClusterGroup::MsgReceive(plMessage* msg)
|
||||
bool plClusterGroup::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg* ref = plGenRefMsg::ConvertNoRef(msg);
|
||||
if( ref )
|
||||
|
@ -108,13 +108,13 @@ protected:
|
||||
|
||||
plRenderLevel fRenderLevel;
|
||||
|
||||
hsBool IAddVisRegion(plVisRegion* reg);
|
||||
hsBool IRemoveVisRegion(plVisRegion* reg);
|
||||
hsBool IAddLight(plLightInfo* li);
|
||||
hsBool IRemoveLight(plLightInfo* li);
|
||||
hsBool IOnRef(plGenRefMsg* ref);
|
||||
hsBool IOnRemove(plGenRefMsg* ref);
|
||||
hsBool IOnReceive(plGenRefMsg* ref);
|
||||
bool IAddVisRegion(plVisRegion* reg);
|
||||
bool IRemoveVisRegion(plVisRegion* reg);
|
||||
bool IAddLight(plLightInfo* li);
|
||||
bool IRemoveLight(plLightInfo* li);
|
||||
bool IOnRef(plGenRefMsg* ref);
|
||||
bool IOnRemove(plGenRefMsg* ref);
|
||||
bool IOnReceive(plGenRefMsg* ref);
|
||||
void ISetVisBits();
|
||||
void ISendToSelf(RefType t, hsKeyedObject* ref);
|
||||
|
||||
@ -132,7 +132,7 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
hsGMaterial* GetMaterial() const { return fMaterial; }
|
||||
const hsBitVector& GetVisSet() const { return fVisSet; }
|
||||
|
@ -77,7 +77,7 @@ void plCutter::Write(hsStream* stream, hsResMgr* mgr)
|
||||
}
|
||||
|
||||
|
||||
void plCutter::Set(const hsPoint3& pos, const hsVector3& dir, const hsVector3& out, hsBool flip)
|
||||
void plCutter::Set(const hsPoint3& pos, const hsVector3& dir, const hsVector3& out, bool flip)
|
||||
{
|
||||
hsVector3 du = dir % out;
|
||||
hsVector3 dv = out % du;
|
||||
@ -274,7 +274,7 @@ inline void plCutter::ICutoutVtxMidW(const plCutoutVtx& inVtx, const plCutoutVtx
|
||||
}
|
||||
|
||||
// IPolyClip
|
||||
hsBool plCutter::IPolyClip(hsTArray<plCutoutVtx>& poly, const hsPoint3 vPos[]) const
|
||||
bool plCutter::IPolyClip(hsTArray<plCutoutVtx>& poly, const hsPoint3 vPos[]) const
|
||||
{
|
||||
static hsTArray<plCutoutVtx> accum;
|
||||
accum.SetCount(0);
|
||||
@ -521,7 +521,7 @@ hsBool plCutter::IPolyClip(hsTArray<plCutoutVtx>& poly, const hsPoint3 vPos[]) c
|
||||
}
|
||||
|
||||
// IPolyClip
|
||||
hsBool plCutter::IFindHitPoint(const hsTArray<plCutoutVtx>& inPoly, plCutoutHit& hit) const
|
||||
bool plCutter::IFindHitPoint(const hsTArray<plCutoutVtx>& inPoly, plCutoutHit& hit) const
|
||||
{
|
||||
static hsTArray<plCutoutVtx> accum;
|
||||
static hsTArray<plCutoutVtx> poly;
|
||||
@ -682,17 +682,17 @@ hsBool plCutter::IFindHitPoint(const hsTArray<plCutoutVtx>& inPoly, plCutoutHit&
|
||||
}
|
||||
|
||||
|
||||
hsBool plCutter::FindHitPoints(const hsTArray<plCutoutPoly>& src, hsTArray<plCutoutHit>& hits) const
|
||||
bool plCutter::FindHitPoints(const hsTArray<plCutoutPoly>& src, hsTArray<plCutoutHit>& hits) const
|
||||
{
|
||||
hits.SetCount(0);
|
||||
|
||||
int iPoly;
|
||||
for( iPoly = 0; iPoly < src.GetCount(); iPoly++ )
|
||||
{
|
||||
hsBool loU = false;
|
||||
hsBool hiU = false;
|
||||
hsBool loV = false;
|
||||
hsBool hiV = false;
|
||||
bool loU = false;
|
||||
bool hiU = false;
|
||||
bool loV = false;
|
||||
bool hiV = false;
|
||||
|
||||
const plCutoutPoly& poly = src[iPoly];
|
||||
int iv;
|
||||
@ -721,7 +721,7 @@ hsBool plCutter::FindHitPoints(const hsTArray<plCutoutPoly>& src, hsTArray<plCut
|
||||
return hits.GetCount() > 0;
|
||||
}
|
||||
|
||||
hsBool plCutter::FindHitPointsConstHeight(const hsTArray<plCutoutPoly>& src, hsTArray<plCutoutHit>& hits, float height) const
|
||||
bool plCutter::FindHitPointsConstHeight(const hsTArray<plCutoutPoly>& src, hsTArray<plCutoutHit>& hits, float height) const
|
||||
{
|
||||
if( FindHitPoints(src, hits) )
|
||||
{
|
||||
@ -741,7 +741,7 @@ void plCutter::ICutoutTransformedConstHeight(plAccessSpan& src, hsTArray<plCutou
|
||||
hsMatrix44 l2wNorm;
|
||||
src.GetWorldToLocal().GetTranspose(&l2wNorm);
|
||||
|
||||
hsBool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha);
|
||||
bool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha);
|
||||
|
||||
plAccTriIterator tri(&src.AccessTri());
|
||||
// For each tri
|
||||
@ -781,7 +781,7 @@ void plCutter::ICutoutTransformed(plAccessSpan& src, hsTArray<plCutoutPoly>& dst
|
||||
hsMatrix44 l2wNorm;
|
||||
src.GetWorldToLocal().GetTranspose(&l2wNorm);
|
||||
|
||||
hsBool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha);
|
||||
bool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha);
|
||||
|
||||
plAccTriIterator tri(&src.AccessTri());
|
||||
// For each tri
|
||||
@ -817,7 +817,7 @@ void plCutter::ICutoutConstHeight(plAccessSpan& src, hsTArray<plCutoutPoly>& dst
|
||||
return;
|
||||
}
|
||||
|
||||
hsBool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha);
|
||||
bool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha);
|
||||
|
||||
plAccTriIterator tri(&src.AccessTri());
|
||||
// For each tri
|
||||
@ -865,7 +865,7 @@ void plCutter::Cutout(plAccessSpan& src, hsTArray<plCutoutPoly>& dst) const
|
||||
return;
|
||||
}
|
||||
|
||||
hsBool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha);
|
||||
bool baseHasAlpha = 0 != (src.GetMaterial()->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendAlpha);
|
||||
|
||||
plAccTriIterator tri(&src.AccessTri());
|
||||
// For each tri
|
||||
@ -893,7 +893,7 @@ void plCutter::Cutout(plAccessSpan& src, hsTArray<plCutoutPoly>& dst) const
|
||||
}
|
||||
}
|
||||
|
||||
void plCutter::IConstruct(hsTArray<plCutoutPoly>& dst, hsTArray<plCutoutVtx>& poly, hsBool baseHasAlpha) const
|
||||
void plCutter::IConstruct(hsTArray<plCutoutPoly>& dst, hsTArray<plCutoutVtx>& poly, bool baseHasAlpha) const
|
||||
{
|
||||
int iDst = dst.GetCount();
|
||||
dst.Push();
|
||||
@ -903,14 +903,14 @@ void plCutter::IConstruct(hsTArray<plCutoutPoly>& dst, hsTArray<plCutoutVtx>& po
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plCutter::CutoutGrid(int nWid, int nLen, plFlatGridMesh& grid) const
|
||||
bool plCutter::CutoutGrid(int nWid, int nLen, plFlatGridMesh& grid) const
|
||||
{
|
||||
hsVector3 halfU = fDirU * (fLengthU * fLengthU * 0.5f);
|
||||
hsVector3 halfV = fDirV * (fLengthV * fLengthV * 0.5f);
|
||||
return MakeGrid(nWid, nLen, fWorldBounds.GetCenter(), halfU, halfV, grid);
|
||||
}
|
||||
|
||||
hsBool plCutter::MakeGrid(int nWid, int nLen, const hsPoint3& center, const hsVector3& halfU, const hsVector3& halfV, plFlatGridMesh& grid)
|
||||
bool plCutter::MakeGrid(int nWid, int nLen, const hsPoint3& center, const hsVector3& halfU, const hsVector3& halfV, plFlatGridMesh& grid)
|
||||
{
|
||||
if( nWid < 3 )
|
||||
nWid = 3;
|
||||
@ -1040,8 +1040,8 @@ void TestCutter(const plKey& key, const hsVector3& size, const hsPoint3& pos)
|
||||
return;
|
||||
|
||||
static plDrawableSpans* drawable = nil;
|
||||
hsBool newDrawable = !drawable;
|
||||
hsBool haveNormal = true;
|
||||
bool newDrawable = !drawable;
|
||||
bool haveNormal = true;
|
||||
|
||||
hsTArray<uint32_t> retIndex;
|
||||
|
||||
@ -1226,7 +1226,7 @@ void TestCutter(const plKey& key, const hsVector3& size, const hsPoint3& pos)
|
||||
|
||||
}
|
||||
|
||||
void TestCutter2(const plKey& key, const hsVector3& size, const hsPoint3& pos, hsBool flip)
|
||||
void TestCutter2(const plKey& key, const hsVector3& size, const hsPoint3& pos, bool flip)
|
||||
{
|
||||
plCutter cutter;
|
||||
|
||||
@ -1246,8 +1246,8 @@ void TestCutter2(const plKey& key, const hsVector3& size, const hsPoint3& pos, h
|
||||
return;
|
||||
|
||||
static plDrawableSpans* drawable = nil;
|
||||
hsBool newDrawable = !drawable;
|
||||
hsBool haveNormal = true;
|
||||
bool newDrawable = !drawable;
|
||||
bool haveNormal = true;
|
||||
|
||||
hsTArray<uint32_t> retIndex;
|
||||
|
||||
|
@ -81,7 +81,7 @@ class plCutoutPoly
|
||||
public:
|
||||
hsTArray<plCutoutVtx> fVerts;
|
||||
|
||||
hsBool fBaseHasAlpha;
|
||||
bool fBaseHasAlpha;
|
||||
};
|
||||
|
||||
class plCutoutMiniVtx
|
||||
@ -121,8 +121,8 @@ protected:
|
||||
hsBounds3Ext fWorldBounds;
|
||||
plBoundsIsect fIsect;
|
||||
|
||||
void IConstruct(hsTArray<plCutoutPoly>& dst, hsTArray<plCutoutVtx>& poly, hsBool baseHasAlpha) const;
|
||||
hsBool IPolyClip(hsTArray<plCutoutVtx>& poly, const hsPoint3 vPos[]) const;
|
||||
void IConstruct(hsTArray<plCutoutPoly>& dst, hsTArray<plCutoutVtx>& poly, bool baseHasAlpha) const;
|
||||
bool IPolyClip(hsTArray<plCutoutVtx>& poly, const hsPoint3 vPos[]) const;
|
||||
|
||||
inline void ICutoutVtxHiU(const plCutoutVtx& inVtx, const plCutoutVtx& outVtx, plCutoutVtx& dst) const;
|
||||
inline void ICutoutVtxHiV(const plCutoutVtx& inVtx, const plCutoutVtx& outVtx, plCutoutVtx& dst) const;
|
||||
@ -134,7 +134,7 @@ protected:
|
||||
inline void ICutoutVtxMidU(const plCutoutVtx& inVtx, const plCutoutVtx& outVtx, plCutoutVtx& dst) const;
|
||||
inline void ICutoutVtxMidW(const plCutoutVtx& inVtx, const plCutoutVtx& outVtx, plCutoutVtx& dst) const;
|
||||
|
||||
hsBool IFindHitPoint(const hsTArray<plCutoutVtx>& inPoly, plCutoutHit& hit) const;
|
||||
bool IFindHitPoint(const hsTArray<plCutoutVtx>& inPoly, plCutoutHit& hit) const;
|
||||
|
||||
inline void ISetPosNorm(float parm, const plCutoutVtx& inVtx, const plCutoutVtx& outVtx, plCutoutVtx& dst) const;
|
||||
|
||||
@ -154,13 +154,13 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
hsBool FindHitPoints(const hsTArray<plCutoutPoly>& src, hsTArray<plCutoutHit>& hits) const;
|
||||
hsBool FindHitPointsConstHeight(const hsTArray<plCutoutPoly>& src, hsTArray<plCutoutHit>& hits, float height) const;
|
||||
bool FindHitPoints(const hsTArray<plCutoutPoly>& src, hsTArray<plCutoutHit>& hits) const;
|
||||
bool FindHitPointsConstHeight(const hsTArray<plCutoutPoly>& src, hsTArray<plCutoutHit>& hits, float height) const;
|
||||
|
||||
void Set(const hsPoint3& pos, const hsVector3& dir, const hsVector3& out, hsBool flip=false);
|
||||
void Set(const hsPoint3& pos, const hsVector3& dir, const hsVector3& out, bool flip=false);
|
||||
|
||||
void Cutout(plAccessSpan& src, hsTArray<plCutoutPoly>& dst) const;
|
||||
hsBool CutoutGrid(int nWid, int nLen, plFlatGridMesh& dst) const;
|
||||
bool CutoutGrid(int nWid, int nLen, plFlatGridMesh& dst) const;
|
||||
|
||||
void SetLength(const hsVector3& s) { fLengthU = s.fX; fLengthV = s.fY; fLengthW = s.fZ; }
|
||||
float GetLengthU() const { return fLengthU; }
|
||||
@ -171,7 +171,7 @@ public:
|
||||
plBoundsIsect& GetIsect() { return fIsect; }
|
||||
hsVector3 GetBackDir() const { return fBackDir; }
|
||||
|
||||
static hsBool MakeGrid(int nWid, int nLen, const hsPoint3& center, const hsVector3& halfU, const hsVector3& halfV, plFlatGridMesh& grid);
|
||||
static bool MakeGrid(int nWid, int nLen, const hsPoint3& center, const hsVector3& halfU, const hsVector3& halfV, plFlatGridMesh& grid);
|
||||
|
||||
};
|
||||
|
||||
|
@ -107,9 +107,9 @@ void plDrawableGenerator::IQuickShadeVerts( uint32_t count, hsVector3 *normal
|
||||
|
||||
void plDrawableGenerator::IFillSpan( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals,
|
||||
hsPoint3 *uvws, uint32_t uvwsPerVtx,
|
||||
hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor,
|
||||
hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor,
|
||||
uint32_t numIndices, uint16_t *indices,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended,
|
||||
plGeometrySpan* span )
|
||||
{
|
||||
hsTArray<hsVector3> myNormals;
|
||||
@ -196,11 +196,11 @@ void plDrawableGenerator::IFillSpan( uint32_t vertCount, hsPoint3 *positions, hs
|
||||
// data given. That data had better match the data the drawable was first filled
|
||||
// with (i.e. vertex/index count
|
||||
|
||||
hsBool plDrawableGenerator::RegenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals,
|
||||
bool plDrawableGenerator::RegenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals,
|
||||
hsPoint3 *uvws, uint32_t uvwsPerVtx,
|
||||
hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor,
|
||||
hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor,
|
||||
uint32_t numIndices, uint16_t *indices,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended,
|
||||
uint32_t diIndex, plDrawableSpans *destDraw )
|
||||
{
|
||||
plDISpanIndex spanList = destDraw->GetDISpans( diIndex );
|
||||
@ -236,9 +236,9 @@ hsBool plDrawableGenerator::RegenerateDrawable( uint32_t vertCount, hsPoint3 *po
|
||||
|
||||
plDrawableSpans *plDrawableGenerator::GenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals,
|
||||
hsPoint3 *uvws, uint32_t uvwsPerVtx,
|
||||
hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor,
|
||||
hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor,
|
||||
uint32_t numIndices, uint16_t *indices,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended,
|
||||
hsTArray<uint32_t> *retIndex, plDrawableSpans *toAddTo )
|
||||
{
|
||||
plDrawableSpans *newDraw;
|
||||
@ -286,7 +286,7 @@ plDrawableSpans *plDrawableGenerator::GenerateDrawable( uint32_t vertCount, hsPo
|
||||
//// GenerateSphericalDrawable ///////////////////////////////////////////////
|
||||
|
||||
plDrawableSpans *plDrawableGenerator::GenerateSphericalDrawable( const hsPoint3& pos, float radius, hsGMaterial *material,
|
||||
const hsMatrix44 &localToWorld, hsBool blended,
|
||||
const hsMatrix44 &localToWorld, bool blended,
|
||||
const hsColorRGBA* multColor,
|
||||
hsTArray<uint32_t> *retIndex, plDrawableSpans *toAddTo,
|
||||
float qualityScalar )
|
||||
@ -367,7 +367,7 @@ plDrawableSpans *plDrawableGenerator::GenerateSphericalDrawable( const hsPoi
|
||||
//// GenerateBoxDrawable /////////////////////////////////////////////////////
|
||||
|
||||
plDrawableSpans *plDrawableGenerator::GenerateBoxDrawable( float width, float height, float depth,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended,
|
||||
const hsColorRGBA* multColor,
|
||||
hsTArray<uint32_t> *retIndex, plDrawableSpans *toAddTo )
|
||||
{
|
||||
@ -390,7 +390,7 @@ plDrawableSpans *plDrawableGenerator::GenerateBoxDrawable( float width, floa
|
||||
#define CALC_NORMAL( nA, xVec, yVec, zVec ) { hsVector3 n = (xVec) + (yVec) + (zVec); n = -n; n.Normalize(); nA.Append( n ); }
|
||||
|
||||
plDrawableSpans *plDrawableGenerator::GenerateBoxDrawable( const hsPoint3 &corner, const hsVector3 &xVec, const hsVector3 &yVec, const hsVector3 &zVec,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended,
|
||||
const hsColorRGBA* multColor,
|
||||
hsTArray<uint32_t> *retIndex, plDrawableSpans *toAddTo )
|
||||
{
|
||||
@ -473,7 +473,7 @@ plDrawableSpans *plDrawableGenerator::GenerateBoxDrawable( const hsPoint3 &c
|
||||
//// GenerateBoundsDrawable //////////////////////////////////////////////////
|
||||
|
||||
plDrawableSpans *plDrawableGenerator::GenerateBoundsDrawable( hsBounds3Ext *bounds,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended,
|
||||
const hsColorRGBA* multColor,
|
||||
hsTArray<uint32_t> *retIndex, plDrawableSpans *toAddTo )
|
||||
{
|
||||
@ -537,7 +537,7 @@ plDrawableSpans *plDrawableGenerator::GenerateBoundsDrawable( hsBounds3Ext *
|
||||
//// GenerateConicalDrawable /////////////////////////////////////////////////
|
||||
|
||||
plDrawableSpans *plDrawableGenerator::GenerateConicalDrawable( float radius, float height, hsGMaterial *material,
|
||||
const hsMatrix44 &localToWorld, hsBool blended,
|
||||
const hsMatrix44 &localToWorld, bool blended,
|
||||
const hsColorRGBA* multColor,
|
||||
hsTArray<uint32_t> *retIndex, plDrawableSpans *toAddTo )
|
||||
{
|
||||
@ -555,7 +555,7 @@ plDrawableSpans *plDrawableGenerator::GenerateConicalDrawable( float radius,
|
||||
//// GenerateConicalDrawable /////////////////////////////////////////////////
|
||||
|
||||
plDrawableSpans *plDrawableGenerator::GenerateConicalDrawable( hsPoint3 &apex, hsVector3 &direction, float radius, hsGMaterial *material,
|
||||
const hsMatrix44 &localToWorld, hsBool blended,
|
||||
const hsMatrix44 &localToWorld, bool blended,
|
||||
const hsColorRGBA* multColor,
|
||||
hsTArray<uint32_t> *retIndex, plDrawableSpans *toAddTo )
|
||||
{
|
||||
@ -642,7 +642,7 @@ plDrawableSpans *plDrawableGenerator::GenerateConicalDrawable( hsPoint3 &ape
|
||||
//// GenerateAxesDrawable ////////////////////////////////////////////////////
|
||||
|
||||
plDrawableSpans *plDrawableGenerator::GenerateAxesDrawable( hsGMaterial *material,
|
||||
const hsMatrix44 &localToWorld, hsBool blended,
|
||||
const hsMatrix44 &localToWorld, bool blended,
|
||||
const hsColorRGBA* multColor,
|
||||
hsTArray<uint32_t> *retIndex, plDrawableSpans *toAddTo )
|
||||
{
|
||||
@ -713,7 +713,7 @@ plDrawableSpans *plDrawableGenerator::GenerateAxesDrawable( hsGMaterial *mat
|
||||
#define CALC_PNORMAL( nA, xVec, yVec ) { hsVector3 n = (xVec) % (yVec); n.Normalize(); nA.Append( n ); }
|
||||
|
||||
plDrawableSpans *plDrawableGenerator::GeneratePlanarDrawable( const hsPoint3 &corner, const hsVector3 &xVec, const hsVector3 &yVec,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended,
|
||||
const hsColorRGBA* multColor,
|
||||
hsTArray<uint32_t> *retIndex, plDrawableSpans *toAddTo )
|
||||
{
|
||||
|
@ -76,67 +76,67 @@ class plDrawableGenerator
|
||||
|
||||
// Refills a drawable previously created with GenerateDrawable with the new data. New data
|
||||
// must match previous data in counts.
|
||||
hsBool RegenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals,
|
||||
bool RegenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals,
|
||||
hsPoint3 *uvws, uint32_t uvwsPerVtx,
|
||||
hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor,
|
||||
hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor,
|
||||
uint32_t numIndices, uint16_t *indices,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended,
|
||||
uint32_t diIndex, plDrawableSpans *destDraw );
|
||||
|
||||
// Generates a drawable based on the vertex/index data given
|
||||
// uvws is an array vertCount*uvwsPerVtx long in order [uvw(s) for vtx0, uvw(s) for vtx1, ...], or is nil
|
||||
static plDrawableSpans *GenerateDrawable( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals,
|
||||
hsPoint3 *uvws, uint32_t uvwsPerVtx,
|
||||
hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor,
|
||||
hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor,
|
||||
uint32_t numIndices, uint16_t *indices,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended = false,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended = false,
|
||||
hsTArray<uint32_t> *retIndex = nil, plDrawableSpans *toAddTo = nil );
|
||||
|
||||
// Generates a spherical drawable
|
||||
static plDrawableSpans *GenerateSphericalDrawable( const hsPoint3& localPos, float radius, hsGMaterial *material,
|
||||
const hsMatrix44 &localToWorld, hsBool blended = false,
|
||||
const hsMatrix44 &localToWorld, bool blended = false,
|
||||
const hsColorRGBA* multColor = nil,
|
||||
hsTArray<uint32_t> *retIndex = nil, plDrawableSpans *toAddTo = nil,
|
||||
float qualityScalar = 1.f );
|
||||
|
||||
// Generates a rectangular drawable
|
||||
static plDrawableSpans *GenerateBoxDrawable( float width, float height, float depth,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended = false,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended = false,
|
||||
const hsColorRGBA* multColor = nil,
|
||||
hsTArray<uint32_t> *retIndex = nil, plDrawableSpans *toAddTo = nil );
|
||||
|
||||
// Generate a rectangular drawable based on a corner and three vectors
|
||||
static plDrawableSpans *GenerateBoxDrawable( const hsPoint3 &corner, const hsVector3 &xVec, const hsVector3 &yVec, const hsVector3 &zVec,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended = false,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended = false,
|
||||
const hsColorRGBA* multColor = nil,
|
||||
hsTArray<uint32_t> *retIndex = nil, plDrawableSpans *toAddTo = nil );
|
||||
// Generates a bounds-based drawable
|
||||
static plDrawableSpans *GenerateBoundsDrawable( hsBounds3Ext *bounds,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended = false,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended = false,
|
||||
const hsColorRGBA* multColor = nil,
|
||||
hsTArray<uint32_t> *retIndex = nil, plDrawableSpans *toAddTo = nil );
|
||||
|
||||
// Generates a conical drawable
|
||||
static plDrawableSpans *GenerateConicalDrawable( float radius, float height, hsGMaterial *material,
|
||||
const hsMatrix44 &localToWorld, hsBool blended = false,
|
||||
const hsMatrix44 &localToWorld, bool blended = false,
|
||||
const hsColorRGBA* multColor = nil,
|
||||
hsTArray<uint32_t> *retIndex = nil, plDrawableSpans *toAddTo = nil );
|
||||
|
||||
// Generates a general conical drawable based on a center and direction
|
||||
static plDrawableSpans *GenerateConicalDrawable( hsPoint3 &apex, hsVector3 &direction, float radius, hsGMaterial *material,
|
||||
const hsMatrix44 &localToWorld, hsBool blended = false,
|
||||
const hsMatrix44 &localToWorld, bool blended = false,
|
||||
const hsColorRGBA* multColor = nil,
|
||||
hsTArray<uint32_t> *retIndex = nil, plDrawableSpans *toAddTo = nil );
|
||||
|
||||
// Generates a drawable representing 3 axes
|
||||
static plDrawableSpans *GenerateAxesDrawable( hsGMaterial *material,
|
||||
const hsMatrix44 &localToWorld, hsBool blended = false,
|
||||
const hsMatrix44 &localToWorld, bool blended = false,
|
||||
const hsColorRGBA* multColor = nil,
|
||||
hsTArray<uint32_t> *retIndex = nil, plDrawableSpans *toAddTo = nil );
|
||||
|
||||
// Generate a planar drawable based on a corner and two vectors
|
||||
static plDrawableSpans *GeneratePlanarDrawable( const hsPoint3 &corner, const hsVector3 &xVec, const hsVector3 &yVec,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended = false,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended = false,
|
||||
const hsColorRGBA* multColor = nil,
|
||||
hsTArray<uint32_t> *retIndex = nil, plDrawableSpans *toAddTo = nil );
|
||||
|
||||
@ -155,9 +155,9 @@ class plDrawableGenerator
|
||||
// already in the SourceSpans.
|
||||
static void IFillSpan( uint32_t vertCount, hsPoint3 *positions, hsVector3 *normals,
|
||||
hsPoint3 *uvws, uint32_t uvwsPerVtx,
|
||||
hsColorRGBA *origColors, hsBool fauxShade, const hsColorRGBA* multColor,
|
||||
hsColorRGBA *origColors, bool fauxShade, const hsColorRGBA* multColor,
|
||||
uint32_t numIndices, uint16_t *indices,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, hsBool blended,
|
||||
hsGMaterial *material, const hsMatrix44 &localToWorld, bool blended,
|
||||
plGeometrySpan* span );
|
||||
|
||||
static hsColorRGBA fLiteColor;
|
||||
|
@ -261,7 +261,7 @@ void plDrawableSpans::PrepForRender( plPipeline *p )
|
||||
}
|
||||
}
|
||||
|
||||
void plDrawableSpans::SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* ref, hsBool on)
|
||||
void plDrawableSpans::SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* ref, bool on)
|
||||
{
|
||||
// Could actually do something here to neutralize bones, but we're not.
|
||||
// Main thing is that if it's Matrix Only, then the indices are into
|
||||
@ -272,7 +272,7 @@ void plDrawableSpans::SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* ref, hsBo
|
||||
plVisRegion* reg = plVisRegion::ConvertNoRef(ref);
|
||||
if( !reg )
|
||||
return;
|
||||
hsBool isNot = reg->GetProperty(plVisRegion::kIsNot);
|
||||
bool isNot = reg->GetProperty(plVisRegion::kIsNot);
|
||||
uint32_t visRegIndex = reg->GetIndex();
|
||||
|
||||
if( isNot )
|
||||
@ -400,7 +400,7 @@ void plDrawableSpans::IUpdateMatrixPaletteBoundsHack()
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plDrawableSpans::IBoundsInvalid(const hsBounds3Ext& bnd) const
|
||||
bool plDrawableSpans::IBoundsInvalid(const hsBounds3Ext& bnd) const
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < 3; i++ )
|
||||
@ -648,7 +648,7 @@ const hsMatrix44& plDrawableSpans::GetWorldToLocal( uint32_t span ) const
|
||||
|
||||
//// Set/GetNativeProperty ///////////////////////////////////////////////////
|
||||
|
||||
plDrawable& plDrawableSpans::SetNativeProperty( uint32_t index, int prop, hsBool on)
|
||||
plDrawable& plDrawableSpans::SetNativeProperty( uint32_t index, int prop, bool on)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -684,7 +684,7 @@ plDrawable& plDrawableSpans::SetNativeProperty( uint32_t index, int prop, hsBool
|
||||
return *this;
|
||||
}
|
||||
|
||||
hsBool plDrawableSpans::GetNativeProperty( uint32_t index, int prop ) const
|
||||
bool plDrawableSpans::GetNativeProperty( uint32_t index, int prop ) const
|
||||
{
|
||||
int i;
|
||||
uint32_t ret = false;
|
||||
@ -709,7 +709,7 @@ hsBool plDrawableSpans::GetNativeProperty( uint32_t index, int prop ) const
|
||||
return ret != 0;
|
||||
}
|
||||
|
||||
plDrawable& plDrawableSpans::SetSubType(uint32_t index, plSubDrawableType t, hsBool on)
|
||||
plDrawable& plDrawableSpans::SetSubType(uint32_t index, plSubDrawableType t, bool on)
|
||||
{
|
||||
if( uint32_t(-1) == index )
|
||||
{
|
||||
@ -770,7 +770,7 @@ uint32_t plDrawableSpans::GetSubType(uint32_t index) const
|
||||
//// IXlateSpanProps /////////////////////////////////////////////////////////
|
||||
// Never used yet--just here in case we ever need it
|
||||
|
||||
uint32_t plDrawableSpans::IXlateSpanProps( uint32_t props, hsBool xlateToSpan )
|
||||
uint32_t plDrawableSpans::IXlateSpanProps( uint32_t props, bool xlateToSpan )
|
||||
{
|
||||
uint32_t retProps = 0;
|
||||
|
||||
@ -796,7 +796,7 @@ uint32_t plDrawableSpans::IXlateSpanProps( uint32_t props, hsBool xlateToSpan )
|
||||
// flag taken in is from plDrawInterface, not our props flags. So we have to
|
||||
// translate...
|
||||
|
||||
plDrawable& plDrawableSpans::SetProperty( uint32_t index, int diProp, hsBool on )
|
||||
plDrawable& plDrawableSpans::SetProperty( uint32_t index, int diProp, bool on )
|
||||
{
|
||||
switch( diProp )
|
||||
{
|
||||
@ -809,7 +809,7 @@ plDrawable& plDrawableSpans::SetProperty( uint32_t index, int diProp, hsBool on
|
||||
return *this;
|
||||
}
|
||||
|
||||
hsBool plDrawableSpans::GetProperty( uint32_t index, int diProp ) const
|
||||
bool plDrawableSpans::GetProperty( uint32_t index, int diProp ) const
|
||||
{
|
||||
switch( diProp )
|
||||
{
|
||||
@ -822,7 +822,7 @@ hsBool plDrawableSpans::GetProperty( uint32_t index, int diProp ) const
|
||||
return false;
|
||||
}
|
||||
|
||||
plDrawable& plDrawableSpans::SetProperty( int prop, hsBool on )
|
||||
plDrawable& plDrawableSpans::SetProperty( int prop, bool on )
|
||||
{
|
||||
switch( prop )
|
||||
{
|
||||
@ -844,7 +844,7 @@ plDrawable& plDrawableSpans::SetProperty( int prop, hsBool on )
|
||||
return *this;
|
||||
}
|
||||
|
||||
hsBool plDrawableSpans::GetProperty( int prop ) const
|
||||
bool plDrawableSpans::GetProperty( int prop ) const
|
||||
{
|
||||
switch( prop )
|
||||
{
|
||||
@ -922,7 +922,7 @@ const hsBounds3Ext& plDrawableSpans::GetMaxWorldBounds( uint32_t index ) const
|
||||
void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr )
|
||||
{
|
||||
uint32_t i, j, count, count2;
|
||||
hsBool gotSkin = false;
|
||||
bool gotSkin = false;
|
||||
plGBufferGroup *group;
|
||||
plRefMsg *refMsg;
|
||||
|
||||
@ -1115,7 +1115,7 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr )
|
||||
|
||||
//// ITestMatForSpecularity //////////////////////////////////////////////////
|
||||
|
||||
hsBool plDrawableSpans::ITestMatForSpecularity( hsGMaterial *mat )
|
||||
bool plDrawableSpans::ITestMatForSpecularity( hsGMaterial *mat )
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1134,11 +1134,11 @@ hsBool plDrawableSpans::ITestMatForSpecularity( hsGMaterial *mat )
|
||||
plProfile_CreateTimer("MatrixPalleteHack", "RenderSetup", PalletteHack);
|
||||
//// MsgReceive //////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plDrawableSpans::MsgReceive( plMessage* msg )
|
||||
bool plDrawableSpans::MsgReceive( plMessage* msg )
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef( msg );
|
||||
int i;
|
||||
hsBool hasSpec;
|
||||
bool hasSpec;
|
||||
|
||||
|
||||
if( refMsg )
|
||||
@ -1396,7 +1396,7 @@ const plRenderLevel& plDrawableSpans::GetRenderLevel() const
|
||||
//// DoIMatch ////////////////////////////////////////////////////////////////
|
||||
// Called by the sceneNode to determine if we match the criteria
|
||||
|
||||
hsBool plDrawableSpans::DoIMatch( const plDrawableCriteria& crit )
|
||||
bool plDrawableSpans::DoIMatch( const plDrawableCriteria& crit )
|
||||
{
|
||||
if( crit.fCriteria ^ fCriteria )
|
||||
return false;
|
||||
@ -1507,7 +1507,7 @@ hsGMaterial* plDrawableSpans::GetSubMaterial(int index) const
|
||||
}
|
||||
|
||||
// return true if span invisible before minDist and/or after maxDist
|
||||
hsBool plDrawableSpans::GetSubVisDists(int index, float& minDist, float& maxDist) const
|
||||
bool plDrawableSpans::GetSubVisDists(int index, float& minDist, float& maxDist) const
|
||||
{
|
||||
return (minDist = fSpans[index]->GetMinDist()) < (maxDist = fSpans[index]->GetMaxDist());
|
||||
}
|
||||
@ -2240,7 +2240,7 @@ uint32_t plDrawableSpans::AppendDIMatrixSpans(int n)
|
||||
// and the transform of the object being skinned. In general, objects can only
|
||||
// share a palette set if they have been flattened into world space (the object's
|
||||
// transform is identity). Fortunately, this is a common case.
|
||||
uint32_t plDrawableSpans::FindBoneBaseMatrix(const hsTArray<hsMatrix44>& initL2B, hsBool searchAll) const
|
||||
uint32_t plDrawableSpans::FindBoneBaseMatrix(const hsTArray<hsMatrix44>& initL2B, bool searchAll) const
|
||||
{
|
||||
if (!searchAll)
|
||||
{
|
||||
@ -2334,8 +2334,8 @@ plDISpanIndex *plDrawableSpans::IFindDIIndices( uint32_t &index )
|
||||
// Note: AddDISpans() adds the spans to a list to be sorted, THEN put into
|
||||
// the buffers; this shoves them right in, bypassing the sorting altogether.
|
||||
|
||||
uint32_t plDrawableSpans::AppendDISpans( hsTArray<plGeometrySpan *> &spans, uint32_t index, hsBool clearSpansAfterAdd,
|
||||
hsBool doNotAddToSource, hsBool addToFront, int lod)
|
||||
uint32_t plDrawableSpans::AppendDISpans( hsTArray<plGeometrySpan *> &spans, uint32_t index, bool clearSpansAfterAdd,
|
||||
bool doNotAddToSource, bool addToFront, int lod)
|
||||
{
|
||||
hsAssert(spans.GetCount(), "Adding no spans? Blow me.");
|
||||
|
||||
@ -2370,7 +2370,7 @@ uint32_t plDrawableSpans::AppendDISpans( hsTArray<plGeometrySpan *> &spans, uin
|
||||
}
|
||||
insertionPoint = idx;
|
||||
}
|
||||
hsBool inserted = insertionPoint < fSpans.GetCount();
|
||||
bool inserted = insertionPoint < fSpans.GetCount();
|
||||
|
||||
/// Add the geometry spans to our list. Also add our internal span
|
||||
/// copies
|
||||
@ -2531,7 +2531,7 @@ void plDrawableSpans::ICheckToRemoveMaterial( uint32_t materialIdx )
|
||||
//// IConvertGeoSpanToVertexSpan /////////////////////////////////////////////
|
||||
// Helper function for the two vertex-based convert functions.
|
||||
|
||||
hsBool plDrawableSpans::IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, plVertexSpan *span, int lod, plVertexSpan *instancedParent)
|
||||
bool plDrawableSpans::IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, plVertexSpan *span, int lod, plVertexSpan *instancedParent)
|
||||
{
|
||||
hsBounds3Ext bounds;
|
||||
uint8_t groupIdx;
|
||||
@ -2583,11 +2583,11 @@ hsBool plDrawableSpans::IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, p
|
||||
fWorldBounds.Union( &bounds );
|
||||
span->fFogEnvironment = geoSpan->fFogEnviron;
|
||||
|
||||
hsBool vertsVol = false;
|
||||
bool vertsVol = false;
|
||||
if( fProps & kPropVolatile )
|
||||
vertsVol = true;
|
||||
|
||||
hsBool idxVol = false;
|
||||
bool idxVol = false;
|
||||
if( fProps & kPropSortFaces )
|
||||
idxVol = true;
|
||||
if( geoSpan->fProps & plGeometrySpan::kPartialSort )
|
||||
@ -2658,7 +2658,7 @@ hsBool plDrawableSpans::IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, p
|
||||
|
||||
//// IConvertGeoSpanToIcicle /////////////////////////////////////////////////
|
||||
|
||||
hsBool plDrawableSpans::IConvertGeoSpanToIcicle(plGeometrySpan *geoSpan, plIcicle *icicle, int lod, plIcicle *instancedParent)
|
||||
bool plDrawableSpans::IConvertGeoSpanToIcicle(plGeometrySpan *geoSpan, plIcicle *icicle, int lod, plIcicle *instancedParent)
|
||||
{
|
||||
uint32_t ibIndex, ibStart;
|
||||
|
||||
@ -3331,7 +3331,7 @@ void plDrawableSpans::UnPackCluster(plClusterGroup* cluster)
|
||||
|
||||
//// IFindBufferGroup ////////////////////////////////////////////////////////
|
||||
|
||||
uint8_t plDrawableSpans::IFindBufferGroup(uint8_t vtxFormat, uint32_t numVertsNeeded, int lod, hsBool vertVolatile, hsBool idxVolatile)
|
||||
uint8_t plDrawableSpans::IFindBufferGroup(uint8_t vtxFormat, uint32_t numVertsNeeded, int lod, bool vertVolatile, bool idxVolatile)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -3381,7 +3381,7 @@ hsBitVector const &plDrawableSpans::GetBlendingSpanVector( void ) const
|
||||
// Could just make GetBlendingSpanVector() non-const, but this way it's harder
|
||||
// for the end user, thus I'm hoping to discourage them from doing it too much.
|
||||
|
||||
void plDrawableSpans::SetBlendingSpanVectorBit( uint32_t bitNumber, hsBool on )
|
||||
void plDrawableSpans::SetBlendingSpanVectorBit( uint32_t bitNumber, bool on )
|
||||
{
|
||||
fFakeBlendingSpanVector.SetBit( bitNumber, on );
|
||||
}
|
||||
|
@ -100,8 +100,8 @@ public:
|
||||
uint8_t fFlags;
|
||||
hsTArray<uint32_t> fIndices;
|
||||
|
||||
hsBool IsMatrixOnly() const { return 0 != (fFlags & kMatrixOnly); }
|
||||
hsBool DontTransform() const { return 0 != ( fFlags & kDontTransformSpans ); }
|
||||
bool IsMatrixOnly() const { return 0 != (fFlags & kMatrixOnly); }
|
||||
bool DontTransform() const { return 0 != ( fFlags & kDontTransformSpans ); }
|
||||
void Append(uint32_t i) { fIndices.Append(i); }
|
||||
void Reset() { fFlags = kNone; fIndices.Reset(); }
|
||||
void SetCountAndZero(int c) { fIndices.SetCountAndZero(c); }
|
||||
@ -122,7 +122,7 @@ class plDrawableSpans : public plDrawable
|
||||
|
||||
uint32_t fType;
|
||||
|
||||
hsBool fReadyToRender;
|
||||
bool fReadyToRender;
|
||||
|
||||
hsBounds3Ext fLocalBounds;
|
||||
hsBounds3Ext fWorldBounds;
|
||||
@ -160,8 +160,8 @@ class plDrawableSpans : public plDrawable
|
||||
plRenderLevel fRenderLevel;
|
||||
plLoadMask fLoadMask;
|
||||
|
||||
hsBool fRegisteredForRecreate, fNeedCleanup;
|
||||
hsBool fRegisteredForRender;
|
||||
bool fRegisteredForRecreate, fNeedCleanup;
|
||||
bool fRegisteredForRender;
|
||||
|
||||
hsBitVector fParticleSpanVector;
|
||||
hsBitVector fBlendingSpanVector;
|
||||
@ -169,13 +169,13 @@ class plDrawableSpans : public plDrawable
|
||||
|
||||
plKey fSceneNode;
|
||||
|
||||
hsBool fSettingMatIdxLock;
|
||||
bool fSettingMatIdxLock;
|
||||
|
||||
uint32_t fSkinTime;
|
||||
|
||||
/// Export-only members
|
||||
hsTArray<plGeometrySpan *> fSourceSpans;
|
||||
hsBool fOptimized;
|
||||
bool fOptimized;
|
||||
|
||||
virtual void IQuickSpaceTree( void ) const;
|
||||
|
||||
@ -187,20 +187,20 @@ class plDrawableSpans : public plDrawable
|
||||
void IAdjustSortData( plGBufferTriangle *triList, uint32_t count, uint32_t threshhold, int32_t delta );
|
||||
|
||||
// The following two functions return true if they create a new span, false if it's just an instance
|
||||
hsBool IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, plVertexSpan *span, int lod, plVertexSpan *instancedParent );
|
||||
hsBool IConvertGeoSpanToIcicle( plGeometrySpan *geoSpan, plIcicle *icicle, int lod, plIcicle *instancedParent = nil );
|
||||
bool IConvertGeoSpanToVertexSpan( plGeometrySpan *geoSpan, plVertexSpan *span, int lod, plVertexSpan *instancedParent );
|
||||
bool IConvertGeoSpanToIcicle( plGeometrySpan *geoSpan, plIcicle *icicle, int lod, plIcicle *instancedParent = nil );
|
||||
|
||||
void IUpdateIcicleFromGeoSpan( plGeometrySpan *geoSpan, plIcicle *icicle );
|
||||
void IUpdateVertexSpanFromGeoSpan( plGeometrySpan *geoSpan, plVertexSpan *span );
|
||||
|
||||
uint32_t IXlateSpanProps( uint32_t props, hsBool xlateToSpan );
|
||||
uint32_t IXlateSpanProps( uint32_t props, bool xlateToSpan );
|
||||
|
||||
uint32_t IAddAMaterial( hsGMaterial *material );
|
||||
uint32_t IRefMaterial( uint32_t index );
|
||||
void ICheckToRemoveMaterial( uint32_t materialIdx );
|
||||
|
||||
// Annoying to need this, but necessary until materials can test for properties on any of their layers (might add in the future)
|
||||
hsBool ITestMatForSpecularity( hsGMaterial *mat );
|
||||
bool ITestMatForSpecularity( hsGMaterial *mat );
|
||||
|
||||
void IAssignMatIdxToSpan( plSpan *span, hsGMaterial *mtl );
|
||||
|
||||
@ -211,7 +211,7 @@ class plDrawableSpans : public plDrawable
|
||||
/// Bit vector build thingies
|
||||
virtual void IBuildVectors( void );
|
||||
|
||||
hsBool IBoundsInvalid(const hsBounds3Ext& bnd) const;
|
||||
bool IBoundsInvalid(const hsBounds3Ext& bnd) const;
|
||||
|
||||
/// EXPORT-ONLY FUNCTIONS
|
||||
// Packs the span indices
|
||||
@ -221,7 +221,7 @@ class plDrawableSpans : public plDrawable
|
||||
// Compare two spans for sorting
|
||||
short ICompareSpans( plGeometrySpan *span1, plGeometrySpan *span2 );
|
||||
// Find a buffer group of the given format (returns its index into fGroups)
|
||||
uint8_t IFindBufferGroup( uint8_t vtxFormat, uint32_t numVertsNeeded, int lod, hsBool vertVolatile, hsBool idxVolatile);
|
||||
uint8_t IFindBufferGroup( uint8_t vtxFormat, uint32_t numVertsNeeded, int lod, bool vertVolatile, bool idxVolatile);
|
||||
// Write a span to a stream
|
||||
void IWriteSpan( hsStream *s, plSpan *span );
|
||||
/// EXPORT-ONLY FUNCTIONS
|
||||
@ -245,19 +245,19 @@ class plDrawableSpans : public plDrawable
|
||||
virtual const hsMatrix44& GetLocalToWorld( uint32_t index = (uint32_t)-1 ) const;
|
||||
virtual const hsMatrix44& GetWorldToLocal( uint32_t index = (uint32_t)-1 ) const;
|
||||
|
||||
virtual plDrawable& SetProperty( uint32_t index, int prop, hsBool on );
|
||||
virtual hsBool GetProperty( uint32_t index, int prop ) const;
|
||||
virtual plDrawable& SetProperty( uint32_t index, int prop, bool on );
|
||||
virtual bool GetProperty( uint32_t index, int prop ) const;
|
||||
|
||||
virtual plDrawable& SetProperty( int prop, hsBool on );
|
||||
virtual hsBool GetProperty( int prop ) const;
|
||||
virtual plDrawable& SetProperty( int prop, bool on );
|
||||
virtual bool GetProperty( int prop ) const;
|
||||
|
||||
virtual plDrawable& SetNativeProperty( int prop, hsBool on ) { if( on ) fProps |= prop; else fProps &= ~prop; return *this; }
|
||||
virtual hsBool GetNativeProperty( int prop ) const { return ( fProps & prop ) ? true : false; }
|
||||
virtual plDrawable& SetNativeProperty( int prop, bool on ) { if( on ) fProps |= prop; else fProps &= ~prop; return *this; }
|
||||
virtual bool GetNativeProperty( int prop ) const { return ( fProps & prop ) ? true : false; }
|
||||
|
||||
virtual plDrawable& SetNativeProperty( uint32_t index, int prop, hsBool on );
|
||||
virtual hsBool GetNativeProperty( uint32_t index, int prop ) const;
|
||||
virtual plDrawable& SetNativeProperty( uint32_t index, int prop, bool on );
|
||||
virtual bool GetNativeProperty( uint32_t index, int prop ) const;
|
||||
|
||||
virtual plDrawable& SetSubType( uint32_t index, plSubDrawableType t, hsBool on );
|
||||
virtual plDrawable& SetSubType( uint32_t index, plSubDrawableType t, bool on );
|
||||
virtual uint32_t GetSubType( uint32_t index ) const; // returns or of all spans with this index (index==-1 is all spans).
|
||||
|
||||
virtual uint32_t GetType( void ) const { return fType; }
|
||||
@ -276,7 +276,7 @@ class plDrawableSpans : public plDrawable
|
||||
virtual plSpaceTree* GetSpaceTree() const { if(!fSpaceTree)IQuickSpaceTree(); return fSpaceTree; }
|
||||
virtual void SetSpaceTree(plSpaceTree* st) const;
|
||||
virtual void SetVisSet(plVisMgr* visMgr);
|
||||
virtual void SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* reg, hsBool on);
|
||||
virtual void SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* reg, bool on);
|
||||
|
||||
virtual const plSpan *GetSpan( uint32_t index ) const { return fSpans[ index ]; }
|
||||
virtual const plSpan *GetSpan( uint32_t diIndex, uint32_t index ) const { return fSpans[ (*fDIIndices[ diIndex ])[ index ] ]; }
|
||||
@ -304,7 +304,7 @@ class plDrawableSpans : public plDrawable
|
||||
virtual void PrepForRender( plPipeline *p );
|
||||
void SetNotReadyToRender() { fReadyToRender = false; }
|
||||
|
||||
virtual hsBool MsgReceive( plMessage* msg );
|
||||
virtual bool MsgReceive( plMessage* msg );
|
||||
|
||||
// These two should only be called by the SceneNode
|
||||
virtual plKey GetSceneNode() const { return fSceneNode; }
|
||||
@ -317,7 +317,7 @@ class plDrawableSpans : public plDrawable
|
||||
// Convert intermediate data into export/run-time-ready data
|
||||
virtual void Optimize( void );
|
||||
// Called by the sceneNode to determine if we match the criteria
|
||||
virtual hsBool DoIMatch( const plDrawableCriteria& crit );
|
||||
virtual bool DoIMatch( const plDrawableCriteria& crit );
|
||||
// To set the criteria that this ice fits
|
||||
void SetCriteria( const plDrawableCriteria& crit );
|
||||
|
||||
@ -328,11 +328,11 @@ class plDrawableSpans : public plDrawable
|
||||
virtual hsBitVector const &GetBlendingSpanVector( void ) const;
|
||||
|
||||
// Set a single bit in the bitVector of spans that are blending
|
||||
virtual void SetBlendingSpanVectorBit( uint32_t bitNumber, hsBool on );
|
||||
virtual void SetBlendingSpanVectorBit( uint32_t bitNumber, bool on );
|
||||
|
||||
// Taking span index. DI Index doesn't make sense here, because one object's DI can dereference into many materials etc.
|
||||
virtual hsGMaterial* GetSubMaterial(int index) const;
|
||||
virtual hsBool GetSubVisDists(int index, float& minDist, float& maxDist) const; // return true if span invisible before minDist and/or after maxDist
|
||||
virtual bool GetSubVisDists(int index, float& minDist, float& maxDist) const; // return true if span invisible before minDist and/or after maxDist
|
||||
|
||||
// Used by the pipeline to keep from reskinning on multiple renders per frame.
|
||||
uint32_t GetSkinTime() const { return fSkinTime; }
|
||||
@ -364,12 +364,12 @@ class plDrawableSpans : public plDrawable
|
||||
|
||||
/// DYNAMIC FUNCTIONS
|
||||
virtual void RemoveDISpans( uint32_t index );
|
||||
virtual uint32_t AppendDISpans( hsTArray<plGeometrySpan *> &spans, uint32_t index = (uint32_t)-1, hsBool clearSpansAfterAdd = true, hsBool doNotAddToSource = false, hsBool addToFront = false, int lod = 0 );
|
||||
virtual uint32_t AppendDISpans( hsTArray<plGeometrySpan *> &spans, uint32_t index = (uint32_t)-1, bool clearSpansAfterAdd = true, bool doNotAddToSource = false, bool addToFront = false, int lod = 0 );
|
||||
virtual uint32_t RefreshDISpans( uint32_t diIndex );
|
||||
virtual uint32_t RefreshSpan( uint32_t srcSpanIndex );
|
||||
virtual void RemoveDIMatrixSpans(uint32_t index);
|
||||
virtual uint32_t AppendDIMatrixSpans(int n);
|
||||
virtual uint32_t FindBoneBaseMatrix(const hsTArray<hsMatrix44>& initL2B, hsBool searchAll) const;
|
||||
virtual uint32_t FindBoneBaseMatrix(const hsTArray<hsMatrix44>& initL2B, bool searchAll) const;
|
||||
virtual uint32_t NewDIMatrixIndex();
|
||||
void SortSpan( uint32_t index, plPipeline *pipe );
|
||||
void SortVisibleSpans(const hsTArray<int16_t>& visList, plPipeline* pipe);
|
||||
|
@ -701,7 +701,7 @@ void plDrawableSpans::ISortSourceSpans( void )
|
||||
|
||||
short plDrawableSpans::ICompareSpans( plGeometrySpan *span1, plGeometrySpan *span2 )
|
||||
{
|
||||
hsBool b1, b2;
|
||||
bool b1, b2;
|
||||
int i, j, numLayers;
|
||||
plBitmap *t1, *t2;
|
||||
|
||||
|
@ -90,12 +90,12 @@ void plDynaBulletMgr::Write(hsStream* stream, hsResMgr* mgr)
|
||||
plDynaDecalMgr::Write(stream, mgr);
|
||||
}
|
||||
|
||||
hsBool plDynaBulletMgr::IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg)
|
||||
bool plDynaBulletMgr::IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plDynaBulletMgr::IHandleShot(plBulletMsg* bull)
|
||||
bool plDynaBulletMgr::IHandleShot(plBulletMsg* bull)
|
||||
{
|
||||
hsVector3 up = IRandomUp(bull->Dir());
|
||||
|
||||
@ -116,7 +116,7 @@ hsBool plDynaBulletMgr::IHandleShot(plBulletMsg* bull)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plDynaBulletMgr::MsgReceive(plMessage* msg)
|
||||
bool plDynaBulletMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plBulletMsg* bullMsg = plBulletMsg::ConvertNoRef(msg);
|
||||
if( bullMsg )
|
||||
|
@ -52,10 +52,10 @@ class plDynaBulletMgr : public plDynaDecalMgr
|
||||
public:
|
||||
protected:
|
||||
|
||||
virtual hsBool IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg);
|
||||
virtual bool IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg);
|
||||
virtual int INewDecal();
|
||||
|
||||
virtual hsBool IHandleShot(plBulletMsg* bull);
|
||||
virtual bool IHandleShot(plBulletMsg* bull);
|
||||
|
||||
public:
|
||||
plDynaBulletMgr();
|
||||
@ -67,7 +67,7 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
};
|
||||
|
||||
#endif // plDynaBulletMgr_inc
|
||||
|
@ -45,7 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plDynaDecal.h"
|
||||
#include "plAuxSpan.h"
|
||||
|
||||
hsBool plDynaSplot::Age(double t, float ramp, float decay, float life)
|
||||
bool plDynaSplot::Age(double t, float ramp, float decay, float life)
|
||||
{
|
||||
float age = float(t - fBirth);
|
||||
if( age >= life )
|
||||
@ -130,7 +130,7 @@ hsBool plDynaSplot::Age(double t, float ramp, float decay, float life)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plDynaRipple::Age(double t, float ramp, float decay, float life)
|
||||
bool plDynaRipple::Age(double t, float ramp, float decay, float life)
|
||||
{
|
||||
float age = float(t - fBirth);
|
||||
if( age >= life )
|
||||
@ -210,7 +210,7 @@ hsBool plDynaRipple::Age(double t, float ramp, float decay, float life)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plDynaWake::Age(double t, float ramp, float decay, float life)
|
||||
bool plDynaWake::Age(double t, float ramp, float decay, float life)
|
||||
{
|
||||
float age = float(t - fBirth);
|
||||
if( age >= life )
|
||||
@ -290,7 +290,7 @@ hsBool plDynaWake::Age(double t, float ramp, float decay, float life)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plDynaWave::Age(double t, float ramp, float decay, float life)
|
||||
bool plDynaWave::Age(double t, float ramp, float decay, float life)
|
||||
{
|
||||
float age = float(t - fBirth);
|
||||
if( age >= life )
|
||||
@ -370,7 +370,7 @@ hsBool plDynaWave::Age(double t, float ramp, float decay, float life)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plDynaRippleVS::Age(double t, float ramp, float decay, float life)
|
||||
bool plDynaRippleVS::Age(double t, float ramp, float decay, float life)
|
||||
{
|
||||
float age = float(t - fBirth);
|
||||
if( age >= life )
|
||||
|
@ -86,7 +86,7 @@ protected:
|
||||
|
||||
double fBirth;
|
||||
float fInitAtten;
|
||||
hsBool fFlags;
|
||||
bool fFlags;
|
||||
|
||||
plDecalVtxFormat* fVtxBase; // Safe pointer, the buffer data will outlive this decal
|
||||
|
||||
@ -95,7 +95,7 @@ protected:
|
||||
friend class plDynaDecalMgr;
|
||||
public:
|
||||
|
||||
virtual hsBool Age(double t, float ramp, float decay, float life) = 0;
|
||||
virtual bool Age(double t, float ramp, float decay, float life) = 0;
|
||||
};
|
||||
|
||||
// No expansion
|
||||
@ -105,7 +105,7 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
virtual hsBool Age(double t, float ramp, float decay, float life);
|
||||
virtual bool Age(double t, float ramp, float decay, float life);
|
||||
};
|
||||
|
||||
// Expands radially from center
|
||||
@ -113,7 +113,7 @@ class plDynaRipple : public plDynaDecal
|
||||
{
|
||||
public:
|
||||
|
||||
virtual hsBool Age(double t, float ramp, float decay, float life);
|
||||
virtual bool Age(double t, float ramp, float decay, float life);
|
||||
|
||||
float fC1U;
|
||||
float fC2U;
|
||||
@ -128,7 +128,7 @@ class plDynaWake : public plDynaDecal
|
||||
{
|
||||
public:
|
||||
|
||||
virtual hsBool Age(double t, float ramp, float decay, float life);
|
||||
virtual bool Age(double t, float ramp, float decay, float life);
|
||||
|
||||
float fC1U;
|
||||
float fC2U;
|
||||
@ -143,7 +143,7 @@ class plDynaWave : public plDynaDecal
|
||||
{
|
||||
public:
|
||||
|
||||
virtual hsBool Age(double t, float ramp, float decay, float life);
|
||||
virtual bool Age(double t, float ramp, float decay, float life);
|
||||
|
||||
float fScrollRate;
|
||||
};
|
||||
@ -154,7 +154,7 @@ class plDynaRippleVS : public plDynaRipple
|
||||
{
|
||||
public:
|
||||
|
||||
virtual hsBool Age(double t, float ramp, float decay, float life);
|
||||
virtual bool Age(double t, float ramp, float decay, float life);
|
||||
};
|
||||
|
||||
#endif // plDynaDecal_inc
|
||||
|
@ -132,8 +132,8 @@ static const float kInitAuxSpans = 5;
|
||||
|
||||
using namespace std;
|
||||
|
||||
hsBool plDynaDecalMgr::fDisableAccumulate = false;
|
||||
hsBool plDynaDecalMgr::fDisableUpdate = false;
|
||||
bool plDynaDecalMgr::fDisableAccumulate = false;
|
||||
bool plDynaDecalMgr::fDisableUpdate = false;
|
||||
|
||||
plDynaDecalMgr::plDynaDecalMgr()
|
||||
:
|
||||
@ -299,7 +299,7 @@ void plDynaDecalMgr::Write(hsStream* stream, hsResMgr* mgr)
|
||||
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IMakeAuxRefs(plPipeline* pipe)
|
||||
bool plDynaDecalMgr::IMakeAuxRefs(plPipeline* pipe)
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < fGroups.GetCount(); i++ )
|
||||
@ -334,14 +334,14 @@ const plPrintShape* plDynaDecalMgr::IGetPrintShape(plArmatureMod* avMod, uint32_
|
||||
return shape;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg)
|
||||
bool plDynaDecalMgr::IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg)
|
||||
{
|
||||
IWetParts(enaMsg);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IWetParts(const plDynaDecalEnableMsg* enaMsg)
|
||||
bool plDynaDecalMgr::IWetParts(const plDynaDecalEnableMsg* enaMsg)
|
||||
{
|
||||
if( !enaMsg->IsArmature() )
|
||||
{
|
||||
@ -374,7 +374,7 @@ hsBool plDynaDecalMgr::IWetParts(const plDynaDecalEnableMsg* enaMsg)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IWetPart(uint32_t id, const plDynaDecalEnableMsg* enaMsg)
|
||||
bool plDynaDecalMgr::IWetPart(uint32_t id, const plDynaDecalEnableMsg* enaMsg)
|
||||
{
|
||||
plArmatureMod* avMod = plArmatureMod::ConvertNoRef(enaMsg->GetArmKey()->ObjectIsLoaded());
|
||||
|
||||
@ -397,7 +397,7 @@ void plDynaDecalMgr::IWetInfo(plDynaDecalInfo& info, const plDynaDecalEnableMsg*
|
||||
info.fFlags &= ~plDynaDecalInfo::kImmersed;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::MsgReceive(plMessage* msg)
|
||||
bool plDynaDecalMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
// On eval pulse, update all our active decals, letting old ones die off.
|
||||
plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg);
|
||||
@ -653,7 +653,7 @@ plAuxSpan* plDynaDecalMgr::IGetAuxSpan(plDrawableSpans* targ, int iSpan, hsGMate
|
||||
return aux;
|
||||
}
|
||||
|
||||
hsBool rtLit = span->fProps & plSpan::kLiteVtxNonPreshaded;
|
||||
bool rtLit = span->fProps & plSpan::kLiteVtxNonPreshaded;
|
||||
|
||||
// Now look to see if we've got one sitting around unused that's suitable.
|
||||
// Here the suitable criteria is a little different. We know we are the owner,
|
||||
@ -762,17 +762,17 @@ void plDynaDecalMgr::IAllocAuxSpan(plAuxSpan* aux, uint32_t maxNumVerts, uint32_
|
||||
grp->SetIndexBufferEnd(aux->fIBufferIdx, aux->fIStartIdx);
|
||||
}
|
||||
|
||||
hsGMaterial* plDynaDecalMgr::ISetAuxMaterial(plAuxSpan* aux, hsGMaterial* mat, hsBool rtLit)
|
||||
hsGMaterial* plDynaDecalMgr::ISetAuxMaterial(plAuxSpan* aux, hsGMaterial* mat, bool rtLit)
|
||||
{
|
||||
if( !mat )
|
||||
mat = fMatRTShade;
|
||||
|
||||
hsBool attenColor = 0 != (mat->GetLayer(0)->GetBlendFlags()
|
||||
bool attenColor = 0 != (mat->GetLayer(0)->GetBlendFlags()
|
||||
& (hsGMatState::kBlendAdd
|
||||
| hsGMatState::kBlendMult
|
||||
| hsGMatState::kBlendMADD));
|
||||
hsBool bump = 0 != (mat->GetLayer(0)->GetMiscFlags() & hsGMatState::kMiscBumpChans);
|
||||
hsBool hasVS = nil != mat->GetLayer(0)->GetVertexShader();
|
||||
bool bump = 0 != (mat->GetLayer(0)->GetMiscFlags() & hsGMatState::kMiscBumpChans);
|
||||
bool hasVS = nil != mat->GetLayer(0)->GetVertexShader();
|
||||
|
||||
if( hasVS )
|
||||
{
|
||||
@ -967,7 +967,7 @@ uint16_t* plDynaDecalMgr::IGetBaseIdxPtr(const plAuxSpan* auxSpan) const
|
||||
return grp->GetIndexBufferData(auxSpan->fIBufferIdx) + auxSpan->fIBufferInit;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IConvertFlatGrid(plAuxSpan* auxSpan,
|
||||
bool plDynaDecalMgr::IConvertFlatGrid(plAuxSpan* auxSpan,
|
||||
plDynaDecal* decal,
|
||||
const plFlatGridMesh& grid) const
|
||||
{
|
||||
@ -1046,7 +1046,7 @@ void plDynaDecalMgr::ISetDepthFalloff()
|
||||
fMaxDepthRange = 1.f / (1.f - fMaxDepth);
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IConvertPolys(plAuxSpan* auxSpan,
|
||||
bool plDynaDecalMgr::IConvertPolys(plAuxSpan* auxSpan,
|
||||
plDynaDecal* decal,
|
||||
hsTArray<plCutoutPoly>& src)
|
||||
{
|
||||
@ -1061,14 +1061,14 @@ hsBool plDynaDecalMgr::IConvertPolys(plAuxSpan* auxSpan,
|
||||
return IConvertPolysAlpha(auxSpan, decal, src);
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IConvertPolysAlpha(plAuxSpan* auxSpan,
|
||||
bool plDynaDecalMgr::IConvertPolysAlpha(plAuxSpan* auxSpan,
|
||||
plDynaDecal* decal,
|
||||
hsTArray<plCutoutPoly>& src)
|
||||
{
|
||||
hsBool loU = false;
|
||||
hsBool hiU = false;
|
||||
hsBool loV = false;
|
||||
hsBool hiV = false;
|
||||
bool loU = false;
|
||||
bool hiU = false;
|
||||
bool loV = false;
|
||||
bool hiV = false;
|
||||
plDecalVtxFormat* vtx = IGetBaseVtxPtr(auxSpan);
|
||||
vtx += decal->fStartVtx;
|
||||
decal->fVtxBase = vtx;
|
||||
@ -1162,14 +1162,14 @@ hsBool plDynaDecalMgr::IConvertPolysAlpha(plAuxSpan* auxSpan,
|
||||
return loU & hiU & loV & hiV;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IConvertPolysColor(plAuxSpan* auxSpan,
|
||||
bool plDynaDecalMgr::IConvertPolysColor(plAuxSpan* auxSpan,
|
||||
plDynaDecal* decal,
|
||||
hsTArray<plCutoutPoly>& src)
|
||||
{
|
||||
hsBool loU = false;
|
||||
hsBool hiU = false;
|
||||
hsBool loV = false;
|
||||
hsBool hiV = false;
|
||||
bool loU = false;
|
||||
bool hiU = false;
|
||||
bool loV = false;
|
||||
bool hiV = false;
|
||||
plDecalVtxFormat* vtx = IGetBaseVtxPtr(auxSpan);
|
||||
vtx += decal->fStartVtx;
|
||||
decal->fVtxBase = vtx;
|
||||
@ -1255,14 +1255,14 @@ hsBool plDynaDecalMgr::IConvertPolysColor(plAuxSpan* auxSpan,
|
||||
return loU & hiU & loV & hiV;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IConvertPolysVS(plAuxSpan* auxSpan,
|
||||
bool plDynaDecalMgr::IConvertPolysVS(plAuxSpan* auxSpan,
|
||||
plDynaDecal* decal,
|
||||
hsTArray<plCutoutPoly>& src)
|
||||
{
|
||||
hsBool loU = false;
|
||||
hsBool hiU = false;
|
||||
hsBool loV = false;
|
||||
hsBool hiV = false;
|
||||
bool loU = false;
|
||||
bool hiU = false;
|
||||
bool loV = false;
|
||||
bool hiV = false;
|
||||
plDecalVtxFormat* vtx = IGetBaseVtxPtr(auxSpan);
|
||||
vtx += decal->fStartVtx;
|
||||
decal->fVtxBase = vtx;
|
||||
@ -1337,12 +1337,12 @@ hsBool plDynaDecalMgr::IConvertPolysVS(plAuxSpan* auxSpan,
|
||||
return loU & hiU & loV & hiV;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IHitTestPolys(hsTArray<plCutoutPoly>& src) const
|
||||
bool plDynaDecalMgr::IHitTestPolys(hsTArray<plCutoutPoly>& src) const
|
||||
{
|
||||
hsBool loU = false;
|
||||
hsBool hiU = false;
|
||||
hsBool loV = false;
|
||||
hsBool hiV = false;
|
||||
bool loU = false;
|
||||
bool hiU = false;
|
||||
bool loV = false;
|
||||
bool hiV = false;
|
||||
int iPoly = 0;
|
||||
int iVert = 0;
|
||||
while( iPoly < src.GetCount() )
|
||||
@ -1368,7 +1368,7 @@ hsBool plDynaDecalMgr::IHitTestPolys(hsTArray<plCutoutPoly>& src) const
|
||||
return loU & hiU & loV & hiV;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IProcessPolys(plDrawableSpans* targ, int iSpan, double t, hsTArray<plCutoutPoly>& src)
|
||||
bool plDynaDecalMgr::IProcessPolys(plDrawableSpans* targ, int iSpan, double t, hsTArray<plCutoutPoly>& src)
|
||||
{
|
||||
// Figure out how many verts and idxs are coming in.
|
||||
uint16_t numVerts, numIdx;
|
||||
@ -1394,7 +1394,7 @@ hsBool plDynaDecalMgr::IProcessPolys(plDrawableSpans* targ, int iSpan, double t,
|
||||
return IConvertPolys(auxSpan, decal, src);
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IProcessGrid(plDrawableSpans* targ, int iSpan, hsGMaterial* mat, double t, const plFlatGridMesh& grid)
|
||||
bool plDynaDecalMgr::IProcessGrid(plDrawableSpans* targ, int iSpan, hsGMaterial* mat, double t, const plFlatGridMesh& grid)
|
||||
{
|
||||
// Find a span to put them in. Either the current span, or a new
|
||||
// one if it's full up.
|
||||
@ -1415,14 +1415,14 @@ hsBool plDynaDecalMgr::IProcessGrid(plDrawableSpans* targ, int iSpan, hsGMateria
|
||||
return IConvertFlatGrid(auxSpan, decal, grid);
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::IHitTestFlatGrid(const plFlatGridMesh& grid) const
|
||||
bool plDynaDecalMgr::IHitTestFlatGrid(const plFlatGridMesh& grid) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plDynaDecalMgr::ICutoutGrid(plDrawableSpans* drawable, int iSpan, hsGMaterial* mat, double secs)
|
||||
bool plDynaDecalMgr::ICutoutGrid(plDrawableSpans* drawable, int iSpan, hsGMaterial* mat, double secs)
|
||||
{
|
||||
static plFlatGridMesh grid;
|
||||
grid.Reset();
|
||||
@ -1435,12 +1435,12 @@ hsBool plDynaDecalMgr::ICutoutGrid(plDrawableSpans* drawable, int iSpan, hsGMate
|
||||
return IProcessGrid(drawable, iSpan, mat, secs, grid);
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::ICutoutObject(plSceneObject* so, double secs)
|
||||
bool plDynaDecalMgr::ICutoutObject(plSceneObject* so, double secs)
|
||||
{
|
||||
if( fDisableAccumulate )
|
||||
return false;
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
|
||||
if( !so )
|
||||
return retVal;
|
||||
@ -1501,12 +1501,12 @@ hsBool plDynaDecalMgr::ICutoutObject(plSceneObject* so, double secs)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::ICutoutList(hsTArray<plDrawVisList>& drawVis, double secs)
|
||||
bool plDynaDecalMgr::ICutoutList(hsTArray<plDrawVisList>& drawVis, double secs)
|
||||
{
|
||||
if( fDisableAccumulate )
|
||||
return false;
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
|
||||
if( !drawVis.GetCount() )
|
||||
return retVal;
|
||||
@ -1547,12 +1547,12 @@ hsBool plDynaDecalMgr::ICutoutList(hsTArray<plDrawVisList>& drawVis, double secs
|
||||
return retVal;
|
||||
}
|
||||
|
||||
hsBool plDynaDecalMgr::ICutoutTargets(double secs)
|
||||
bool plDynaDecalMgr::ICutoutTargets(double secs)
|
||||
{
|
||||
if( fDisableAccumulate )
|
||||
return false;
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
|
||||
int i;
|
||||
for( i = 0; i < fTargets.GetCount(); i++ )
|
||||
@ -1754,7 +1754,7 @@ hsMatrix44 plDynaDecalMgr::IL2WFromHit(hsPoint3 pos, hsVector3 dir) const
|
||||
return l2w;
|
||||
}
|
||||
|
||||
void plDynaDecalMgr::ICutoutCallback(const hsTArray<plCutoutPoly>& cutouts, hsBool hasWaterHeight, float waterHeight)
|
||||
void plDynaDecalMgr::ICutoutCallback(const hsTArray<plCutoutPoly>& cutouts, bool hasWaterHeight, float waterHeight)
|
||||
{
|
||||
hsTArray<plCutoutHit> hits;
|
||||
|
||||
|
@ -129,8 +129,8 @@ public:
|
||||
kRefNextAvailable = 10
|
||||
};
|
||||
protected:
|
||||
static hsBool fDisableAccumulate;
|
||||
static hsBool fDisableUpdate;
|
||||
static bool fDisableAccumulate;
|
||||
static bool fDisableUpdate;
|
||||
|
||||
plDynaDecalMap fDecalMap;
|
||||
|
||||
@ -182,21 +182,21 @@ protected:
|
||||
const plPrintShape* IGetPrintShape(const plKey& objKey) const;
|
||||
const plPrintShape* IGetPrintShape(plArmatureMod* avMod, uint32_t id) const;
|
||||
|
||||
virtual hsBool IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg);
|
||||
virtual bool IHandleEnableMsg(const plDynaDecalEnableMsg* enaMsg);
|
||||
void INotifyActive(plDynaDecalInfo& info, const plKey& armKey, uint32_t id) const;
|
||||
void INotifyInactive(plDynaDecalInfo& info, const plKey& armKey, uint32_t id) const;
|
||||
hsBool IWetParts(const plDynaDecalEnableMsg* enaMsg);
|
||||
hsBool IWetPart(uint32_t id, const plDynaDecalEnableMsg* enaMsg);
|
||||
bool IWetParts(const plDynaDecalEnableMsg* enaMsg);
|
||||
bool IWetPart(uint32_t id, const plDynaDecalEnableMsg* enaMsg);
|
||||
void IWetInfo(plDynaDecalInfo& info, const plDynaDecalEnableMsg* enaMsg) const;
|
||||
float IHowWet(plDynaDecalInfo& info, double t) const;
|
||||
plDynaDecalInfo& IGetDecalInfo(uintptr_t id, const plKey& key);
|
||||
void IRemoveDecalInfo(uint32_t id);
|
||||
void IRemoveDecalInfos(const plKey& key);
|
||||
|
||||
hsGMaterial* ISetAuxMaterial(plAuxSpan* aux, hsGMaterial* mat, hsBool rtLit);
|
||||
hsGMaterial* ISetAuxMaterial(plAuxSpan* aux, hsGMaterial* mat, bool rtLit);
|
||||
void IAllocAuxSpan(plAuxSpan* aux, uint32_t maxNumVerts, uint32_t maxNumIdx);
|
||||
plAuxSpan* IGetAuxSpan(plDrawableSpans* targ, int iSpan, hsGMaterial* mat, uint16_t numVerts, uint16_t numIdx);
|
||||
hsBool IMakeAuxRefs(plPipeline* pipe);
|
||||
bool IMakeAuxRefs(plPipeline* pipe);
|
||||
|
||||
uint16_t* IGetBaseIdxPtr(const plAuxSpan* auxSpan) const;
|
||||
plDecalVtxFormat* IGetBaseVtxPtr(const plAuxSpan* auxSpan) const;
|
||||
@ -207,25 +207,25 @@ protected:
|
||||
void IUpdateDecals(double t);
|
||||
|
||||
void ICountIncoming(hsTArray<plCutoutPoly>& src, uint16_t& numVerts, uint16_t& numIdx) const;
|
||||
hsBool IConvertPolysColor(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray<plCutoutPoly>& src);
|
||||
hsBool IConvertPolysAlpha(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray<plCutoutPoly>& src);
|
||||
hsBool IConvertPolysVS(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray<plCutoutPoly>& src);
|
||||
hsBool IConvertPolys(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray<plCutoutPoly>& src);
|
||||
hsBool IProcessPolys(plDrawableSpans* targ, int iSpan, double t, hsTArray<plCutoutPoly>& src);
|
||||
hsBool IHitTestPolys(hsTArray<plCutoutPoly>& src) const;
|
||||
bool IConvertPolysColor(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray<plCutoutPoly>& src);
|
||||
bool IConvertPolysAlpha(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray<plCutoutPoly>& src);
|
||||
bool IConvertPolysVS(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray<plCutoutPoly>& src);
|
||||
bool IConvertPolys(plAuxSpan* auxSpan, plDynaDecal* decal, hsTArray<plCutoutPoly>& src);
|
||||
bool IProcessPolys(plDrawableSpans* targ, int iSpan, double t, hsTArray<plCutoutPoly>& src);
|
||||
bool IHitTestPolys(hsTArray<plCutoutPoly>& src) const;
|
||||
|
||||
hsBool IProcessGrid(plDrawableSpans* targ, int iSpan, hsGMaterial* mat, double t, const plFlatGridMesh& grid);
|
||||
hsBool IConvertFlatGrid(plAuxSpan* auxSpan, plDynaDecal* decal, const plFlatGridMesh& grid) const;
|
||||
hsBool ICutoutGrid(plDrawableSpans* drawable, int iSpan, hsGMaterial* mat, double secs);
|
||||
hsBool IHitTestFlatGrid(const plFlatGridMesh& grid) const;
|
||||
bool IProcessGrid(plDrawableSpans* targ, int iSpan, hsGMaterial* mat, double t, const plFlatGridMesh& grid);
|
||||
bool IConvertFlatGrid(plAuxSpan* auxSpan, plDynaDecal* decal, const plFlatGridMesh& grid) const;
|
||||
bool ICutoutGrid(plDrawableSpans* drawable, int iSpan, hsGMaterial* mat, double secs);
|
||||
bool IHitTestFlatGrid(const plFlatGridMesh& grid) const;
|
||||
|
||||
hsBool ICutoutList(hsTArray<plDrawVisList>& drawVis, double secs);
|
||||
hsBool ICutoutObject(plSceneObject* so, double secs);
|
||||
hsBool ICutoutTargets(double secs);
|
||||
bool ICutoutList(hsTArray<plDrawVisList>& drawVis, double secs);
|
||||
bool ICutoutObject(plSceneObject* so, double secs);
|
||||
bool ICutoutTargets(double secs);
|
||||
|
||||
void ISetDepthFalloff(); // Sets from current cutter settings.
|
||||
|
||||
virtual void ICutoutCallback(const hsTArray<plCutoutPoly>& cutouts, hsBool hasWaterHeight=false, float waterHeight=0.f);
|
||||
virtual void ICutoutCallback(const hsTArray<plCutoutPoly>& cutouts, bool hasWaterHeight=false, float waterHeight=0.f);
|
||||
|
||||
hsGMaterial* IConvertToEnvMap(hsGMaterial* mat, plBitmap* envMap);
|
||||
|
||||
@ -247,7 +247,7 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
// This is public, because you need to call it after creating
|
||||
// a DynaDecalMgr on the fly. It's normally called on Read().
|
||||
@ -256,8 +256,8 @@ public:
|
||||
void SetScale(const hsVector3& v) { fScale = v; }
|
||||
const hsVector3& GetScale() const { return fScale; }
|
||||
|
||||
void SetWaitOnEnable(hsBool on) { fWaitOnEnable = on; }
|
||||
hsBool GetWaitOnEnable() const { return fWaitOnEnable; }
|
||||
void SetWaitOnEnable(bool on) { fWaitOnEnable = on; }
|
||||
bool GetWaitOnEnable() const { return fWaitOnEnable; }
|
||||
|
||||
void SetWetLength(float f) { fWetLength = f; }
|
||||
void SetRampEnd(float f) { fRampEnd = f; }
|
||||
@ -280,13 +280,13 @@ public:
|
||||
uint32_t GetNumNotifies() const { return fNotifies.GetCount(); }
|
||||
const plKey& GetNotify(int i) const { return fNotifies[i]; }
|
||||
|
||||
static void SetDisableAccumulate(hsBool on) { fDisableAccumulate = on; }
|
||||
static void SetDisableAccumulate(bool on) { fDisableAccumulate = on; }
|
||||
static void ToggleDisableAccumulate() { fDisableAccumulate = !fDisableAccumulate; }
|
||||
static hsBool GetDisableAccumulate() { return fDisableAccumulate; }
|
||||
static bool GetDisableAccumulate() { return fDisableAccumulate; }
|
||||
|
||||
static void SetDisableUpdate(hsBool on) { fDisableUpdate = on; }
|
||||
static void SetDisableUpdate(bool on) { fDisableUpdate = on; }
|
||||
static void ToggleDisableUpdate() { fDisableUpdate = !fDisableUpdate; }
|
||||
static hsBool GetDisableUpdate() { return fDisableUpdate; }
|
||||
static bool GetDisableUpdate() { return fDisableUpdate; }
|
||||
};
|
||||
|
||||
#endif // plDynaDecalMgr_inc
|
||||
|
@ -104,7 +104,7 @@ void plDynaFootMgr::Write(hsStream* stream, hsResMgr* mgr)
|
||||
}
|
||||
|
||||
|
||||
hsBool plDynaFootMgr::MsgReceive(plMessage* msg)
|
||||
bool plDynaFootMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plAvatarFootMsg* footMsg = plAvatarFootMsg::ConvertNoRef(msg);
|
||||
if( footMsg )
|
||||
@ -132,9 +132,9 @@ hsBool plDynaFootMgr::MsgReceive(plMessage* msg)
|
||||
return plDynaDecalMgr::MsgReceive(msg);
|
||||
}
|
||||
|
||||
hsBool plDynaFootMgr::IPrintFromShape(const plPrintShape* shape, hsBool flip)
|
||||
bool plDynaFootMgr::IPrintFromShape(const plPrintShape* shape, bool flip)
|
||||
{
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
|
||||
if( shape )
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ class plAvatarFootMsg;
|
||||
class plDynaFootMgr : public plDynaDecalMgr
|
||||
{
|
||||
protected:
|
||||
virtual hsBool IPrintFromShape(const plPrintShape* shape, hsBool flip);
|
||||
virtual bool IPrintFromShape(const plPrintShape* shape, bool flip);
|
||||
|
||||
virtual int INewDecal();
|
||||
public:
|
||||
@ -63,7 +63,7 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
};
|
||||
|
||||
|
@ -82,7 +82,7 @@ void plDynaPuddleMgr::Read(hsStream* stream, hsResMgr* mgr)
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plAvatarFootMsg::Index(), GetKey());
|
||||
}
|
||||
|
||||
hsBool plDynaPuddleMgr::MsgReceive(plMessage* msg)
|
||||
bool plDynaPuddleMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plAvatarFootMsg* footMsg = plAvatarFootMsg::ConvertNoRef(msg);
|
||||
if( footMsg )
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
};
|
||||
|
||||
|
@ -135,7 +135,7 @@ void plDynaRippleMgr::Write(hsStream* stream, hsResMgr* mgr)
|
||||
fFinalUVW.Write(stream);
|
||||
}
|
||||
|
||||
hsBool plDynaRippleMgr::MsgReceive(plMessage* msg)
|
||||
bool plDynaRippleMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plArmatureUpdateMsg* armMsg = plArmatureUpdateMsg::ConvertNoRef(msg);
|
||||
if( armMsg && !armMsg->IsInvis())
|
||||
@ -175,12 +175,12 @@ hsBool plDynaRippleMgr::MsgReceive(plMessage* msg)
|
||||
return plDynaDecalMgr::MsgReceive(msg);
|
||||
}
|
||||
|
||||
hsBool plDynaRippleMgr::IRippleFromShape(const plPrintShape* shape, hsBool force)
|
||||
bool plDynaRippleMgr::IRippleFromShape(const plPrintShape* shape, bool force)
|
||||
{
|
||||
if( !shape )
|
||||
return false;
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
|
||||
plDynaDecalInfo& info = IGetDecalInfo(uintptr_t(shape), shape->GetKey());
|
||||
|
||||
@ -190,9 +190,9 @@ hsBool plDynaRippleMgr::IRippleFromShape(const plPrintShape* shape, hsBool force
|
||||
plConst(float) kMinTime(1.5f);
|
||||
double t = hsTimer::GetSysSeconds();
|
||||
float dt = float(t - info.fLastTime) * sRand.RandZeroToOne();
|
||||
hsBool longEnough = (dt >= kMinTime);
|
||||
bool longEnough = (dt >= kMinTime);
|
||||
hsPoint3 xlate = shapeL2W.GetTranslate();
|
||||
hsBool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist);
|
||||
bool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist);
|
||||
if( force || longEnough || farEnough )
|
||||
{
|
||||
hsPoint3 pos = shapeL2W.GetTranslate();
|
||||
@ -225,7 +225,7 @@ hsBool plDynaRippleMgr::IRippleFromShape(const plPrintShape* shape, hsBool force
|
||||
fCutter->Set(pos, dir, up);
|
||||
|
||||
|
||||
hsBool hit = ICutoutTargets(t);
|
||||
bool hit = ICutoutTargets(t);
|
||||
if( hit )
|
||||
{
|
||||
retVal = true;
|
||||
|
@ -53,7 +53,7 @@ protected:
|
||||
hsVector3 fInitUVW;
|
||||
hsVector3 fFinalUVW;
|
||||
|
||||
virtual hsBool IRippleFromShape(const plPrintShape* shape, hsBool force=false);
|
||||
virtual bool IRippleFromShape(const plPrintShape* shape, bool force=false);
|
||||
|
||||
virtual int INewDecal();
|
||||
public:
|
||||
@ -66,7 +66,7 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
void SetUVWAnim(const hsVector3& init, const hsVector3& final) { fInitUVW = init; fFinalUVW = final; }
|
||||
const hsVector3& GetInitUVW() const { return fInitUVW; }
|
||||
|
@ -113,9 +113,9 @@ void plDynaRippleVSMgr::Write(hsStream* stream, hsResMgr* mgr)
|
||||
mgr->WriteKey(stream, fWaveSetBase);
|
||||
}
|
||||
|
||||
hsBool plDynaRippleVSMgr::MsgReceive(plMessage* msg)
|
||||
bool plDynaRippleVSMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
hsBool retVal = plDynaRippleMgr::MsgReceive(msg);
|
||||
bool retVal = plDynaRippleMgr::MsgReceive(msg);
|
||||
if( retVal )
|
||||
return true;
|
||||
|
||||
@ -135,7 +135,7 @@ hsBool plDynaRippleVSMgr::MsgReceive(plMessage* msg)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plDynaRippleVSMgr::ICheckRTMat()
|
||||
bool plDynaRippleVSMgr::ICheckRTMat()
|
||||
{
|
||||
if( !fMatRTShade )
|
||||
return false;
|
||||
@ -162,7 +162,7 @@ hsBool plDynaRippleVSMgr::ICheckRTMat()
|
||||
return fWaveSetBase->SetupRippleMat(fMatRTShade, ripConsts);
|
||||
}
|
||||
|
||||
hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool force)
|
||||
bool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, bool force)
|
||||
{
|
||||
if( !ICheckRTMat() )
|
||||
return false;
|
||||
@ -170,7 +170,7 @@ hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool for
|
||||
if( !shape )
|
||||
return false;
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
|
||||
plDynaDecalInfo& info = IGetDecalInfo(uintptr_t(shape), shape->GetKey());
|
||||
|
||||
@ -180,9 +180,9 @@ hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool for
|
||||
plConst(float) kMinTime(1.5f);
|
||||
double t = hsTimer::GetSysSeconds();
|
||||
float dt = float(t - info.fLastTime) * sRand.RandZeroToOne();
|
||||
hsBool longEnough = (dt >= kMinTime);
|
||||
bool longEnough = (dt >= kMinTime);
|
||||
hsPoint3 xlate = shapeL2W.GetTranslate();
|
||||
hsBool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist);
|
||||
bool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist);
|
||||
if( force || longEnough || farEnough )
|
||||
{
|
||||
hsPoint3 pos = shapeL2W.GetTranslate();
|
||||
@ -221,7 +221,7 @@ hsBool plDynaRippleVSMgr::IRippleFromShape(const plPrintShape* shape, hsBool for
|
||||
fCutter->Set(pos, dir, up);
|
||||
|
||||
|
||||
hsBool hit = ICutoutTargets(t);
|
||||
bool hit = ICutoutTargets(t);
|
||||
if( hit )
|
||||
{
|
||||
info.fLastTime = t;
|
||||
|
@ -57,11 +57,11 @@ protected:
|
||||
|
||||
plWaveSetBase* fWaveSetBase;
|
||||
|
||||
virtual hsBool IRippleFromShape(const plPrintShape* shape, hsBool force=false);
|
||||
virtual bool IRippleFromShape(const plPrintShape* shape, bool force=false);
|
||||
|
||||
virtual int INewDecal();
|
||||
|
||||
virtual hsBool ICheckRTMat();
|
||||
virtual bool ICheckRTMat();
|
||||
|
||||
public:
|
||||
plDynaRippleVSMgr();
|
||||
@ -73,7 +73,7 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
};
|
||||
|
||||
#endif // plDynaRippleVSMgr_inc
|
||||
|
@ -76,7 +76,7 @@ void plDynaTorpedoMgr::Read(hsStream* stream, hsResMgr* mgr)
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plBulletMsg::Index(), GetKey());
|
||||
}
|
||||
|
||||
hsBool plDynaTorpedoMgr::IHandleShot(plBulletMsg* bull)
|
||||
bool plDynaTorpedoMgr::IHandleShot(plBulletMsg* bull)
|
||||
{
|
||||
float partyTime = fPartyTime;
|
||||
|
||||
@ -142,7 +142,7 @@ hsBool plDynaTorpedoMgr::IHandleShot(plBulletMsg* bull)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plDynaTorpedoMgr::MsgReceive(plMessage* msg)
|
||||
bool plDynaTorpedoMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plBulletMsg* bullMsg = plBulletMsg::ConvertNoRef(msg);
|
||||
if( bullMsg )
|
||||
|
@ -52,7 +52,7 @@ class plDynaTorpedoMgr : public plDynaRippleMgr
|
||||
{
|
||||
protected:
|
||||
|
||||
virtual hsBool IHandleShot(plBulletMsg* bull);
|
||||
virtual bool IHandleShot(plBulletMsg* bull);
|
||||
|
||||
public:
|
||||
plDynaTorpedoMgr();
|
||||
@ -63,7 +63,7 @@ public:
|
||||
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
};
|
||||
|
||||
|
@ -80,7 +80,7 @@ int plDynaTorpedoVSMgr::INewDecal()
|
||||
return idx;
|
||||
}
|
||||
|
||||
hsBool plDynaTorpedoVSMgr::IHandleShot(plBulletMsg* bull)
|
||||
bool plDynaTorpedoVSMgr::IHandleShot(plBulletMsg* bull)
|
||||
{
|
||||
if( !ICheckRTMat() )
|
||||
return false;
|
||||
@ -88,7 +88,7 @@ hsBool plDynaTorpedoVSMgr::IHandleShot(plBulletMsg* bull)
|
||||
return plDynaTorpedoMgr::IHandleShot(bull);
|
||||
}
|
||||
|
||||
hsBool plDynaTorpedoVSMgr::ICheckRTMat()
|
||||
bool plDynaTorpedoVSMgr::ICheckRTMat()
|
||||
{
|
||||
if( !fMatRTShade )
|
||||
return false;
|
||||
@ -122,9 +122,9 @@ plRipVSConsts plDynaTorpedoVSMgr::IGetRippleConsts() const
|
||||
return ripConsts;
|
||||
}
|
||||
|
||||
hsBool plDynaTorpedoVSMgr::MsgReceive(plMessage* msg)
|
||||
bool plDynaTorpedoVSMgr::MsgReceive(plMessage* msg)
|
||||
{
|
||||
hsBool retVal = plDynaTorpedoMgr::MsgReceive(msg);
|
||||
bool retVal = plDynaTorpedoMgr::MsgReceive(msg);
|
||||
if( retVal )
|
||||
return true;
|
||||
|
||||
|
@ -59,10 +59,10 @@ protected:
|
||||
|
||||
virtual int INewDecal();
|
||||
|
||||
virtual hsBool ICheckRTMat();
|
||||
virtual bool ICheckRTMat();
|
||||
|
||||
plRipVSConsts IGetRippleConsts() const;
|
||||
virtual hsBool IHandleShot(plBulletMsg* bull);
|
||||
virtual bool IHandleShot(plBulletMsg* bull);
|
||||
public:
|
||||
plDynaTorpedoVSMgr();
|
||||
virtual ~plDynaTorpedoVSMgr();
|
||||
@ -70,7 +70,7 @@ public:
|
||||
CLASSNAME_REGISTER( plDynaTorpedoVSMgr );
|
||||
GETINTERFACE_ANY( plDynaTorpedoVSMgr, plDynaTorpedoMgr );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
@ -166,12 +166,12 @@ hsVector3 plDynaWakeMgr::IGetDirection(const plDynaDecalInfo& info, const hsPoin
|
||||
return dir;
|
||||
}
|
||||
|
||||
hsBool plDynaWakeMgr::IRippleFromShape(const plPrintShape* shape, hsBool force)
|
||||
bool plDynaWakeMgr::IRippleFromShape(const plPrintShape* shape, bool force)
|
||||
{
|
||||
if( !shape )
|
||||
return false;
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
|
||||
plDynaDecalInfo& info = IGetDecalInfo(uintptr_t(shape), shape->GetKey());
|
||||
|
||||
@ -181,9 +181,9 @@ hsBool plDynaWakeMgr::IRippleFromShape(const plPrintShape* shape, hsBool force)
|
||||
static float kMinTime = 0.25f;
|
||||
double t = hsTimer::GetSysSeconds();
|
||||
float dt = float(t - info.fLastTime) * sRand.RandZeroToOne();
|
||||
hsBool longEnough = (dt >= kMinTime);
|
||||
bool longEnough = (dt >= kMinTime);
|
||||
hsPoint3 xlate = shapeL2W.GetTranslate();
|
||||
hsBool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist);
|
||||
bool farEnough = (hsVector3(&info.fLastPos, &xlate).Magnitude() > kMinDist);
|
||||
if( force || longEnough || farEnough )
|
||||
{
|
||||
hsPoint3 pos = shapeL2W.GetTranslate();
|
||||
@ -221,7 +221,7 @@ hsBool plDynaWakeMgr::IRippleFromShape(const plPrintShape* shape, hsBool force)
|
||||
info.fLastTime = t;
|
||||
info.fLastPos = shapeL2W.GetTranslate();
|
||||
|
||||
hsBool hit = ICutoutTargets(t);
|
||||
bool hit = ICutoutTargets(t);
|
||||
if( hit )
|
||||
retVal = true;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ protected:
|
||||
|
||||
virtual hsVector3 IGetDirection(const plDynaDecalInfo& info, const hsPoint3& pos) const;
|
||||
|
||||
virtual hsBool IRippleFromShape(const plPrintShape* shape, hsBool force=false);
|
||||
virtual bool IRippleFromShape(const plPrintShape* shape, bool force=false);
|
||||
|
||||
virtual int INewDecal();
|
||||
public:
|
||||
|
@ -57,7 +57,7 @@ plGeoSpanDice::~plGeoSpanDice()
|
||||
{
|
||||
}
|
||||
|
||||
hsBool plGeoSpanDice::Dice(hsTArray<plGeometrySpan*>& spans) const
|
||||
bool plGeoSpanDice::Dice(hsTArray<plGeometrySpan*>& spans) const
|
||||
{
|
||||
int startingCount = spans.GetCount();
|
||||
|
||||
@ -82,7 +82,7 @@ hsBool plGeoSpanDice::Dice(hsTArray<plGeometrySpan*>& spans) const
|
||||
return spans.GetCount() != startingCount;
|
||||
}
|
||||
|
||||
hsBool plGeoSpanDice::INeedSplitting(plGeometrySpan* src) const
|
||||
bool plGeoSpanDice::INeedSplitting(plGeometrySpan* src) const
|
||||
{
|
||||
// Do we have enough faces to bother?
|
||||
if( fMinFaces )
|
||||
@ -111,7 +111,7 @@ hsBool plGeoSpanDice::INeedSplitting(plGeometrySpan* src) const
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plGeoSpanDice::IHalf(plGeometrySpan* src, hsTArray<plGeometrySpan*>& out, int exclAxis) const
|
||||
bool plGeoSpanDice::IHalf(plGeometrySpan* src, hsTArray<plGeometrySpan*>& out, int exclAxis) const
|
||||
{
|
||||
if( !INeedSplitting(src) )
|
||||
return false;
|
||||
|
@ -55,17 +55,17 @@ protected:
|
||||
uint32_t fMaxFaces;
|
||||
hsPoint3 fMaxSize;
|
||||
|
||||
hsBool INeedSplitting(plGeometrySpan* src) const;
|
||||
bool INeedSplitting(plGeometrySpan* src) const;
|
||||
plGeometrySpan* IAllocSpace(plGeometrySpan* src, int numVerts, int numTris) const;
|
||||
plGeometrySpan* IExtractTris(plGeometrySpan* src, hsTArray<uint32_t>& tris) const;
|
||||
int ISelectAxis(int exclAxis, plGeometrySpan* src) const;
|
||||
hsBool IHalf(plGeometrySpan* src, hsTArray<plGeometrySpan*>& out, int exclAxis=0) const;
|
||||
bool IHalf(plGeometrySpan* src, hsTArray<plGeometrySpan*>& out, int exclAxis=0) const;
|
||||
|
||||
public:
|
||||
plGeoSpanDice();
|
||||
virtual ~plGeoSpanDice();
|
||||
|
||||
hsBool Dice(hsTArray<plGeometrySpan*>& spans) const;
|
||||
bool Dice(hsTArray<plGeometrySpan*>& spans) const;
|
||||
|
||||
void SetMaxSize(const hsPoint3& size) { fMaxSize = size; }
|
||||
hsPoint3 GetMaxSize() const { return fMaxSize; }
|
||||
|
@ -270,7 +270,7 @@ class plGeometrySpan
|
||||
uint32_t fIndices;
|
||||
};
|
||||
|
||||
hsBool fCreating;
|
||||
bool fCreating;
|
||||
hsTArray<TempVertex> fVertAccum;
|
||||
hsTArray<uint16_t> fIndexAccum;
|
||||
|
||||
|
@ -70,7 +70,7 @@ void plInstanceDrawInterface::Write(hsStream* stream, hsResMgr* mgr)
|
||||
mgr->WriteKey(stream, fDrawable->GetKey());
|
||||
}
|
||||
|
||||
hsBool plInstanceDrawInterface::MsgReceive(plMessage* msg)
|
||||
bool plInstanceDrawInterface::MsgReceive(plMessage* msg)
|
||||
{
|
||||
#if 0 // UNUSED
|
||||
// This currently isn't being used, so I'm commenting it out at
|
||||
@ -103,7 +103,7 @@ hsBool plInstanceDrawInterface::MsgReceive(plMessage* msg)
|
||||
return plDrawInterface::MsgReceive(msg);
|
||||
}
|
||||
|
||||
void plInstanceDrawInterface::AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat, hsBool addToFront, int lod, hsBool partialSort)
|
||||
void plInstanceDrawInterface::AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat, bool addToFront, int lod, bool partialSort)
|
||||
{
|
||||
if (fDrawable == nil)
|
||||
{
|
||||
|
@ -67,9 +67,9 @@ public:
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
void AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat, hsBool addToFront, int LOD, hsBool partialSort);
|
||||
void AddSharedMesh(plSharedMesh *mesh, hsGMaterial *mat, bool addToFront, int LOD, bool partialSort);
|
||||
void RemoveSharedMesh(plSharedMesh *mesh);
|
||||
|
||||
virtual void ReleaseData();
|
||||
|
@ -210,7 +210,7 @@ void plMorphDelta::ComputeDeltas(const hsTArray<plGeometrySpan*>& base, const hs
|
||||
// For position, normal, color and all uvws
|
||||
// Calc del and delLenSq
|
||||
// If any delLenSq big enough, set nonZero to true
|
||||
hsBool nonZero = false;
|
||||
bool nonZero = false;
|
||||
|
||||
// These are actually min del SQUARED.
|
||||
plConst(float) kMinDelPos(1.e-4f); // From Budtpueller's Handbook of Constants
|
||||
|
@ -122,7 +122,7 @@ plMorphSequence::~plMorphSequence()
|
||||
DeInit();
|
||||
}
|
||||
|
||||
hsBool plMorphSequence::MsgReceive(plMessage* msg)
|
||||
bool plMorphSequence::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plRenderMsg* rend = plRenderMsg::ConvertNoRef(msg);
|
||||
if( rend )
|
||||
@ -305,7 +305,7 @@ void plMorphSequence::SetWeight(int iLay, int iDel, float w, plKey meshKey /* =
|
||||
}
|
||||
}
|
||||
|
||||
void plMorphSequence::ISetDirty(hsBool on)
|
||||
void plMorphSequence::ISetDirty(bool on)
|
||||
{
|
||||
if( on )
|
||||
{
|
||||
@ -597,7 +597,7 @@ void plMorphSequence::IApplyShared(int iShare)
|
||||
mInfo.fFlags &= ~plSharedMeshInfo::kInfoDirtyMesh;
|
||||
}
|
||||
|
||||
hsBool plMorphSequence::IResetShared(int iShare)
|
||||
bool plMorphSequence::IResetShared(int iShare)
|
||||
{
|
||||
if( iShare >= fSharedMeshes.GetCount() || fSharedMeshes[iShare].fCurrDraw == nil)
|
||||
return false;
|
||||
@ -633,7 +633,7 @@ hsBool plMorphSequence::IResetShared(int iShare)
|
||||
return true;
|
||||
}
|
||||
|
||||
hsBool plMorphSequence::IFindIndices(int iShare)
|
||||
bool plMorphSequence::IFindIndices(int iShare)
|
||||
{
|
||||
plSharedMeshInfo& mInfo = fSharedMeshes[iShare];
|
||||
mInfo.fCurrDraw = nil; // In case we fail.
|
||||
@ -695,7 +695,7 @@ int32_t plMorphSequence::IFindPendingStateIndex(plKey meshKey) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
hsBool plMorphSequence::IIsUsingDrawable(plDrawable *draw)
|
||||
bool plMorphSequence::IIsUsingDrawable(plDrawable *draw)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < fSharedMeshes.GetCount(); i++)
|
||||
|
@ -121,14 +121,14 @@ protected:
|
||||
|
||||
const plDrawInterface* IGetDrawInterface() const;
|
||||
|
||||
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 ISetHaveSnap(hsBool on) { if(on)fMorphFlags |= kHaveSnap; else fMorphFlags &= ~kHaveSnap; }
|
||||
void ISetDirty(hsBool on);
|
||||
void ISetHaveSnap(bool on) { if(on)fMorphFlags |= kHaveSnap; else fMorphFlags &= ~kHaveSnap; }
|
||||
void ISetDirty(bool on);
|
||||
|
||||
hsBool IResetShared(int iShare);
|
||||
bool IResetShared(int iShare);
|
||||
void IApplyShared(int iShare);
|
||||
hsBool IFindIndices(int iShare);
|
||||
bool IFindIndices(int iShare);
|
||||
void IReleaseIndices(int iShare);
|
||||
|
||||
void IRenormalize(hsTArray<plAccessSpan>& dst) const;
|
||||
@ -140,7 +140,7 @@ protected:
|
||||
|
||||
int32_t IFindPendingStateIndex(plKey meshKey) const; // Do we have pending state for this mesh?
|
||||
int32_t IFindSharedMeshIndex(plKey meshKey) const; // What's this mesh's index in our array?
|
||||
hsBool IIsUsingDrawable(plDrawable *draw); // Are we actively looking at spans in this drawable?
|
||||
bool IIsUsingDrawable(plDrawable *draw); // Are we actively looking at spans in this drawable?
|
||||
|
||||
// Internal functions for maintaining that all meshes share the same global weight(s) (fGlobalLayerRef)
|
||||
void ISetAllSharedToGlobal();
|
||||
@ -154,7 +154,7 @@ public:
|
||||
CLASSNAME_REGISTER( plMorphSequence );
|
||||
GETINTERFACE_ANY( plMorphSequence, plSingleModifier );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void AddTarget(plSceneObject* so);
|
||||
virtual void RemoveTarget(plSceneObject* so);
|
||||
@ -176,11 +176,11 @@ public:
|
||||
float GetWeight(int iLay, int iDel, plKey meshKey = nil) const;
|
||||
void SetWeight(int iLay, int iDel, float w, plKey meshKey = nil);
|
||||
|
||||
hsBool GetHaveSnap() const { return 0 != (fMorphFlags & kHaveSnap); }
|
||||
hsBool GetDirty() const { return 0 != (fMorphFlags & kDirty); }
|
||||
hsBool GetUseSharedMesh() const { return 0 != (fMorphFlags & kHaveShared); }
|
||||
bool GetHaveSnap() const { return 0 != (fMorphFlags & kHaveSnap); }
|
||||
bool GetDirty() const { return 0 != (fMorphFlags & kDirty); }
|
||||
bool GetUseSharedMesh() const { return 0 != (fMorphFlags & kHaveShared); }
|
||||
|
||||
void SetUseSharedMesh(hsBool on) { if(on)fMorphFlags |= kHaveShared; else fMorphFlags &= ~kHaveShared; }
|
||||
void SetUseSharedMesh(bool on) { if(on)fMorphFlags |= kHaveShared; else fMorphFlags &= ~kHaveShared; }
|
||||
void AddSharedMesh(plSharedMesh* mesh);
|
||||
void RemoveSharedMesh(plSharedMesh* mesh);
|
||||
static void FindMorphMods(const plSceneObject *so, hsTArray<const plMorphSequence*> &mods);
|
||||
|
@ -225,7 +225,7 @@ void plProxyGen::IGenerateProxy()
|
||||
hsGMaterial* mat = IGetProxyMaterial();
|
||||
hsAssert(mat, "Failed to create proxy material");
|
||||
|
||||
hsBool onCreate = !fProxyDrawables[idx];
|
||||
bool onCreate = !fProxyDrawables[idx];
|
||||
|
||||
fProxyIndex.SetCount(0);
|
||||
fProxyDrawables[idx] = ICreateProxy(mat, fProxyIndex, fProxyDrawables[idx]);
|
||||
@ -296,7 +296,7 @@ void plProxyGen::IDestroyProxy()
|
||||
fProxyMaterials.Reset();
|
||||
}
|
||||
|
||||
hsBool plProxyGen::MsgReceive(plMessage* msg)
|
||||
bool plProxyGen::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plProxyDrawMsg* pDraw = plProxyDrawMsg::ConvertNoRef(msg);
|
||||
if( pDraw && (pDraw->GetProxyFlags() & IGetProxyMsgType()) )
|
||||
@ -356,7 +356,7 @@ void plProxyGen::SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l)
|
||||
}
|
||||
}
|
||||
|
||||
void plProxyGen::SetDisable(hsBool on)
|
||||
void plProxyGen::SetDisable(bool on)
|
||||
{
|
||||
uint32_t idx = IGetProxyIndex();
|
||||
if( fProxyDrawables[idx] )
|
||||
|
@ -120,11 +120,11 @@ public:
|
||||
virtual ~plProxyGen();
|
||||
|
||||
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l);
|
||||
virtual void SetDisable(hsBool on);
|
||||
virtual void SetDisable(bool on);
|
||||
|
||||
virtual void Init(const hsKeyedObject* owner);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
};
|
||||
|
||||
|
@ -79,7 +79,7 @@ plDrawInterface *di = so->GetVolatileDrawInterface();
|
||||
}
|
||||
*/
|
||||
|
||||
hsBool plSharedMesh::MsgReceive(plMessage* msg)
|
||||
bool plSharedMesh::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plGenRefMsg *refMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (refMsg)
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
CLASSNAME_REGISTER( plSharedMesh );
|
||||
GETINTERFACE_ANY( plSharedMesh, hsKeyedObject );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
@ -87,7 +87,7 @@ class plSharedMeshBCMsg : public plMessage
|
||||
public:
|
||||
plDrawableSpans *fDraw;
|
||||
plSharedMesh *fMesh;
|
||||
hsBool fIsAdding;
|
||||
bool fIsAdding;
|
||||
|
||||
plSharedMeshBCMsg();
|
||||
~plSharedMeshBCMsg() {}
|
||||
|
@ -123,7 +123,7 @@ void plSpaceTree::Refresh()
|
||||
IRefreshRecur(fRoot);
|
||||
}
|
||||
|
||||
void plSpaceTree::SetTreeFlag(uint16_t f, hsBool on)
|
||||
void plSpaceTree::SetTreeFlag(uint16_t f, bool on)
|
||||
{
|
||||
if( IsEmpty() )
|
||||
return;
|
||||
@ -149,7 +149,7 @@ void plSpaceTree::ClearTreeFlag(uint16_t f)
|
||||
fTree[i].fFlags &= ~f;
|
||||
}
|
||||
|
||||
void plSpaceTree::SetLeafFlag(int16_t idx, uint16_t f, hsBool on)
|
||||
void plSpaceTree::SetLeafFlag(int16_t idx, uint16_t f, bool on)
|
||||
{
|
||||
if( IsEmpty() )
|
||||
return;
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
int16_t GetChild(int w) const { hsAssert(!(fFlags & kIsLeaf), "Getting Child of leaf node"); return fChildren[w]; }
|
||||
int16_t GetParent() const { return fParent; }
|
||||
int16_t GetLeaf() const { hsAssert(fFlags & kIsLeaf, "Getting leaf idx off interior node"); return fLeafIndex; }
|
||||
hsBool IsLeaf() const { return 0 != (fFlags & kIsLeaf); }
|
||||
bool IsLeaf() const { return 0 != (fFlags & kIsLeaf); }
|
||||
const hsBounds3Ext& GetWorldBounds() const { return fWorldBounds; }
|
||||
|
||||
// Kind of hate this. Would like to blast the whole thing in, but
|
||||
@ -138,8 +138,8 @@ public:
|
||||
|
||||
const plSpaceTreeNode& GetNode(int16_t w) const { return fTree[w]; }
|
||||
int16_t GetRoot() const { return fRoot; }
|
||||
hsBool IsRoot(int16_t w) const { return fRoot == w; }
|
||||
hsBool IsLeaf(int16_t w) const { return GetNode(w).IsLeaf(); }
|
||||
bool IsRoot(int16_t w) const { return fRoot == w; }
|
||||
bool IsLeaf(int16_t w) const { return GetNode(w).IsLeaf(); }
|
||||
|
||||
void HarvestLeaves(hsBitVector& totList, hsBitVector& list) const;
|
||||
void HarvestLeaves(hsBitVector& list) const;
|
||||
@ -162,20 +162,20 @@ public:
|
||||
uint16_t GetHarvestFlags() const { return fHarvestFlags; }
|
||||
|
||||
uint16_t HasLeafFlag(int16_t w, uint16_t f) const { return GetNode(w).fFlags & f; }
|
||||
void SetLeafFlag(int16_t w, uint16_t f, hsBool on=true);
|
||||
void SetLeafFlag(int16_t w, uint16_t f, bool on=true);
|
||||
void ClearLeafFlag(int16_t w, uint16_t f);
|
||||
void ClearTreeFlag(uint16_t f);
|
||||
void SetTreeFlag(uint16_t f, hsBool on=true);
|
||||
void SetTreeFlag(uint16_t f, bool on=true);
|
||||
|
||||
hsBool IsDisabled(uint16_t w) const { return (GetNode(w).fFlags & plSpaceTreeNode::kDisabled) || (fCache && !fCache->IsBitSet(w)); }
|
||||
bool IsDisabled(uint16_t w) const { return (GetNode(w).fFlags & plSpaceTreeNode::kDisabled) || (fCache && !fCache->IsBitSet(w)); }
|
||||
|
||||
// Should GetWorldBounds check and refresh if needed?
|
||||
const hsBounds3Ext& GetWorldBounds() const { return GetNode(GetRoot()).fWorldBounds; }
|
||||
|
||||
void MoveLeaf(int16_t idx, const hsBounds3Ext& newWorldBnd);
|
||||
void Refresh();
|
||||
hsBool IsEmpty() const { return 0 != (GetNode(GetRoot()).fFlags & plSpaceTreeNode::kEmpty); }
|
||||
hsBool IsDirty() const { return 0 != (GetNode(GetRoot()).fFlags & plSpaceTreeNode::kDirty); }
|
||||
bool IsEmpty() const { return 0 != (GetNode(GetRoot()).fFlags & plSpaceTreeNode::kEmpty); }
|
||||
bool IsDirty() const { return 0 != (GetNode(GetRoot()).fFlags & plSpaceTreeNode::kDirty); }
|
||||
void MakeDirty() { fTree[GetRoot()].fFlags |= plSpaceTreeNode::kDirty; }
|
||||
|
||||
int16_t GetNumLeaves() const { return fNumLeaves; }
|
||||
|
@ -411,7 +411,7 @@ void plSpaceTreeMaker::Cleanup()
|
||||
fDisabled.Reset();
|
||||
}
|
||||
|
||||
int32_t plSpaceTreeMaker::AddLeaf(const hsBounds3Ext& worldBnd, hsBool disable)
|
||||
int32_t plSpaceTreeMaker::AddLeaf(const hsBounds3Ext& worldBnd, bool disable)
|
||||
{
|
||||
plSpacePrepNode* leaf = new plSpacePrepNode;
|
||||
fLeaves.Append(leaf);
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
void Cleanup();
|
||||
|
||||
void Reset();
|
||||
int32_t AddLeaf(const hsBounds3Ext& worldBnd, hsBool disable=false);
|
||||
int32_t AddLeaf(const hsBounds3Ext& worldBnd, bool disable=false);
|
||||
plSpaceTree* MakeTree();
|
||||
|
||||
void TestTree(); // development only - NUKE ME mf horse
|
||||
|
@ -151,8 +151,8 @@ public:
|
||||
|
||||
void SetLocalToWorld(const hsMatrix44& l2w);
|
||||
|
||||
hsBool HasPosDelta() const { return fPosDelta != nil; }
|
||||
hsBool HasColor() const { return fCol != nil; }
|
||||
bool HasPosDelta() const { return fPosDelta != nil; }
|
||||
bool HasColor() const { return fCol != nil; }
|
||||
|
||||
static uint16_t PosStrideFromEncoding(const plSpanEncoding& encoding)
|
||||
{
|
||||
@ -241,7 +241,7 @@ public:
|
||||
|
||||
fNumVertsLeft--;
|
||||
}
|
||||
hsBool More() const { return fNumVertsLeft > 0; }
|
||||
bool More() const { return fNumVertsLeft > 0; }
|
||||
|
||||
hsVector3 DelPos() const
|
||||
{
|
||||
|
@ -58,12 +58,12 @@ class plSpanTemplate
|
||||
public:
|
||||
// 99% of the time, the defaults are fine. Just tell me
|
||||
// how many UVWs, and whether you've got color.
|
||||
static uint16_t MakeFormat(hsBool hasColor, int numUVWs,
|
||||
hsBool hasWgtIdx = false,
|
||||
static uint16_t MakeFormat(bool hasColor, int numUVWs,
|
||||
bool hasWgtIdx = false,
|
||||
int numWgts = 0,
|
||||
hsBool hasNorm = true,
|
||||
hsBool hasPos = true,
|
||||
hsBool hasColor2 = true)
|
||||
bool hasNorm = true,
|
||||
bool hasPos = true,
|
||||
bool hasColor2 = true)
|
||||
{
|
||||
return (hasPos ? kPosMask : 0)
|
||||
| (hasNorm ? kNormMask : 0)
|
||||
@ -210,7 +210,7 @@ public:
|
||||
return nil;
|
||||
}
|
||||
|
||||
hsBool ValidateInput(Channel chan, int i, int j) const
|
||||
bool ValidateInput(Channel chan, int i, int j) const
|
||||
{
|
||||
switch(chan)
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ void plSpan::AddAuxSpan(plAuxSpan* aux)
|
||||
// PermaLights are permanently assigned to a set of spans. There's no checking
|
||||
// for in range or anything, they are just on.
|
||||
|
||||
void plSpan::AddPermaLight(plLightInfo* li, hsBool proj)
|
||||
void plSpan::AddPermaLight(plLightInfo* li, bool proj)
|
||||
{
|
||||
if( li )
|
||||
{
|
||||
@ -157,7 +157,7 @@ void plSpan::AddPermaLight(plLightInfo* li, hsBool proj)
|
||||
}
|
||||
}
|
||||
|
||||
void plSpan::RemovePermaLight(plLightInfo* li, hsBool proj)
|
||||
void plSpan::RemovePermaLight(plLightInfo* li, bool proj)
|
||||
{
|
||||
hsTArray<plLightInfo*>& lights = proj ? fPermaProjs : fPermaLights;
|
||||
int idx = lights.Find(li);
|
||||
@ -172,7 +172,7 @@ void plSpan::RemovePermaLight(plLightInfo* li, hsBool proj)
|
||||
//// AddLight ////////////////////////////////////////////////////////////////
|
||||
// Smart function for maintaining the sorted list of lights for a plSpan.
|
||||
|
||||
void plSpan::AddLight( plLightInfo *li, float strength, float scale, hsBool proj ) const
|
||||
void plSpan::AddLight( plLightInfo *li, float strength, float scale, bool proj ) const
|
||||
{
|
||||
hsTArray<plLightInfo*>& lights = proj ? fProjectors : fLights;
|
||||
hsTArray<float>& strengths = proj ? fProjStrengths : fLightStrengths;
|
||||
@ -224,7 +224,7 @@ void plSpan::ClearLights() const
|
||||
|
||||
//// CanMergeInto ////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plSpan::CanMergeInto( plSpan *other )
|
||||
bool plSpan::CanMergeInto( plSpan *other )
|
||||
{
|
||||
if( fTypeMask ^ other->fTypeMask )
|
||||
{
|
||||
@ -375,7 +375,7 @@ void plVertexSpan::Write( hsStream* stream )
|
||||
stream->WriteLE32( fVLength );
|
||||
}
|
||||
|
||||
hsBool plVertexSpan::CanMergeInto( plSpan *other )
|
||||
bool plVertexSpan::CanMergeInto( plSpan *other )
|
||||
{
|
||||
if( !plSpan::CanMergeInto( other ) )
|
||||
return false;
|
||||
@ -470,7 +470,7 @@ void plIcicle::Destroy( void )
|
||||
|
||||
//// CanMergeInto ////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plIcicle::CanMergeInto( plSpan *other )
|
||||
bool plIcicle::CanMergeInto( plSpan *other )
|
||||
{
|
||||
if( !plVertexSpan::CanMergeInto( other ) )
|
||||
return false;
|
||||
@ -530,7 +530,7 @@ plParticleSpan::plParticleSpan() : plIcicle()
|
||||
|
||||
//// CanMergeInto ////////////////////////////////////////////////////////////
|
||||
|
||||
hsBool plParticleSpan::CanMergeInto( plSpan *other )
|
||||
bool plParticleSpan::CanMergeInto( plSpan *other )
|
||||
{
|
||||
return plIcicle::CanMergeInto( other );
|
||||
}
|
||||
|
@ -174,25 +174,25 @@ class plSpan
|
||||
|
||||
void SetShadowBit(uint32_t idx) const { fShadowBits.SetBit(idx); }
|
||||
void ClearShadowBits() const { fShadowBits.Clear(); }
|
||||
hsBool IsShadowBitSet(uint32_t idx) const { return fShadowBits.IsBitSet(idx); }
|
||||
bool IsShadowBitSet(uint32_t idx) const { return fShadowBits.IsBitSet(idx); }
|
||||
void ClearLights() const;
|
||||
|
||||
void AddLight( plLightInfo* li, float strength, float scale, hsBool proj ) const;
|
||||
void AddLight( plLightInfo* li, float strength, float scale, bool proj ) const;
|
||||
|
||||
hsTArray<plLightInfo*>& GetLightList(hsBool proj) const { return proj ? fProjectors : fLights; }
|
||||
hsTArray<plLightInfo*>& GetLightList(bool proj) const { return proj ? fProjectors : fLights; }
|
||||
|
||||
uint32_t GetNumLights(hsBool proj) const { return proj ? fProjectors.GetCount() : fLights.GetCount(); }
|
||||
plLightInfo* GetLight(int i, hsBool proj) const { return proj ? fProjectors[i] : fLights[i]; }
|
||||
float GetLightStrength(int i, hsBool proj) const { return proj ? fProjStrengths[i] : fLightStrengths[i]; }
|
||||
float GetLightScale(int i, hsBool proj) const { return proj ? fProjScales[i] : fLightScales[i]; }
|
||||
uint32_t GetNumLights(bool proj) const { return proj ? fProjectors.GetCount() : fLights.GetCount(); }
|
||||
plLightInfo* GetLight(int i, bool proj) const { return proj ? fProjectors[i] : fLights[i]; }
|
||||
float GetLightStrength(int i, bool proj) const { return proj ? fProjStrengths[i] : fLightStrengths[i]; }
|
||||
float GetLightScale(int i, bool proj) const { return proj ? fProjScales[i] : fLightScales[i]; }
|
||||
|
||||
void AddPermaLight(plLightInfo* li, hsBool proj);
|
||||
void RemovePermaLight(plLightInfo* li, hsBool proj);
|
||||
void AddPermaLight(plLightInfo* li, bool proj);
|
||||
void RemovePermaLight(plLightInfo* li, bool proj);
|
||||
|
||||
const hsBitVector& GetVisSet() const { return fVisSet; }
|
||||
const hsBitVector& GetVisNot() const { return fVisNot; }
|
||||
void SetVisBit(uint32_t w, hsBool on) { fVisSet.SetBit(w, on); }
|
||||
void SetVisNot(uint32_t w, hsBool on) { fVisNot.SetBit(w, on); }
|
||||
void SetVisBit(uint32_t w, bool on) { fVisSet.SetBit(w, on); }
|
||||
void SetVisNot(uint32_t w, bool on) { fVisNot.SetBit(w, on); }
|
||||
|
||||
void RemoveAuxSpan(plAuxSpan* aux);
|
||||
void AddAuxSpan(plAuxSpan* aux);
|
||||
@ -202,7 +202,7 @@ class plSpan
|
||||
virtual void Read( hsStream* stream );
|
||||
virtual void Write( hsStream* stream );
|
||||
|
||||
virtual hsBool CanMergeInto( plSpan* other );
|
||||
virtual bool CanMergeInto( plSpan* other );
|
||||
virtual void MergeInto( plSpan* other );
|
||||
virtual void Destroy( void );
|
||||
|
||||
@ -233,7 +233,7 @@ public:
|
||||
virtual void Read( hsStream* stream );
|
||||
virtual void Write( hsStream* stream );
|
||||
|
||||
virtual hsBool CanMergeInto( plSpan* other );
|
||||
virtual bool CanMergeInto( plSpan* other );
|
||||
virtual void MergeInto( plSpan* other );
|
||||
};
|
||||
|
||||
@ -260,7 +260,7 @@ class plIcicle : public plVertexSpan
|
||||
virtual void Read( hsStream* stream );
|
||||
virtual void Write( hsStream* stream );
|
||||
|
||||
virtual hsBool CanMergeInto( plSpan* other );
|
||||
virtual bool CanMergeInto( plSpan* other );
|
||||
virtual void MergeInto( plSpan* other );
|
||||
virtual void Destroy( void );
|
||||
};
|
||||
@ -288,7 +288,7 @@ class plParticleSpan : public plIcicle
|
||||
virtual void Read( hsStream* stream ) { /*plParticleSpans don't read in!*/ }
|
||||
virtual void Write( hsStream* stream ) { /*plParticleSpans don't write out!*/ }
|
||||
|
||||
virtual hsBool CanMergeInto( plSpan* other );
|
||||
virtual bool CanMergeInto( plSpan* other );
|
||||
virtual void MergeInto( plSpan* other );
|
||||
virtual void Destroy( void );
|
||||
};
|
||||
|
@ -77,7 +77,7 @@ plVisLOSMgr* plVisLOSMgr::Instance()
|
||||
return &inst;
|
||||
}
|
||||
|
||||
hsBool plVisLOSMgr::ICheckSpaceTreeRecur(plSpaceTree* space, int which, hsTArray<plSpaceHit>& hits)
|
||||
bool plVisLOSMgr::ICheckSpaceTreeRecur(plSpaceTree* space, int which, hsTArray<plSpaceHit>& hits)
|
||||
{
|
||||
const plSpaceTreeNode& node = space->GetNode(which);
|
||||
|
||||
@ -101,7 +101,7 @@ hsBool plVisLOSMgr::ICheckSpaceTreeRecur(plSpaceTree* space, int which, hsTArray
|
||||
// else recurse on its children
|
||||
else
|
||||
{
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
if( ICheckSpaceTreeRecur(space, node.GetChild(0), hits) )
|
||||
retVal = true;
|
||||
|
||||
@ -123,7 +123,7 @@ struct plCompSpaceHit : public std::binary_function<plSpaceHit, plSpaceHit, bool
|
||||
};
|
||||
|
||||
|
||||
hsBool plVisLOSMgr::ICheckSpaceTree(plSpaceTree* space, hsTArray<plSpaceHit>& hits)
|
||||
bool plVisLOSMgr::ICheckSpaceTree(plSpaceTree* space, hsTArray<plSpaceHit>& hits)
|
||||
{
|
||||
hits.SetCount(0);
|
||||
|
||||
@ -131,7 +131,7 @@ hsBool plVisLOSMgr::ICheckSpaceTree(plSpaceTree* space, hsTArray<plSpaceHit>& hi
|
||||
return false;
|
||||
|
||||
// Hierarchical search down the tree for bounds intersecting the current ray.
|
||||
hsBool retVal = ICheckSpaceTreeRecur(space, space->GetRoot(), hits);
|
||||
bool retVal = ICheckSpaceTreeRecur(space, space->GetRoot(), hits);
|
||||
|
||||
// Now sort them front to back.
|
||||
plSpaceHit* begin = hits.AcquireArray();
|
||||
@ -142,7 +142,7 @@ hsBool plVisLOSMgr::ICheckSpaceTree(plSpaceTree* space, hsTArray<plSpaceHit>& hi
|
||||
return retVal;
|
||||
}
|
||||
|
||||
hsBool plVisLOSMgr::ISetup(const hsPoint3& pStart, const hsPoint3& pEnd)
|
||||
bool plVisLOSMgr::ISetup(const hsPoint3& pStart, const hsPoint3& pEnd)
|
||||
{
|
||||
fCurrFrom = pStart;
|
||||
fCurrTarg = pEnd;
|
||||
@ -153,7 +153,7 @@ hsBool plVisLOSMgr::ISetup(const hsPoint3& pStart, const hsPoint3& pEnd)
|
||||
return fMaxDist > kMinMaxDist;
|
||||
}
|
||||
|
||||
hsBool plVisLOSMgr::Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit& hit)
|
||||
bool plVisLOSMgr::Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit& hit)
|
||||
{
|
||||
if( !fPageMgr )
|
||||
return false;
|
||||
@ -174,7 +174,7 @@ hsBool plVisLOSMgr::Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit
|
||||
// Our max distance can be changing as we do this, because a
|
||||
// face hit will limit how far we need to look. When we hit the
|
||||
// first node with a closest distance < fMaxDist, we're done.
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
|
||||
int i;
|
||||
for( i = 0; i < hits.GetCount(); i++ )
|
||||
@ -189,13 +189,13 @@ hsBool plVisLOSMgr::Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit
|
||||
return retVal;
|
||||
}
|
||||
|
||||
hsBool plVisLOSMgr::ICheckSceneNode(plSceneNode* node, plVisHit& hit)
|
||||
bool plVisLOSMgr::ICheckSceneNode(plSceneNode* node, plVisHit& hit)
|
||||
{
|
||||
static hsTArray<plSpaceHit> hits;
|
||||
if( !ICheckSpaceTree(node->GetSpaceTree(), hits) )
|
||||
return false;
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
int i;
|
||||
for( i = 0; i < hits.GetCount(); i++ )
|
||||
{
|
||||
@ -214,7 +214,7 @@ hsBool plVisLOSMgr::ICheckSceneNode(plSceneNode* node, plVisHit& hit)
|
||||
}
|
||||
|
||||
|
||||
hsBool plVisLOSMgr::ICheckDrawable(plDrawable* d, plVisHit& hit)
|
||||
bool plVisLOSMgr::ICheckDrawable(plDrawable* d, plVisHit& hit)
|
||||
{
|
||||
plDrawableSpans* ds = plDrawableSpans::ConvertNoRef(d);
|
||||
if( !ds )
|
||||
@ -224,11 +224,11 @@ hsBool plVisLOSMgr::ICheckDrawable(plDrawable* d, plVisHit& hit)
|
||||
if( !ICheckSpaceTree(ds->GetSpaceTree(), hits) )
|
||||
return false;
|
||||
|
||||
const hsBool isOpaque = !ds->GetRenderLevel().Level();
|
||||
const bool isOpaque = !ds->GetRenderLevel().Level();
|
||||
|
||||
const hsTArray<plSpan *> spans = ds->GetSpanArray();
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
int i;
|
||||
for( i = 0; i < hits.GetCount(); i++ )
|
||||
{
|
||||
@ -245,7 +245,7 @@ hsBool plVisLOSMgr::ICheckDrawable(plDrawable* d, plVisHit& hit)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
hsBool plVisLOSMgr::ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit& hit)
|
||||
bool plVisLOSMgr::ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit& hit)
|
||||
{
|
||||
if( !(dr->GetSpan(spanIdx)->fTypeMask & plSpan::kIcicleSpan) )
|
||||
return false;
|
||||
@ -253,9 +253,9 @@ hsBool plVisLOSMgr::ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit&
|
||||
plAccessSpan src;
|
||||
plAccessGeometry::Instance()->OpenRO(dr, spanIdx, src);
|
||||
|
||||
const hsBool twoSided = !!(src.GetMaterial()->GetLayer(0)->GetMiscFlags() & hsGMatState::kMiscTwoSided);
|
||||
const bool twoSided = !!(src.GetMaterial()->GetLayer(0)->GetMiscFlags() & hsGMatState::kMiscTwoSided);
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
|
||||
// We move into local space, look for hits, and convert the closest we find
|
||||
// (if any) back into world space at the end.
|
||||
@ -330,7 +330,7 @@ hsBool plVisLOSMgr::ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit&
|
||||
return retVal;
|
||||
}
|
||||
|
||||
hsBool plVisLOSMgr::ICheckBound(const hsBounds3Ext& bnd, float& closest)
|
||||
bool plVisLOSMgr::ICheckBound(const hsBounds3Ext& bnd, float& closest)
|
||||
{
|
||||
if( bnd.GetType() != kBoundsNormal )
|
||||
return false;
|
||||
@ -354,7 +354,7 @@ hsBool plVisLOSMgr::ICheckBound(const hsBounds3Ext& bnd, float& closest)
|
||||
hsPoint3 corn[8];
|
||||
bnd.GetCorners(corn);
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
|
||||
const hsPoint3& currFrom = fCurrFrom;
|
||||
const hsPoint3& currTarg = fCurrTarg;
|
||||
@ -416,7 +416,7 @@ hsBool plVisLOSMgr::ICheckBound(const hsBounds3Ext& bnd, float& closest)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plVisLOSMgr::CursorCheck(plVisHit& hit)
|
||||
bool plVisLOSMgr::CursorCheck(plVisHit& hit)
|
||||
{
|
||||
int32_t sx= int32_t(plMouseDevice::Instance()->GetCursorX() * fPipe->Width());
|
||||
int32_t sy= int32_t(plMouseDevice::Instance()->GetCursorY() * fPipe->Height());
|
||||
|
@ -79,17 +79,17 @@ protected:
|
||||
hsPoint3 fCurrFrom;
|
||||
hsPoint3 fCurrTarg;
|
||||
|
||||
hsBool ISetup(const hsPoint3& pStart, const hsPoint3& pEnd);
|
||||
hsBool ICheckBound(const hsBounds3Ext& bnd, float& closest);
|
||||
hsBool ICheckSpaceTreeRecur(plSpaceTree* space, int which, hsTArray<plSpaceHit>& hits);
|
||||
hsBool ICheckSpaceTree(plSpaceTree* space, hsTArray<plSpaceHit>& hits);
|
||||
hsBool ICheckSceneNode(plSceneNode* node, plVisHit& hit);
|
||||
hsBool ICheckDrawable(plDrawable* d, plVisHit& hit);
|
||||
hsBool ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit& hit);
|
||||
bool ISetup(const hsPoint3& pStart, const hsPoint3& pEnd);
|
||||
bool ICheckBound(const hsBounds3Ext& bnd, float& closest);
|
||||
bool ICheckSpaceTreeRecur(plSpaceTree* space, int which, hsTArray<plSpaceHit>& hits);
|
||||
bool ICheckSpaceTree(plSpaceTree* space, hsTArray<plSpaceHit>& hits);
|
||||
bool ICheckSceneNode(plSceneNode* node, plVisHit& hit);
|
||||
bool ICheckDrawable(plDrawable* d, plVisHit& hit);
|
||||
bool ICheckSpan(plDrawableSpans* dr, uint32_t spanIdx, plVisHit& hit);
|
||||
|
||||
public:
|
||||
hsBool Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit& hit);
|
||||
hsBool CursorCheck(plVisHit& hit);
|
||||
bool Check(const hsPoint3& pStart, const hsPoint3& pEnd, plVisHit& hit);
|
||||
bool CursorCheck(plVisHit& hit);
|
||||
|
||||
static plVisLOSMgr* Instance();
|
||||
|
||||
|
@ -430,7 +430,7 @@ void plWaveSet7::Write(hsStream* stream, hsResMgr* mgr)
|
||||
}
|
||||
}
|
||||
|
||||
hsBool plWaveSet7::MsgReceive(plMessage* msg)
|
||||
bool plWaveSet7::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plEvalMsg* update = plEvalMsg::ConvertNoRef(msg);
|
||||
if( update )
|
||||
@ -444,7 +444,7 @@ hsBool plWaveSet7::MsgReceive(plMessage* msg)
|
||||
IRestartLog();
|
||||
IRestartGraph();
|
||||
|
||||
plCONST(hsBool) reRender(false);
|
||||
plCONST(bool) reRender(false);
|
||||
if( reRender || (fTrialUpdate & kReRenderEnvMap) )
|
||||
{
|
||||
plDynamicEnvMap* envMap = plDynamicEnvMap::ConvertNoRef(fEnvMap);
|
||||
@ -519,7 +519,7 @@ hsBool plWaveSet7::MsgReceive(plMessage* msg)
|
||||
return plMultiModifier::MsgReceive(msg);
|
||||
}
|
||||
|
||||
hsBool plWaveSet7::IAnyBoundsVisible(plPipeline* pipe) const
|
||||
bool plWaveSet7::IAnyBoundsVisible(plPipeline* pipe) const
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < fTargBnds.GetCount(); i++ )
|
||||
@ -530,7 +530,7 @@ hsBool plWaveSet7::IAnyBoundsVisible(plPipeline* pipe) const
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plWaveSet7::IOnReceive(plGenRefMsg* refMsg)
|
||||
bool plWaveSet7::IOnReceive(plGenRefMsg* refMsg)
|
||||
{
|
||||
switch( refMsg->fType )
|
||||
{
|
||||
@ -638,7 +638,7 @@ hsBool plWaveSet7::IOnReceive(plGenRefMsg* refMsg)
|
||||
return false;
|
||||
}
|
||||
|
||||
hsBool plWaveSet7::IOnRemove(plGenRefMsg* refMsg)
|
||||
bool plWaveSet7::IOnRemove(plGenRefMsg* refMsg)
|
||||
{
|
||||
switch( refMsg->fType )
|
||||
{
|
||||
@ -786,7 +786,7 @@ void plWaveSet7::IUpdateWaves(float dt)
|
||||
}
|
||||
|
||||
// return true if we've finished this transition.
|
||||
hsBool plWaveSet7::ITransContinue(float dt)
|
||||
bool plWaveSet7::ITransContinue(float dt)
|
||||
{
|
||||
float currFade = (fFreqMod[fTransistor] += fTransDel * dt);
|
||||
|
||||
@ -847,7 +847,7 @@ void plWaveSet7::ITransition(float dt)
|
||||
|
||||
}
|
||||
|
||||
hsBool plWaveSet7::ITransTexContinue(float dt)
|
||||
bool plWaveSet7::ITransTexContinue(float dt)
|
||||
{
|
||||
float currFade = (fTexWaveFade[fTexTrans] += fTexTransDel * dt);
|
||||
|
||||
@ -3564,7 +3564,7 @@ void plWaveSet7::AddShoreTest(plKey& key)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
hsBool plWaveSet7::SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts)
|
||||
bool plWaveSet7::SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts)
|
||||
{
|
||||
// We'll assume that if we set the vertexshader, we set the pixelshader too.
|
||||
if( fRipVShader && (mat->GetLayer(0)->GetVertexShader() == fRipVShader) )
|
||||
|
@ -352,7 +352,7 @@ protected:
|
||||
void ICalcScale();
|
||||
void IUpdateWaves(float dt);
|
||||
void IUpdateWave(float dt, int i);
|
||||
hsBool IAnyBoundsVisible(plPipeline* pipe) const;
|
||||
bool IAnyBoundsVisible(plPipeline* pipe) const;
|
||||
|
||||
void IInitWave(int i);
|
||||
void IReInitWaves();
|
||||
@ -370,15 +370,15 @@ protected:
|
||||
|
||||
void ISetWindSpeed(float s);
|
||||
|
||||
hsBool IOnReceive(plGenRefMsg* refMsg);
|
||||
hsBool IOnRemove(plGenRefMsg* refMsg);
|
||||
bool IOnReceive(plGenRefMsg* refMsg);
|
||||
bool IOnRemove(plGenRefMsg* refMsg);
|
||||
|
||||
hsBool ITransContinue(float dt);
|
||||
bool ITransContinue(float dt);
|
||||
void IStartTransition(float dt);
|
||||
float ITransitionDelay() const;
|
||||
void ITransition(float dt);
|
||||
|
||||
hsBool ITransTexContinue(float dt);
|
||||
bool ITransTexContinue(float dt);
|
||||
void IStartTexTransition(float dt);
|
||||
void ITransTex(float dt);
|
||||
|
||||
@ -494,9 +494,9 @@ public:
|
||||
CLASSNAME_REGISTER( plWaveSet7 );
|
||||
GETINTERFACE_ANY( plWaveSet7, plWaveSetBase );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; }
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty) { return false; }
|
||||
|
||||
int32_t GetNumProperties() const { return kNumProps; }
|
||||
|
||||
@ -635,7 +635,7 @@ public:
|
||||
void AddBuoy(plKey soKey);
|
||||
void RemoveBuoy(plKey soKey);
|
||||
|
||||
virtual hsBool SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts);
|
||||
virtual bool SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts);
|
||||
|
||||
virtual float GetHeight() const { return State().fWaterHeight; }
|
||||
|
||||
@ -649,10 +649,10 @@ public:
|
||||
|
||||
void StopLog();
|
||||
void StartLog();
|
||||
hsBool Logging() const { return fStatusLog != nil; }
|
||||
bool Logging() const { return fStatusLog != nil; }
|
||||
void StartGraph();
|
||||
void StopGraph();
|
||||
hsBool Graphing() const { return fStatusGraph != nil; }
|
||||
bool Graphing() const { return fStatusGraph != nil; }
|
||||
};
|
||||
|
||||
#endif // plWaveSet7_inc
|
||||
|
@ -61,11 +61,11 @@ public:
|
||||
CLASSNAME_REGISTER( plWaveSetBase );
|
||||
GETINTERFACE_ANY( plWaveSetBase, plMultiModifier );
|
||||
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return false; }
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty) { return false; }
|
||||
|
||||
int32_t GetNumProperties() const { return 0; }
|
||||
|
||||
virtual hsBool SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts) = 0;
|
||||
virtual bool SetupRippleMat(hsGMaterial* mat, const plRipVSConsts& ripConsts) = 0;
|
||||
virtual float GetHeight() const = 0;
|
||||
virtual hsVector3 GetWindDir() const = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user