|
|
@ -1045,10 +1045,10 @@ void plDrawableSpans::Read( hsStream* s, hsResMgr* mgr ) |
|
|
|
|
|
|
|
|
|
|
|
/// Read in the matrix palette (if any)
|
|
|
|
/// Read in the matrix palette (if any)
|
|
|
|
count = s->ReadLE32(); |
|
|
|
count = s->ReadLE32(); |
|
|
|
fLocalToWorlds.SetCount(count); |
|
|
|
fLocalToWorlds.resize(count); |
|
|
|
fWorldToLocals.SetCount(count); |
|
|
|
fWorldToLocals.resize(count); |
|
|
|
fLocalToBones.SetCount(count); |
|
|
|
fLocalToBones.resize(count); |
|
|
|
fBoneToLocals.SetCount(count); |
|
|
|
fBoneToLocals.resize(count); |
|
|
|
for( i = 0; i < count; i++ ) |
|
|
|
for( i = 0; i < count; i++ ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
fLocalToWorlds[i].Read(s); |
|
|
|
fLocalToWorlds[i].Read(s); |
|
|
@ -2209,16 +2209,12 @@ uint32_t plDrawableSpans::AppendDIMatrixSpans(int n) |
|
|
|
if( fNeedCleanup ) |
|
|
|
if( fNeedCleanup ) |
|
|
|
IRemoveGarbage(); |
|
|
|
IRemoveGarbage(); |
|
|
|
|
|
|
|
|
|
|
|
uint32_t baseIdx = fLocalToWorlds.GetCount(); |
|
|
|
uint32_t baseIdx = fLocalToWorlds.size(); |
|
|
|
fLocalToWorlds.Expand(baseIdx + n); |
|
|
|
fLocalToWorlds.resize(baseIdx + n); |
|
|
|
fLocalToWorlds.SetCount(baseIdx + n); |
|
|
|
fWorldToLocals.resize(baseIdx + n); |
|
|
|
fWorldToLocals.Expand(baseIdx + n); |
|
|
|
|
|
|
|
fWorldToLocals.SetCount(baseIdx + n); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fLocalToBones.Expand(baseIdx + n); |
|
|
|
fLocalToBones.resize(baseIdx + n); |
|
|
|
fLocalToBones.SetCount(baseIdx + n); |
|
|
|
fBoneToLocals.resize(baseIdx + n); |
|
|
|
fBoneToLocals.Expand(baseIdx + n); |
|
|
|
|
|
|
|
fBoneToLocals.SetCount(baseIdx + n); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int i; |
|
|
|
int i; |
|
|
|
for( i = baseIdx; i < baseIdx + n; i++ ) |
|
|
|
for( i = baseIdx; i < baseIdx + n; i++ ) |
|
|
@ -2267,7 +2263,7 @@ uint32_t plDrawableSpans::FindBoneBaseMatrix(const hsTArray<hsMatrix44>& initL2B |
|
|
|
// runtime, a sharable bone pallete won't be found by scanning fSpans.
|
|
|
|
// runtime, a sharable bone pallete won't be found by scanning fSpans.
|
|
|
|
// We have to do a larger search through all bone matrices.
|
|
|
|
// We have to do a larger search through all bone matrices.
|
|
|
|
int i; |
|
|
|
int i; |
|
|
|
for( i = 0; i + initL2B.GetCount() < fLocalToBones.GetCount(); i++ ) |
|
|
|
for( i = 0; i + initL2B.GetCount() < fLocalToBones.size(); i++ ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int j; |
|
|
|
int j; |
|
|
|
for( j = 0; j < initL2B.GetCount(); j++ ) |
|
|
|
for( j = 0; j < initL2B.GetCount(); j++ ) |
|
|
@ -2894,7 +2890,7 @@ void plDrawableSpans::ICleanupMatrices() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for( j = 0; j < fLocalToWorlds.GetCount(); j++ ) |
|
|
|
for( j = 0; j < fLocalToWorlds.size(); j++ ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if( !usedMatrices.IsBitSet(j) ) |
|
|
|
if( !usedMatrices.IsBitSet(j) ) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -2910,7 +2906,7 @@ void plDrawableSpans::ICleanupMatrices() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
for( i = j+1; i < fLocalToWorlds.GetCount(); i++ ) |
|
|
|
for( i = j+1; i < fLocalToWorlds.size(); i++ ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
fLocalToWorlds[i] = fLocalToWorlds[i-1]; |
|
|
|
fLocalToWorlds[i] = fLocalToWorlds[i-1]; |
|
|
|
fWorldToLocals[i] = fWorldToLocals[i-1]; |
|
|
|
fWorldToLocals[i] = fWorldToLocals[i-1]; |
|
|
|