From 79a470d31c0d45a3ae8f42447f36018f7ba8f6d8 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Sun, 8 Feb 2015 23:24:23 -0800 Subject: [PATCH] Some cross-platform MinGW/gcc fixes. --- Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp | 4 ++-- .../Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp | 2 +- Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp index e200d1c0..0b9bba90 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequence.cpp @@ -131,7 +131,7 @@ bool plMorphSequence::MsgReceive(plMessage* msg) // Can always add it in later if desired. 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; for( i = 0; i < fTgtWgts.GetCount(); i++ ) { @@ -820,4 +820,4 @@ void plMorphSequence::ISetSingleSharedToGlobal(int idx) int 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()); -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp index d3cc3c5e..4c381d27 100644 --- a/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp +++ b/Sources/Plasma/PubUtilLib/plDrawable/plMorphSequenceSDLMod.cpp @@ -154,7 +154,7 @@ void plMorphSequenceSDLMod::ISetCurrentStateFrom(const plStateDataRecord* srcSta { plKey meshKey; morphSD->GetStateDataRecord(i)->FindVar(kStrMesh)->Get(&meshKey); - if (meshKey && !meshKey->GetUoid().GetClassType() == plSharedMesh::Index()) + if (meshKey && meshKey->GetUoid().GetClassType() != plSharedMesh::Index()) continue; // meshKey will be nil when dealing with non-sharedMesh data diff --git a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp index 3aa975c4..d65a6074 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plSecureStream.cpp @@ -325,7 +325,10 @@ uint32_t plSecureStream::IRead(uint32_t bytes, void* buffer) } else { + // TODO: errno equivalent for *nix +#if HS_BUILD_FOR_WIN32 hsDebugMessage("Error on Windows read", GetLastError()); +#endif } } return numItems;