mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 03:09:13 +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:
@ -40,13 +40,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plCullPoly.h"
|
||||
#include "hsMatrix44.h"
|
||||
#include "hsStream.h"
|
||||
#include "hsFastMath.h"
|
||||
|
||||
plCullPoly& plCullPoly::InitFromVerts(UInt32 f)
|
||||
plCullPoly& plCullPoly::InitFromVerts(uint32_t f)
|
||||
{
|
||||
fFlags = f;
|
||||
|
||||
@ -66,20 +66,20 @@ plCullPoly& plCullPoly::InitFromVerts(UInt32 f)
|
||||
{
|
||||
fCenter += fVerts[i];
|
||||
}
|
||||
fCenter *= 1.f / hsScalar(fVerts.GetCount());
|
||||
fCenter *= 1.f / float(fVerts.GetCount());
|
||||
|
||||
fRadius = ICalcRadius();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
hsScalar plCullPoly::ICalcRadius() const
|
||||
float plCullPoly::ICalcRadius() const
|
||||
{
|
||||
hsScalar radSq = 0;
|
||||
float radSq = 0;
|
||||
int i;
|
||||
for( i = 0; i < fVerts.GetCount(); i++ )
|
||||
{
|
||||
hsScalar tmpSq = hsVector3(&fVerts[i], &fCenter).MagnitudeSquared();
|
||||
float tmpSq = hsVector3(&fVerts[i], &fCenter).MagnitudeSquared();
|
||||
if( tmpSq > radSq )
|
||||
radSq = tmpSq;
|
||||
}
|
||||
@ -169,8 +169,8 @@ void plCullPoly::Write(hsStream* s, hsResMgr* mgr)
|
||||
#ifdef MF_VALIDATE_POLYS
|
||||
hsBool plCullPoly::Validate() const
|
||||
{
|
||||
const hsScalar kMinMag = 1.e-8f;
|
||||
hsScalar magSq = fNorm.MagnitudeSquared();
|
||||
const float kMinMag = 1.e-8f;
|
||||
float magSq = fNorm.MagnitudeSquared();
|
||||
if( magSq < kMinMag )
|
||||
return false;
|
||||
if( fVerts.GetCount() < 3 )
|
||||
|
@ -51,7 +51,7 @@ class hsStream;
|
||||
class hsResMgr;
|
||||
struct hsMatrix44;
|
||||
|
||||
const hsScalar kCullPolyDegen = 1.e-4f;
|
||||
const float kCullPolyDegen = 1.e-4f;
|
||||
|
||||
class plCullPoly
|
||||
{
|
||||
@ -62,17 +62,17 @@ public:
|
||||
kTwoSided = 0x2
|
||||
};
|
||||
|
||||
UInt32 fFlags;
|
||||
uint32_t fFlags;
|
||||
mutable hsBitVector fClipped; // fClipped[i] => edge(fVerts[i], fVerts[(i+1)%n])
|
||||
|
||||
hsTArray<hsPoint3> fVerts;
|
||||
hsVector3 fNorm;
|
||||
hsScalar fDist;
|
||||
float fDist;
|
||||
hsPoint3 fCenter;
|
||||
hsScalar fRadius;
|
||||
float fRadius;
|
||||
|
||||
const hsPoint3& GetCenter() const { return fCenter; }
|
||||
hsScalar GetRadius() const { return fRadius; }
|
||||
float GetRadius() const { return fRadius; }
|
||||
|
||||
void SetHole(hsBool on) { if( on )fFlags |= kHole; else fFlags &= ~kHole; }
|
||||
void SetTwoSided(hsBool on) { if( on )fFlags |= kTwoSided; else fFlags &= ~kTwoSided; }
|
||||
@ -82,8 +82,8 @@ public:
|
||||
|
||||
plCullPoly& Init(const plCullPoly& p) { fClipped.Clear(); fVerts.SetCount(0); fFlags = p.fFlags; fNorm = p.fNorm; fDist = p.fDist; fCenter = p.fCenter; return *this; }
|
||||
plCullPoly& Flip(const plCullPoly& p);
|
||||
plCullPoly& InitFromVerts(UInt32 f=kNone);
|
||||
hsScalar ICalcRadius() const;
|
||||
plCullPoly& InitFromVerts(uint32_t f=kNone);
|
||||
float ICalcRadius() const;
|
||||
|
||||
plCullPoly& Transform(const hsMatrix44& l2w, const hsMatrix44& w2l, plCullPoly& dst) const;
|
||||
|
||||
|
@ -175,7 +175,7 @@ plOccNode* plOccTree::IAddPolyRecur(plOccNode* node, plOccPoly* poly)
|
||||
plOccPoly* outPoly = nil;
|
||||
|
||||
|
||||
UInt32 test = ITestPoly(node->fPlane, poly, inPoly, outPoly);
|
||||
uint32_t test = ITestPoly(node->fPlane, poly, inPoly, outPoly);
|
||||
|
||||
switch( test )
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
plOccPlane fPlane;
|
||||
|
||||
hsTArray<hsPoint3> fVerts;
|
||||
hsTArray<UInt8> fEdgeFlags; // flag[i] => edge(fVerts[i], fVerts[(i+1)%n])
|
||||
hsTArray<uint8_t> fEdgeFlags; // flag[i] => edge(fVerts[i], fVerts[(i+1)%n])
|
||||
};
|
||||
|
||||
class plOccNode
|
||||
@ -82,7 +82,7 @@ protected:
|
||||
kSplit = 0x2
|
||||
};
|
||||
|
||||
UInt32 fFlags;
|
||||
uint32_t fFlags;
|
||||
|
||||
plOccPlane fPolyPlane; // Plane of the poly we came from
|
||||
plOccPlane fViewPlane; // Plane perp to view dir.
|
||||
@ -106,7 +106,7 @@ protected:
|
||||
kNeedsBuild = 0x1
|
||||
};
|
||||
|
||||
UInt8 fFlags;
|
||||
uint8_t fFlags;
|
||||
|
||||
// Temp pools for building our trees each frame.
|
||||
hsTArray<plOccPoly> fPolyPool;
|
||||
|
@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plOccluder.h"
|
||||
#include "hsStream.h"
|
||||
#include "plOccluderProxy.h"
|
||||
@ -58,7 +58,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
plOccluder::plOccluder()
|
||||
: fSceneNode(nil)
|
||||
{
|
||||
fProxyGen = TRACKED_NEW plOccluderProxy;
|
||||
fProxyGen = new plOccluderProxy;
|
||||
fProxyGen->Init(this);
|
||||
|
||||
fVisSet.SetBit(0);
|
||||
@ -130,12 +130,12 @@ void plOccluder::IRemoveVisRegion(plVisRegion* reg)
|
||||
}
|
||||
}
|
||||
|
||||
plDrawableSpans* plOccluder::CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo)
|
||||
plDrawableSpans* plOccluder::CreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo)
|
||||
{
|
||||
hsTArray<hsPoint3> pos;
|
||||
hsTArray<hsVector3> norm;
|
||||
hsTArray<hsColorRGBA> color;
|
||||
hsTArray<UInt16> tris;
|
||||
hsTArray<uint16_t> tris;
|
||||
|
||||
plLayer* lay = plLayer::ConvertNoRef(mat->GetLayer(0)->BottomOfStack());
|
||||
if( lay )
|
||||
@ -238,9 +238,9 @@ void plOccluder::IComputeBounds()
|
||||
}
|
||||
}
|
||||
|
||||
hsScalar plOccluder::IComputeSurfaceArea()
|
||||
float plOccluder::IComputeSurfaceArea()
|
||||
{
|
||||
hsScalar area = 0;
|
||||
float area = 0;
|
||||
const hsTArray<plCullPoly>& polys = GetLocalPolyList();
|
||||
int i;
|
||||
for( i =0 ; i < polys.GetCount(); i++ )
|
||||
@ -258,7 +258,7 @@ hsScalar plOccluder::IComputeSurfaceArea()
|
||||
|
||||
void plOccluder::SetPolyList(const hsTArray<plCullPoly>& list)
|
||||
{
|
||||
UInt16 n = list.GetCount();
|
||||
uint16_t n = list.GetCount();
|
||||
fPolys.SetCount(n);
|
||||
int i;
|
||||
for( i = 0; i < n; i++ )
|
||||
@ -271,7 +271,7 @@ void plOccluder::ISetSceneNode(plKey node)
|
||||
{
|
||||
if( node )
|
||||
{
|
||||
plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(node, plRefMsg::kOnCreate, -1, plNodeRefMsg::kOccluder);
|
||||
plNodeRefMsg* refMsg = new plNodeRefMsg(node, plRefMsg::kOnCreate, -1, plNodeRefMsg::kOccluder);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(GetKey(), refMsg, plRefFlags::kPassiveRef);
|
||||
}
|
||||
if( fSceneNode )
|
||||
@ -290,7 +290,7 @@ void plOccluder::Read(hsStream* s, hsResMgr* mgr)
|
||||
fPriority = s->ReadLEScalar();
|
||||
|
||||
hsTArray<plCullPoly>& localPolys = IGetLocalPolyList();
|
||||
UInt16 n = s->ReadLE16();
|
||||
uint16_t n = s->ReadLE16();
|
||||
localPolys.SetCount(n);
|
||||
int i;
|
||||
for( i = 0; i < n; i++ )
|
||||
@ -302,7 +302,7 @@ void plOccluder::Read(hsStream* s, hsResMgr* mgr)
|
||||
n = s->ReadLE16();
|
||||
fVisRegions.SetCountAndZero(n);
|
||||
for( i = 0; i < n; i++ )
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefVisRegion), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefVisRegion), plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
void plOccluder::Write(hsStream* s, hsResMgr* mgr)
|
||||
@ -360,7 +360,7 @@ void plMobileOccluder::SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l
|
||||
|
||||
void plMobileOccluder::SetPolyList(const hsTArray<plCullPoly>& list)
|
||||
{
|
||||
UInt16 n = list.GetCount();
|
||||
uint16_t n = list.GetCount();
|
||||
fOrigPolys.SetCount(n);
|
||||
fPolys.SetCount(n);
|
||||
|
||||
|
@ -75,12 +75,12 @@ protected:
|
||||
hsTArray<plVisRegion*> fVisRegions;
|
||||
hsBitVector fVisNot;
|
||||
|
||||
hsScalar fPriority;
|
||||
float fPriority;
|
||||
hsBounds3Ext fWorldBounds;
|
||||
|
||||
plKey fSceneNode;
|
||||
|
||||
virtual hsScalar IComputeSurfaceArea();
|
||||
virtual float IComputeSurfaceArea();
|
||||
virtual void IComputeBounds();
|
||||
|
||||
virtual hsTArray<plCullPoly>& IGetLocalPolyList() { return fPolys; }
|
||||
@ -99,7 +99,7 @@ public:
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual hsScalar GetPriority() const { return fPriority; }
|
||||
virtual float GetPriority() const { return fPriority; }
|
||||
|
||||
hsBool InVisSet(const hsBitVector& visSet) const { return fVisSet.Overlap(visSet); }
|
||||
hsBool InVisNot(const hsBitVector& visNot) const { return fVisNot.Overlap(visNot); }
|
||||
@ -114,13 +114,13 @@ public:
|
||||
virtual const hsTArray<plCullPoly>& GetWorldPolyList() const { return fPolys; }
|
||||
virtual const hsTArray<plCullPoly>& GetLocalPolyList() const { return fPolys; }
|
||||
|
||||
virtual Int32 GetNumProperties() const { return kNumProps; }
|
||||
virtual int32_t GetNumProperties() const { return kNumProps; }
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
// Visualization
|
||||
virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo);
|
||||
virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo);
|
||||
|
||||
// Export only function to initialize.
|
||||
virtual void ComputeFromPolys();
|
||||
|
@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plOccluderProxy.h"
|
||||
#include "plOccluder.h"
|
||||
#include "plDrawable/plDrawableSpans.h"
|
||||
@ -72,7 +72,7 @@ plKey plOccluderProxy::IGetNode() const
|
||||
return fOwner ? fOwner->GetSceneNode() : nil;
|
||||
}
|
||||
|
||||
plDrawableSpans* plOccluderProxy::ICreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo)
|
||||
plDrawableSpans* plOccluderProxy::ICreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo)
|
||||
{
|
||||
if( fOwner )
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ protected:
|
||||
plOccluder* fOwner;
|
||||
|
||||
|
||||
virtual plDrawableSpans* ICreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo=nil);
|
||||
virtual plDrawableSpans* ICreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo=nil);
|
||||
virtual plKey IGetNode() const;
|
||||
public:
|
||||
plOccluderProxy();
|
||||
|
@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plPageTreeMgr.h"
|
||||
#include "plDrawable/plSpaceTreeMaker.h"
|
||||
#include "plDrawable/plSpaceTree.h"
|
||||
@ -116,7 +116,7 @@ hsBool plPageTreeMgr::Harvest(plVolumeIsect* isect, hsTArray<plDrawVisList>& lev
|
||||
if( !(GetSpaceTree() || IBuildSpaceTree()) )
|
||||
return false;
|
||||
|
||||
static hsTArray<Int16> list;
|
||||
static hsTArray<int16_t> list;
|
||||
|
||||
GetSpaceTree()->HarvestLeaves(isect, list);
|
||||
|
||||
@ -139,7 +139,7 @@ int plPageTreeMgr::Render(plPipeline* pipe)
|
||||
if( !(GetSpaceTree() || IBuildSpaceTree()) )
|
||||
return 0;
|
||||
|
||||
static hsTArray<Int16> list;
|
||||
static hsTArray<int16_t> list;
|
||||
list.SetCount(0);
|
||||
|
||||
plProfile_BeginTiming(RenderScene);
|
||||
@ -276,7 +276,7 @@ hsBool plPageTreeMgr::ISortByLevel(plPipeline* pipe, hsTArray<plDrawVisList>& dr
|
||||
// Returns the index of the last one drawn.
|
||||
int plPageTreeMgr::IPrepForRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawVisList>& drawVis, int& iDrawStart)
|
||||
{
|
||||
UInt32 renderLevel = drawVis[iDrawStart].fDrawable->GetRenderLevel().Level();
|
||||
uint32_t renderLevel = drawVis[iDrawStart].fDrawable->GetRenderLevel().Level();
|
||||
|
||||
int i;
|
||||
|
||||
@ -308,7 +308,7 @@ int plPageTreeMgr::IPrepForRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawV
|
||||
iDraw++ )
|
||||
{
|
||||
plDrawable* drawable = drawVis[iDraw].fDrawable;
|
||||
hsTArray<Int16>& visList = drawVis[iDraw].fVisList;
|
||||
hsTArray<int16_t>& visList = drawVis[iDraw].fVisList;
|
||||
for( i = 0; i < visList.GetCount(); i++ )
|
||||
{
|
||||
plDrawSpanPair* pair = pairs.Push();
|
||||
@ -354,14 +354,14 @@ hsBool plPageTreeMgr::IRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawVisLi
|
||||
plDrawable* drawable = drawList[pairs[i].fDrawable]->fDrawable;
|
||||
|
||||
listTrav = &scratchList[iSort++];
|
||||
listTrav->fBody = (void*)*(UInt32*)&pairs[i];
|
||||
listTrav->fBody = (void*)*(uint32_t*)&pairs[i];
|
||||
listTrav->fNext = listTrav + 1;
|
||||
|
||||
if( drawable->GetNativeProperty(plDrawable::kPropSortAsOne) )
|
||||
{
|
||||
const hsBounds3Ext& bnd = drawable->GetSpaceTree()->GetNode(drawable->GetSpaceTree()->GetRoot()).fWorldBounds;
|
||||
plConst(hsScalar) kDistFudge(1.e-1f);
|
||||
listTrav->fKey.fFloat = -(bnd.GetCenter() - viewPos).MagnitudeSquared() + hsScalar(pairs[i].fSpan) * kDistFudge;
|
||||
plConst(float) kDistFudge(1.e-1f);
|
||||
listTrav->fKey.fFloat = -(bnd.GetCenter() - viewPos).MagnitudeSquared() + float(pairs[i].fSpan) * kDistFudge;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -381,7 +381,7 @@ hsBool plPageTreeMgr::IRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawVisLi
|
||||
|
||||
plProfile_EndTiming(DrawObjSort);
|
||||
|
||||
static hsTArray<Int16> visList;
|
||||
static hsTArray<int16_t> visList;
|
||||
visList.SetCount(0);
|
||||
|
||||
plVisMgr* visMgr = fDisableVisMgr ? nil : fVisMgr;
|
||||
@ -449,7 +449,7 @@ hsBool plPageTreeMgr::IRenderSortingSpans(plPipeline* pipe, hsTArray<plDrawVisLi
|
||||
int curDraw = curPair.fDrawable;
|
||||
listTrav = listTrav->fNext;
|
||||
|
||||
static hsTArray<UInt32> numDrawn;
|
||||
static hsTArray<uint32_t> numDrawn;
|
||||
numDrawn.SetCountAndZero(drawList.GetCount());
|
||||
|
||||
visList.Append(drawList[curDraw]->fVisList[numDrawn[curDraw]++]);
|
||||
@ -632,7 +632,7 @@ hsBool plPageTreeMgr::IGetCullPolys(plPipeline* pipe)
|
||||
{
|
||||
if( pipe->TestVisibleWorld(fOccluders[i]->GetWorldBounds()) )
|
||||
{
|
||||
hsScalar invDist = -hsFastMath::InvSqrtAppr((viewPos - fOccluders[i]->GetWorldBounds().GetCenter()).MagnitudeSquared());
|
||||
float invDist = -hsFastMath::InvSqrtAppr((viewPos - fOccluders[i]->GetWorldBounds().GetCenter()).MagnitudeSquared());
|
||||
listTrav = &scratchList[numSubmit++];
|
||||
listTrav->fBody = (void*)fOccluders[i];
|
||||
listTrav->fNext = listTrav+1;
|
||||
@ -653,7 +653,7 @@ hsBool plPageTreeMgr::IGetCullPolys(plPipeline* pipe)
|
||||
hsRadixSort::Elem* sortedList = rad.Sort(scratchList.AcquireArray(), 0);
|
||||
listTrav = sortedList;
|
||||
|
||||
const UInt32 kMaxOccluders = 1000;
|
||||
const uint32_t kMaxOccluders = 1000;
|
||||
if( numSubmit > kMaxOccluders )
|
||||
numSubmit = kMaxOccluders;
|
||||
|
||||
@ -673,7 +673,7 @@ hsBool plPageTreeMgr::IGetCullPolys(plPipeline* pipe)
|
||||
return fCullPolys.GetCount() > 0;
|
||||
}
|
||||
|
||||
hsBool plPageTreeMgr::IGetOcclusion(plPipeline* pipe, hsTArray<Int16>& list)
|
||||
hsBool plPageTreeMgr::IGetOcclusion(plPipeline* pipe, hsTArray<int16_t>& list)
|
||||
{
|
||||
plProfile_BeginTiming(DrawOccBuild);
|
||||
|
||||
|
@ -59,9 +59,9 @@ class plDrawSpanPair
|
||||
{
|
||||
public:
|
||||
plDrawSpanPair() {}
|
||||
plDrawSpanPair(UInt16 d, UInt16 s) : fDrawable(d), fSpan(s) {}
|
||||
UInt16 fDrawable;
|
||||
UInt16 fSpan;
|
||||
plDrawSpanPair(uint16_t d, uint16_t s) : fDrawable(d), fSpan(s) {}
|
||||
uint16_t fDrawable;
|
||||
uint16_t fSpan;
|
||||
};
|
||||
|
||||
class plDrawVisList
|
||||
@ -71,7 +71,7 @@ public:
|
||||
virtual ~plDrawVisList() {}
|
||||
|
||||
plDrawable* fDrawable;
|
||||
hsTArray<Int16> fVisList;
|
||||
hsTArray<int16_t> fVisList;
|
||||
|
||||
plDrawVisList& operator=(const plDrawVisList& v) { fDrawable = v.fDrawable; fVisList = v.fVisList; return *this; }
|
||||
};
|
||||
@ -94,7 +94,7 @@ protected:
|
||||
hsBool IBuildSpaceTree();
|
||||
hsBool IRefreshTree(plPipeline* pipe);
|
||||
void ISortCullPolys(plPipeline* pipe);
|
||||
hsBool IGetOcclusion(plPipeline* pipe, hsTArray<Int16>& list);
|
||||
hsBool IGetOcclusion(plPipeline* pipe, hsTArray<int16_t>& list);
|
||||
hsBool IGetCullPolys(plPipeline* pipe);
|
||||
void IResetOcclusion(plPipeline* pipe);
|
||||
void IAddCullPolyList(const hsTArray<plCullPoly>& polyList);
|
||||
|
@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plPostEffectMod.h"
|
||||
#include "plPageTreeMgr.h"
|
||||
#include "plSceneNode.h"
|
||||
@ -64,8 +64,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
plPostEffectMod::plPostEffectMod()
|
||||
: fHither(1.f),
|
||||
fYon(100.f),
|
||||
fFovX(hsScalarPI * 0.25f),
|
||||
fFovY(hsScalarPI * 0.25f * 0.75f),
|
||||
fFovX(M_PI * 0.25f),
|
||||
fFovY(M_PI * 0.25f * 0.75f),
|
||||
fPageMgr(nil),
|
||||
fRenderTarget(nil),
|
||||
fRenderRequest(nil)
|
||||
@ -83,18 +83,18 @@ plPostEffectMod::~plPostEffectMod()
|
||||
|
||||
void plPostEffectMod::ISetupRenderRequest()
|
||||
{
|
||||
UInt32 rtFlags = 0;
|
||||
uint32_t rtFlags = 0;
|
||||
|
||||
// If we go to rendering to sub-window, we'll want to explicitly set width and height
|
||||
UInt32 width = 0;
|
||||
UInt32 height = 0;
|
||||
uint32_t width = 0;
|
||||
uint32_t height = 0;
|
||||
|
||||
UInt32 colorDepth = 0;
|
||||
UInt32 zDepth = 0;
|
||||
UInt32 stencilDepth = 0;
|
||||
uint32_t colorDepth = 0;
|
||||
uint32_t zDepth = 0;
|
||||
uint32_t stencilDepth = 0;
|
||||
|
||||
fRenderRequest = TRACKED_NEW plRenderRequest;
|
||||
UInt32 renderState = plPipeline::kRenderNormal
|
||||
fRenderRequest = new plRenderRequest;
|
||||
uint32_t renderState = plPipeline::kRenderNormal
|
||||
| plPipeline::kRenderNoProjection
|
||||
| plPipeline::kRenderNoLights
|
||||
| plPipeline::kRenderClearDepth;
|
||||
@ -107,7 +107,7 @@ void plPostEffectMod::ISetupRenderRequest()
|
||||
|
||||
fRenderRequest->SetRenderTarget(fRenderTarget);
|
||||
|
||||
fPageMgr = TRACKED_NEW plPageTreeMgr;
|
||||
fPageMgr = new plPageTreeMgr;
|
||||
|
||||
fRenderRequest->SetPageTreeMgr(fPageMgr);
|
||||
|
||||
@ -157,7 +157,7 @@ hsBool plPostEffectMod::IIsEnabled() const
|
||||
return /*GetTarget() &&*/ !fPageMgr->Empty() && fState.IsBitSet(kEnabled);
|
||||
}
|
||||
|
||||
hsBool plPostEffectMod::IEval(double secs, hsScalar del, UInt32 dirty)
|
||||
hsBool plPostEffectMod::IEval(double secs, float del, uint32_t dirty)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -223,7 +223,7 @@ void plPostEffectMod::ISubmitRequest()
|
||||
|
||||
IUpdateRenderRequest();
|
||||
|
||||
plRenderRequestMsg* req = TRACKED_NEW plRenderRequestMsg(GetKey(), fRenderRequest);
|
||||
plRenderRequestMsg* req = new plRenderRequestMsg(GetKey(), fRenderRequest);
|
||||
plgDispatch::MsgSend(req);
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ void plPostEffectMod::Read(hsStream* s, hsResMgr* mgr)
|
||||
fFovX = s->ReadLEScalar();
|
||||
fFovY = s->ReadLEScalar();
|
||||
|
||||
fNodeKey = mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kNodeRef), plRefFlags::kPassiveRef);
|
||||
fNodeKey = mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, -1, kNodeRef), plRefFlags::kPassiveRef);
|
||||
|
||||
fDefaultW2C.Read( s );
|
||||
fDefaultC2W.Read( s );
|
||||
@ -334,4 +334,4 @@ const plViewTransform& plPostEffectMod::GetViewTransform()
|
||||
{
|
||||
IUpdateRenderRequest();
|
||||
return fRenderRequest->GetViewTransform();
|
||||
}
|
||||
}
|
||||
|
@ -69,11 +69,11 @@ protected:
|
||||
|
||||
hsBitVector fState;
|
||||
|
||||
hsScalar fHither;
|
||||
hsScalar fYon;
|
||||
float fHither;
|
||||
float fYon;
|
||||
|
||||
hsScalar fFovX;
|
||||
hsScalar fFovY;
|
||||
float fFovX;
|
||||
float fFovY;
|
||||
|
||||
plKey fNodeKey;
|
||||
plPageTreeMgr* fPageMgr;
|
||||
@ -84,7 +84,7 @@ protected:
|
||||
hsMatrix44 fDefaultW2C, fDefaultC2W;
|
||||
|
||||
|
||||
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty); // called only by owner object's Eval()
|
||||
virtual hsBool IEval(double secs, float del, uint32_t dirty); // called only by owner object's Eval()
|
||||
|
||||
void ISetupRenderRequest();
|
||||
void IDestroyRenderRequest();
|
||||
@ -118,15 +118,15 @@ public:
|
||||
void SetNodeKey(plKey key) { fNodeKey = key; }
|
||||
plKey GetNodeKey() const { return fNodeKey; }
|
||||
|
||||
void SetHither(hsScalar h) { fHither = h; }
|
||||
void SetYon(hsScalar y) { fYon = y; }
|
||||
void SetFovX(hsScalar f) { fFovX = f; }
|
||||
void SetFovY(hsScalar f) { fFovY = f; }
|
||||
void SetHither(float h) { fHither = h; }
|
||||
void SetYon(float y) { fYon = y; }
|
||||
void SetFovX(float f) { fFovX = f; }
|
||||
void SetFovY(float f) { fFovY = f; }
|
||||
|
||||
hsScalar GetHither() const { return fHither; }
|
||||
hsScalar GetYon() const { return fYon; }
|
||||
hsScalar GetFovX() const { return fFovX; }
|
||||
hsScalar GetFovY() const { return fFovY; }
|
||||
float GetHither() const { return fHither; }
|
||||
float GetYon() const { return fYon; }
|
||||
float GetFovX() const { return fFovX; }
|
||||
float GetFovY() const { return fFovY; }
|
||||
|
||||
plPageTreeMgr* GetPageMgr() const { return fPageMgr; }
|
||||
|
||||
|
@ -53,7 +53,7 @@ plRelevanceMgr::plRelevanceMgr() : fEnabled(true)
|
||||
|
||||
void plRelevanceMgr::Init()
|
||||
{
|
||||
fInstance = TRACKED_NEW plRelevanceMgr;
|
||||
fInstance = new plRelevanceMgr;
|
||||
fInstance->RegisterAs(kRelevanceMgr_KEY);
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ void plRelevanceMgr::SetRegionVectors(const hsPoint3 &pos, hsBitVector ®ionsI
|
||||
}
|
||||
}
|
||||
|
||||
UInt32 plRelevanceMgr::GetNumRegions() const
|
||||
uint32_t plRelevanceMgr::GetNumRegions() const
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -149,7 +149,7 @@ hsBool plRelevanceMgr::MsgReceive(plMessage* msg)
|
||||
return hsKeyedObject::MsgReceive(msg);
|
||||
}
|
||||
|
||||
UInt32 plRelevanceMgr::GetIndex(const plString ®ionName)
|
||||
uint32_t plRelevanceMgr::GetIndex(const plString ®ionName)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < fRegions.GetCount(); i++)
|
||||
@ -161,9 +161,9 @@ UInt32 plRelevanceMgr::GetIndex(const plString ®ionName)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void plRelevanceMgr::MarkRegion(UInt32 localIdx, UInt32 remoteIdx, hsBool doICare)
|
||||
void plRelevanceMgr::MarkRegion(uint32_t localIdx, uint32_t remoteIdx, hsBool doICare)
|
||||
{
|
||||
if (localIdx == (UInt32)-1 || remoteIdx == (UInt32)-1)
|
||||
if (localIdx == (uint32_t)-1 || remoteIdx == (uint32_t)-1)
|
||||
return;
|
||||
|
||||
if (localIdx - 1 >= fRegions.GetCount() || remoteIdx - 1 >= fRegions.GetCount() || fRegions[localIdx - 1] == nil)
|
||||
@ -219,7 +219,7 @@ void plRelevanceMgr::ParseCsvInput(hsStream *s)
|
||||
if (strcmp(buff, "") == 0)
|
||||
continue; // ignore the initial blank one
|
||||
|
||||
plRegionInfo *info = TRACKED_NEW plRegionInfo;
|
||||
plRegionInfo *info = new plRegionInfo;
|
||||
regions.Append(info);
|
||||
info->fName = hsStrcpy(buff);
|
||||
info->fIndex = GetIndex(_TEMP_CONVERT_FROM_LITERAL(buff));
|
||||
|
@ -80,10 +80,10 @@ public:
|
||||
hsBool GetEnabled() { return fEnabled; }
|
||||
void SetEnabled(hsBool val) { fEnabled = val; }
|
||||
|
||||
UInt32 GetIndex(const plString ®ionName);
|
||||
void MarkRegion(UInt32 localIdx, UInt32 remoteIdx, hsBool doICare);
|
||||
uint32_t GetIndex(const plString ®ionName);
|
||||
void MarkRegion(uint32_t localIdx, uint32_t remoteIdx, hsBool doICare);
|
||||
void SetRegionVectors(const hsPoint3 &pos, hsBitVector ®ionsImIn, hsBitVector ®ionsICareAbout);
|
||||
UInt32 GetNumRegions() const; // includes the secret 0 region in its count
|
||||
uint32_t GetNumRegions() const; // includes the secret 0 region in its count
|
||||
void ParseCsvInput(hsStream *s);
|
||||
|
||||
plString GetRegionNames(hsBitVector regions);
|
||||
|
@ -48,13 +48,13 @@ void plRelevanceRegion::Read(hsStream* s, hsResMgr* mgr)
|
||||
{
|
||||
plObjInterface::Read(s, mgr);
|
||||
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, 0), plRefFlags::kActiveRef);
|
||||
|
||||
// Added to the manager when read in.
|
||||
// Removed when paged out, due to passive ref.
|
||||
if (plRelevanceMgr::Instance())
|
||||
{
|
||||
plGenRefMsg *msg = TRACKED_NEW plGenRefMsg(plRelevanceMgr::Instance()->GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
plGenRefMsg *msg = new plGenRefMsg(plRelevanceMgr::Instance()->GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(GetKey(), msg, plRefFlags::kPassiveRef);
|
||||
}
|
||||
}
|
||||
@ -87,9 +87,9 @@ hsBool plRelevanceRegion::MsgReceive(plMessage* msg)
|
||||
}
|
||||
|
||||
|
||||
void plRelevanceRegion::SetMgrIndex(UInt32 index)
|
||||
void plRelevanceRegion::SetMgrIndex(uint32_t index)
|
||||
{
|
||||
if (fMgrIdx != (UInt32)-1)
|
||||
if (fMgrIdx != (uint32_t)-1)
|
||||
fRegionsICareAbout.SetBit(fMgrIdx, false);
|
||||
|
||||
fMgrIdx = index;
|
||||
|
@ -54,10 +54,10 @@ class plRelevanceRegion : public plObjInterface
|
||||
protected:
|
||||
plRegionBase *fRegion;
|
||||
hsBitVector fRegionsICareAbout;
|
||||
UInt32 fMgrIdx;
|
||||
uint32_t fMgrIdx;
|
||||
|
||||
public:
|
||||
plRelevanceRegion() : fRegion(nil), fMgrIdx((UInt32)-1) {}
|
||||
plRelevanceRegion() : fRegion(nil), fMgrIdx((uint32_t)-1) {}
|
||||
virtual ~plRelevanceRegion() {}
|
||||
|
||||
CLASSNAME_REGISTER( plRelevanceRegion );
|
||||
@ -66,12 +66,12 @@ public:
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
|
||||
virtual void SetTransform(const hsMatrix44& l2w, const hsMatrix44& w2l) {}
|
||||
virtual Int32 GetNumProperties() const { return 1; }
|
||||
virtual int32_t GetNumProperties() const { return 1; }
|
||||
|
||||
virtual void Read(hsStream* stream, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* stream, hsResMgr* mgr);
|
||||
|
||||
void SetMgrIndex(UInt32 idx);
|
||||
void SetMgrIndex(uint32_t idx);
|
||||
};
|
||||
|
||||
#endif // plRelevanceRegion_inc
|
||||
|
@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plRenderRequest.h"
|
||||
#include "plPageTreeMgr.h"
|
||||
#include "plPipeline/plRenderTarget.h"
|
||||
@ -57,8 +57,8 @@ plRenderRequest::plRenderRequest()
|
||||
fAck(nil),
|
||||
fOverrideMat(nil),
|
||||
fEraseMat(nil),
|
||||
fDrawableMask(UInt32(-1)),
|
||||
fSubDrawableMask(UInt32(-1)),
|
||||
fDrawableMask(uint32_t(-1)),
|
||||
fSubDrawableMask(uint32_t(-1)),
|
||||
fRenderState(0),
|
||||
fClearDepth(1.f),
|
||||
fFogStart(-1.f),
|
||||
@ -136,7 +136,7 @@ void plRenderRequest::Render(plPipeline* pipe, plPageTreeMgr* pageMgr)
|
||||
|
||||
if( GetAck() )
|
||||
{
|
||||
plRenderRequestAck* ack = TRACKED_NEW plRenderRequestAck( GetAck(), GetUserData() );
|
||||
plRenderRequestAck* ack = new plRenderRequestAck( GetAck(), GetUserData() );
|
||||
ack->SetNumDrawn(numDrawn);
|
||||
plgDispatch::MsgSend( ack );
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class plRenderRequest : public plRenderRequestBase
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
UInt32 fRenderState; // Or'ed from plPipeline::RenderStateSettings::kRender*
|
||||
uint32_t fRenderState; // Or'ed from plPipeline::RenderStateSettings::kRender*
|
||||
|
||||
plDrawable* fClearDrawable;
|
||||
plRenderTarget* fRenderTarget;
|
||||
@ -75,15 +75,15 @@ protected:
|
||||
|
||||
plKey fAck;
|
||||
|
||||
hsScalar fPriority;
|
||||
float fPriority;
|
||||
|
||||
UInt32 fDrawableMask;
|
||||
UInt32 fSubDrawableMask;
|
||||
uint32_t fDrawableMask;
|
||||
uint32_t fSubDrawableMask;
|
||||
|
||||
hsColorRGBA fClearColor;
|
||||
hsScalar fClearDepth;
|
||||
float fClearDepth;
|
||||
|
||||
hsScalar fFogStart;
|
||||
float fFogStart;
|
||||
|
||||
hsMatrix44 fLocalToWorld;
|
||||
hsMatrix44 fWorldToLocal;
|
||||
@ -92,7 +92,7 @@ protected:
|
||||
|
||||
hsBitVector fVisForce;
|
||||
|
||||
UInt32 fUserData;
|
||||
uint32_t fUserData;
|
||||
hsBool fIgnoreOccluders;
|
||||
|
||||
public:
|
||||
@ -102,14 +102,14 @@ public:
|
||||
hsBool GetRenderSelect() const { return !fVisForce.Empty(); }
|
||||
hsBool GetRenderCharacters() const;
|
||||
|
||||
void SetRenderState(UInt32 st) { fRenderState = st; }
|
||||
UInt32 GetRenderState() const { return fRenderState; }
|
||||
void SetRenderState(uint32_t st) { fRenderState = st; }
|
||||
uint32_t GetRenderState() const { return fRenderState; }
|
||||
|
||||
void SetDrawableMask(UInt32 m) { fDrawableMask = m; }
|
||||
UInt32 GetDrawableMask() const { return fDrawableMask; }
|
||||
void SetDrawableMask(uint32_t m) { fDrawableMask = m; }
|
||||
uint32_t GetDrawableMask() const { return fDrawableMask; }
|
||||
|
||||
void SetSubDrawableMask(UInt32 m) { fSubDrawableMask = m; }
|
||||
UInt32 GetSubDrawableMask() const { return fSubDrawableMask; }
|
||||
void SetSubDrawableMask(uint32_t m) { fSubDrawableMask = m; }
|
||||
uint32_t GetSubDrawableMask() const { return fSubDrawableMask; }
|
||||
|
||||
void RequestAck(plKey key) { fAck = key; }
|
||||
plKey GetAck() const { return fAck; }
|
||||
@ -139,28 +139,28 @@ public:
|
||||
|
||||
const plViewTransform& GetViewTransform() const { return fViewTransform; }
|
||||
|
||||
hsScalar GetHither() const { return fViewTransform.GetHither(); }
|
||||
hsScalar GetYon() const { return fViewTransform.GetYon(); }
|
||||
float GetHither() const { return fViewTransform.GetHither(); }
|
||||
float GetYon() const { return fViewTransform.GetYon(); }
|
||||
|
||||
hsScalar GetFovX() const { return fViewTransform.GetFovXDeg(); }
|
||||
hsScalar GetFovY() const { return fViewTransform.GetFovYDeg(); }
|
||||
float GetFovX() const { return fViewTransform.GetFovXDeg(); }
|
||||
float GetFovY() const { return fViewTransform.GetFovYDeg(); }
|
||||
|
||||
hsScalar GetSizeX() const { return fViewTransform.GetOrthoWidth(); }
|
||||
hsScalar GetSizeY() const { return fViewTransform.GetOrthoHeight(); }
|
||||
float GetSizeX() const { return fViewTransform.GetOrthoWidth(); }
|
||||
float GetSizeY() const { return fViewTransform.GetOrthoHeight(); }
|
||||
|
||||
UInt16 GetScreenWidth() const { return fViewTransform.GetScreenWidth(); }
|
||||
UInt16 GetScreenHeight() const { return fViewTransform.GetScreenHeight(); }
|
||||
uint16_t GetScreenWidth() const { return fViewTransform.GetScreenWidth(); }
|
||||
uint16_t GetScreenHeight() const { return fViewTransform.GetScreenHeight(); }
|
||||
|
||||
const hsColorRGBA& GetClearColor() const { return fClearColor; }
|
||||
hsScalar GetClearDepth() const { return fClearDepth; }
|
||||
float GetClearDepth() const { return fClearDepth; }
|
||||
// FogStart
|
||||
// negative => use current settings (default)
|
||||
// 0 => no fog == fog starts at yon
|
||||
// 1 => fog starts at camera.
|
||||
// Fog start greater than 1 is legal. Fog always linear.
|
||||
hsScalar GetFogStart() const { return fFogStart; }
|
||||
float GetFogStart() const { return fFogStart; }
|
||||
|
||||
hsScalar GetPriority() const { return fPriority; }
|
||||
float GetPriority() const { return fPriority; }
|
||||
|
||||
void SetLocalTransform(const hsMatrix44& l2w, const hsMatrix44& w2l);
|
||||
|
||||
@ -171,31 +171,31 @@ public:
|
||||
void SetPerspective(hsBool on=true) { fViewTransform.SetPerspective(on); }
|
||||
void SetOrthogonal(hsBool on=true) { fViewTransform.SetOrthogonal(on); }
|
||||
|
||||
void SetHither(hsScalar f) { fViewTransform.SetHither(f); }
|
||||
void SetYon(hsScalar f) { fViewTransform.SetYon(f); }
|
||||
void SetHither(float f) { fViewTransform.SetHither(f); }
|
||||
void SetYon(float f) { fViewTransform.SetYon(f); }
|
||||
|
||||
void SetFovX(hsScalar f) { fViewTransform.SetFovXDeg(f); }
|
||||
void SetFovY(hsScalar f) { fViewTransform.SetFovYDeg(f); }
|
||||
void SetFovX(float f) { fViewTransform.SetFovXDeg(f); }
|
||||
void SetFovY(float f) { fViewTransform.SetFovYDeg(f); }
|
||||
|
||||
void SetSizeX(hsScalar f) { fViewTransform.SetWidth(f); }
|
||||
void SetSizeY(hsScalar f) { fViewTransform.SetHeight(f); }
|
||||
void SetSizeX(float f) { fViewTransform.SetWidth(f); }
|
||||
void SetSizeY(float f) { fViewTransform.SetHeight(f); }
|
||||
|
||||
void SetClearColor(const hsColorRGBA& c) { fClearColor = c; }
|
||||
void SetClearDepth(hsScalar d) { fClearDepth = d; }
|
||||
void SetClearDepth(float d) { fClearDepth = d; }
|
||||
// FogStart
|
||||
// negative => use current settings (default)
|
||||
// 0 => no fog == fog starts at yon
|
||||
// 1 => fog starts at camera.
|
||||
// Fog start greater than 1 is legal. Fog always linear.
|
||||
void SetFogStart(hsScalar d) { fFogStart = d; }
|
||||
void SetFogStart(float d) { fFogStart = d; }
|
||||
|
||||
void SetPriority(hsScalar p) { fPriority = p; }
|
||||
void SetPriority(float p) { fPriority = p; }
|
||||
|
||||
virtual void Read(hsStream* s, hsResMgr* mgr);
|
||||
virtual void Write(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
void SetUserData(UInt32 n) { fUserData = n; }
|
||||
UInt32 GetUserData() const { return fUserData; }
|
||||
void SetUserData(uint32_t n) { fUserData = n; }
|
||||
uint32_t GetUserData() const { return fUserData; }
|
||||
|
||||
void SetIgnoreOccluders(hsBool b) { fIgnoreOccluders = b; }
|
||||
hsBool GetIgnoreOccluders() { return fIgnoreOccluders; }
|
||||
|
@ -41,7 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plSceneNode.h"
|
||||
#include "pnDispatch/plDispatch.h"
|
||||
#include "plMessage/plNodeCleanupMsg.h"
|
||||
@ -96,14 +96,14 @@ void plSceneNode::Read(hsStream* s, hsResMgr* mgr)
|
||||
{
|
||||
hsKeyedObject::Read(s, mgr);
|
||||
|
||||
UInt32 n;
|
||||
uint32_t n;
|
||||
int i;
|
||||
|
||||
n = s->ReadLE32();
|
||||
fSceneObjects.Reset();
|
||||
for( i = 0; i < n; i++ )
|
||||
{
|
||||
plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(GetKey(), plRefMsg::kOnCreate, i, plNodeRefMsg::kObject);
|
||||
plNodeRefMsg* refMsg = new plNodeRefMsg(GetKey(), plRefMsg::kOnCreate, i, plNodeRefMsg::kObject);
|
||||
plKey key = mgr->ReadKeyNotifyMe(s, refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ void plSceneNode::Read(hsStream* s, hsResMgr* mgr)
|
||||
fGenericPool.Reset();
|
||||
for( i = 0; i < n; i++ )
|
||||
{
|
||||
plNodeRefMsg* refMsg = TRACKED_NEW plNodeRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric);
|
||||
plNodeRefMsg* refMsg = new plNodeRefMsg(GetKey(), plRefMsg::kOnCreate, -1, plNodeRefMsg::kGeneric);
|
||||
mgr->ReadKeyNotifyMe(s, refMsg, plRefFlags::kActiveRef);
|
||||
}
|
||||
}
|
||||
@ -133,10 +133,10 @@ void plSceneNode::Write(hsStream* s, hsResMgr* mgr)
|
||||
|
||||
void plSceneNode::Harvest(plVolumeIsect* isect, hsTArray<plDrawVisList>& levList)
|
||||
{
|
||||
static hsTArray<Int16> visList;
|
||||
static hsTArray<int16_t> visList;
|
||||
visList.SetCount(0);
|
||||
GetSpaceTree()->HarvestLeaves(isect, visList);
|
||||
static hsTArray<Int16> visSpans;
|
||||
static hsTArray<int16_t> visSpans;
|
||||
visSpans.SetCount(0);
|
||||
|
||||
int i;
|
||||
@ -155,10 +155,10 @@ void plSceneNode::Harvest(plVolumeIsect* isect, hsTArray<plDrawVisList>& levList
|
||||
|
||||
void plSceneNode::CollectForRender(plPipeline* pipe, hsTArray<plDrawVisList>& levList, plVisMgr* visMgr)
|
||||
{
|
||||
static hsTArray<Int16> visList;
|
||||
static hsTArray<int16_t> visList;
|
||||
visList.SetCount(0);
|
||||
pipe->HarvestVisible(GetSpaceTree(), visList);
|
||||
static hsTArray<Int16> visSpans;
|
||||
static hsTArray<int16_t> visSpans;
|
||||
visSpans.SetCount(0);
|
||||
|
||||
int i;
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
protected:
|
||||
hsBool fFilterGenerics; // Export only
|
||||
|
||||
Int16 fDepth;
|
||||
int16_t fDepth;
|
||||
|
||||
hsTArray<plSceneObject*> fSceneObjects;
|
||||
|
||||
@ -133,9 +133,9 @@ public:
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
|
||||
Int16 GetDepth() { return fDepth; }
|
||||
Int16 IncDepth() { return ++fDepth; }
|
||||
Int16 DecDepth() { return --fDepth; }
|
||||
int16_t GetDepth() { return fDepth; }
|
||||
int16_t IncDepth() { return ++fDepth; }
|
||||
int16_t DecDepth() { return --fDepth; }
|
||||
|
||||
void Init( void );
|
||||
|
||||
|
@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plVisMgr.h"
|
||||
|
||||
#include "plVisRegion.h"
|
||||
@ -209,7 +209,7 @@ plVisMgr* plGlobalVisMgr::fInstance = nil;
|
||||
|
||||
void plGlobalVisMgr::Init()
|
||||
{
|
||||
fInstance = TRACKED_NEW plVisMgr;
|
||||
fInstance = new plVisMgr;
|
||||
fInstance->RegisterAs(kGlobalVisMgr_KEY);
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "hsTypes.h"
|
||||
#include "HeadSpin.h"
|
||||
#include "plVisRegion.h"
|
||||
|
||||
#include "hsStream.h"
|
||||
@ -127,8 +127,8 @@ void plVisRegion::Read(hsStream* s, hsResMgr* mgr)
|
||||
{
|
||||
plObjInterface::Read(s, mgr);
|
||||
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefRegion), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefVisMgr), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefRegion), plRefFlags::kActiveRef);
|
||||
mgr->ReadKeyNotifyMe(s, new plGenRefMsg(GetKey(), plRefMsg::kOnCreate, 0, kRefVisMgr), plRefFlags::kActiveRef);
|
||||
|
||||
if( fMgr )
|
||||
fMgr->Register(this, GetProperty(kIsNot));
|
||||
|
@ -72,9 +72,9 @@ protected:
|
||||
|
||||
plVisMgr* fMgr;
|
||||
|
||||
Int32 fIndex;
|
||||
int32_t fIndex;
|
||||
|
||||
void SetIndex(Int32 i) { fIndex = i; }
|
||||
void SetIndex(int32_t i) { fIndex = i; }
|
||||
|
||||
friend class plVisMgr;
|
||||
public:
|
||||
@ -84,7 +84,7 @@ public:
|
||||
CLASSNAME_REGISTER( plVisRegion );
|
||||
GETINTERFACE_ANY( plVisRegion, plObjInterface );
|
||||
|
||||
virtual Int32 GetNumProperties() const { return 3; } // This is stupid.
|
||||
virtual int32_t GetNumProperties() const { return 3; } // This is stupid.
|
||||
|
||||
virtual hsBool MsgReceive(plMessage* msg);
|
||||
|
||||
@ -97,7 +97,7 @@ public:
|
||||
|
||||
hsBool Eval(const hsPoint3& pos) const;
|
||||
|
||||
Int32 GetIndex() const { return fIndex; }
|
||||
int32_t GetIndex() const { return fIndex; }
|
||||
|
||||
hsBool Registered() const { return GetIndex() > 0; }
|
||||
|
||||
|
Reference in New Issue
Block a user