mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Convert custom HeadSpin integer types to standard types from stdint.h
This commit is contained in:
@ -85,7 +85,7 @@ private:
|
||||
plPXPhysical* phys = (plPXPhysical*)hitActor.userData;
|
||||
|
||||
plKey objKey = nil;
|
||||
UInt16 objDB = plSimDefs::kLOSDBNone;
|
||||
uint16_t objDB = plSimDefs::kLOSDBNone;
|
||||
|
||||
if (phys)
|
||||
{
|
||||
|
@ -269,7 +269,7 @@ void plPXPhysical::IMakeHull(NxConvexMesh* convexMesh, hsMatrix44 l2w)
|
||||
|
||||
for (int i = 0; i < desc.numTriangles; i++)
|
||||
{
|
||||
UInt32* triangle = (UInt32*)(((char*)desc.triangles) + desc.triangleStrideBytes*i);
|
||||
uint32_t* triangle = (uint32_t*)(((char*)desc.triangles) + desc.triangleStrideBytes*i);
|
||||
float* vertex1 = (float*)(((char*)desc.points) + desc.pointStrideBytes*triangle[0]);
|
||||
float* vertex2 = (float*)(((char*)desc.points) + desc.pointStrideBytes*triangle[1]);
|
||||
float* vertex3 = (float*)(((char*)desc.points) + desc.pointStrideBytes*triangle[2]);
|
||||
@ -612,7 +612,7 @@ hsBool plPXPhysical::MsgReceive( plMessage* msg )
|
||||
// right now, we're only worrying about the subworlds
|
||||
hsBool plPXPhysical::HandleRefMsg(plGenRefMsg* refMsg)
|
||||
{
|
||||
UInt8 refCtxt = refMsg->GetContext();
|
||||
uint8_t refCtxt = refMsg->GetContext();
|
||||
plKey refKey = refMsg->GetRef()->GetKey();
|
||||
plKey ourKey = GetKey();
|
||||
PhysRefType refType = PhysRefType(refMsg->fType);
|
||||
@ -1190,7 +1190,7 @@ void plPXPhysical::Write(hsStream* stream, hsResMgr* mgr)
|
||||
// TESTING SDL
|
||||
// Send phys sendState msg to object's plPhysicalSDLModifier
|
||||
//
|
||||
hsBool plPXPhysical::DirtySynchState(const char* SDLStateName, UInt32 synchFlags )
|
||||
hsBool plPXPhysical::DirtySynchState(const char* SDLStateName, uint32_t synchFlags )
|
||||
{
|
||||
if (GetObjectKey())
|
||||
{
|
||||
@ -1272,21 +1272,21 @@ inline hsPoint3& GetTrimeshVert(NxTriangleMeshDesc& desc, int idx)
|
||||
return *((hsPoint3*)(((char*)desc.points)+desc.pointStrideBytes*idx));
|
||||
}
|
||||
|
||||
void GetTrimeshTri(NxTriangleMeshDesc& desc, int idx, UInt16* out)
|
||||
void GetTrimeshTri(NxTriangleMeshDesc& desc, int idx, uint16_t* out)
|
||||
{
|
||||
if (hsCheckBits(desc.flags, NX_MF_16_BIT_INDICES))
|
||||
{
|
||||
UInt16* descTris = ((UInt16*)(((char*)desc.triangles)+desc.pointStrideBytes*idx));
|
||||
uint16_t* descTris = ((uint16_t*)(((char*)desc.triangles)+desc.pointStrideBytes*idx));
|
||||
out[0] = descTris[0];
|
||||
out[1] = descTris[1];
|
||||
out[2] = descTris[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
UInt32* descTris = ((UInt32*)(((char*)desc.triangles)+desc.pointStrideBytes*idx));
|
||||
out[0] = (UInt16)descTris[0];
|
||||
out[1] = (UInt16)descTris[1];
|
||||
out[2] = (UInt16)descTris[2];
|
||||
uint32_t* descTris = ((uint32_t*)(((char*)desc.triangles)+desc.pointStrideBytes*idx));
|
||||
out[0] = (uint16_t)descTris[0];
|
||||
out[1] = (uint16_t)descTris[1];
|
||||
out[2] = (uint16_t)descTris[2];
|
||||
}
|
||||
}
|
||||
|
||||
@ -1296,26 +1296,26 @@ inline hsPoint3& GetConvexVert(NxConvexMeshDesc& desc, int idx)
|
||||
return *((hsPoint3*)(((char*)desc.points)+desc.pointStrideBytes*idx));
|
||||
}
|
||||
|
||||
void GetConvexTri(NxConvexMeshDesc& desc, int idx, UInt16* out)
|
||||
void GetConvexTri(NxConvexMeshDesc& desc, int idx, uint16_t* out)
|
||||
{
|
||||
if (hsCheckBits(desc.flags, NX_MF_16_BIT_INDICES))
|
||||
{
|
||||
UInt16* descTris = ((UInt16*)(((char*)desc.triangles)+desc.pointStrideBytes*idx));
|
||||
uint16_t* descTris = ((uint16_t*)(((char*)desc.triangles)+desc.pointStrideBytes*idx));
|
||||
out[0] = descTris[0];
|
||||
out[1] = descTris[1];
|
||||
out[2] = descTris[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
UInt32* descTris = ((UInt32*)(((char*)desc.triangles)+desc.pointStrideBytes*idx));
|
||||
out[0] = (UInt16)descTris[0];
|
||||
out[1] = (UInt16)descTris[1];
|
||||
out[2] = (UInt16)descTris[2];
|
||||
uint32_t* descTris = ((uint32_t*)(((char*)desc.triangles)+desc.pointStrideBytes*idx));
|
||||
out[0] = (uint16_t)descTris[0];
|
||||
out[1] = (uint16_t)descTris[1];
|
||||
out[2] = (uint16_t)descTris[2];
|
||||
}
|
||||
}
|
||||
|
||||
// Make a visible object that can be viewed by users for debugging purposes.
|
||||
plDrawableSpans* plPXPhysical::CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo)
|
||||
plDrawableSpans* plPXPhysical::CreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo)
|
||||
{
|
||||
plDrawableSpans* myDraw = addTo;
|
||||
hsMatrix44 l2w, unused;
|
||||
@ -1332,7 +1332,7 @@ plDrawableSpans* plPXPhysical::CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& i
|
||||
trimeshShape->getTriangleMesh().saveToDesc(desc);
|
||||
|
||||
hsTArray<hsPoint3> pos;
|
||||
hsTArray<UInt16> tris;
|
||||
hsTArray<uint16_t> tris;
|
||||
|
||||
const int kMaxTris = 10000;
|
||||
const int kMaxVerts = 32000;
|
||||
@ -1411,7 +1411,7 @@ plDrawableSpans* plPXPhysical::CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& i
|
||||
convexShape->getConvexMesh().saveToDesc(desc);
|
||||
|
||||
hsTArray<hsPoint3> pos;
|
||||
hsTArray<UInt16> tris;
|
||||
hsTArray<uint16_t> tris;
|
||||
|
||||
pos.SetCount(desc.numVertices);
|
||||
tris.SetCount(desc.numTriangles * 3);
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
hsScalar restitution;
|
||||
plSimDefs::Bounds bounds;
|
||||
plSimDefs::Group group;
|
||||
UInt32 reportsOn;
|
||||
uint32_t reportsOn;
|
||||
plKey objectKey;
|
||||
plKey sceneNode;
|
||||
plKey worldKey;
|
||||
@ -151,10 +151,10 @@ public:
|
||||
|
||||
virtual int GetGroup() const { return fGroup; }
|
||||
|
||||
virtual void AddLOSDB(UInt16 flag) { hsSetBits(fLOSDBs, flag); }
|
||||
virtual void RemoveLOSDB(UInt16 flag) { hsClearBits(fLOSDBs, flag); }
|
||||
virtual UInt16 GetAllLOSDBs() { return fLOSDBs; }
|
||||
virtual hsBool IsInLOSDB(UInt16 flag) { return hsCheckBits(fLOSDBs, flag); }
|
||||
virtual void AddLOSDB(uint16_t flag) { hsSetBits(fLOSDBs, flag); }
|
||||
virtual void RemoveLOSDB(uint16_t flag) { hsClearBits(fLOSDBs, flag); }
|
||||
virtual uint16_t GetAllLOSDBs() { return fLOSDBs; }
|
||||
virtual hsBool IsInLOSDB(uint16_t flag) { return hsCheckBits(fLOSDBs, flag); }
|
||||
|
||||
virtual hsBool DoDetectorHullWorkaround() { return fSaveTriangles ? true : false; }
|
||||
virtual hsBool Should_I_Trigger(hsBool enter, hsPoint3& pos);
|
||||
@ -178,7 +178,7 @@ public:
|
||||
|
||||
virtual void ExcludeRegionHack(hsBool cleared);
|
||||
|
||||
virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo);
|
||||
virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo);
|
||||
|
||||
hsBool DoReportOn(plSimDefs::Group group) const { return hsCheckBits(fReportsOn, 1<<group); }
|
||||
|
||||
@ -207,7 +207,7 @@ protected:
|
||||
//
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
void IConvertGroups(UInt32 memberOf, UInt32 reportsOn, UInt32 collideWith);
|
||||
void IConvertGroups(uint32_t memberOf, uint32_t reportsOn, uint32_t collideWith);
|
||||
|
||||
/** See if the object is in a valid, non-overlapping position.
|
||||
A valid overlap is one which is approved by the collision
|
||||
@ -224,7 +224,7 @@ protected:
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/** Remember that we need to do a synch soon. */
|
||||
hsBool DirtySynchState(const char* SDLStateName, UInt32 synchFlags );
|
||||
hsBool DirtySynchState(const char* SDLStateName, uint32_t synchFlags );
|
||||
|
||||
double GetLastSyncTime() { return fLastSyncTime; }
|
||||
|
||||
@ -243,8 +243,8 @@ protected:
|
||||
|
||||
plSimDefs::Bounds fBoundsType;
|
||||
plSimDefs::Group fGroup;
|
||||
UInt32 fReportsOn; // bit vector for groups we report interactions with
|
||||
UInt16 fLOSDBs; // Which LOS databases we get put into
|
||||
uint32_t fReportsOn; // bit vector for groups we report interactions with
|
||||
uint16_t fLOSDBs; // Which LOS databases we get put into
|
||||
hsBitVector fProps; // plSimulationInterface::plSimulationProperties kept here
|
||||
float fMass;
|
||||
|
||||
@ -253,7 +253,7 @@ protected:
|
||||
|
||||
// PHYSX FIXME - need to create a plasma hull so that we can determine if inside
|
||||
hsPlane3* fWorldHull;
|
||||
UInt32 fHullNumberPlanes;
|
||||
uint32_t fHullNumberPlanes;
|
||||
hsPoint3* fSaveTriangles;
|
||||
hsBool fInsideConvexHull;
|
||||
void ISetHullToWorldWTriangles();
|
||||
|
@ -187,7 +187,7 @@ int plPXPhysicalController::GetNumberOfControllersInThisSubWorld(plKey world)
|
||||
void plPXPhysicalController::Update(bool prestep, hsScalar delSecs)
|
||||
{
|
||||
// Apparently the user data field of the controllers is broken
|
||||
// UInt32 count = gControllerMgr.getNbControllers();
|
||||
// uint32_t count = gControllerMgr.getNbControllers();
|
||||
// NxController* controllers = (NxController*)gControllerMgr.getControllers();
|
||||
//
|
||||
// for (int i = 0; i < count; i++)
|
||||
@ -705,11 +705,11 @@ void plPXPhysicalController::GetKinematicPosition(hsPoint3& pos)
|
||||
|
||||
void plPXPhysicalController::IApply(hsScalar delSecs)
|
||||
{
|
||||
/*static const UInt32 collideFlags =
|
||||
/*static const uint32_t collideFlags =
|
||||
1<<plSimDefs::kGroupStatic |
|
||||
1<<plSimDefs::kGroupAvatarBlocker |
|
||||
1<<plSimDefs::kGroupDynamic;*/
|
||||
UInt32 collideFlags =
|
||||
uint32_t collideFlags =
|
||||
1<<plSimDefs::kGroupStatic |
|
||||
1<<plSimDefs::kGroupAvatarBlocker |
|
||||
1<<plSimDefs::kGroupDynamic;
|
||||
@ -1219,7 +1219,7 @@ void plPXPhysicalController::IDeleteController()
|
||||
}
|
||||
|
||||
// Make a visible object that can be viewed by users for debugging purposes.
|
||||
plDrawableSpans* plPXPhysicalController::CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo)
|
||||
plDrawableSpans* plPXPhysicalController::CreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo)
|
||||
{
|
||||
plDrawableSpans* myDraw = addTo;
|
||||
|
||||
@ -1250,7 +1250,7 @@ void plPXPhysicalController::IDrawDebugDisplay()
|
||||
plDebugText &debugTxt = plDebugText::Instance();
|
||||
char strBuf[ 2048 ];
|
||||
int lineHeight = debugTxt.GetFontSize() + 4;
|
||||
UInt32 scrnWidth, scrnHeight;
|
||||
uint32_t scrnWidth, scrnHeight;
|
||||
|
||||
debugTxt.GetScreenSize( &scrnWidth, &scrnHeight );
|
||||
int y = 10;
|
||||
|
@ -127,7 +127,7 @@ public:
|
||||
virtual bool IsKinematic();
|
||||
virtual void GetKinematicPosition(hsPoint3& pos);
|
||||
|
||||
virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo);
|
||||
virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo);
|
||||
|
||||
virtual const hsMatrix44& GetPrevSubworldW2L() { return fPrevSubworldW2L; }
|
||||
|
||||
|
@ -876,7 +876,7 @@ void plPXPhysicalControllerCore::GetKinematicPosition(hsPoint3& pos)
|
||||
void plPXPhysicalControllerCore::UpdatePoststep( hsScalar delSecs)
|
||||
{
|
||||
// Apparently the user data field of the controllers is broken
|
||||
// UInt32 count = gControllerMgr.getNbControllers();
|
||||
// uint32_t count = gControllerMgr.getNbControllers();
|
||||
// NxController* controllers = (NxController*)gControllerMgr.getControllers();
|
||||
//
|
||||
// for (int i = 0; i < count; i++)
|
||||
@ -981,7 +981,7 @@ void plPXPhysicalControllerCore::HandleKinematicEnableNextUpdate()
|
||||
void plPXPhysicalControllerCore::IHandleResize()
|
||||
{
|
||||
|
||||
UInt32 collideFlags =
|
||||
uint32_t collideFlags =
|
||||
1<<plSimDefs::kGroupStatic |
|
||||
1<<plSimDefs::kGroupAvatarBlocker |
|
||||
1<<plSimDefs::kGroupDynamic;
|
||||
@ -1033,7 +1033,7 @@ void plPXPhysicalControllerCore::LeaveAge()
|
||||
this->fMovementInterface->LeaveAge();
|
||||
}
|
||||
int plPXPhysicalControllerCore::SweepControllerPath(const hsPoint3& startPos, const hsPoint3& endPos, hsBool vsDynamics, hsBool vsStatics,
|
||||
UInt32& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut)
|
||||
uint32_t& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut)
|
||||
{
|
||||
NxCapsule tempCap;
|
||||
tempCap.p0 =plPXConvert::Point( startPos);
|
||||
@ -1165,7 +1165,7 @@ const hsVector3& plPXPhysicalControllerCore::GetLinearVelocity()
|
||||
}
|
||||
|
||||
// Make a visible object that can be viewed by users for debugging purposes.
|
||||
plDrawableSpans* plPXPhysicalControllerCore::CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo)
|
||||
plDrawableSpans* plPXPhysicalControllerCore::CreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo)
|
||||
{
|
||||
plDrawableSpans* myDraw = addTo;
|
||||
hsBool blended = ((mat->GetLayer(0)->GetBlendFlags() & hsGMatState::kBlendMask));
|
||||
@ -1194,7 +1194,7 @@ void plPXPhysicalControllerCore::IDrawDebugDisplay()
|
||||
plDebugText &debugTxt = plDebugText::Instance();
|
||||
char strBuf[ 2048 ];
|
||||
int lineHeight = debugTxt.GetFontSize() + 4;
|
||||
UInt32 scrnWidth, scrnHeight;
|
||||
uint32_t scrnWidth, scrnHeight;
|
||||
|
||||
debugTxt.GetScreenSize( &scrnWidth, &scrnHeight );
|
||||
int y = 10;
|
||||
|
@ -116,13 +116,13 @@ public:
|
||||
static void UpdatePrestep(hsScalar delSecs);
|
||||
static void UpdatePoststep(hsScalar delSecs);
|
||||
static void UpdatePostSimStep(hsScalar delSecs);
|
||||
virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<UInt32>& idx, plDrawableSpans* addTo);
|
||||
virtual plDrawableSpans* CreateProxy(hsGMaterial* mat, hsTArray<uint32_t>& idx, plDrawableSpans* addTo);
|
||||
#ifndef PLASMA_EXTERNAL_RELEASE
|
||||
static hsBool fDebugDisplay;
|
||||
#endif // PLASMA_EXTERNAL_RELEASE
|
||||
static void SetMaxNumberOfControllers(int max) { fPXControllersMax = max; }
|
||||
static int fPXControllersMax;
|
||||
virtual int SweepControllerPath(const hsPoint3& startPos, const hsPoint3& endPos, hsBool vsDynamics, hsBool vsStatics, UInt32& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut);
|
||||
virtual int SweepControllerPath(const hsPoint3& startPos, const hsPoint3& endPos, hsBool vsDynamics, hsBool vsStatics, uint32_t& vsSimGroups, std::multiset< plControllerSweepRecord >& WhatWasHitOut);
|
||||
virtual void BehaveLikeAnimatedPhysical(hsBool actLikeAnAnimatedPhys);
|
||||
virtual hsBool BehavingLikeAnAnimatedPhysical();
|
||||
virtual const hsVector3& GetLinearVelocity();
|
||||
|
@ -468,7 +468,7 @@ NxScene* plSimulationMgr::GetScene(plKey world)
|
||||
|
||||
if (!scene)
|
||||
{
|
||||
UInt32 maxSteps = (UInt32)hsCeil(fMaxDelta / fStepSize);
|
||||
uint32_t maxSteps = (uint32_t)hsCeil(fMaxDelta / fStepSize);
|
||||
|
||||
NxSceneDesc sceneDesc;
|
||||
sceneDesc.gravity.set(0, 0, -32.174049f);
|
||||
@ -556,7 +556,7 @@ void plSimulationMgr::UpdateDetectorsInScene(plKey world, plKey avatar, hsPoint3
|
||||
hsPoint3 soPos = ci->GetWorldPos();
|
||||
if (scene)
|
||||
{
|
||||
UInt32 numActors = scene->getNbActors();
|
||||
uint32_t numActors = scene->getNbActors();
|
||||
NxActor** actors = scene->getActors();
|
||||
|
||||
for (int i = 0; i < numActors; i++)
|
||||
@ -584,7 +584,7 @@ void plSimulationMgr::UpdateAvatarInDetector(plKey world, plPXPhysical* detector
|
||||
NxScene* scene = GetScene(world);
|
||||
if (scene)
|
||||
{
|
||||
UInt32 numActors = scene->getNbActors();
|
||||
uint32_t numActors = scene->getNbActors();
|
||||
NxActor** actors = scene->getActors();
|
||||
|
||||
for (int i = 0; i < numActors; i++)
|
||||
@ -629,7 +629,7 @@ void plSimulationMgr::Advance(float delSecs)
|
||||
plProfile_IncCount(StepLen, (int)(delSecs*1000));
|
||||
|
||||
#ifndef PLASMA_EXTERNAL_RELASE
|
||||
UInt32 stepTime = hsTimer::GetPrecTickCount();
|
||||
uint32_t stepTime = hsTimer::GetPrecTickCount();
|
||||
#endif
|
||||
plProfile_BeginTiming(Step);
|
||||
plPXPhysicalControllerCore::UpdatePrestep(delSecs);
|
||||
@ -719,7 +719,7 @@ void plSimulationMgr::ISendUpdates()
|
||||
for (; it != fScenes.end(); it++)
|
||||
{
|
||||
NxScene* scene = it->second;
|
||||
UInt32 numActors = scene->getNbActors();
|
||||
uint32_t numActors = scene->getNbActors();
|
||||
NxActor** actors = scene->getActors();
|
||||
|
||||
for (int i = 0; i < numActors; i++)
|
||||
@ -984,7 +984,7 @@ void plSimulationMgr::IDrawActiveActorList()
|
||||
plDebugText &debugTxt = plDebugText::Instance();
|
||||
char strBuf[ 2048 ];
|
||||
int lineHeight = debugTxt.GetFontSize() + 4;
|
||||
UInt32 scrnWidth, scrnHeight;
|
||||
uint32_t scrnWidth, scrnHeight;
|
||||
|
||||
debugTxt.GetScreenSize( &scrnWidth, &scrnHeight );
|
||||
int y = 10;
|
||||
@ -1000,9 +1000,9 @@ void plSimulationMgr::IDrawActiveActorList()
|
||||
sprintf(strBuf, "Scene: %s",it->first->GetName());
|
||||
debugTxt.DrawString(x, y, strBuf);
|
||||
y += lineHeight;
|
||||
UInt32 numActors =it->second->getNbActors();
|
||||
uint32_t numActors =it->second->getNbActors();
|
||||
NxActor** actors =it->second->getActors();
|
||||
for(UInt32 i=0;i<numActors;i++)
|
||||
for(uint32_t i=0;i<numActors;i++)
|
||||
{
|
||||
if(!actors[i]->isSleeping())
|
||||
{
|
||||
|
Reference in New Issue
Block a user