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

Obliterate hsBool

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

View File

@ -181,7 +181,7 @@ void plLightInfo::GetStrengthAndScale(const hsBounds3Ext& bnd, float& strength,
return;
}
void plLightInfo::GetAffectedForced(const plSpaceTree* space, hsBitVector& list, hsBool charac)
void plLightInfo::GetAffectedForced(const plSpaceTree* space, hsBitVector& list, bool charac)
{
Refresh();
@ -195,7 +195,7 @@ void plLightInfo::GetAffectedForced(const plSpaceTree* space, hsBitVector& list,
}
}
void plLightInfo::GetAffected(const plSpaceTree* space, hsBitVector& list, hsBool charac)
void plLightInfo::GetAffected(const plSpaceTree* space, hsBitVector& list, bool charac)
{
Refresh();
@ -215,7 +215,7 @@ void plLightInfo::GetAffected(const plSpaceTree* space, hsBitVector& list, hsBoo
}
}
const hsTArray<int16_t>& plLightInfo::GetAffected(plSpaceTree* space, const hsTArray<int16_t>& visList, hsTArray<int16_t>& litList, hsBool charac)
const hsTArray<int16_t>& plLightInfo::GetAffected(plSpaceTree* space, const hsTArray<int16_t>& visList, hsTArray<int16_t>& litList, bool charac)
{
Refresh();
@ -249,7 +249,7 @@ const hsTArray<int16_t>& plLightInfo::GetAffected(plSpaceTree* space, const hsTA
// flag taken in is from plDrawInterface, not our props flags. So we have to
// translate...
void plLightInfo::SetProperty( int prop, hsBool on )
void plLightInfo::SetProperty( int prop, bool on )
{
plObjInterface::SetProperty(prop, on);
if( kDisable == prop )
@ -368,7 +368,7 @@ void plLightInfo::IRemoveVisRegion(plVisRegion* reg)
}
hsBool plLightInfo::MsgReceive(plMessage* msg)
bool plLightInfo::MsgReceive(plMessage* msg)
{
plRenderMsg* rendMsg = plRenderMsg::ConvertNoRef(msg);
if( rendMsg )

View File

@ -138,7 +138,7 @@ protected:
float fMaxStrength;
hsBool fRegisteredForRenderMsg;
bool fRegisteredForRenderMsg;
// Small shadow section
hsBitVector fSlaveBits;
@ -166,31 +166,31 @@ public:
hsGDeviceRef* GetDeviceRef() const { return fDeviceRef; }
// Dirty state is local to this machine, so shouldn't be in the network synchronized properties.
hsBool IsDirty() const { return 0 != (fVolFlags & kVolDirty); }
void SetDirty(hsBool on=true) { if(on)fVolFlags |= kVolDirty; else fVolFlags &= ~kVolDirty; }
bool IsDirty() const { return 0 != (fVolFlags & kVolDirty); }
void SetDirty(bool on=true) { if(on)fVolFlags |= kVolDirty; else fVolFlags &= ~kVolDirty; }
hsBool IsEmpty() const { return 0 != (fVolFlags & kVolEmpty); }
void SetEmpty(hsBool on=true) { if(on)fVolFlags |= kVolEmpty; else fVolFlags &= ~kVolEmpty; }
bool IsEmpty() const { return 0 != (fVolFlags & kVolEmpty); }
void SetEmpty(bool on=true) { if(on)fVolFlags |= kVolEmpty; else fVolFlags &= ~kVolEmpty; }
hsBool IsZero() const { return 0 != (fVolFlags & kVolZero); }
void SetZero(hsBool on) { if(on)fVolFlags |= kVolZero; else fVolFlags &= ~kVolZero; }
bool IsZero() const { return 0 != (fVolFlags & kVolZero); }
void SetZero(bool on) { if(on)fVolFlags |= kVolZero; else fVolFlags &= ~kVolZero; }
inline hsBool IsIdle() const;
inline bool IsIdle() const;
hsBool OverAll() const { return GetProperty(kLPOverAll); }
bool OverAll() const { return GetProperty(kLPOverAll); }
hsBool IsShadowCaster() const { return GetProperty(kLPCastShadows); }
void SetShadowCaster(hsBool on) { SetProperty(kLPCastShadows, on); }
bool IsShadowCaster() const { return GetProperty(kLPCastShadows); }
void SetShadowCaster(bool on) { SetProperty(kLPCastShadows, on); }
void Refresh() { if( IsDirty() ) { IRefresh(); SetDirty(false); } }
virtual void GetStrengthAndScale(const hsBounds3Ext& bnd, float& strength, float& scale) const;
hsBool AffectsBound(const hsBounds3Ext& bnd) { return IGetIsect() ? IGetIsect()->Test(bnd) != kVolumeCulled : true; }
void GetAffectedForced(const plSpaceTree* space, hsBitVector& list, hsBool charac);
void GetAffected(const plSpaceTree* space, hsBitVector& list, hsBool charac);
const hsTArray<int16_t>& GetAffected(plSpaceTree* space, const hsTArray<int16_t>& visList, hsTArray<int16_t>& litList, hsBool charac);
hsBool InVisSet(const hsBitVector& visSet) const { return fVisSet.Overlap(visSet); }
hsBool InVisNot(const hsBitVector& visNot) const { return fVisNot.Overlap(visNot); }
bool AffectsBound(const hsBounds3Ext& bnd) { return IGetIsect() ? IGetIsect()->Test(bnd) != kVolumeCulled : true; }
void GetAffectedForced(const plSpaceTree* space, hsBitVector& list, bool charac);
void GetAffected(const plSpaceTree* space, hsBitVector& list, bool charac);
const hsTArray<int16_t>& GetAffected(plSpaceTree* space, const hsTArray<int16_t>& visList, hsTArray<int16_t>& litList, bool charac);
bool InVisSet(const hsBitVector& visSet) const { return fVisSet.Overlap(visSet); }
bool InVisNot(const hsBitVector& visNot) const { return fVisNot.Overlap(visNot); }
void SetAmbient(const hsColorRGBA& c) { fAmbient = c; SetDirty(); }
void SetDiffuse(const hsColorRGBA& c) { fDiffuse = c; SetDirty(); }
@ -202,7 +202,7 @@ public:
plLayerInterface* GetProjection() const { return fProjection; }
virtual void SetProperty(int prop, hsBool on);
virtual void SetProperty(int prop, bool on);
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l);
virtual const hsMatrix44& GetLocalToWorld() const;
@ -219,12 +219,12 @@ 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);
virtual void Unlink( void );
virtual void Link( plLightInfo **back );
virtual plLightInfo *GetNext( void ) { return fNextDevPtr; }
virtual hsBool IsLinked( void ) { return ( fNextDevPtr != nil || fPrevDevPtr != nil ) ? true : false; }
virtual bool IsLinked( void ) { return ( fNextDevPtr != nil || fPrevDevPtr != nil ) ? true : false; }
// New shadow
void ClearSlaveBits() { fSlaveBits.Clear(); }
@ -333,7 +333,7 @@ public:
virtual hsVector3 GetNegativeWorldDirection(const hsPoint3& pos) const;
hsBool IsAttenuated() const { return (fAttenLinear != 0)||(fAttenQuadratic != 0) || ( fAttenCutoff != 0 ); }
bool IsAttenuated() const { return (fAttenLinear != 0)||(fAttenQuadratic != 0) || ( fAttenCutoff != 0 ); }
float GetRadius() const;
float GetConstantAttenuation() const { return fAttenConst; }
@ -402,7 +402,7 @@ public:
};
inline hsBool plLightInfo::IsIdle() const
inline bool plLightInfo::IsIdle() const
{
if( GetProperty(kDisable) )
return true;

View File

@ -57,7 +57,7 @@ plLightProxy::~plLightProxy()
{
}
hsBool plLightProxy::Init(plLightInfo* liInfo)
bool plLightProxy::Init(plLightInfo* liInfo)
{
plProxyGen::Init(liInfo);

View File

@ -59,7 +59,7 @@ public:
plLightProxy();
virtual ~plLightProxy();
hsBool Init(plLightInfo* liInfo);
bool Init(plLightInfo* liInfo);
};
#endif // plLightProxy_inc

View File

@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plgDispatch.h"
hsBool plLightSpace::MsgReceive(plMessage* msg)
bool plLightSpace::MsgReceive(plMessage* msg)
{
plCollideMsg* collMsg = plCollideMsg::ConvertNoRef(msg);
if( collMsg )
@ -57,7 +57,7 @@ hsBool plLightSpace::MsgReceive(plMessage* msg)
// HACK - CollideMsg doesn't have sufficient info yet. Need at least object
// which is entering and leaving, and whether it is entering or leaving.
plKey otherKey = nil;
hsBool enter = true;
bool enter = true;
uint8_t ctx = enter ? plRefMsg::kOnRequest : plRefMsg::kOnRemove;
plLightRefMsg* liMsg = new plLightRefMsg(GetKey(), otherKey, IGetLightInfo(), ctx);
plgDispatch::MsgSend(liMsg);

View File

@ -62,12 +62,12 @@ public:
CLASSNAME_REGISTER( plLightSpace );
GETINTERFACE_ANY( plLightSpace, 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; }
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
};

View File

@ -138,13 +138,13 @@ bool plPerspDirSlave::SetupViewTransform(plPipeline* pipe)
hsPoint3 pWorldLiDir(worldLiDir.fX, worldLiDir.fY, worldLiDir.fZ);
hsPoint3 perspLiPos = IProject(world2NDC, pWorldLiDir, 0);
hsBool reverseZ = fLightDir.InnerProduct(pipe->GetViewDirWorld()) > 0;
bool reverseZ = fLightDir.InnerProduct(pipe->GetViewDirWorld()) > 0;
SetFlag(kReverseZ, reverseZ);
SetFlag(kReverseCull, reverseZ);
hsPoint3 lookAt;
plConst(hsBool) kUsePerspCenter(true);
plConst(hsBool) kUseFrustCenter(true);
plConst(bool) kUsePerspCenter(true);
plConst(bool) kUseFrustCenter(true);
if( kUsePerspCenter )
{
hsPoint3 lookAtCam = pipeView.GetWorldToCamera() * fCasterWorldBounds.GetCenter();
@ -170,13 +170,13 @@ bool plPerspDirSlave::SetupViewTransform(plPipeline* pipe)
float minZ, maxZ;
float cotX, cotY;
plConst(hsBool) kFixedPersp(true);
plConst(bool) kFixedPersp(true);
if( !kFixedPersp )
{
hsBounds3Ext bnd(IGetPerspCasterBound(camNDC2Li * world2NDC));
hsBounds3Ext bnd2(IGetPerspCasterBound(world2NDC));
bnd2.Transform(&camNDC2Li);
plConst(hsBool) kUseBnd2(false);
plConst(bool) kUseBnd2(false);
if( kUseBnd2 )
bnd = bnd2;
@ -194,7 +194,7 @@ bool plPerspDirSlave::SetupViewTransform(plPipeline* pipe)
return false;
// THIS IS EVEN MORE WRONG
plConst(hsBool) kFakeDepth(false);
plConst(bool) kFakeDepth(false);
if( kFakeDepth )
{
plConst(float) kMin(1.f);

View File

@ -59,8 +59,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plShadowMaster.h"
hsBool plShadowCaster::fShadowCastDisabled = false;
hsBool plShadowCaster::fCanShadowCast = true;
bool plShadowCaster::fShadowCastDisabled = false;
bool plShadowCaster::fCanShadowCast = true;
plShadowCaster::plShadowCaster()
: fMaxOpacity(0),
@ -157,7 +157,7 @@ void plShadowCaster::ICollectAllSpans()
}
}
hsBool plShadowCaster::IOnRenderMsg(plRenderMsg* msg)
bool plShadowCaster::IOnRenderMsg(plRenderMsg* msg)
{
if( ShadowCastDisabled() )
return true;
@ -209,7 +209,7 @@ hsBool plShadowCaster::IOnRenderMsg(plRenderMsg* msg)
#include "plProfile.h"
plProfile_CreateTimer("ShadowCaster", "RenderSetup", ShadowCaster);
hsBool plShadowCaster::MsgReceive(plMessage* msg)
bool plShadowCaster::MsgReceive(plMessage* msg)
{
plRenderMsg* rendMsg = plRenderMsg::ConvertNoRef(msg);
if( rendMsg )

View File

@ -77,8 +77,8 @@ protected:
// Global state to just turn off the whole gig. Not just
// debugging, we'll probably want a user option for this.
static hsBool fShadowCastDisabled;
static hsBool fCanShadowCast;
static bool fShadowCastDisabled;
static bool fCanShadowCast;
// Properties really just to be read and written,
@ -99,10 +99,10 @@ protected:
void ICollectAllSpans();
hsBool IOnRenderMsg(plRenderMsg* msg);
bool IOnRenderMsg(plRenderMsg* msg);
friend class plDXPipeline;
static void SetCanShadowCast(hsBool b) { fCanShadowCast = b; }
static void SetCanShadowCast(bool b) { fCanShadowCast = b; }
public:
plShadowCaster();
virtual ~plShadowCaster();
@ -110,9 +110,9 @@ public:
CLASSNAME_REGISTER( plShadowCaster );
GETINTERFACE_ANY( plShadowCaster, plMultiModifier );
virtual hsBool IEval(double secs, float del, uint32_t dirty) { return true; }
virtual bool IEval(double secs, float del, uint32_t dirty) { return true; }
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
@ -120,14 +120,14 @@ public:
float MaxOpacity() const { return fMaxOpacity; }
const hsTArray<DrawSpan>& Spans() const { return fSpans; }
hsBool GetSelfShadow() const { return 0 != (fCastFlags & kSelfShadow); }
void SetSelfShadow(hsBool on) { if(on) fCastFlags |= kSelfShadow; else fCastFlags &= ~kSelfShadow; }
bool GetSelfShadow() const { return 0 != (fCastFlags & kSelfShadow); }
void SetSelfShadow(bool on) { if(on) fCastFlags |= kSelfShadow; else fCastFlags &= ~kSelfShadow; }
hsBool GetPerspective() const { return 0 != (fCastFlags & kPerspective); }
void SetPerspective(hsBool on) { if(on) fCastFlags |= kPerspective; else fCastFlags &= ~kPerspective; }
bool GetPerspective() const { return 0 != (fCastFlags & kPerspective); }
void SetPerspective(bool on) { if(on) fCastFlags |= kPerspective; else fCastFlags &= ~kPerspective; }
hsBool GetLimitRes() const { return 0 != (fCastFlags & kLimitRes); }
void SetLimitRes(hsBool on) { if(on) fCastFlags |= kLimitRes; else fCastFlags &= ~kLimitRes; }
bool GetLimitRes() const { return 0 != (fCastFlags & kLimitRes); }
void SetLimitRes(bool on) { if(on) fCastFlags |= kLimitRes; else fCastFlags &= ~kLimitRes; }
float GetAttenScale() const { return fAttenScale; }
void SetAttenScale(float s) { fAttenScale = s; }
@ -144,12 +144,12 @@ public:
void Deactivate() const;
void Activate() const;
static void DisableShadowCast(hsBool on=true) { fShadowCastDisabled = on; }
static void EnableShadowCast(hsBool on=true) { fShadowCastDisabled = !on; }
static void DisableShadowCast(bool on=true) { fShadowCastDisabled = on; }
static void EnableShadowCast(bool on=true) { fShadowCastDisabled = !on; }
static void ToggleShadowCast() { fShadowCastDisabled = !fShadowCastDisabled; }
static hsBool ShadowCastDisabled() { return !CanShadowCast() || fShadowCastDisabled; }
static bool ShadowCastDisabled() { return !CanShadowCast() || fShadowCastDisabled; }
static hsBool CanShadowCast() { return fCanShadowCast; }
static bool CanShadowCast() { return fCanShadowCast; }
};
typedef plShadowCaster::DrawSpan plShadowCastSpan;

View File

@ -175,7 +175,7 @@ void plShadowMaster::SetMaxDist(float f)
#include "plProfile.h"
plProfile_CreateTimer("ShadowMaster", "RenderSetup", ShadowMaster);
hsBool plShadowMaster::MsgReceive(plMessage* msg)
bool plShadowMaster::MsgReceive(plMessage* msg)
{
plRenderMsg* rendMsg = plRenderMsg::ConvertNoRef(msg);
if( rendMsg )
@ -203,7 +203,7 @@ void plShadowMaster::IBeginRender()
fLightInfo->ClearSlaveBits();
}
hsBool plShadowMaster::IOnCastMsg(plShadowCastMsg* castMsg)
bool plShadowMaster::IOnCastMsg(plShadowCastMsg* castMsg)
{
// // HACKTEST
// return false;
@ -803,9 +803,9 @@ public:
CLASSNAME_REGISTER( plShadowCaster );
GETINTERFACE_ANY( plShadowCaster, plMultiModifier );
virtual hsBool IEval(double secs, float del, uint32_t dirty) {}
virtual bool IEval(double secs, float del, uint32_t dirty) {}
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
virtual void Read(hsStream* stream, hsResMgr* mgr);
virtual void Write(hsStream* stream, hsResMgr* mgr);
@ -836,7 +836,7 @@ protected:
public:
plVolumeIsect* GetIsect() const { return fIsect; }
hsBool CanSee(const hsBounds3Ext& bnd)
bool CanSee(const hsBounds3Ext& bnd)
{
switch( fType )
{
@ -1114,7 +1114,7 @@ void IClearShadowSlaves();
// We don't have the depth resolution to even think about self shadowing, so we just don't
// let a slave shadow any of the spans that were rendered into it.
hsBool AcceptsShadow(plSpan* span, plShadowSlave* slave)
bool AcceptsShadow(plSpan* span, plShadowSlave* slave)
{
return !span->IsShadowBitSet(slave->fIndex);
}
@ -1123,7 +1123,7 @@ hsBool AcceptsShadow(plSpan* span, plShadowSlave* slave)
// look goofy, or won't contribute.
// Also, if we have less than 3 simultaneous textures, we want to skip anything with
// an alpha'd base layer, unless it's been overriden.
hsBool ReceivesShadows(plSpan* span, hsGMaterial* mat)
bool ReceivesShadows(plSpan* span, hsGMaterial* mat)
{
if( span.fProps & plSpan::kPropNoShadow )
return false;
@ -1159,7 +1159,7 @@ Apply
RenderSpanShadows
{
hsBool first = true;
bool first = true;
if receivesShadows(span)
{
for each ShadowSlave

View File

@ -115,7 +115,7 @@ protected:
plLightInfo* ISetLightInfo();
virtual void IBeginRender();
virtual hsBool IOnCastMsg(plShadowCastMsg* castMsg);
virtual bool IOnCastMsg(plShadowCastMsg* castMsg);
public:
plShadowMaster();
@ -124,7 +124,7 @@ public:
CLASSNAME_REGISTER( plShadowMaster );
GETINTERFACE_ANY( plShadowMaster, plObjInterface );
virtual hsBool MsgReceive(plMessage* msg);
virtual bool MsgReceive(plMessage* msg);
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) {}

View File

@ -99,17 +99,17 @@ public:
kPositional = 0x80
};
void SetFlag(SlaveFlag f, hsBool on) { if(on) fFlags |= f; else fFlags &= ~f; }
hsBool HasFlag(SlaveFlag f) const { return 0 != (fFlags & f); }
void SetFlag(SlaveFlag f, bool on) { if(on) fFlags |= f; else fFlags &= ~f; }
bool HasFlag(SlaveFlag f) const { return 0 != (fFlags & f); }
hsBool ObeysLightGroups() const { return HasFlag(kObeysLightGroups); }
hsBool IncludesChars() const { return HasFlag(kIncludesChars); }
hsBool SelfShadow() const { return HasFlag(kSelfShadow); }
hsBool CastInCameraSpace() const { return HasFlag(kCastInCameraSpace); }
hsBool ReverseZ() const { return HasFlag(kReverseZ); }
hsBool TwoSided() const { return HasFlag(kTwoSided); }
hsBool ReverseCull() const { return HasFlag(kReverseCull); }
hsBool Positional() const { return HasFlag(kPositional); }
bool ObeysLightGroups() const { return HasFlag(kObeysLightGroups); }
bool IncludesChars() const { return HasFlag(kIncludesChars); }
bool SelfShadow() const { return HasFlag(kSelfShadow); }
bool CastInCameraSpace() const { return HasFlag(kCastInCameraSpace); }
bool ReverseZ() const { return HasFlag(kReverseZ); }
bool TwoSided() const { return HasFlag(kTwoSided); }
bool ReverseCull() const { return HasFlag(kReverseCull); }
bool Positional() const { return HasFlag(kPositional); }
virtual void Init() { fFlags = 0; }