1
0
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:
2012-07-11 01:28:00 -04:00
parent 5f78b33db4
commit a709e17069
1041 changed files with 7889 additions and 8070 deletions

View File

@ -174,17 +174,17 @@ enum StateIdx {
uint32_t fZFlags;
uint32_t fMiscFlags;
static hsBool Differs(uint32_t mine, uint32_t hers, uint32_t mask)
static bool Differs(uint32_t mine, uint32_t hers, uint32_t mask)
{
return (mine & mask) ^ (hers & mask);
}
static hsBool Differs(uint32_t mine, uint32_t hers)
static bool Differs(uint32_t mine, uint32_t hers)
{
return mine ^ hers;
}
hsBool operator!=(const hsGMatState& other)
bool operator!=(const hsGMatState& other)
{
return ((fBlendFlags ^ other.fBlendFlags)
| (fClampFlags ^ other.fClampFlags)

View File

@ -63,8 +63,8 @@ public:
//---------------------------
// Load and Unload
//---------------------------
virtual void Load (const plKey& objKey)=0; // places on list to be loaded
virtual hsBool Unload(const plKey& objKey)=0; // Unregisters (deletes) an object, Return true if successful
virtual void Load (const plKey& objKey)=0; // places on list to be loaded
virtual bool Unload(const plKey& objKey)=0; // Unregisters (deletes) an object, Return true if successful
virtual plKey CloneKey(const plKey& objKey)=0;
//---------------------------
@ -75,11 +75,11 @@ public:
//---------------------------
// Establish reference linkage
//---------------------------
virtual hsBool AddViaNotify(const plKey& sentKey, plRefMsg* msg, plRefFlags::Type flags)=0;
virtual hsBool AddViaNotify(plRefMsg* msg, plRefFlags::Type flags)=0; // msg->fRef->GetKey() == sentKey
virtual bool AddViaNotify(const plKey& sentKey, plRefMsg* msg, plRefFlags::Type flags)=0;
virtual bool AddViaNotify(plRefMsg* msg, plRefFlags::Type flags)=0; // msg->fRef->GetKey() == sentKey
virtual hsBool SendRef(const plKey& key, plRefMsg* refMsg, plRefFlags::Type flags)=0;
virtual hsBool SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags)=0;
virtual bool SendRef(const plKey& key, plRefMsg* refMsg, plRefFlags::Type flags)=0;
virtual bool SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags)=0;
//---------------------------
// Reading and Writing keys
@ -119,7 +119,7 @@ protected:
friend class plArmatureMod; // Temp hack until a findkey/clone issue is fixed. -Bob
virtual plKey ReRegister(const plString& nm, const plUoid& oid)=0;
virtual hsBool ReadObject(plKeyImp* key)=0; // plKeys call this when needed
virtual bool ReadObject(plKeyImp* key)=0; // plKeys call this when needed
// Sets a key as used or unused in the registry. When all keys in a page of a
// particular type in an page are unused, we can free the memory associated with them.
@ -129,8 +129,8 @@ protected:
protected: // hsgResMgr only
friend class hsgResMgr;
virtual hsBool IReset()=0;
virtual hsBool IInit()=0;
virtual bool IReset()=0;
virtual bool IInit()=0;
virtual void IShutdown()=0;
};
@ -145,12 +145,12 @@ public:
static plDispatchBase* Dispatch() { hsAssert(fResMgr, "No resmgr"); return fResMgr->Dispatch(); }
static hsBool Init(hsResMgr* m);
static hsBool Reset() { return fResMgr->IReset(); }
static bool Init(hsResMgr* m);
static bool Reset() { return fResMgr->IReset(); }
static void Shutdown();
static hsBool SendRef(plKey& key, plRefMsg* refMsg, plRefFlags::Type flags) { return fResMgr->SendRef(key, refMsg, flags); }
static hsBool SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags) { return fResMgr->SendRef(ko, refMsg, flags); }
static bool SendRef(plKey& key, plRefMsg* refMsg, plRefFlags::Type flags) { return fResMgr->SendRef(key, refMsg, flags); }
static bool SendRef(hsKeyedObject* ko, plRefMsg* refMsg, plRefFlags::Type flags) { return fResMgr->SendRef(ko, refMsg, flags); }
};
#endif // hsResMgr_inc

View File

@ -47,9 +47,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class plTimerShare
{
protected:
mutable hsBool fFirstTime;
mutable bool fFirstTime;
mutable hsWide fRawTimeZero;
mutable hsBool fResetSmooth;
mutable bool fResetSmooth;
enum {
kSmoothBuffLen = 10
@ -58,14 +58,14 @@ protected:
int fCurrSlot;
float fSysTimeScale;
double fRealSeconds;
double fSysSeconds;
double fRealSeconds;
double fSysSeconds;
float fDelSysSeconds;
float fFrameTimeInc;
hsBool fRunningFrameTime;
bool fRunningFrameTime;
float fTimeClampSecs;
float fSmoothingClampSecs;
hsBool fClamping;
bool fClamping;
hsWide* FactorInTimeZero(hsWide* ticks) const;
@ -77,22 +77,22 @@ protected:
double RawTicksToDSeconds(const hsWide& ticks);
hsWide DSecondsToRawTicks(double secs);
float GetDelSysSeconds() const { return fDelSysSeconds; }
float GetDelSysSeconds() const { return fDelSysSeconds; }
double GetSysSeconds() const { return fSysSeconds; }
double IncSysSeconds();
void SetRealTime(hsBool realTime);
hsBool IsRealTime() const { return !fRunningFrameTime; }
void SetRealTime(bool realTime);
bool IsRealTime() const { return !fRunningFrameTime; }
void SetFrameTimeInc(float inc) { fFrameTimeInc = inc; }
void SetTimeScale(float s) { fSysTimeScale = s; }
float GetTimeScale() const { return fSysTimeScale; }
float GetTimeScale() const { return fSysTimeScale; }
void SetTimeClamp(float secs) { fTimeClampSecs = secs; }
void SetSmoothingCap(float secs) { fSmoothingClampSecs = secs; }
float GetTimeClamp() const { return fTimeClampSecs; }
hsBool IsClamping() const { return fClamping; }
float GetTimeClamp() const { return fTimeClampSecs; }
bool IsClamping() const { return fClamping; }
friend class hsTimer;
public:
@ -111,10 +111,10 @@ protected:
static plTimerShare* fTimer;
public:
static hsBool VerifyRawBase() { return fRawBase == IInitRawBase(); }
static const hsWide& GetRawBase() { return fRawBase; }
static bool VerifyRawBase() { return fRawBase == IInitRawBase(); }
static const hsWide& GetRawBase() { return fRawBase; }
static hsWide* GetRawTicks(hsWide* ticks) { return fTimer->GetRawTicks(ticks); }
static hsWide* GetRawTicks(hsWide* ticks) { return fTimer->GetRawTicks(ticks); }
static double GetSeconds() { return fTimer->GetSeconds(); }
static double GetMilliSeconds() { return fTimer->GetMilliSeconds(); }
@ -122,37 +122,37 @@ public:
static double RawTicksToDSeconds(const hsWide& ticks) { return fTimer->RawTicksToDSeconds(ticks); }
static hsWide DSecondsToRawTicks(double secs) { return fTimer->DSecondsToRawTicks(secs); }
static float GetDelSysSeconds() { return fTimer->GetDelSysSeconds(); }
static float GetDelSysSeconds() { return fTimer->GetDelSysSeconds(); }
static double GetSysSeconds() { return fTimer->GetSysSeconds(); }
static double IncSysSeconds() { return fTimer->IncSysSeconds(); }
static void SetRealTime(hsBool realTime) { fTimer->SetRealTime(realTime); }
static hsBool IsRealTime() { return fTimer->IsRealTime(); }
static void SetRealTime(bool realTime) { fTimer->SetRealTime(realTime); }
static bool IsRealTime() { return fTimer->IsRealTime(); }
static void SetFrameTimeInc(float inc) { fTimer->SetFrameTimeInc(inc); }
static void SetTimeScale(float s) { fTimer->SetTimeScale(s); }
static float GetTimeScale() { return fTimer->GetTimeScale(); }
static float GetTimeScale() { return fTimer->GetTimeScale(); }
static void SetTimeClamp(float secs) { fTimer->SetTimeClamp(secs); }
static void SetTimeSmoothingClamp(float secs) { fTimer->SetSmoothingCap(secs); }
static float GetTimeClamp() { return fTimer->GetTimeClamp(); }
static hsBool IsClamping() { return fTimer->IsClamping(); }
static float GetTimeClamp() { return fTimer->GetTimeClamp(); }
static bool IsClamping() { return fTimer->IsClamping(); }
///////////////////////////
// Precision timer routines - these are stateless and implemented as statics.
///////////////////////////
static uint32_t GetPrecTickCount();
static double GetPrecTicksPerSec();
static uint32_t PrecSecsToTicks(float secs);
static double PrecTicksToSecs(uint32_t ticks);
static double PrecTicksToHz(uint32_t ticks);
static uint32_t GetPrecTickCount();
static double GetPrecTicksPerSec();
static uint32_t PrecSecsToTicks(float secs);
static double PrecTicksToSecs(uint32_t ticks);
static double PrecTicksToHz(uint32_t ticks);
// If you need to time something longer than 20 seconds, use this instead of
// the precision timer. It works the same, it just gives you full resolution.
static uint64_t GetFullTickCount();
static float FullTicksToMs(uint64_t ticks);
static float FullTicksToMs(uint64_t ticks);
//
// Pass GetTheTimer() into other process space, and then call SetTheTimer() on it.

View File

@ -63,8 +63,8 @@ public:
CLASSNAME_REGISTER( plAudible );
GETINTERFACE_ANY( plAudible, hsKeyedObject );
virtual plAudible& SetProperty(int prop, hsBool on) = 0;
virtual hsBool GetProperty(int prop) = 0;
virtual plAudible& SetProperty(int prop, bool on) = 0;
virtual bool GetProperty(int prop) = 0;
virtual plAudible& SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, int index = -1) { return *this; }
@ -90,8 +90,8 @@ public:
virtual void SetVelocity(const hsVector3 vel,int index = -1) = 0;
virtual hsVector3 GetVelocity(int index = -1) const = 0;
virtual hsPoint3 GetPosition(int index = -1) = 0;
virtual void SetLooping(hsBool loop,int index = -1) = 0; // sets continuous loop or stops looping
virtual hsBool IsPlaying(int index = -1) = 0;
virtual void SetLooping(bool loop,int index = -1) = 0; // sets continuous loop or stops looping
virtual bool IsPlaying(int index = -1) = 0;
virtual void SetTime(double t, int index = -1) = 0;
virtual void Activate() = 0;
virtual void DeActivate() = 0;
@ -101,13 +101,13 @@ public:
virtual int GetNumSounds() const = 0;
virtual plSound* GetSound(int i) const = 0;
virtual int GetSoundIndex(const char *keyname) const = 0;
virtual void Init(hsBool isLocal){;}
virtual void Init(bool isLocal){;}
virtual void SetVolume(const float volume,int index = -1) = 0;
virtual void SetMuted( hsBool muted, int index = -1 ) = 0;
virtual void SetMuted( bool muted, int index = -1 ) = 0;
virtual void ToggleMuted( int index = -1 ) = 0;
virtual void SetTalkIcon(int index, uint32_t str) = 0;
virtual void ClearTalkIcon() = 0;
virtual void SetFilename(int index, const char *filename, hsBool isCompressed) = 0; // set filename for a streaming sound
virtual void SetFilename(int index, const char *filename, bool isCompressed) = 0; // set filename for a streaming sound
virtual void SetFadeIn( const int type, const float length, int index = -1 ) = 0;
virtual void SetFadeOut( const int type, const float length, int index = -1 ) = 0;

View File

@ -143,19 +143,19 @@ public:
CLASSNAME_REGISTER( plDrawable );
GETINTERFACE_ANY( plDrawable, hsKeyedObject );
virtual plDrawable& SetProperty( int prop, hsBool on ) = 0;
virtual hsBool GetProperty( int prop ) const = 0;
virtual plDrawable& SetProperty( int prop, bool on ) = 0;
virtual bool GetProperty( int prop ) const = 0;
virtual plDrawable& SetProperty( uint32_t index, int prop, hsBool on ) = 0;
virtual hsBool GetProperty( uint32_t index, int prop ) const = 0;
virtual plDrawable& SetProperty( uint32_t index, int prop, bool on ) = 0;
virtual bool GetProperty( uint32_t index, int prop ) const = 0;
virtual plDrawable& SetNativeProperty( int prop, hsBool on ) = 0;
virtual hsBool GetNativeProperty( int prop ) const = 0;
virtual plDrawable& SetNativeProperty( int prop, bool on ) = 0;
virtual bool GetNativeProperty( int prop ) const = 0;
virtual plDrawable& SetNativeProperty( uint32_t index, int prop, hsBool on ) = 0;
virtual hsBool GetNativeProperty( uint32_t index, int prop ) const = 0;
virtual plDrawable& SetNativeProperty( uint32_t index, int prop, bool on ) = 0;
virtual bool GetNativeProperty( uint32_t index, int prop ) const = 0;
virtual plDrawable& SetSubType( uint32_t index, plSubDrawableType t, hsBool on ) = 0;
virtual plDrawable& SetSubType( uint32_t index, plSubDrawableType t, bool on ) = 0;
virtual uint32_t GetSubType( uint32_t index ) const = 0; // returns or of all spans with this index (index==-1 is all spans).
virtual uint32_t GetType( void ) const = 0;
@ -173,11 +173,11 @@ public:
virtual const hsBounds3Ext& GetMaxWorldBounds( uint32_t index = (uint32_t)-1 ) const = 0;
virtual plSpaceTree* GetSpaceTree() const = 0;
virtual void SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* reg, hsBool on) = 0;
virtual void SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* reg, bool on) = 0;
// 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 = 0;
virtual hsBool GetSubVisDists(int index, float& minDist, float& maxDist) const = 0; // return true if span invisible before minDist and/or after maxDist
virtual bool GetSubVisDists(int index, float& minDist, float& maxDist) const = 0; // return true if span invisible before minDist and/or after maxDist
// Should implement hsKeyedObject Read/Write/Save/Load as well
@ -193,7 +193,7 @@ public:
/// EXPORT-ONLY
// Called by the sceneNode to determine if we match the criteria
virtual hsBool DoIMatch( const plDrawableCriteria& crit ) = 0;
virtual bool DoIMatch( const plDrawableCriteria& crit ) = 0;
// Take the list of triMeshes and convert them to buffers, building a list of spans for each
virtual void Optimize( void ) = 0;

View File

@ -67,8 +67,8 @@ public:
CLASSNAME_REGISTER(plPhysical);
GETINTERFACE_ANY(plPhysical, plSynchedObject);
virtual plPhysical& SetProperty(int prop, hsBool b) = 0;
virtual hsBool GetProperty(int prop) const = 0;
virtual plPhysical& SetProperty(int prop, bool b) = 0;
virtual bool GetProperty(int prop) const = 0;
virtual void SetObjectKey(plKey oKey) = 0;
virtual plKey GetObjectKey() const = 0;
@ -77,11 +77,11 @@ public:
virtual void SetSceneNode(plKey node) = 0;
virtual plKey GetSceneNode() const = 0;
virtual hsBool GetLinearVelocitySim(hsVector3& vel) const = 0;
virtual bool GetLinearVelocitySim(hsVector3& vel) const = 0;
virtual void SetLinearVelocitySim(const hsVector3& vel) = 0;
virtual void ClearLinearVelocity() = 0;
virtual hsBool GetAngularVelocitySim(hsVector3& vel) const = 0;
virtual bool GetAngularVelocitySim(hsVector3& vel) const = 0;
virtual void SetAngularVelocitySim(const hsVector3& vel) = 0;
virtual void SetHitForce(const hsVector3& force, const hsPoint3& pos)=0;
@ -91,17 +91,17 @@ public:
will be applied regardless.
Set force to true if you don't want the transform to be ignored for any reason. Without it,
this will ignore the incoming transform if it's the same one it sent out last time. */
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, hsBool force=false) = 0;
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l, bool force=false) = 0;
virtual void GetTransform(hsMatrix44& l2w, hsMatrix44& w2l) = 0;
// From plSimDefs::Group
virtual int GetGroup() const = 0;
// Flags in plSimDefs::plLOSDB
virtual void AddLOSDB(uint16_t flag) = 0;
virtual void RemoveLOSDB(uint16_t flag) = 0;
virtual void AddLOSDB(uint16_t flag) = 0;
virtual void RemoveLOSDB(uint16_t flag) = 0;
virtual uint16_t GetAllLOSDBs() = 0;
virtual hsBool IsInLOSDB(uint16_t flag) = 0;
virtual bool IsInLOSDB(uint16_t flag) = 0;
// Return the key of our subworld. May be a nil key.
virtual plKey GetWorldKey() const = 0;
@ -114,7 +114,7 @@ public:
If the simulation is a subworld, this will also factor in the subworld's
transform. The sent transform is global. "isSynchUpdate" tells us if this
is an update due to receiving remote state.*/
virtual void SendNewLocation(hsBool synchTransform = false, hsBool isSynchUpdate = false) = 0;
virtual void SendNewLocation(bool synchTransform = false, bool isSynchUpdate = false) = 0;
// For the physics SDL only. For Set, any of the values may be set to nil, if
// they're not used.
@ -124,7 +124,7 @@ public:
virtual float GetMass() = 0;
// I wish I could think of a better way to do this, but this is how it's
// going to be for now.
virtual void ExcludeRegionHack(hsBool cleared) = 0;
virtual void ExcludeRegionHack(bool cleared) = 0;
virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo) = 0;
};

View File

@ -53,7 +53,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class plPipeResReq
{
protected:
hsBool fReq;
bool fReq;
plPipeResReq() : fReq(false) {}
@ -62,7 +62,7 @@ protected:
public:
static void Request() { PIPELOG("Request"); Instance().fReq = true; }
static hsBool Check() { PIPELOG("Check"); return Instance().fReq; }
static bool Check() { PIPELOG("Check"); return Instance().fReq; }
static void Clear() { PIPELOG("Clear"); Instance().fReq = false; }
};

View File

@ -117,7 +117,7 @@ struct PipelineParams
int Width;
int Height;
hsBool Windowed;
bool Windowed;
int ColorDepth;
int AntiAliasingAmount;
int AnisotropicLevel;
@ -125,9 +125,9 @@ struct PipelineParams
int VideoQuality;
int Shadows;
int PlanarReflections;
hsBool VSync;
bool VSync;
#ifndef PLASMA_EXTERNAL_RELEASE
hsBool ForceSecondMonitor;
bool ForceSecondMonitor;
#endif // PLASMA_EXTERNAL_RELEASE
};
@ -152,12 +152,12 @@ public:
// visList is write only. On output, visList is UNSORTED visible spans.
// Called once per scene render (maybe multiple times per frame).
// Returns true if rendering should proceed.
virtual hsBool PreRender(plDrawable* drawable, hsTArray<int16_t>& visList, plVisMgr* visMgr=nil) = 0;
virtual bool PreRender(plDrawable* drawable, hsTArray<int16_t>& visList, plVisMgr* visMgr=nil) = 0;
// PrepForRender - perform any processing on the drawable data nessecary before rendering.
// visList is read only. On input, visList is SORTED visible spans, and is ALL spans which will be drawn this render.
// Called once per scene render.
// Returns true if rendering should proceed.
virtual hsBool PrepForRender(plDrawable* drawable, hsTArray<int16_t>& visList, plVisMgr* visMgr=nil) = 0;
virtual bool PrepForRender(plDrawable* drawable, hsTArray<int16_t>& visList, plVisMgr* visMgr=nil) = 0;
// Render - draw the drawable to the current render target.
// visList is read only. On input, visList is SORTED visible spans. May not be the complete list of visible spans
// for this drawable.
@ -177,8 +177,8 @@ public:
virtual void CheckVertexBufferRef(plGBufferGroup* owner, uint32_t idx) = 0;
virtual void CheckIndexBufferRef(plGBufferGroup* owner, uint32_t idx) = 0;
virtual hsBool OpenAccess(plAccessSpan& dst, plDrawableSpans* d, const plVertexSpan* span, hsBool readOnly) = 0;
virtual hsBool CloseAccess(plAccessSpan& acc) = 0;
virtual bool OpenAccess(plAccessSpan& dst, plDrawableSpans* d, const plVertexSpan* span, bool readOnly) = 0;
virtual bool CloseAccess(plAccessSpan& acc) = 0;
virtual void CheckTextureRef(plLayerInterface* lay) = 0;
@ -220,37 +220,37 @@ public:
virtual void ClearRenderTarget(const hsColorRGBA* col = nil, const float* depth = nil) = 0; // col/depth are overrides for current default.
virtual void SetClear(const hsColorRGBA* col=nil, const float* depth=nil) = 0; // sets the default clear for current render target.
virtual hsColorRGBA GetClearColor() const = 0;
virtual float GetClearDepth() const = 0;
virtual float GetClearDepth() const = 0;
virtual hsGDeviceRef *MakeRenderTargetRef( plRenderTarget *owner ) = 0;
virtual void PushRenderTarget( plRenderTarget *target ) = 0;
virtual plRenderTarget *PopRenderTarget( void ) = 0;
virtual hsBool BeginRender() = 0;
virtual hsBool EndRender() = 0;
virtual bool BeginRender() = 0;
virtual bool EndRender() = 0;
virtual void RenderScreenElements( void ) = 0;
virtual hsBool BeginDrawable(plDrawable* d) = 0;
virtual hsBool EndDrawable(plDrawable* d) = 0;
virtual bool BeginDrawable(plDrawable* d) = 0;
virtual bool EndDrawable(plDrawable* d) = 0;
virtual void BeginVisMgr(plVisMgr* visMgr) = 0;
virtual void EndVisMgr(plVisMgr* visMgr) = 0;
virtual hsBool IsFullScreen() const = 0;
virtual uint32_t Width() const = 0;
virtual uint32_t Height() const = 0;
virtual uint32_t ColorDepth() const = 0;
virtual bool IsFullScreen() const = 0;
virtual uint32_t Width() const = 0;
virtual uint32_t Height() const = 0;
virtual uint32_t ColorDepth() const = 0;
virtual void Resize( uint32_t width, uint32_t height ) = 0;
// Culling. Might be used in Update before bothering to do any serious computation.
virtual hsBool TestVisibleWorld(const hsBounds3Ext& wBnd) = 0;
virtual hsBool TestVisibleWorld(const plSceneObject* sObj) = 0;
virtual hsBool HarvestVisible(plSpaceTree* space, hsTArray<int16_t>& visList) = 0;
virtual hsBool SubmitOccluders(const hsTArray<const plCullPoly*>& polyList) = 0;
virtual bool TestVisibleWorld(const hsBounds3Ext& wBnd) = 0;
virtual bool TestVisibleWorld(const plSceneObject* sObj) = 0;
virtual bool HarvestVisible(plSpaceTree* space, hsTArray<int16_t>& visList) = 0;
virtual bool SubmitOccluders(const hsTArray<const plCullPoly*>& polyList) = 0;
virtual void SetDebugFlag( uint32_t flag, hsBool on ) = 0;
virtual hsBool IsDebugFlagSet( uint32_t flag ) const = 0;
virtual void SetDebugFlag( uint32_t flag, bool on ) = 0;
virtual bool IsDebugFlagSet( uint32_t flag ) const = 0;
virtual void SetMaxCullNodes(uint16_t n) = 0; // Debug/analysis only
virtual uint16_t GetMaxCullNodes() const = 0; // Debug/analysis only
virtual uint16_t GetMaxCullNodes() const = 0; // Debug/analysis only
// Properties
enum Properties
@ -259,18 +259,18 @@ public:
// MakeTextureRef, regardless of the kUserOwnsBitmap flag
};
virtual hsBool CheckResources() = 0; // Do we need to call LoadResources?
virtual bool CheckResources() = 0; // Do we need to call LoadResources?
virtual void LoadResources() = 0;
virtual void SetProperty( uint32_t prop, hsBool on ) = 0;
virtual hsBool GetProperty( uint32_t prop ) const = 0;
virtual uint32_t GetMaxLayersAtOnce() const = 0;
virtual void SetProperty( uint32_t prop, bool on ) = 0;
virtual bool GetProperty( uint32_t prop ) const = 0;
virtual uint32_t GetMaxLayersAtOnce() const = 0;
// Drawable type mask
virtual void SetDrawableTypeMask( uint32_t mask ) = 0;
virtual uint32_t GetDrawableTypeMask( void ) const = 0;
virtual uint32_t GetDrawableTypeMask( void ) const = 0;
virtual void SetSubDrawableTypeMask( uint32_t mask ) = 0;
virtual uint32_t GetSubDrawableTypeMask( void ) const = 0;
virtual uint32_t GetSubDrawableTypeMask( void ) const = 0;
// View state
virtual hsPoint3 GetViewPositionWorld() const = 0;
@ -289,7 +289,7 @@ public:
virtual void SetDepth(float hither, float yon) = 0;
virtual void SetZBiasScale( float scale ) = 0;
virtual float GetZBiasScale( void ) const = 0;
virtual float GetZBiasScale( void ) const = 0;
virtual const hsMatrix44& GetWorldToCamera() const = 0;
virtual const hsMatrix44& GetCameraToWorld() const = 0;
@ -311,16 +311,16 @@ public:
virtual void PopOverrideMaterial(hsGMaterial* restore) = 0;
virtual hsGMaterial* GetOverrideMaterial() const = 0;
virtual plLayerInterface* AppendLayerInterface(plLayerInterface* li, hsBool onAllLayers = false) = 0;
virtual plLayerInterface* RemoveLayerInterface(plLayerInterface* li, hsBool onAllLayers = false) = 0;
virtual plLayerInterface* AppendLayerInterface(plLayerInterface* li, bool onAllLayers = false) = 0;
virtual plLayerInterface* RemoveLayerInterface(plLayerInterface* li, bool onAllLayers = false) = 0;
virtual uint32_t GetMaterialOverrideOn(hsGMatState::StateIdx category) const = 0;
virtual uint32_t GetMaterialOverrideOff(hsGMatState::StateIdx category) const = 0;
virtual uint32_t GetMaterialOverrideOn(hsGMatState::StateIdx category) const = 0;
virtual uint32_t GetMaterialOverrideOff(hsGMatState::StateIdx category) const = 0;
virtual hsGMatState PushMaterialOverride(const hsGMatState& state, hsBool on) = 0;
virtual hsGMatState PushMaterialOverride(hsGMatState::StateIdx cat, uint32_t which, hsBool on) = 0;
virtual void PopMaterialOverride(const hsGMatState& restore, hsBool on) = 0;
virtual const hsGMatState& GetMaterialOverride(hsBool on) const = 0;
virtual hsGMatState PushMaterialOverride(const hsGMatState& state, bool on) = 0;
virtual hsGMatState PushMaterialOverride(hsGMatState::StateIdx cat, uint32_t which, bool on) = 0;
virtual void PopMaterialOverride(const hsGMatState& restore, bool on) = 0;
virtual const hsGMatState& GetMaterialOverride(bool on) const = 0;
virtual hsColorOverride PushColorOverride(const hsColorOverride& over) = 0;
virtual void PopColorOverride(const hsColorOverride& restore) = 0;
@ -330,13 +330,13 @@ public:
virtual void SubmitClothingOutfit(plClothingOutfit* co) = 0;
// These all return true if the gamma was successfully set.
virtual hsBool SetGamma(float eR, float eG, float eB) = 0;
virtual hsBool SetGamma(const uint16_t* const tabR, const uint16_t* const tabG, const uint16_t* const tabB) = 0; // len table = 256.
virtual hsBool SetGamma(float e) { return SetGamma(e, e, e); }
virtual hsBool SetGamma(const uint16_t* const table) { return SetGamma(table, table, table); }
virtual bool SetGamma(float eR, float eG, float eB) = 0;
virtual bool SetGamma(const uint16_t* const tabR, const uint16_t* const tabG, const uint16_t* const tabB) = 0; // len table = 256.
virtual bool SetGamma(float e) { return SetGamma(e, e, e); }
virtual bool SetGamma(const uint16_t* const table) { return SetGamma(table, table, table); }
// flipVertical is for the AVI writer, which wants it's frames upside down
virtual hsBool CaptureScreen( plMipmap *dest, bool flipVertical = false, uint16_t desiredWidth = 0, uint16_t desiredHeight = 0 ) = 0;
virtual bool CaptureScreen( plMipmap *dest, bool flipVertical = false, uint16_t desiredWidth = 0, uint16_t desiredHeight = 0 ) = 0;
// Returns an un-named (GetKey()==nil) mipmap same dimensions as targ. You are responsible for deleting said mipMap.
virtual plMipmap* ExtractMipMap(plRenderTarget* targ) = 0;
@ -353,7 +353,7 @@ public:
int GetDesktopColorDepth() { return fDesktopParams.ColorDepth; }
PipelineParams *GetDefaultParams() { return &fDefaultPipeParams; }
virtual void ResetDisplayDevice(int Width, int Height, int ColorDepth, hsBool Windowed, int NumAASamples, int MaxAnisotropicSamples, hsBool vSync = false ) = 0;
virtual void ResetDisplayDevice(int Width, int Height, int ColorDepth, bool Windowed, int NumAASamples, int MaxAnisotropicSamples, bool vSync = false ) = 0;
static PipelineParams fDefaultPipeParams;
static PipelineParams fInitialPipeParams;
plDisplayMode fDesktopParams;

View File

@ -159,8 +159,8 @@ protected:
uint64_t fAvgTotal;
uint32_t fLastAvg;
uint32_t fMax;
hsBool fActive;
hsBool fRunning;
bool fActive;
bool fRunning;
uint8_t fDisplayFlags;
// Number of times EndTiming was called. Can be used to combine timing and counting in one timer
@ -168,7 +168,7 @@ protected:
void IAddAvg();
void IPrintValue(uint32_t value, char* buf, hsBool printType);
void IPrintValue(uint32_t value, char* buf, bool printType);
public:
plProfileBase();
@ -181,15 +181,15 @@ public:
uint32_t GetValue();
void PrintValue(char* buf, hsBool printType=true);
void PrintAvg(char* buf, hsBool printType=true);
void PrintMax(char* buf, hsBool printType=true);
void PrintValue(char* buf, bool printType=true);
void PrintAvg(char* buf, bool printType=true);
void PrintMax(char* buf, bool printType=true);
uint32_t GetTimerSamples() const { return fTimerSamples; }
const char* GetName() { return fName; }
void SetActive(hsBool s) { fActive = s; }
void SetActive(bool s) { fActive = s; }
void Stop() { fRunning = false; }
void Start() { fRunning = true; }
@ -204,7 +204,7 @@ class plProfileVar : public plProfileBase
protected:
const char* fGroup;
plProfileLaps* fLaps;
hsBool fLapsActive;
bool fLapsActive;
plProfileVar() {}
@ -246,7 +246,7 @@ public:
plProfileLaps* GetLaps() { return fLaps; }
// Enable Lap Sampling
void SetLapsActive(hsBool s) { fLapsActive = s; }
void SetLapsActive(bool s) { fLapsActive = s; }
};
#endif // plProfile_h_inc

View File

@ -98,7 +98,7 @@ static uint32_t GetProcSpeed()
for (int i = 0; i < numKeys; i++)
{
HKEY thisKey = NULL;
hsBool success = (RegOpenKeyEx(hKey, keypath[i], 0, KEY_READ, &thisKey) == ERROR_SUCCESS);
bool success = (RegOpenKeyEx(hKey, keypath[i], 0, KEY_READ, &thisKey) == ERROR_SUCCESS);
RegCloseKey(hKey);
hKey = thisKey;
@ -108,7 +108,7 @@ static uint32_t GetProcSpeed()
}
DWORD value=0, size=sizeof(DWORD);
hsBool success = (RegQueryValueEx(hKey, "~MHz", 0, NULL, (BYTE*)&value, &size) == ERROR_SUCCESS);
bool success = (RegQueryValueEx(hKey, "~MHz", 0, NULL, (BYTE*)&value, &size) == ERROR_SUCCESS);
RegCloseKey(hKey);
return value*1000000;
@ -214,7 +214,7 @@ void plProfileManager::EndFrame()
{
gVarEFPS.EndTiming();
hsBool updateAvgs = false;
bool updateAvgs = false;
// If enough time has passed, update the averages
double curTime = hsTimer::GetMilliSeconds();
@ -334,7 +334,7 @@ static const char *insertCommas(unsigned int value)
return str;
}
void plProfileBase::IPrintValue(uint32_t value, char* buf, hsBool printType)
void plProfileBase::IPrintValue(uint32_t value, char* buf, bool printType)
{
if (hsCheckBits(fDisplayFlags, kDisplayCount))
{
@ -372,17 +372,17 @@ void plProfileBase::IPrintValue(uint32_t value, char* buf, hsBool printType)
}
}
void plProfileBase::PrintValue(char* buf, hsBool printType)
void plProfileBase::PrintValue(char* buf, bool printType)
{
IPrintValue(fValue, buf, printType);
}
void plProfileBase::PrintAvg(char* buf, hsBool printType)
void plProfileBase::PrintAvg(char* buf, bool printType)
{
IPrintValue(fLastAvg, buf, printType);
}
void plProfileBase::PrintMax(char* buf, hsBool printType)
void plProfileBase::PrintMax(char* buf, bool printType)
{
IPrintValue(fMax, buf, printType);
}

View File

@ -62,19 +62,19 @@ public:
virtual void UnRegisterAll(const plKey& receiver) = 0;
virtual hsBool MsgSend(plMessage* msg, hsBool async=false) = 0;
virtual bool MsgSend(plMessage* msg, bool async=false) = 0;
virtual void MsgQueue(plMessage* msg)=0; // Used by other thread to Send Messages, they are handled as soon as Practicable
virtual void MsgQueueProcess() = 0;
virtual void MsgQueueOnOff(hsBool) = 0; // Turn on or off Queued Messages, if off, uses MsgSend Immediately (for plugins)
virtual void MsgQueueOnOff(bool) = 0; // Turn on or off Queued Messages, if off, uses MsgSend Immediately (for plugins)
virtual hsBool SetMsgBuffering(hsBool on) = 0; // On starts deferring msg delivery until buffering is set to off again.
virtual bool SetMsgBuffering(bool on) = 0; // On starts deferring msg delivery until buffering is set to off again.
};
class plgDispatch
{
public:
static plDispatchBase* Dispatch();
static hsBool MsgSend(plMessage* msg, hsBool async = false) { return Dispatch()->MsgSend(msg, async); }
static bool MsgSend(plMessage* msg, bool async = false) { return Dispatch()->MsgSend(msg, async); }
};

View File

@ -51,7 +51,7 @@ plDispatchBase* plgDispatch::Dispatch()
return hsgResMgr::Dispatch();
}
hsBool hsgResMgr::Init(hsResMgr* m)
bool hsgResMgr::Init(hsResMgr* m)
{
hsRefCnt_SafeAssign(fResMgr, m);
hsRefCnt_SafeUnRef(m);