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:
@ -159,7 +159,7 @@ uint32_t hsGMaterial::AddLayerViaNotify(plLayerInterface* layer)
|
||||
return idx;
|
||||
}
|
||||
|
||||
void hsGMaterial::ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLay, hsBool piggyBack)
|
||||
void hsGMaterial::ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLay, bool piggyBack)
|
||||
{
|
||||
hsTArray<plLayerInterface*>& layers = piggyBack ? fPiggyBacks : fLayers;
|
||||
int i;
|
||||
@ -174,7 +174,7 @@ void hsGMaterial::ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLa
|
||||
SetLayer(newLay, i, piggyBack);
|
||||
}
|
||||
|
||||
void hsGMaterial::RemoveLayer(plLayerInterface* lay, hsBool piggyBack)
|
||||
void hsGMaterial::RemoveLayer(plLayerInterface* lay, bool piggyBack)
|
||||
{
|
||||
hsTArray<plLayerInterface*>& layers = piggyBack ? fPiggyBacks : fLayers;
|
||||
int i;
|
||||
@ -190,14 +190,14 @@ void hsGMaterial::RemoveLayer(plLayerInterface* lay, hsBool piggyBack)
|
||||
layers.Remove(i);
|
||||
}
|
||||
|
||||
void hsGMaterial::InsertLayer(plLayerInterface* layer, int32_t which, hsBool piggyBack)
|
||||
void hsGMaterial::InsertLayer(plLayerInterface* layer, int32_t which, bool piggyBack)
|
||||
{
|
||||
hsTArray<plLayerInterface*>& layers = piggyBack ? fPiggyBacks : fLayers;
|
||||
hsAssert(which <= layers.GetCount(), "Material layers Exceeding test depth");
|
||||
layers.InsertAtIndex(which, layer);
|
||||
}
|
||||
|
||||
void hsGMaterial::SetLayer(plLayerInterface* layer, int32_t which, hsBool insert, hsBool piggyBack)
|
||||
void hsGMaterial::SetLayer(plLayerInterface* layer, int32_t which, bool insert, bool piggyBack)
|
||||
{
|
||||
if( insert )
|
||||
{
|
||||
@ -310,17 +310,17 @@ void hsGMaterial::Init()
|
||||
Reset();
|
||||
}
|
||||
|
||||
hsBool hsGMaterial::MsgReceive(plMessage* msg)
|
||||
bool hsGMaterial::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plMatRefMsg* refMsg = plMatRefMsg::ConvertNoRef(msg);
|
||||
if( refMsg )
|
||||
{
|
||||
int which = refMsg->fWhich;
|
||||
hsBool piggyBack = 0 != (refMsg->fType & plMatRefMsg::kPiggyBack);
|
||||
bool piggyBack = 0 != (refMsg->fType & plMatRefMsg::kPiggyBack);
|
||||
plLayerInterface* lay= plLayerInterface::ConvertNoRef(refMsg->GetRef());
|
||||
if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest) )
|
||||
{
|
||||
hsBool insert = 0 != (refMsg->fType & plMatRefMsg::kInsert);
|
||||
bool insert = 0 != (refMsg->fType & plMatRefMsg::kInsert);
|
||||
SetLayer(lay, which,
|
||||
insert,
|
||||
piggyBack );
|
||||
|
@ -93,10 +93,10 @@ protected:
|
||||
void IClearLayers();
|
||||
uint32_t IMakeExtraLayer();
|
||||
|
||||
void InsertLayer(plLayerInterface* lay, int32_t which = 0, hsBool piggyBack = false);
|
||||
void SetLayer(plLayerInterface* lay, int32_t which = 0, hsBool insert=false, hsBool piggyBack=false);
|
||||
void ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLay, hsBool piggyBack = false);
|
||||
void RemoveLayer(plLayerInterface* oldLay, hsBool piggyBack = false);
|
||||
void InsertLayer(plLayerInterface* lay, int32_t which = 0, bool piggyBack = false);
|
||||
void SetLayer(plLayerInterface* lay, int32_t which = 0, bool insert=false, bool piggyBack=false);
|
||||
void ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLay, bool piggyBack = false);
|
||||
void RemoveLayer(plLayerInterface* oldLay, bool piggyBack = false);
|
||||
public:
|
||||
hsGMaterial();
|
||||
~hsGMaterial();
|
||||
@ -122,11 +122,11 @@ public:
|
||||
|
||||
float GetLastUpdateTime() const { return fLastUpdateTime; }
|
||||
void SetLastUpdateTime(float f) { fLastUpdateTime = f; }
|
||||
hsBool IShouldUpdate(float secs, uint32_t flags) { return GetLastUpdateTime() != secs || (flags & kUpdateAgain); }
|
||||
bool IShouldUpdate(float secs, uint32_t flags) { return GetLastUpdateTime() != secs || (flags & kUpdateAgain); }
|
||||
|
||||
hsBool IsDynamic() const { return (fCompFlags & kCompDynamic); }
|
||||
hsBool IsDecal() const { return (fCompFlags & kCompDecal); }
|
||||
hsBool NeedsBlendChannel() { return (fCompFlags & kCompNeedsBlendChannel); }
|
||||
bool IsDynamic() const { return (fCompFlags & kCompDynamic); }
|
||||
bool IsDecal() const { return (fCompFlags & kCompDecal); }
|
||||
bool NeedsBlendChannel() { return (fCompFlags & kCompNeedsBlendChannel); }
|
||||
|
||||
virtual void Read(hsStream* s);
|
||||
virtual void Write(hsStream* s);
|
||||
@ -140,7 +140,7 @@ public:
|
||||
CLASSNAME_REGISTER( hsGMaterial );
|
||||
GETINTERFACE_ANY( hsGMaterial, hsKeyedObject );
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
};
|
||||
|
||||
#endif // hsGCompMatDefined
|
||||
|
@ -133,7 +133,7 @@ void plGrassShaderMod::RemoveTarget(plSceneObject *object)
|
||||
fTarget = nil;
|
||||
}
|
||||
|
||||
hsBool plGrassShaderMod::MsgReceive(plMessage *msg)
|
||||
bool plGrassShaderMod::MsgReceive(plMessage *msg)
|
||||
{
|
||||
plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (refMsg)
|
||||
@ -211,7 +211,7 @@ void plGrassShaderMod::Read(hsStream *stream, hsResMgr *mgr)
|
||||
plgDispatch::Dispatch()->RegisterForExactType(plAgeLoadedMsg::Index(), GetKey());
|
||||
}
|
||||
|
||||
hsBool plGrassShaderMod::IEval(double secs, float del, uint32_t dirty)
|
||||
bool plGrassShaderMod::IEval(double secs, float del, uint32_t dirty)
|
||||
{
|
||||
if (fVShader)
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
virtual void AddTarget(plSceneObject *object);
|
||||
virtual void RemoveTarget(plSceneObject *object);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage *msg);
|
||||
virtual bool MsgReceive(plMessage *msg);
|
||||
|
||||
virtual void Write(hsStream *stream, hsResMgr *mgr);
|
||||
virtual void Read(hsStream *stream, hsResMgr *mgr);
|
||||
@ -99,7 +99,7 @@ public:
|
||||
plGrassWave fWaves[kNumWaves];
|
||||
|
||||
protected:
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty);
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty);
|
||||
virtual void IApplyDynamic() {}; // dummy function required by base class
|
||||
void ISetupShaders();
|
||||
void IRefreshWaves(plShader *vShader);
|
||||
|
@ -167,7 +167,7 @@ void plLayer::Write(hsStream* s, hsResMgr* mgr)
|
||||
fBumpEnvXfm->Write(s);
|
||||
}
|
||||
|
||||
hsBool plLayer::MsgReceive(plMessage* msg)
|
||||
bool plLayer::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plLayRefMsg* refMsg = plLayRefMsg::ConvertNoRef(msg);
|
||||
if( refMsg )
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
// Flat layer specifics
|
||||
plLayer& InitToDefault();
|
||||
|
@ -208,7 +208,7 @@ void plLayerAnimationBase::IEvalConvertedTime(float secs, uint32_t passChans, ui
|
||||
fPassThruChannels = 0; // already handled, don't need to keep passing them through.
|
||||
}
|
||||
|
||||
hsBool plLayerAnimationBase::MsgReceive(plMessage* msg)
|
||||
bool plLayerAnimationBase::MsgReceive(plMessage* msg)
|
||||
{
|
||||
return plLayerInterface::MsgReceive(msg);
|
||||
}
|
||||
@ -367,7 +367,7 @@ uint32_t plLayerAnimation::Eval(double wSecs, uint32_t frame, uint32_t ignore)
|
||||
return dirty;
|
||||
}
|
||||
|
||||
hsBool plLayerAnimation::MsgReceive(plMessage* msg)
|
||||
bool plLayerAnimation::MsgReceive(plMessage* msg)
|
||||
{
|
||||
// pass sdl msg to sdlMod
|
||||
plSDLModifierMsg* sdlMsg = plSDLModifierMsg::ConvertNoRef(msg);
|
||||
@ -377,7 +377,7 @@ hsBool plLayerAnimation::MsgReceive(plMessage* msg)
|
||||
return true; // msg handled
|
||||
}
|
||||
|
||||
hsBool retVal = false;
|
||||
bool retVal = false;
|
||||
plAnimCmdMsg* cmdMsg = plAnimCmdMsg::ConvertNoRef(msg);
|
||||
if( cmdMsg )
|
||||
{
|
||||
@ -538,7 +538,7 @@ uint32_t plLayerLinkAnimation::Eval(double wSecs, uint32_t frame, uint32_t ignor
|
||||
return dirty;
|
||||
}
|
||||
|
||||
void plLayerLinkAnimation::SetFadeFlag(uint8_t flag, hsBool val)
|
||||
void plLayerLinkAnimation::SetFadeFlag(uint8_t flag, bool val)
|
||||
{
|
||||
if (val)
|
||||
fFadeFlags |= flag;
|
||||
@ -554,7 +554,7 @@ void plLayerLinkAnimation::SetFadeFlag(uint8_t flag, hsBool val)
|
||||
fFadeFlagsDirty = true;
|
||||
}
|
||||
|
||||
hsBool plLayerLinkAnimation::MsgReceive( plMessage* pMsg )
|
||||
bool plLayerLinkAnimation::MsgReceive( plMessage* pMsg )
|
||||
{
|
||||
plLinkEffectPrepBCMsg *bcpMsg = plLinkEffectPrepBCMsg::ConvertNoRef(pMsg);
|
||||
if (bcpMsg != nil)
|
||||
@ -722,7 +722,7 @@ uint32_t plLayerSDLAnimation::Eval(double wSecs, uint32_t frame, uint32_t ignore
|
||||
return dirty;
|
||||
}
|
||||
|
||||
hsBool plLayerSDLAnimation::MsgReceive(plMessage* msg)
|
||||
bool plLayerSDLAnimation::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plSDLNotificationMsg* nMsg = plSDLNotificationMsg::ConvertNoRef(msg);
|
||||
if (nMsg)
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
virtual plLayerInterface* Attach(plLayerInterface* prev);
|
||||
//virtual uint32_t Eval(double secs, uint32_t frame, uint32_t ignore) = 0;
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
@ -129,7 +129,7 @@ public:
|
||||
virtual plLayerInterface* Attach(plLayerInterface* prev);
|
||||
virtual uint32_t Eval(double wSecs, uint32_t frame, uint32_t ignore);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
@ -144,7 +144,7 @@ class plLayerLinkAnimation : public plLayerAnimation
|
||||
{
|
||||
protected:
|
||||
plKey fLinkKey;
|
||||
hsBool fEnabled;
|
||||
bool fEnabled;
|
||||
plEventCallbackMsg *fIFaceCallback;
|
||||
|
||||
enum
|
||||
@ -157,7 +157,7 @@ protected:
|
||||
};
|
||||
uint8_t fFadeFlags;
|
||||
uint8_t fLastFadeFlag;
|
||||
hsBool fFadeFlagsDirty;
|
||||
bool fFadeFlagsDirty;
|
||||
|
||||
public:
|
||||
plLayerLinkAnimation();
|
||||
@ -173,16 +173,16 @@ public:
|
||||
// NEVER!
|
||||
// If you think it should... talk to Bob. He will explain why it can't be, and beat you up.
|
||||
// If he can't remember, beat him up until he does (or ask Moose).
|
||||
virtual hsBool DirtySynchState(const char* sdlName, uint32_t sendFlags) { return false; } // don't send link state
|
||||
virtual bool DirtySynchState(const char* sdlName, uint32_t sendFlags) { return false; } // don't send link state
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
virtual uint32_t Eval(double wSecs, uint32_t frame, uint32_t ignore);
|
||||
virtual hsBool MsgReceive(plMessage* pMsg);
|
||||
void Enable(hsBool b) { fEnabled = b; }
|
||||
void SetFadeFlag(uint8_t flag, hsBool val);
|
||||
virtual bool MsgReceive(plMessage* pMsg);
|
||||
void Enable(bool b) { fEnabled = b; }
|
||||
void SetFadeFlag(uint8_t flag, bool val);
|
||||
|
||||
hsBool fLeavingAge;
|
||||
bool fLeavingAge;
|
||||
};
|
||||
|
||||
class plLayerSDLAnimation : public plLayerAnimationBase
|
||||
@ -200,7 +200,7 @@ public:
|
||||
|
||||
virtual uint32_t Eval(double wSecs, uint32_t frame, uint32_t ignore);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
@ -346,7 +346,7 @@ void plLayerInterface::Write(hsStream* s, hsResMgr* mgr)
|
||||
mgr->WriteKey(s, fUnderLay);
|
||||
}
|
||||
|
||||
hsBool plLayerInterface::MsgReceive(plMessage* msg)
|
||||
bool plLayerInterface::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plLayRefMsg* refMsg = plLayRefMsg::ConvertNoRef(msg);
|
||||
if( refMsg )
|
||||
|
@ -208,12 +208,12 @@ public:
|
||||
plLayerInterface* GetAttached();
|
||||
void AttachViaNotify(plLayerInterface *prev); // Export only
|
||||
|
||||
hsBool OwnChannel(uint32_t which) const { return 0 != (fOwnedChannels & which); }
|
||||
bool OwnChannel(uint32_t which) const { return 0 != (fOwnedChannels & which); }
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
|
||||
};
|
||||
|
||||
|
@ -148,7 +148,7 @@ uint32_t plLayerMultiply::Eval(double wSecs, uint32_t frame, uint32_t ignore)
|
||||
return dirtyChannels;
|
||||
}
|
||||
|
||||
hsBool plLayerMultiply::MsgReceive(plMessage* msg)
|
||||
bool plLayerMultiply::MsgReceive(plMessage* msg)
|
||||
{
|
||||
return plLayerInterface::MsgReceive(msg);
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
|
||||
virtual plLayerInterface* Attach(plLayerInterface* prev);
|
||||
virtual uint32_t Eval(double secs, uint32_t frame, uint32_t ignore);
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
virtual bool MsgReceive(plMessage* msg);
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
|
@ -50,7 +50,7 @@ class plLayerOr : public plLayerInterface
|
||||
{
|
||||
protected:
|
||||
hsGMatState fOringState;
|
||||
hsBool fDirty;
|
||||
bool fDirty;
|
||||
|
||||
public:
|
||||
plLayerOr();
|
||||
|
@ -49,7 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
class plLayerLightBase : public plLayerInterface
|
||||
{
|
||||
protected:
|
||||
hsBool fDirty;
|
||||
bool fDirty;
|
||||
public:
|
||||
|
||||
plLayerLightBase();
|
||||
@ -69,7 +69,7 @@ public:
|
||||
class plLayerShadowBase : public plLayerInterface
|
||||
{
|
||||
protected:
|
||||
hsBool fDirty;
|
||||
bool fDirty;
|
||||
public:
|
||||
|
||||
plLayerShadowBase();
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
return dirty;
|
||||
}
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg) { return plLayerInterface::MsgReceive(msg); }
|
||||
virtual bool MsgReceive(plMessage* msg) { return plLayerInterface::MsgReceive(msg); }
|
||||
};
|
||||
|
||||
#endif // plLayerWrapper_inc
|
||||
|
@ -246,12 +246,12 @@ public:
|
||||
void SetDecl(const plShaderDecl* p); // will reference (pointer copy)
|
||||
void SetDecl(plShaderID::ID id);
|
||||
|
||||
hsBool IsValid() const { return !(fFlags & kInvalid); }
|
||||
bool IsValid() const { return !(fFlags & kInvalid); }
|
||||
void Invalidate() const { fFlags |= kInvalid; }
|
||||
|
||||
hsBool IsPixelShader() const { return 0 != (fFlags & kIsPixel); }
|
||||
hsBool IsVertexShader() const { return !IsPixelShader(); }
|
||||
void SetIsPixelShader(hsBool on) { if(on)fFlags |= kIsPixel; else fFlags &= ~kIsPixel; }
|
||||
bool IsPixelShader() const { return 0 != (fFlags & kIsPixel); }
|
||||
bool IsVertexShader() const { return !IsPixelShader(); }
|
||||
void SetIsPixelShader(bool on) { if(on)fFlags |= kIsPixel; else fFlags &= ~kIsPixel; }
|
||||
|
||||
// These are only for use by the pipeline.
|
||||
hsGDeviceRef* GetDeviceRef() const { return fDeviceRef; }
|
||||
|
@ -130,14 +130,14 @@ protected:
|
||||
|
||||
plShaderTableInst();
|
||||
|
||||
hsBool LoadFromFile() const { return 0 != (fFlags & kLoadFromFile); }
|
||||
void SetLoadFromFile(hsBool on) { if(on) fFlags |= kLoadFromFile; else fFlags &= ~kLoadFromFile; }
|
||||
bool LoadFromFile() const { return 0 != (fFlags & kLoadFromFile); }
|
||||
void SetLoadFromFile(bool on) { if(on) fFlags |= kLoadFromFile; else fFlags &= ~kLoadFromFile; }
|
||||
|
||||
const plShaderDecl* Decl(plShaderID::ID id) const { return fTable[id]; }
|
||||
|
||||
void Register(const plShaderDecl* decl);
|
||||
|
||||
hsBool IsRegistered(plShaderID::ID id) const { return (id == 0) || ((id < plShaderID::kNumShaders) && fTable[id]); }
|
||||
bool IsRegistered(plShaderID::ID id) const { return (id == 0) || ((id < plShaderID::kNumShaders) && fTable[id]); }
|
||||
|
||||
public:
|
||||
virtual ~plShaderTableInst();
|
||||
@ -156,14 +156,14 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
static hsBool LoadFromFile() { return Instance().LoadFromFile(); }
|
||||
static void SetLoadFromFile(hsBool on) { Instance().SetLoadFromFile(on); }
|
||||
static bool LoadFromFile() { return Instance().LoadFromFile(); }
|
||||
static void SetLoadFromFile(bool on) { Instance().SetLoadFromFile(on); }
|
||||
|
||||
static const plShaderDecl* Decl(plShaderID::ID id) { return Instance().Decl(id); }
|
||||
|
||||
static void Register(const plShaderDecl* decl) { Instance().Register(decl); }
|
||||
|
||||
static hsBool IsRegistered(plShaderID::ID id) { return Instance().IsRegistered(id); }
|
||||
static bool IsRegistered(plShaderID::ID id) { return Instance().IsRegistered(id); }
|
||||
};
|
||||
|
||||
class plShaderRegister
|
||||
|
Reference in New Issue
Block a user