mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Merge remote-tracking branch 'origin/master' into plString
Conflicts: Sources/Plasma/CoreLib/hsStream.h Sources/Plasma/FeatureLib/pfAudio/plListener.cpp Sources/Plasma/FeatureLib/pfConsole/pfConsoleCommands.cpp Sources/Plasma/FeatureLib/pfConsole/pfDispatchLog.cpp Sources/Plasma/FeatureLib/pfJournalBook/pfJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp Sources/Plasma/FeatureLib/pfPython/cyMisc.h Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.h Sources/Plasma/FeatureLib/pfPython/pyImage.cpp Sources/Plasma/FeatureLib/pfPython/pyJournalBook.cpp Sources/Plasma/FeatureLib/pfPython/pyNetServerSessionInfo.h Sources/Plasma/NucleusLib/pnKeyedObject/plFixedKey.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plKeyImp.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.cpp Sources/Plasma/NucleusLib/pnKeyedObject/plUoid.h Sources/Plasma/NucleusLib/pnMessage/plMessage.h Sources/Plasma/NucleusLib/pnNetCommon/plNetApp.h Sources/Plasma/PubUtilLib/plAvatar/plCoopCoordinator.cpp Sources/Plasma/PubUtilLib/plDrawable/plDrawableSpansExport.cpp Sources/Plasma/PubUtilLib/plDrawable/plDynaDecalMgr.cpp Sources/Plasma/PubUtilLib/plDrawable/plWaveSet7.cpp Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.h Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.h Sources/Plasma/PubUtilLib/plNetCommon/plClientGuid.h Sources/Plasma/PubUtilLib/plNetMessage/plNetMessage.cpp Sources/Plasma/PubUtilLib/plNetMessage/plNetMsgHelpers.h Sources/Plasma/PubUtilLib/plNetTransport/plNetTransportMember.h Sources/Plasma/PubUtilLib/plPhysX/plSimulationMgr.cpp Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp Sources/Plasma/PubUtilLib/plPipeline/plPlates.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.cpp Sources/Plasma/PubUtilLib/plResMgr/plKeyFinder.h Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.h Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.cpp Sources/Plasma/PubUtilLib/plScene/plRelevanceMgr.h Sources/Plasma/PubUtilLib/plSurface/plGrassShaderMod.cpp
This commit is contained in:
@ -168,18 +168,18 @@ enum StateIdx {
|
||||
kZ,
|
||||
kMisc
|
||||
};
|
||||
UInt32 fBlendFlags;
|
||||
UInt32 fClampFlags;
|
||||
UInt32 fShadeFlags;
|
||||
UInt32 fZFlags;
|
||||
UInt32 fMiscFlags;
|
||||
uint32_t fBlendFlags;
|
||||
uint32_t fClampFlags;
|
||||
uint32_t fShadeFlags;
|
||||
uint32_t fZFlags;
|
||||
uint32_t fMiscFlags;
|
||||
|
||||
static hsBool Differs(UInt32 mine, UInt32 hers, UInt32 mask)
|
||||
static hsBool Differs(uint32_t mine, uint32_t hers, uint32_t mask)
|
||||
{
|
||||
return (mine & mask) ^ (hers & mask);
|
||||
}
|
||||
|
||||
static hsBool Differs(UInt32 mine, UInt32 hers)
|
||||
static hsBool Differs(uint32_t mine, uint32_t hers)
|
||||
{
|
||||
return mine ^ hers;
|
||||
}
|
||||
@ -192,7 +192,7 @@ enum StateIdx {
|
||||
| (fZFlags ^ other.fZFlags)
|
||||
| (fMiscFlags ^ other.fMiscFlags));
|
||||
}
|
||||
UInt32 Value(int i) const
|
||||
uint32_t Value(int i) const
|
||||
{
|
||||
switch(i)
|
||||
{
|
||||
@ -210,7 +210,7 @@ enum StateIdx {
|
||||
hsAssert(false, "Bad param");
|
||||
return fBlendFlags;
|
||||
}
|
||||
UInt32& operator[](const int i)
|
||||
uint32_t& operator[](const int i)
|
||||
{
|
||||
switch(i)
|
||||
{
|
||||
@ -254,7 +254,7 @@ enum StateIdx {
|
||||
inline void Read(hsStream* s);
|
||||
inline void Write(hsStream* s);
|
||||
|
||||
hsGMatState(UInt32 blend=0, UInt32 clamp=0, UInt32 shade=0, UInt32 z=0, UInt32 misc=0)
|
||||
hsGMatState(uint32_t blend=0, uint32_t clamp=0, uint32_t shade=0, uint32_t z=0, uint32_t misc=0)
|
||||
: fBlendFlags(blend),
|
||||
fClampFlags(clamp),
|
||||
fShadeFlags(shade),
|
||||
|
@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef hsResMgr_inc
|
||||
#define hsResMgr_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsRefCnt.h"
|
||||
#include "plLoadMask.h"
|
||||
#include "plRefFlags.h"
|
||||
|
@ -43,11 +43,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#define hsTimer_Defined
|
||||
|
||||
#include "hsWide.h"
|
||||
#include "hsScalar.h"
|
||||
|
||||
#if !HS_CAN_USE_FLOAT
|
||||
#error "Unsupported without double's"
|
||||
#endif // !HS_CAN_USE_FLOAT
|
||||
|
||||
class plTimerShare
|
||||
{
|
||||
@ -62,14 +57,14 @@ protected:
|
||||
double fSmoothBuff[kSmoothBuffLen];
|
||||
int fCurrSlot;
|
||||
|
||||
hsScalar fSysTimeScale;
|
||||
float fSysTimeScale;
|
||||
double fRealSeconds;
|
||||
double fSysSeconds;
|
||||
hsScalar fDelSysSeconds;
|
||||
hsScalar fFrameTimeInc;
|
||||
float fDelSysSeconds;
|
||||
float fFrameTimeInc;
|
||||
hsBool fRunningFrameTime;
|
||||
hsScalar fTimeClampSecs;
|
||||
hsScalar fSmoothingClampSecs;
|
||||
float fTimeClampSecs;
|
||||
float fSmoothingClampSecs;
|
||||
hsBool fClamping;
|
||||
|
||||
hsWide* FactorInTimeZero(hsWide* ticks) const;
|
||||
@ -82,21 +77,21 @@ protected:
|
||||
double RawTicksToDSeconds(const hsWide& ticks);
|
||||
hsWide DSecondsToRawTicks(double secs);
|
||||
|
||||
hsScalar 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 SetFrameTimeInc(hsScalar inc) { fFrameTimeInc = inc; }
|
||||
void SetFrameTimeInc(float inc) { fFrameTimeInc = inc; }
|
||||
|
||||
void SetTimeScale(hsScalar s) { fSysTimeScale = s; }
|
||||
hsScalar GetTimeScale() const { return fSysTimeScale; }
|
||||
void SetTimeScale(float s) { fSysTimeScale = s; }
|
||||
float GetTimeScale() const { return fSysTimeScale; }
|
||||
|
||||
void SetTimeClamp(hsScalar secs) { fTimeClampSecs = secs; }
|
||||
void SetSmoothingCap(hsScalar secs) { fSmoothingClampSecs = secs; }
|
||||
hsScalar GetTimeClamp() const { return fTimeClampSecs; }
|
||||
void SetTimeClamp(float secs) { fTimeClampSecs = secs; }
|
||||
void SetSmoothingCap(float secs) { fSmoothingClampSecs = secs; }
|
||||
float GetTimeClamp() const { return fTimeClampSecs; }
|
||||
hsBool IsClamping() const { return fClamping; }
|
||||
|
||||
friend class hsTimer;
|
||||
@ -127,7 +122,7 @@ public:
|
||||
static double RawTicksToDSeconds(const hsWide& ticks) { return fTimer->RawTicksToDSeconds(ticks); }
|
||||
static hsWide DSecondsToRawTicks(double secs) { return fTimer->DSecondsToRawTicks(secs); }
|
||||
|
||||
static hsScalar GetDelSysSeconds() { return fTimer->GetDelSysSeconds(); }
|
||||
static float GetDelSysSeconds() { return fTimer->GetDelSysSeconds(); }
|
||||
static double GetSysSeconds() { return fTimer->GetSysSeconds(); }
|
||||
|
||||
static double IncSysSeconds() { return fTimer->IncSysSeconds(); }
|
||||
@ -135,29 +130,29 @@ public:
|
||||
static void SetRealTime(hsBool realTime) { fTimer->SetRealTime(realTime); }
|
||||
static hsBool IsRealTime() { return fTimer->IsRealTime(); }
|
||||
|
||||
static void SetFrameTimeInc(hsScalar inc) { fTimer->SetFrameTimeInc(inc); }
|
||||
static void SetFrameTimeInc(float inc) { fTimer->SetFrameTimeInc(inc); }
|
||||
|
||||
static void SetTimeScale(hsScalar s) { fTimer->SetTimeScale(s); }
|
||||
static hsScalar GetTimeScale() { return fTimer->GetTimeScale(); }
|
||||
static void SetTimeScale(float s) { fTimer->SetTimeScale(s); }
|
||||
static float GetTimeScale() { return fTimer->GetTimeScale(); }
|
||||
|
||||
static void SetTimeClamp(hsScalar secs) { fTimer->SetTimeClamp(secs); }
|
||||
static void SetTimeSmoothingClamp(hsScalar secs) { fTimer->SetSmoothingCap(secs); }
|
||||
static hsScalar GetTimeClamp() { return fTimer->GetTimeClamp(); }
|
||||
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(); }
|
||||
|
||||
///////////////////////////
|
||||
// Precision timer routines - these are stateless and implemented as statics.
|
||||
///////////////////////////
|
||||
static UInt32 GetPrecTickCount();
|
||||
static uint32_t GetPrecTickCount();
|
||||
static double GetPrecTicksPerSec();
|
||||
static UInt32 PrecSecsToTicks(hsScalar secs);
|
||||
static double PrecTicksToSecs(UInt32 ticks);
|
||||
static double PrecTicksToHz(UInt32 ticks);
|
||||
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 GetFullTickCount();
|
||||
static float FullTicksToMs(UInt64 ticks);
|
||||
static uint64_t GetFullTickCount();
|
||||
static float FullTicksToMs(uint64_t ticks);
|
||||
|
||||
//
|
||||
// Pass GetTheTimer() into other process space, and then call SetTheTimer() on it.
|
||||
|
@ -83,10 +83,10 @@ public:
|
||||
virtual void Stop(int index = -1) = 0;
|
||||
virtual void FastForwardPlay(int index = -1) = 0;
|
||||
virtual void FastForwardToggle( int index = -1) = 0;
|
||||
virtual void SetMin(const hsScalar m,int index = -1) = 0; // sets minimum falloff distance
|
||||
virtual void SetMax(const hsScalar m,int index = -1) = 0; // sets maximum falloff distance
|
||||
virtual hsScalar GetMin(int index = -1) const = 0;
|
||||
virtual hsScalar GetMax(int index = -1) const = 0;
|
||||
virtual void SetMin(const float m,int index = -1) = 0; // sets minimum falloff distance
|
||||
virtual void SetMax(const float m,int index = -1) = 0; // sets maximum falloff distance
|
||||
virtual float GetMin(int index = -1) const = 0;
|
||||
virtual float GetMax(int index = -1) const = 0;
|
||||
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;
|
||||
@ -105,7 +105,7 @@ public:
|
||||
virtual void SetVolume(const float volume,int index = -1) = 0;
|
||||
virtual void SetMuted( hsBool muted, int index = -1 ) = 0;
|
||||
virtual void ToggleMuted( int index = -1 ) = 0;
|
||||
virtual void SetTalkIcon(int index, UInt32 str) = 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 SetFadeIn( const int type, const float length, int index = -1 ) = 0;
|
||||
|
@ -61,10 +61,10 @@ class plAccessSpan;
|
||||
class plDrawableCriteria
|
||||
{
|
||||
public:
|
||||
plDrawableCriteria(UInt32 crit, const plRenderLevel& lev, const plLoadMask& m, UInt32 ty=1 /* Normal */ ) : fCriteria(crit), fLevel(lev), fType(ty), fLoadMask(m) {}
|
||||
UInt32 fCriteria;
|
||||
plDrawableCriteria(uint32_t crit, const plRenderLevel& lev, const plLoadMask& m, uint32_t ty=1 /* Normal */ ) : fCriteria(crit), fLevel(lev), fType(ty), fLoadMask(m) {}
|
||||
uint32_t fCriteria;
|
||||
plRenderLevel fLevel;
|
||||
UInt32 fType;
|
||||
uint32_t fType;
|
||||
plLoadMask fLoadMask;
|
||||
};
|
||||
|
||||
@ -146,38 +146,38 @@ public:
|
||||
virtual plDrawable& SetProperty( int prop, hsBool on ) = 0;
|
||||
virtual hsBool GetProperty( int prop ) const = 0;
|
||||
|
||||
virtual plDrawable& SetProperty( UInt32 index, int prop, hsBool on ) = 0;
|
||||
virtual hsBool GetProperty( UInt32 index, 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& SetNativeProperty( int prop, hsBool on ) = 0;
|
||||
virtual hsBool GetNativeProperty( int prop ) const = 0;
|
||||
|
||||
virtual plDrawable& SetNativeProperty( UInt32 index, int prop, hsBool on ) = 0;
|
||||
virtual hsBool GetNativeProperty( UInt32 index, 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& SetSubType( UInt32 index, plSubDrawableType t, hsBool on ) = 0;
|
||||
virtual UInt32 GetSubType( UInt32 index ) const = 0; // returns or of all spans with this index (index==-1 is all spans).
|
||||
virtual plDrawable& SetSubType( uint32_t index, plSubDrawableType t, hsBool 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 GetType( void ) const = 0;
|
||||
virtual void SetType( UInt32 type ) = 0;
|
||||
virtual uint32_t GetType( void ) const = 0;
|
||||
virtual void SetType( uint32_t type ) = 0;
|
||||
|
||||
virtual void SetRenderLevel(const plRenderLevel& l) = 0;
|
||||
virtual const plRenderLevel& GetRenderLevel() const = 0;
|
||||
|
||||
virtual plDrawable& SetTransform( UInt32 index, const hsMatrix44& l2w, const hsMatrix44& w2l ) = 0;
|
||||
virtual const hsMatrix44& GetLocalToWorld( UInt32 span = (UInt32)-1 ) const = 0;
|
||||
virtual const hsMatrix44& GetWorldToLocal( UInt32 span = (UInt32)-1 ) const = 0;
|
||||
virtual plDrawable& SetTransform( uint32_t index, const hsMatrix44& l2w, const hsMatrix44& w2l ) = 0;
|
||||
virtual const hsMatrix44& GetLocalToWorld( uint32_t span = (uint32_t)-1 ) const = 0;
|
||||
virtual const hsMatrix44& GetWorldToLocal( uint32_t span = (uint32_t)-1 ) const = 0;
|
||||
|
||||
virtual const hsBounds3Ext& GetLocalBounds( UInt32 index = (UInt32)-1 ) const = 0;
|
||||
virtual const hsBounds3Ext& GetWorldBounds( UInt32 index = (UInt32)-1 ) const = 0;
|
||||
virtual const hsBounds3Ext& GetMaxWorldBounds( UInt32 index = (UInt32)-1 ) const = 0;
|
||||
virtual const hsBounds3Ext& GetLocalBounds( uint32_t index = (uint32_t)-1 ) const = 0;
|
||||
virtual const hsBounds3Ext& GetWorldBounds( uint32_t index = (uint32_t)-1 ) const = 0;
|
||||
virtual const hsBounds3Ext& GetMaxWorldBounds( uint32_t index = (uint32_t)-1 ) const = 0;
|
||||
|
||||
virtual plSpaceTree* GetSpaceTree() const = 0;
|
||||
virtual void SetDISpanVisSet(UInt32 diIndex, hsKeyedObject* reg, hsBool on) = 0;
|
||||
virtual void SetDISpanVisSet(uint32_t diIndex, hsKeyedObject* reg, hsBool 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, hsScalar& minDist, hsScalar& maxDist) const = 0; // return true if span invisible before minDist and/or after maxDist
|
||||
virtual hsBool 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
|
||||
|
||||
@ -186,9 +186,9 @@ public:
|
||||
virtual plKey GetSceneNode() const = 0;
|
||||
|
||||
/// Funky particle system functions
|
||||
virtual UInt32 CreateParticleSystem( UInt32 maxNumEmitters, UInt32 maxNumParticles, hsGMaterial *material ) = 0;
|
||||
virtual void ResetParticleSystem( UInt32 index ) = 0;
|
||||
virtual void AssignEmitterToParticleSystem( UInt32 index, plParticleEmitter *emitter ) = 0;
|
||||
virtual uint32_t CreateParticleSystem( uint32_t maxNumEmitters, uint32_t maxNumParticles, hsGMaterial *material ) = 0;
|
||||
virtual void ResetParticleSystem( uint32_t index ) = 0;
|
||||
virtual void AssignEmitterToParticleSystem( uint32_t index, plParticleEmitter *emitter ) = 0;
|
||||
|
||||
/// EXPORT-ONLY
|
||||
|
||||
|
@ -98,10 +98,10 @@ public:
|
||||
virtual int GetGroup() const = 0;
|
||||
|
||||
// Flags in plSimDefs::plLOSDB
|
||||
virtual void AddLOSDB(UInt16 flag) = 0;
|
||||
virtual void RemoveLOSDB(UInt16 flag) = 0;
|
||||
virtual UInt16 GetAllLOSDBs() = 0;
|
||||
virtual hsBool IsInLOSDB(UInt16 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;
|
||||
|
||||
// Return the key of our subworld. May be a nil key.
|
||||
virtual plKey GetWorldKey() const = 0;
|
||||
@ -121,12 +121,12 @@ public:
|
||||
virtual void GetSyncState(hsPoint3& pos, hsQuat& rot, hsVector3& linV, hsVector3& angV) = 0;
|
||||
virtual void SetSyncState(hsPoint3* pos, hsQuat* rot, hsVector3* linV, hsVector3* angV) = 0;
|
||||
|
||||
virtual hsScalar GetMass() = 0;
|
||||
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 plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo) = 0;
|
||||
virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo) = 0;
|
||||
};
|
||||
|
||||
#endif // plPhysical_inc
|
||||
|
@ -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>& visList, plVisMgr* visMgr=nil) = 0;
|
||||
virtual hsBool 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>& visList, plVisMgr* visMgr=nil) = 0;
|
||||
virtual hsBool 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.
|
||||
@ -165,17 +165,17 @@ public:
|
||||
// Render(drawable0, visList0) // visList0 contains furthest spans in drawable0
|
||||
// Render(drawable1, visList1) // visList1 contains spans from drawable1 between drawable0's visList0 and visList2
|
||||
// Render(drawable0, visList2) // visList2 contains closest spans in drawable0.
|
||||
virtual void Render(plDrawable* d, const hsTArray<Int16>& visList) = 0;
|
||||
virtual void Render(plDrawable* d, const hsTArray<int16_t>& visList) = 0;
|
||||
// Draw - Convenience wrapper for standalone renders. Calls PreRender, PrepForRender, Render. Currently for internal
|
||||
// use only, but may prove useful for procedurals (render to texture).
|
||||
virtual void Draw(plDrawable* d) = 0;
|
||||
|
||||
// Device-specific ref creation. Includes buffers and fonts
|
||||
virtual plTextFont *MakeTextFont( char *face, UInt16 size ) = 0;
|
||||
virtual plTextFont *MakeTextFont( char *face, uint16_t size ) = 0;
|
||||
|
||||
// Create and/or Refresh geometry buffers
|
||||
virtual void CheckVertexBufferRef(plGBufferGroup* owner, UInt32 idx) = 0;
|
||||
virtual void CheckIndexBufferRef(plGBufferGroup* owner, UInt32 idx) = 0;
|
||||
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;
|
||||
@ -217,10 +217,10 @@ public:
|
||||
virtual void PopRenderRequest(plRenderRequest* req) = 0;
|
||||
|
||||
virtual void ClearRenderTarget( plDrawable* d ) = 0; // nil d reverts to ClearRenderTarget(nil, nil).
|
||||
virtual void ClearRenderTarget(const hsColorRGBA* col = nil, const hsScalar* depth = nil) = 0; // col/depth are overrides for current default.
|
||||
virtual void SetClear(const hsColorRGBA* col=nil, const hsScalar* depth=nil) = 0; // sets the default clear for current render target.
|
||||
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 hsScalar 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;
|
||||
@ -236,21 +236,21 @@ public:
|
||||
virtual void EndVisMgr(plVisMgr* visMgr) = 0;
|
||||
|
||||
virtual hsBool IsFullScreen() const = 0;
|
||||
virtual UInt32 Width() const = 0;
|
||||
virtual UInt32 Height() const = 0;
|
||||
virtual UInt32 ColorDepth() const = 0;
|
||||
virtual void Resize( UInt32 width, UInt32 height ) = 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>& visList) = 0;
|
||||
virtual hsBool HarvestVisible(plSpaceTree* space, hsTArray<int16_t>& visList) = 0;
|
||||
virtual hsBool SubmitOccluders(const hsTArray<const plCullPoly*>& polyList) = 0;
|
||||
|
||||
virtual void SetDebugFlag( UInt32 flag, hsBool on ) = 0;
|
||||
virtual hsBool IsDebugFlagSet( UInt32 flag ) const = 0;
|
||||
virtual void SetMaxCullNodes(UInt16 n) = 0; // Debug/analysis only
|
||||
virtual UInt16 GetMaxCullNodes() const = 0; // Debug/analysis only
|
||||
virtual void SetDebugFlag( uint32_t flag, hsBool on ) = 0;
|
||||
virtual hsBool 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
|
||||
|
||||
// Properties
|
||||
enum Properties
|
||||
@ -262,15 +262,15 @@ public:
|
||||
virtual hsBool CheckResources() = 0; // Do we need to call LoadResources?
|
||||
virtual void LoadResources() = 0;
|
||||
|
||||
virtual void SetProperty( UInt32 prop, hsBool on ) = 0;
|
||||
virtual hsBool GetProperty( UInt32 prop ) const = 0;
|
||||
virtual UInt32 GetMaxLayersAtOnce() const = 0;
|
||||
virtual void SetProperty( uint32_t prop, hsBool on ) = 0;
|
||||
virtual hsBool GetProperty( uint32_t prop ) const = 0;
|
||||
virtual uint32_t GetMaxLayersAtOnce() const = 0;
|
||||
|
||||
// Drawable type mask
|
||||
virtual void SetDrawableTypeMask( UInt32 mask ) = 0;
|
||||
virtual UInt32 GetDrawableTypeMask( void ) const = 0;
|
||||
virtual void SetSubDrawableTypeMask( UInt32 mask ) = 0;
|
||||
virtual UInt32 GetSubDrawableTypeMask( void ) const = 0;
|
||||
virtual void SetDrawableTypeMask( uint32_t mask ) = 0;
|
||||
virtual uint32_t GetDrawableTypeMask( void ) const = 0;
|
||||
virtual void SetSubDrawableTypeMask( uint32_t mask ) = 0;
|
||||
virtual uint32_t GetSubDrawableTypeMask( void ) const = 0;
|
||||
|
||||
// View state
|
||||
virtual hsPoint3 GetViewPositionWorld() const = 0;
|
||||
@ -279,17 +279,17 @@ public:
|
||||
virtual hsVector3 GetViewDirWorld() const = 0;
|
||||
virtual void GetViewAxesWorld(hsVector3 axes[3] /* ac,up,at */ ) const = 0;
|
||||
|
||||
virtual void GetFOV(hsScalar& fovX, hsScalar& fovY) const = 0;
|
||||
virtual void SetFOV(hsScalar fovX, hsScalar fovY) = 0;
|
||||
virtual void GetFOV(float& fovX, float& fovY) const = 0;
|
||||
virtual void SetFOV(float fovX, float fovY) = 0;
|
||||
|
||||
virtual void GetSize(hsScalar& width, hsScalar& height) const = 0;
|
||||
virtual void SetSize(hsScalar width, hsScalar height) = 0;
|
||||
virtual void GetSize(float& width, float& height) const = 0;
|
||||
virtual void SetSize(float width, float height) = 0;
|
||||
|
||||
virtual void GetDepth(hsScalar& hither, hsScalar& yon) const = 0;
|
||||
virtual void SetDepth(hsScalar hither, hsScalar yon) = 0;
|
||||
virtual void GetDepth(float& hither, float& yon) const = 0;
|
||||
virtual void SetDepth(float hither, float yon) = 0;
|
||||
|
||||
virtual void SetZBiasScale( hsScalar scale ) = 0;
|
||||
virtual hsScalar GetZBiasScale( void ) const = 0;
|
||||
virtual void SetZBiasScale( float scale ) = 0;
|
||||
virtual float GetZBiasScale( void ) const = 0;
|
||||
|
||||
virtual const hsMatrix44& GetWorldToCamera() const = 0;
|
||||
virtual const hsMatrix44& GetCameraToWorld() const = 0;
|
||||
@ -300,8 +300,8 @@ public:
|
||||
|
||||
virtual const plViewTransform& GetViewTransform() const = 0;
|
||||
|
||||
virtual void ScreenToWorldPoint( int n, UInt32 stride, Int32 *scrX, Int32 *scrY,
|
||||
hsScalar dist, UInt32 strideOut, hsPoint3 *worldOut ) = 0;
|
||||
virtual void ScreenToWorldPoint( int n, uint32_t stride, int32_t *scrX, int32_t *scrY,
|
||||
float dist, uint32_t strideOut, hsPoint3 *worldOut ) = 0;
|
||||
|
||||
virtual void RefreshMatrices( void ) = 0;
|
||||
virtual void RefreshScreenMatrices( void ) = 0;
|
||||
@ -314,11 +314,11 @@ public:
|
||||
virtual plLayerInterface* AppendLayerInterface(plLayerInterface* li, hsBool onAllLayers = false) = 0;
|
||||
virtual plLayerInterface* RemoveLayerInterface(plLayerInterface* li, hsBool onAllLayers = false) = 0;
|
||||
|
||||
virtual UInt32 GetMaterialOverrideOn(hsGMatState::StateIdx category) const = 0;
|
||||
virtual UInt32 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 which, 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;
|
||||
|
||||
@ -330,13 +330,13 @@ public:
|
||||
virtual void SubmitClothingOutfit(plClothingOutfit* co) = 0;
|
||||
|
||||
// These all return true if the gamma was successfully set.
|
||||
virtual hsBool SetGamma(hsScalar eR, hsScalar eG, hsScalar eB) = 0;
|
||||
virtual hsBool SetGamma(const UInt16* const tabR, const UInt16* const tabG, const UInt16* const tabB) = 0; // len table = 256.
|
||||
virtual hsBool SetGamma(hsScalar e) { return SetGamma(e, e, e); }
|
||||
virtual hsBool SetGamma(const UInt16* const table) { return SetGamma(table, table, table); }
|
||||
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); }
|
||||
|
||||
// flipVertical is for the AVI writer, which wants it's frames upside down
|
||||
virtual hsBool CaptureScreen( plMipmap *dest, bool flipVertical = false, UInt16 desiredWidth = 0, UInt16 desiredHeight = 0 ) = 0;
|
||||
virtual hsBool 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;
|
||||
|
@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plProfile_h_inc
|
||||
#define plProfile_h_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
#define PL_PROFILE_ENABLED
|
||||
@ -153,22 +153,22 @@ public:
|
||||
protected:
|
||||
const char* fName; // Name of timer
|
||||
|
||||
UInt32 fValue;
|
||||
uint32_t fValue;
|
||||
|
||||
UInt32 fAvgCount;
|
||||
UInt64 fAvgTotal;
|
||||
UInt32 fLastAvg;
|
||||
UInt32 fMax;
|
||||
uint32_t fAvgCount;
|
||||
uint64_t fAvgTotal;
|
||||
uint32_t fLastAvg;
|
||||
uint32_t fMax;
|
||||
hsBool fActive;
|
||||
hsBool fRunning;
|
||||
UInt8 fDisplayFlags;
|
||||
uint8_t fDisplayFlags;
|
||||
|
||||
// Number of times EndTiming was called. Can be used to combine timing and counting in one timer
|
||||
UInt32 fTimerSamples;
|
||||
uint32_t fTimerSamples;
|
||||
|
||||
void IAddAvg();
|
||||
|
||||
void IPrintValue(UInt32 value, char* buf, hsBool printType);
|
||||
void IPrintValue(uint32_t value, char* buf, hsBool printType);
|
||||
|
||||
public:
|
||||
plProfileBase();
|
||||
@ -179,13 +179,13 @@ public:
|
||||
|
||||
void UpdateAvg();
|
||||
|
||||
UInt32 GetValue();
|
||||
uint32_t GetValue();
|
||||
|
||||
void PrintValue(char* buf, hsBool printType=true);
|
||||
void PrintAvg(char* buf, hsBool printType=true);
|
||||
void PrintMax(char* buf, hsBool printType=true);
|
||||
|
||||
UInt32 GetTimerSamples() const { return fTimerSamples; }
|
||||
uint32_t GetTimerSamples() const { return fTimerSamples; }
|
||||
|
||||
const char* GetName() { return fName; }
|
||||
|
||||
@ -194,7 +194,7 @@ public:
|
||||
void Stop() { fRunning = false; }
|
||||
void Start() { fRunning = true; }
|
||||
|
||||
UInt8 GetDisplayFlags() const { return fDisplayFlags; }
|
||||
uint8_t GetDisplayFlags() const { return fDisplayFlags; }
|
||||
|
||||
void ResetMax() { fMax = 0; }
|
||||
};
|
||||
@ -216,21 +216,21 @@ protected:
|
||||
|
||||
public:
|
||||
// Name is the timer name. Each timer group gets its own plStatusLog
|
||||
plProfileVar(const char *name, const char* group, UInt8 flags);
|
||||
plProfileVar(const char *name, const char* group, uint8_t flags);
|
||||
~plProfileVar();
|
||||
|
||||
// For timing
|
||||
void BeginTiming() { if (fActive && fRunning) IBeginTiming(); }
|
||||
void EndTiming() { if (fActive && fRunning) IEndTiming(); }
|
||||
|
||||
void NewMem(UInt32 memAmount) { fValue += memAmount; }
|
||||
void DelMem(UInt32 memAmount) { fValue -= memAmount; }
|
||||
void NewMem(uint32_t memAmount) { fValue += memAmount; }
|
||||
void DelMem(uint32_t memAmount) { fValue -= memAmount; }
|
||||
|
||||
// For Counting
|
||||
void Inc(int i = 1) { fValue += i;}
|
||||
void Dec(int i = 1) { fValue -= i;}
|
||||
|
||||
void Set(UInt32 value) { fValue = value; }
|
||||
void Set(uint32_t value) { fValue = value; }
|
||||
|
||||
//
|
||||
// For multiple timings per frame of the same thing ie. Each particle system
|
||||
|
@ -43,9 +43,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "plProfile.h"
|
||||
#include "hsTimer.h"
|
||||
|
||||
#include "hsUtils.h"
|
||||
|
||||
static UInt32 gCyclesPerMS = 0;
|
||||
|
||||
static uint32_t gCyclesPerMS = 0;
|
||||
|
||||
#ifdef HS_BUILD_FOR_WIN32
|
||||
#define USE_FAST_TIMER
|
||||
@ -62,7 +62,7 @@ static UInt32 gCyclesPerMS = 0;
|
||||
#define forceinline inline
|
||||
#endif
|
||||
|
||||
forceinline UInt32 GetPentiumCounter()
|
||||
forceinline uint32_t GetPentiumCounter()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
__asm {
|
||||
@ -79,9 +79,9 @@ forceinline UInt32 GetPentiumCounter()
|
||||
|
||||
#pragma warning (pop)
|
||||
|
||||
#include "hsWindows.h"
|
||||
|
||||
static UInt32 GetProcSpeed()
|
||||
|
||||
static uint32_t GetProcSpeed()
|
||||
{
|
||||
const char* keypath[] =
|
||||
{
|
||||
@ -114,16 +114,16 @@ static UInt32 GetProcSpeed()
|
||||
return value*1000000;
|
||||
}
|
||||
|
||||
UInt32 GetProcSpeedAlt()
|
||||
uint32_t GetProcSpeedAlt()
|
||||
{
|
||||
const UInt32 kSamplePeriodMS = 250;
|
||||
const uint32_t kSamplePeriodMS = 250;
|
||||
|
||||
// Raise priority to avoid interference from other threads.
|
||||
int priority = GetThreadPriority(GetCurrentThread());
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
|
||||
|
||||
UInt32 startTicks, endTicks;
|
||||
UInt64 pcStart, pcEnd;
|
||||
uint32_t startTicks, endTicks;
|
||||
uint64_t pcStart, pcEnd;
|
||||
|
||||
// Count number of processor cycles inside the specified interval
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&pcStart);
|
||||
@ -136,17 +136,17 @@ UInt32 GetProcSpeedAlt()
|
||||
SetThreadPriority(GetCurrentThread(), priority);
|
||||
|
||||
// Calculate Rdtsc/PerformanceCounter ratio;
|
||||
UInt32 numTicks = endTicks - startTicks;
|
||||
UInt64 pcDiff = pcEnd - pcStart;
|
||||
uint32_t numTicks = endTicks - startTicks;
|
||||
uint64_t pcDiff = pcEnd - pcStart;
|
||||
|
||||
double ratio = double(numTicks) / double(pcDiff);
|
||||
UInt64 pcFreq;
|
||||
uint64_t pcFreq;
|
||||
QueryPerformanceFrequency((LARGE_INTEGER*)&pcFreq);
|
||||
|
||||
// Calculate CPU frequency.
|
||||
UInt64 cpuFreq = UInt64(pcFreq * ratio);
|
||||
uint64_t cpuFreq = uint64_t(pcFreq * ratio);
|
||||
|
||||
return (UInt32)cpuFreq;
|
||||
return (uint32_t)cpuFreq;
|
||||
}
|
||||
|
||||
#define GetProfileTicks() GetPentiumCounter()
|
||||
@ -189,9 +189,9 @@ void plProfileManager::AddTimer(plProfileVar* var)
|
||||
fVars.push_back(var);
|
||||
}
|
||||
|
||||
static UInt32 kAvgMilliseconds = 1000;
|
||||
static uint32_t kAvgMilliseconds = 1000;
|
||||
|
||||
void plProfileManager::SetAvgTime(UInt32 avgMS)
|
||||
void plProfileManager::SetAvgTime(uint32_t avgMS)
|
||||
{
|
||||
kAvgMilliseconds = avgMS;
|
||||
}
|
||||
@ -251,7 +251,7 @@ void plProfileManager::EndFrame()
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 plProfileManager::GetTime()
|
||||
uint32_t plProfileManager::GetTime()
|
||||
{
|
||||
return GetProfileTicks();
|
||||
}
|
||||
@ -294,16 +294,16 @@ void plProfileBase::UpdateAvg()
|
||||
{
|
||||
if (fAvgCount > 0)
|
||||
{
|
||||
fLastAvg = (UInt32)(fAvgTotal / fAvgCount);
|
||||
fLastAvg = (uint32_t)(fAvgTotal / fAvgCount);
|
||||
fAvgCount = 0;
|
||||
fAvgTotal = 0;
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 plProfileBase::GetValue()
|
||||
uint32_t plProfileBase::GetValue()
|
||||
{
|
||||
if (hsCheckBits(fDisplayFlags, kDisplayTime))
|
||||
return (UInt32)TicksToMSec(fValue);
|
||||
return (uint32_t)TicksToMSec(fValue);
|
||||
else
|
||||
return fValue;
|
||||
}
|
||||
@ -334,7 +334,7 @@ static const char *insertCommas(unsigned int value)
|
||||
return str;
|
||||
}
|
||||
|
||||
void plProfileBase::IPrintValue(UInt32 value, char* buf, hsBool printType)
|
||||
void plProfileBase::IPrintValue(uint32_t value, char* buf, hsBool printType)
|
||||
{
|
||||
if (hsCheckBits(fDisplayFlags, kDisplayCount))
|
||||
{
|
||||
@ -416,7 +416,7 @@ plProfileLaps::LapInfo* plProfileLaps::IFindLap(const char* lapName)
|
||||
return nil;
|
||||
}
|
||||
|
||||
void plProfileLaps::BeginLap(UInt32 curValue, const char* name)
|
||||
void plProfileLaps::BeginLap(uint32_t curValue, const char* name)
|
||||
{
|
||||
LapInfo* lap = IFindLap(name);
|
||||
if (!lap)
|
||||
@ -432,7 +432,7 @@ void plProfileLaps::BeginLap(UInt32 curValue, const char* name)
|
||||
lap->BeginTiming(curValue);
|
||||
}
|
||||
|
||||
void plProfileLaps::EndLap(UInt32 curValue, const char* name)
|
||||
void plProfileLaps::EndLap(uint32_t curValue, const char* name)
|
||||
{
|
||||
LapInfo* lap = IFindLap(name);
|
||||
|
||||
@ -489,7 +489,7 @@ plProfileBase* plProfileLaps::GetLap(int i)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
plProfileVar::plProfileVar(const char *name, const char* group, UInt8 flags) :
|
||||
plProfileVar::plProfileVar(const char *name, const char* group, uint8_t flags) :
|
||||
fGroup(group),
|
||||
fLaps(nil)
|
||||
{
|
||||
@ -507,7 +507,7 @@ plProfileVar::~plProfileVar()
|
||||
void plProfileVar::IBeginLap(const char* lapName)
|
||||
{
|
||||
if (!fLaps)
|
||||
fLaps = TRACKED_NEW plProfileLaps;
|
||||
fLaps = new plProfileLaps;
|
||||
fDisplayFlags |= kDisplayLaps;
|
||||
if(fLapsActive)
|
||||
fLaps->BeginLap(fValue, lapName);
|
||||
|
@ -42,7 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plProfileManager_h_inc
|
||||
#define plProfileManager_h_inc
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "hsStlUtils.h"
|
||||
#include "plProfile.h"
|
||||
|
||||
@ -56,7 +56,7 @@ protected:
|
||||
|
||||
double fLastAvgTime;
|
||||
|
||||
UInt32 fProcessorSpeed;
|
||||
uint32_t fProcessorSpeed;
|
||||
|
||||
plProfileManager();
|
||||
|
||||
@ -70,12 +70,12 @@ public:
|
||||
void BeginFrame(); // Call begin frame on all timers
|
||||
void EndFrame(); // Call end frame on all timers
|
||||
|
||||
void SetAvgTime(UInt32 avgMS);
|
||||
void SetAvgTime(uint32_t avgMS);
|
||||
|
||||
UInt32 GetProcessorSpeed() { return fProcessorSpeed; }
|
||||
uint32_t GetProcessorSpeed() { return fProcessorSpeed; }
|
||||
|
||||
// Backdoor for hack timers in calculated profiles
|
||||
static UInt32 GetTime();
|
||||
static uint32_t GetTime();
|
||||
};
|
||||
|
||||
class plProfileLaps
|
||||
@ -90,16 +90,16 @@ protected:
|
||||
LapInfo(const char* name) { fName = name; fDisplayFlags = kDisplayTime; }
|
||||
bool operator<(const LapInfo& rhs) const { return fLastAvg < rhs.fLastAvg; }
|
||||
|
||||
void BeginTiming(UInt32 value) { fValue -= value; }
|
||||
void EndTiming(UInt32 value) { fValue += value; fTimerSamples++; }
|
||||
void BeginTiming(uint32_t value) { fValue -= value; }
|
||||
void EndTiming(uint32_t value) { fValue += value; fTimerSamples++; }
|
||||
};
|
||||
std::vector<LapInfo> fLapTimes;
|
||||
|
||||
LapInfo* IFindLap(const char* lapName);
|
||||
|
||||
public:
|
||||
void BeginLap(UInt32 curValue, const char* name);
|
||||
void EndLap(UInt32 curValue, const char* name);
|
||||
void BeginLap(uint32_t curValue, const char* name);
|
||||
void EndLap(uint32_t curValue, const char* name);
|
||||
|
||||
void BeginFrame();
|
||||
void EndFrame();
|
||||
|
@ -54,11 +54,11 @@ public:
|
||||
CLASSNAME_REGISTER( plDispatchBase );
|
||||
GETINTERFACE_ANY( plDispatchBase, plCreatable );
|
||||
|
||||
virtual void RegisterForType(UInt16 hClass, const plKey& receiver) = 0;
|
||||
virtual void RegisterForExactType(UInt16 hClass, const plKey& receiver) = 0;
|
||||
virtual void RegisterForType(uint16_t hClass, const plKey& receiver) = 0;
|
||||
virtual void RegisterForExactType(uint16_t hClass, const plKey& receiver) = 0;
|
||||
|
||||
virtual void UnRegisterForType(UInt16 hClass, const plKey& receiver) = 0;
|
||||
virtual void UnRegisterForExactType(UInt16 hClass, const plKey& receiver) = 0;
|
||||
virtual void UnRegisterForType(uint16_t hClass, const plKey& receiver) = 0;
|
||||
virtual void UnRegisterForExactType(uint16_t hClass, const plKey& receiver) = 0;
|
||||
|
||||
virtual void UnRegisterAll(const plKey& receiver) = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user