mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-21 12:49:10 +00:00
Convert custom HeadSpin integer types to standard types from stdint.h
This commit is contained in:
@ -52,13 +52,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
class EdgeBin
|
||||
{
|
||||
public:
|
||||
UInt16 fVtx;
|
||||
UInt16 fCount;
|
||||
uint16_t fVtx;
|
||||
uint16_t fCount;
|
||||
|
||||
EdgeBin() : fVtx(0), fCount(0) {}
|
||||
};
|
||||
|
||||
void plAccMeshSmooth::FindEdges(UInt32 maxVtxIdx, UInt32 nTris, UInt16* idxList, hsTArray<UInt16>& edgeVerts)
|
||||
void plAccMeshSmooth::FindEdges(uint32_t maxVtxIdx, uint32_t nTris, uint16_t* idxList, hsTArray<uint16_t>& edgeVerts)
|
||||
{
|
||||
hsTArray<EdgeBin>* bins = TRACKED_NEW hsTArray<EdgeBin>[maxVtxIdx+1];
|
||||
|
||||
@ -138,7 +138,7 @@ void plAccMeshSmooth::FindEdges(UInt32 maxVtxIdx, UInt32 nTris, UInt16* idxList,
|
||||
delete [] bins;
|
||||
}
|
||||
|
||||
void plAccMeshSmooth::FindEdges(hsTArray<plGeometrySpan*>& spans, hsTArray<UInt16>* edgeVerts)
|
||||
void plAccMeshSmooth::FindEdges(hsTArray<plGeometrySpan*>& spans, hsTArray<uint16_t>* edgeVerts)
|
||||
{
|
||||
fSpans.SetCount(spans.GetCount());
|
||||
|
||||
@ -151,9 +151,9 @@ void plAccMeshSmooth::FindEdges(hsTArray<plGeometrySpan*>& spans, hsTArray<UInt1
|
||||
|
||||
plAccessTriSpan& triSpan = fSpans[i].AccessTri();
|
||||
|
||||
UInt32 nTris = triSpan.TriCount();
|
||||
UInt16* idxList = triSpan.fTris;
|
||||
UInt32 maxVertIdx = triSpan.VertCount()-1;
|
||||
uint32_t nTris = triSpan.TriCount();
|
||||
uint16_t* idxList = triSpan.fTris;
|
||||
uint32_t maxVertIdx = triSpan.VertCount()-1;
|
||||
|
||||
FindEdges(maxVertIdx, nTris, idxList, edgeVerts[i]);
|
||||
}
|
||||
@ -161,8 +161,8 @@ void plAccMeshSmooth::FindEdges(hsTArray<plGeometrySpan*>& spans, hsTArray<UInt1
|
||||
|
||||
void plAccMeshSmooth::Smooth(hsTArray<plGeometrySpan*>& spans)
|
||||
{
|
||||
hsTArray<UInt16>* shareVtx = TRACKED_NEW hsTArray<UInt16>[spans.GetCount()];
|
||||
hsTArray<UInt16>* edgeVerts = TRACKED_NEW hsTArray<UInt16>[spans.GetCount()];
|
||||
hsTArray<uint16_t>* shareVtx = TRACKED_NEW hsTArray<uint16_t>[spans.GetCount()];
|
||||
hsTArray<uint16_t>* edgeVerts = TRACKED_NEW hsTArray<uint16_t>[spans.GetCount()];
|
||||
FindEdges(spans, edgeVerts);
|
||||
|
||||
int i;
|
||||
@ -278,7 +278,7 @@ hsVector3 plAccMeshSmooth::INormalToLocal(plAccessSpan& span, const hsVector3& w
|
||||
return ret;
|
||||
}
|
||||
|
||||
void plAccMeshSmooth::FindSharedVerts(plAccessSpan& span, int numEdgeVerts, hsTArray<UInt16>& edgeVerts, hsTArray<UInt16>& shareVtx, VtxAccum& accum)
|
||||
void plAccMeshSmooth::FindSharedVerts(plAccessSpan& span, int numEdgeVerts, hsTArray<uint16_t>& edgeVerts, hsTArray<uint16_t>& shareVtx, VtxAccum& accum)
|
||||
{
|
||||
plAccessTriSpan& triSpan = span.AccessTri();
|
||||
int i;
|
||||
@ -311,7 +311,7 @@ void plAccMeshSmooth::FindSharedVerts(plAccessSpan& span, int numEdgeVerts, hsTA
|
||||
}
|
||||
}
|
||||
|
||||
void plAccMeshSmooth::SetPositions(plAccessSpan& span, hsTArray<UInt16>& shareVtx, const hsPoint3& pos) const
|
||||
void plAccMeshSmooth::SetPositions(plAccessSpan& span, hsTArray<uint16_t>& shareVtx, const hsPoint3& pos) const
|
||||
{
|
||||
plAccessTriSpan& triSpan = span.AccessTri();
|
||||
int i;
|
||||
@ -319,7 +319,7 @@ void plAccMeshSmooth::SetPositions(plAccessSpan& span, hsTArray<UInt16>& shareVt
|
||||
triSpan.Position(shareVtx[i]) = IPositionToLocal(span, pos);
|
||||
}
|
||||
|
||||
void plAccMeshSmooth::SetNormals(plAccessSpan& span, hsTArray<UInt16>& shareVtx, const hsVector3& norm) const
|
||||
void plAccMeshSmooth::SetNormals(plAccessSpan& span, hsTArray<uint16_t>& shareVtx, const hsVector3& norm) const
|
||||
{
|
||||
plAccessTriSpan& triSpan = span.AccessTri();
|
||||
int i;
|
||||
@ -327,7 +327,7 @@ void plAccMeshSmooth::SetNormals(plAccessSpan& span, hsTArray<UInt16>& shareVtx,
|
||||
triSpan.Normal(shareVtx[i]) = INormalToLocal(span, norm);
|
||||
}
|
||||
|
||||
void plAccMeshSmooth::SetDiffuse(plAccessSpan& span, hsTArray<UInt16>& shareVtx, const hsColorRGBA& diff) const
|
||||
void plAccMeshSmooth::SetDiffuse(plAccessSpan& span, hsTArray<uint16_t>& shareVtx, const hsColorRGBA& diff) const
|
||||
{
|
||||
plAccessTriSpan& triSpan = span.AccessTri();
|
||||
hsAssert(triSpan.HasDiffuse(), "Calling SetColors on data with no color");
|
||||
|
Reference in New Issue
Block a user