Browse Source

Some cross-platform MinGW/gcc fixes.

Darryl Pogue 10 years ago
parent
commit
79a470d31c
  1. 4
      Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp
  2. 2
      Sources/Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp
  3. 3
      Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp

4
Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp

@ -131,7 +131,7 @@ bool plMorphSequence::MsgReceive(plMessage* msg)
// Can always add it in later if desired. // Can always add it in later if desired.
if( fTgtWgts.GetCount() ) if( fTgtWgts.GetCount() )
{ {
float delWgt = hsTimer::GetDelSysSeconds() / (kMorphTime > 0 ? kMorphTime : 1.e-3f); float delWgt = hsTimer::GetDelSysSeconds() / (kMorphTime > 0 ? float(kMorphTime) : 1.e-3f);
int i; int i;
for( i = 0; i < fTgtWgts.GetCount(); i++ ) for( i = 0; i < fTgtWgts.GetCount(); i++ )
{ {
@ -820,4 +820,4 @@ void plMorphSequence::ISetSingleSharedToGlobal(int idx)
int i; int i;
for (i = 0; i < fSharedMeshes[fGlobalLayerRef].fArrayWeights[0].fDeltaWeights.GetCount(); i++) for (i = 0; i < fSharedMeshes[fGlobalLayerRef].fArrayWeights[0].fDeltaWeights.GetCount(); i++)
SetWeight(0, i, fSharedMeshes[fGlobalLayerRef].fArrayWeights[0].fDeltaWeights[i], fSharedMeshes[idx].fMesh->GetKey()); SetWeight(0, i, fSharedMeshes[fGlobalLayerRef].fArrayWeights[0].fDeltaWeights[i], fSharedMeshes[idx].fMesh->GetKey());
} }

2
Sources/Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp

@ -154,7 +154,7 @@ void plMorphSequenceSDLMod::ISetCurrentStateFrom(const plStateDataRecord* srcSta
{ {
plKey meshKey; plKey meshKey;
morphSD->GetStateDataRecord(i)->FindVar(kStrMesh)->Get(&meshKey); morphSD->GetStateDataRecord(i)->FindVar(kStrMesh)->Get(&meshKey);
if (meshKey && !meshKey->GetUoid().GetClassType() == plSharedMesh::Index()) if (meshKey && meshKey->GetUoid().GetClassType() != plSharedMesh::Index())
continue; continue;
// meshKey will be nil when dealing with non-sharedMesh data // meshKey will be nil when dealing with non-sharedMesh data

3
Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp

@ -325,7 +325,10 @@ uint32_t plSecureStream::IRead(uint32_t bytes, void* buffer)
} }
else else
{ {
// TODO: errno equivalent for *nix
#if HS_BUILD_FOR_WIN32
hsDebugMessage("Error on Windows read", GetLastError()); hsDebugMessage("Error on Windows read", GetLastError());
#endif
} }
} }
return numItems; return numItems;

Loading…
Cancel
Save