[Scummvm-git-logs] scummvm master -> 9fcae32ed4a50580ec8cf200d19d62e6b7eee453

sev- noreply at scummvm.org
Sun Dec 25 16:52:38 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9fcae32ed4 HPL1: Fix VS C2807 errors caused by change of int32 to long.


Commit: 9fcae32ed4a50580ec8cf200d19d62e6b7eee453
    https://github.com/scummvm/scummvm/commit/9fcae32ed4a50580ec8cf200d19d62e6b7eee453
Author: elasota (ejlasota at gmail.com)
Date: 2022-12-25T17:52:35+01:00

Commit Message:
HPL1: Fix VS C2807 errors caused by change of int32 to long.

Changed paths:
    engines/hpl1/engine/libraries/newton/Newton.cpp
    engines/hpl1/engine/libraries/newton/Newton.h
    engines/hpl1/engine/libraries/newton/core/dgGoogol.cpp
    engines/hpl1/engine/libraries/newton/core/dgList.h
    engines/hpl1/engine/libraries/newton/core/dgTree.h
    engines/hpl1/engine/libraries/newton/physics/dgCollisionCompoundBreakable.cpp
    engines/hpl1/engine/libraries/newton/physics/dgMeshEffect.h
    engines/hpl1/engine/libraries/newton/physics/dgMinkowskiConv.cpp
    engines/hpl1/engine/libraries/newton/physics/dgNarrowPhaseCollision.cpp
    engines/hpl1/engine/libraries/newton/physics/dgWorld.cpp
    engines/hpl1/engine/libraries/newton/physics/dgWorldDynamicUpdate.cpp


diff --git a/engines/hpl1/engine/libraries/newton/Newton.cpp b/engines/hpl1/engine/libraries/newton/Newton.cpp
index d8bc2b29390..795451e8ecc 100644
--- a/engines/hpl1/engine/libraries/newton/Newton.cpp
+++ b/engines/hpl1/engine/libraries/newton/Newton.cpp
@@ -2823,8 +2823,8 @@ NEWTON_API NewtonCollision *NewtonCreateCompoundCollisionFromMesh(NewtonWorld *c
 
 NEWTON_API NewtonCollision *NewtonCreateCompoundBreakable(
     NewtonWorld *const newtonWorld, int meshCount,
-    NewtonMesh **const solids, const int *const shapeIDArray,
-    const dFloat *const densities, const int *const internalFaceMaterial,
+	NewtonMesh **const solids, const int32 *const shapeIDArray,
+    const dFloat *const densities, const int32 *const internalFaceMaterial,
     int shapeID, int debriID, dFloat debriSeparationGap) {
 	Newton *world;
 	dgCollision *collision;
@@ -3068,7 +3068,7 @@ int NewtonBreakableSegmentGetIndexCount(void *const segment) {
 int NewtonBreakableSegmentGetIndexStream(
     const NewtonCollision *const compoundBreakable,
     NewtonbreakableComponentMesh *const meshOwner,
-    void *const segment, int *const index) {
+	void *const segment, int32 *const index) {
 	int count;
 	const dgCollision *collision;
 
@@ -3229,7 +3229,7 @@ unsigned NewtonCollisionGetUserID(NewtonCollision *const collision) {
 // See also: NewtonCollisionGetInfo, NewtonCreateConvexHull
 int NewtonConvexHullGetFaceIndices(
     const NewtonCollision *const convexHullCollision, int face,
-    int *const faceIndices) {
+    int32 *const faceIndices) {
 	const dgCollision *coll;
 
 	TRACE_FUNTION(__FUNCTION__);
@@ -3589,7 +3589,7 @@ void NewtonTreeCollisionEndBuild(NewtonCollision *const treeCollision,
 //
 // See also: NewtonTreeCollisionSetFaceAtribute, NewtonCreateTreeCollision, NewtonCreateTreeCollisionFromSerialization
 int NewtonTreeCollisionGetFaceAtribute(
-    const NewtonCollision *const treeCollision, const int *const faceIndexArray) {
+    const NewtonCollision *const treeCollision, const int32 *const faceIndexArray) {
 	TRACE_FUNTION(__FUNCTION__);
 	const dgCollisionBVH *const collision = (const dgCollisionBVH *)treeCollision;
 	NEWTON_ASSERT(collision->IsType(dgCollision::dgCollisionBVH_RTTI));
@@ -3615,7 +3615,7 @@ int NewtonTreeCollisionGetFaceAtribute(
 //
 // See also: NewtonTreeCollisionGetFaceAtribute, NewtonCreateTreeCollision, NewtonCreateTreeCollisionFromSerialization
 void NewtonTreeCollisionSetFaceAtribute(
-    NewtonCollision *const treeCollision, const int *const faceIndexArray,
+    NewtonCollision *const treeCollision, const int32 *const faceIndexArray,
     int attribute) {
 	TRACE_FUNTION(__FUNCTION__);
 	dgCollisionBVH *const collision = (dgCollisionBVH *)treeCollision;
@@ -3651,9 +3651,9 @@ void NewtonTreeCollisionSetFaceAtribute(
 int NewtonTreeCollisionGetVertexListIndexListInAABB(
     const NewtonCollision *const treeCollision, const dFloat *const p0,
     const dFloat *const p1, const dFloat **const vertexArray,
-    int *const vertexCount, int *const vertexStrideInBytes,
-    int *const indexList, int maxIndexCount,
-    int *const faceAttribute) {
+    int32 *const vertexCount, int *const vertexStrideInBytes,
+    int32 *const indexList, int maxIndexCount,
+    int32 *const faceAttribute) {
 	dgInt32 count;
 	const dgCollision *meshColl;
 
@@ -8007,7 +8007,7 @@ NewtonMesh *NewtonMeshIntersection(NewtonMesh *const mesh,
 }
 
 void NewtonRemoveUnusedVertices(NewtonMesh *const mesh,
-                                int *const vertexRemapTable) {
+                                int32 *const vertexRemapTable) {
 	TRACE_FUNTION(__FUNCTION__);
 
 	((dgMeshEffect *)mesh)->RemoveUnusedVertices(vertexRemapTable);
@@ -8037,13 +8037,13 @@ void NewtonMeshEndFace(NewtonMesh *const mesh) {
 }
 
 void NewtonMeshBuildFromVertexListIndexList(NewtonMesh *const mesh,
-        int faceCount, const int *const faceIndexCount,
-        const int *const faceMaterialIndex, const dFloat *const vertex,
-        int vertexStrideInBytes, const int *const vertexIndex,
+        int faceCount, const int32 *const faceIndexCount,
+        const int32 *const faceMaterialIndex, const dFloat *const vertex,
+        int vertexStrideInBytes, const int32 *const vertexIndex,
         const dFloat *const normal, int normalStrideInBytes,
-        const int *const normalIndex, const dFloat *const uv0, int uv0StrideInBytes,
-        const int *const uv0Index, const dFloat *const uv1, int uv1StrideInBytes,
-        const int *const uv1Index) {
+        const int32 *const normalIndex, const dFloat *const uv0, int uv0StrideInBytes,
+        const int32 *const uv0Index, const dFloat *const uv1, int uv1StrideInBytes,
+        const int32 *const uv1Index) {
 	dgMeshEffect *const meshEffect = (dgMeshEffect *)mesh;
 
 	TRACE_FUNTION(__FUNCTION__);
@@ -8208,7 +8208,7 @@ int NewtonMeshMaterialGetIndexCount(const NewtonMesh *const mesh,
 }
 
 void NewtonMeshMaterialGetIndexStream(const NewtonMesh *const mesh,
-                                      void *const handle, int materialId, int *const index) {
+                                      void *const handle, int materialId, int32 *const index) {
 
 	const dgMeshEffect *const meshEffect = (const dgMeshEffect *)mesh;
 
@@ -8289,8 +8289,8 @@ int NewtonMeshGetTotalIndexCount(const NewtonMesh *const mesh) {
 	return ((const dgMeshEffect *)mesh)->GetTotalIndexCount();
 }
 
-void NewtonMeshGetFaces(const NewtonMesh *const mesh, int *const faceIndexCount,
-                        int *const faceMaterial, void **const faceIndices) {
+void NewtonMeshGetFaces(const NewtonMesh *const mesh, int32 *const faceIndexCount,
+                        int32 *const faceMaterial, void **const faceIndices) {
 	((const dgMeshEffect *)mesh)->GetFaces(faceIndexCount, faceMaterial, faceIndices);
 }
 
@@ -8345,7 +8345,7 @@ void *NewtonMeshGetNextEdge(const NewtonMesh *const mesh,
 }
 
 void NewtonMeshGetEdgeIndices(const NewtonMesh *const mesh,
-                              const void *const edge, int *const v0, int *const v1) {
+                              const void *const edge, int32 *const v0, int32 *const v1) {
 	TRACE_FUNTION(__FUNCTION__);
 	return ((const dgMeshEffect *)mesh)->GetEdgeIndex(edge, *v0, *v1);
 }
diff --git a/engines/hpl1/engine/libraries/newton/Newton.h b/engines/hpl1/engine/libraries/newton/Newton.h
index e761b824536..c918d5b1a4e 100644
--- a/engines/hpl1/engine/libraries/newton/Newton.h
+++ b/engines/hpl1/engine/libraries/newton/Newton.h
@@ -485,7 +485,7 @@ NEWTON_API dFloat NewtonCollisionGetMaxBreakImpactImpulse(const NewtonCollision
 NEWTON_API void NewtonCollisionSetUserID(NewtonCollision *convexCollision, unsigned id);
 NEWTON_API unsigned NewtonCollisionGetUserID(NewtonCollision *const convexCollision);
 
-NEWTON_API int NewtonConvexHullGetFaceIndices(const NewtonCollision *const convexHullCollision, int face, int *const faceIndices);
+NEWTON_API int NewtonConvexHullGetFaceIndices(const NewtonCollision *const convexHullCollision, int face, int32 *const faceIndices);
 NEWTON_API dFloat NewtonConvexCollisionCalculateVolume(const NewtonCollision *const convexCollision);
 NEWTON_API void NewtonConvexCollisionCalculateInertialMatrix(const NewtonCollision *convexCollision, dFloat *const inertia, dFloat *const origin);
 
@@ -525,12 +525,12 @@ NEWTON_API NewtonCollision *NewtonCreateCompoundCollisionFromMesh(NewtonWorld *c
 // **********************************************************************************************
 //	NEWTON_API NewtonCollision* NewtonCreateCompoundBreakable (const NewtonWorld* const newtonWorld, int meshCount,
 //															   NewtonMesh* const solids[], NewtonMesh* const splitePlanes[],
-//															   dFloat* const matrixPallete, int* const shapeIDArray, dFloat* const densities,
+//															   dFloat* const matrixPallete, int32* const shapeIDArray, dFloat* const densities,
 //															   int shapeID, int debriID, NewtonCollisionCompoundBreakableCallback callback, void* buildUsedData);
 
 NEWTON_API NewtonCollision *NewtonCreateCompoundBreakable(NewtonWorld *const newtonWorld, int meshCount,
-        NewtonMesh **const solids, const int *const shapeIDArray,
-        const dFloat *const densities, const int *const internalFaceMaterial,
+        NewtonMesh **const solids, const int32 *const shapeIDArray,
+        const dFloat *const densities, const int32 *const internalFaceMaterial,
         int shapeID, int debriID, dFloat debriSeparationGap);
 
 
@@ -559,7 +559,7 @@ NEWTON_API void *NewtonBreakableGetNextSegment(const void *const segment);
 
 NEWTON_API int NewtonBreakableSegmentGetMaterial(void *const segment);
 NEWTON_API int NewtonBreakableSegmentGetIndexCount(void *const segment);
-NEWTON_API int NewtonBreakableSegmentGetIndexStream(const NewtonCollision *const compoundBreakable, NewtonbreakableComponentMesh *const meshOwner, void *const segment, int *const index);
+NEWTON_API int NewtonBreakableSegmentGetIndexStream(const NewtonCollision *const compoundBreakable, NewtonbreakableComponentMesh *const meshOwner, void *const segment, int32 *const index);
 NEWTON_API int NewtonBreakableSegmentGetIndexStreamShort(const NewtonCollision *const compoundBreakable, const NewtonbreakableComponentMesh *const meshOwner, void *const segment, short int *const index);
 
 
@@ -612,9 +612,9 @@ NEWTON_API void NewtonTreeCollisionBeginBuild(NewtonCollision *treeCollision);
 NEWTON_API void NewtonTreeCollisionAddFace(NewtonCollision *const treeCollision, int vertexCount, const dFloat *const vertexPtr, int strideInBytes, int faceAttribute);
 NEWTON_API void NewtonTreeCollisionEndBuild(NewtonCollision *const treeCollision, int optimize);
 
-NEWTON_API int NewtonTreeCollisionGetFaceAtribute(const NewtonCollision *const treeCollision, const int *const faceIndexArray);
-NEWTON_API void NewtonTreeCollisionSetFaceAtribute(NewtonCollision *const treeCollision, const int *const faceIndexArray, int attribute);
-NEWTON_API int NewtonTreeCollisionGetVertexListIndexListInAABB(const NewtonCollision *const treeCollision, const dFloat *const p0, const dFloat *const p1, const dFloat **const vertexArray, int *const vertexCount, int *const vertexStrideInBytes, int *const indexList, int maxIndexCount, int *const faceAttribute);
+NEWTON_API int NewtonTreeCollisionGetFaceAtribute(const NewtonCollision *const treeCollision, const int32 *const faceIndexArray);
+NEWTON_API void NewtonTreeCollisionSetFaceAtribute(NewtonCollision *const treeCollision, const int32 *const faceIndexArray, int attribute);
+NEWTON_API int NewtonTreeCollisionGetVertexListIndexListInAABB(const NewtonCollision *const treeCollision, const dFloat *const p0, const dFloat *const p1, const dFloat **const vertexArray, int32 *const vertexCount, int32 *const vertexStrideInBytes, int32 *const indexList, int maxIndexCount, int32 *const faceAttribute);
 
 
 NEWTON_API void NewtonStaticCollisionSetDebugCallback(NewtonCollision *const staticCollision, NewtonTreeCollisionCallback userCallback);
@@ -933,18 +933,18 @@ NEWTON_API NewtonMesh *NewtonMeshTetrahedralization(const NewtonMesh *const mesh
 NEWTON_API NewtonMesh *NewtonMeshVoronoiDecomposition(const NewtonMesh *const mesh, int pointCount, int pointStrideInBytes, const dFloat *const pointCloud, int internalMaterial, const dFloat *const textureMatrix);
 
 
-NEWTON_API void NewtonRemoveUnusedVertices(const NewtonMesh *const mesh, int *const vertexRemapTable);
+NEWTON_API void NewtonRemoveUnusedVertices(const NewtonMesh *const mesh, int32 *const vertexRemapTable);
 
 NEWTON_API void NewtonMeshBeginFace(const NewtonMesh *const mesh);
 NEWTON_API void NewtonMeshAddFace(const NewtonMesh *const mesh, int vertexCount, const dFloat *const vertex, int strideInBytes, int materialIndex);
 NEWTON_API void NewtonMeshEndFace(const NewtonMesh *const mesh);
 
 NEWTON_API void NewtonMeshBuildFromVertexListIndexList(const NewtonMesh *const mesh,
-        int faceCount, const int *const faceIndexCount, const int *const faceMaterialIndex,
-        const dFloat *const vertex, int vertexStrideInBytes, const int *const vertexIndex,
-        const dFloat *const normal, int normalStrideInBytes, const int *const normalIndex,
-        const dFloat *const uv0, int uv0StrideInBytes, const int *const uv0Index,
-        const dFloat *const uv1, int uv1StrideInBytes, const int *const uv1Index);
+        int faceCount, const int32 *const faceIndexCount, const int32 *const faceMaterialIndex,
+        const dFloat *const vertex, int vertexStrideInBytes, const int32 *const vertexIndex,
+        const dFloat *const normal, int normalStrideInBytes, const int32 *const normalIndex,
+        const dFloat *const uv0, int uv0StrideInBytes, const int32 *const uv0Index,
+        const dFloat *const uv1, int uv1StrideInBytes, const int32 *const uv1Index);
 
 
 
@@ -964,7 +964,7 @@ NEWTON_API int NewtonMeshFirstMaterial(const NewtonMesh *const mesh, void *const
 NEWTON_API int NewtonMeshNextMaterial(const NewtonMesh *const mesh, void *const handle, int materialId);
 NEWTON_API int NewtonMeshMaterialGetMaterial(const NewtonMesh *const mesh, void *const handle, int materialId);
 NEWTON_API int NewtonMeshMaterialGetIndexCount(const NewtonMesh *const mesh, void *const handle, int materialId);
-NEWTON_API void NewtonMeshMaterialGetIndexStream(const NewtonMesh *const mesh, void *const handle, int materialId, int *const index);
+NEWTON_API void NewtonMeshMaterialGetIndexStream(const NewtonMesh *const mesh, void *const handle, int materialId, int32 *const index);
 NEWTON_API void NewtonMeshMaterialGetIndexStreamShort(const NewtonMesh *const mesh, void *const handle, int materialId, short int *const index);
 
 NEWTON_API NewtonMesh *NewtonMeshCreateFirstSingleSegment(const NewtonMesh *const mesh);
@@ -976,7 +976,7 @@ NEWTON_API NewtonMesh *NewtonMeshCreateNextLayer(const NewtonMesh *const mesh, c
 
 NEWTON_API int NewtonMeshGetTotalFaceCount(const NewtonMesh *const mesh);
 NEWTON_API int NewtonMeshGetTotalIndexCount(const NewtonMesh *const mesh);
-NEWTON_API void NewtonMeshGetFaces(const NewtonMesh *const mesh, int *const faceIndexCount, int *const faceMaterial, void **const faceIndices);
+NEWTON_API void NewtonMeshGetFaces(const NewtonMesh *const mesh, int32 *const faceIndexCount, int32 *const faceMaterial, void **const faceIndices);
 
 
 NEWTON_API int NewtonMeshGetPointCount(const NewtonMesh *const mesh);
@@ -1003,7 +1003,7 @@ NEWTON_API int NewtonMeshGetVertexIndexFromPoint(const NewtonMesh *const mesh, v
 
 NEWTON_API void *NewtonMeshGetFirstEdge(const NewtonMesh *const mesh);
 NEWTON_API void *NewtonMeshGetNextEdge(const NewtonMesh *const mesh, void *const edge);
-NEWTON_API void NewtonMeshGetEdgeIndices(const NewtonMesh *const mesh, const void *const edge, int *const v0, int *const v1);
+NEWTON_API void NewtonMeshGetEdgeIndices(const NewtonMesh *const mesh, const void *const edge, int32 *const v0, int32 *const v1);
 //NEWTON_API void NewtonMeshGetEdgePointIndices (const NewtonMesh* const mesh, const void* const edge, int* const v0, int* const v1);
 
 NEWTON_API void *NewtonMeshGetFirstFace(const NewtonMesh *const mesh);
diff --git a/engines/hpl1/engine/libraries/newton/core/dgGoogol.cpp b/engines/hpl1/engine/libraries/newton/core/dgGoogol.cpp
index 239e769e228..6e7fa05dfb3 100644
--- a/engines/hpl1/engine/libraries/newton/core/dgGoogol.cpp
+++ b/engines/hpl1/engine/libraries/newton/core/dgGoogol.cpp
@@ -29,7 +29,7 @@ dgGoogol::dgGoogol(void) :
 
 dgGoogol::dgGoogol(dgFloat64 value) :
 	m_sign(0), m_exponent(0) {
-	dgInt32 exp;
+	int exp;
 	dgFloat64 mantissa = fabs(frexp(value, &exp));
 
 	m_exponent = dgInt16(exp);
@@ -399,4 +399,4 @@ void dgGoogol::Trace() const {
 	dgTrace(("%f ", GetAproximateValue()));
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/engines/hpl1/engine/libraries/newton/core/dgList.h b/engines/hpl1/engine/libraries/newton/core/dgList.h
index 596601d08fa..3407160c1ed 100644
--- a/engines/hpl1/engine/libraries/newton/core/dgList.h
+++ b/engines/hpl1/engine/libraries/newton/core/dgList.h
@@ -153,7 +153,7 @@ public:
 			m_ptr = m_ptr->m_next();
 		}
 
-		void operator++ (dgInt32) {
+		void operator++ (int) {
 			NEWTON_ASSERT(m_ptr);
 			m_ptr = m_ptr->GetNext();
 		}
@@ -163,7 +163,7 @@ public:
 			m_ptr = m_ptr->GetPrev();
 		}
 
-		void operator-- (dgInt32) {
+		void operator-- (int) {
 			NEWTON_ASSERT(m_ptr);
 			m_ptr = m_ptr->GetPrev();
 		}
diff --git a/engines/hpl1/engine/libraries/newton/core/dgTree.h b/engines/hpl1/engine/libraries/newton/core/dgTree.h
index cf0a0c79f5c..234a84ff953 100644
--- a/engines/hpl1/engine/libraries/newton/core/dgTree.h
+++ b/engines/hpl1/engine/libraries/newton/core/dgTree.h
@@ -175,7 +175,7 @@ public:
 			m_ptr = m_ptr->Next();
 		}
 
-		void operator++ (dgInt32) {
+		void operator++ (int) {
 			NEWTON_ASSERT(m_ptr);
 			m_ptr = m_ptr->Next();
 		}
@@ -185,7 +185,7 @@ public:
 			m_ptr = m_ptr->Prev();
 		}
 
-		void operator-- (dgInt32) {
+		void operator-- (int) {
 			NEWTON_ASSERT(m_ptr);
 			m_ptr = m_ptr->Prev();
 		}
diff --git a/engines/hpl1/engine/libraries/newton/physics/dgCollisionCompoundBreakable.cpp b/engines/hpl1/engine/libraries/newton/physics/dgCollisionCompoundBreakable.cpp
index 3b6a4b2a183..34ed4f5911f 100644
--- a/engines/hpl1/engine/libraries/newton/physics/dgCollisionCompoundBreakable.cpp
+++ b/engines/hpl1/engine/libraries/newton/physics/dgCollisionCompoundBreakable.cpp
@@ -479,7 +479,7 @@ void dgCollisionCompoundBreakable::dgDebriGraph::Serialize(dgSerialize callback,
 	dgDebriNodeInfo::PackedSaveData packedData(data.m_commonData);
 	packedData.m_lru = 0;
 	callback(userData, &packedData, sizeof(packedData));
-	enumerator.Insert(0, GetFirst());
+	enumerator.Insert(dgInt32(0), GetFirst());
 
 	for (dgListNode *node = GetFirst()->GetNext(); node; node = node->GetNext()) {
 		dgDebriNodeInfo &dataN = node->GetInfo().m_nodeData;
diff --git a/engines/hpl1/engine/libraries/newton/physics/dgMeshEffect.h b/engines/hpl1/engine/libraries/newton/physics/dgMeshEffect.h
index 3c15ba728c1..54170631be4 100644
--- a/engines/hpl1/engine/libraries/newton/physics/dgMeshEffect.h
+++ b/engines/hpl1/engine/libraries/newton/physics/dgMeshEffect.h
@@ -215,12 +215,12 @@ public:
 
 	void *GetFirstVertex() const;
 	void *GetNextVertex(void *const vertex) const;
-	int GetVertexIndex(void *const vertex) const;
+	dgInt32 GetVertexIndex(void *const vertex) const;
 
 	void *GetFirstPoint() const;
 	void *GetNextPoint(void *const point) const;
-	int GetPointIndex(const void *const point) const;
-	int GetVertexIndexFromPoint(void *const point) const;
+	dgInt32 GetPointIndex(const void *const point) const;
+	dgInt32 GetVertexIndexFromPoint(void *const point) const;
 
 	void *GetFirstEdge() const;
 	void *GetNextEdge(void *const edge) const;
@@ -229,9 +229,9 @@ public:
 
 	void *GetFirstFace() const;
 	void *GetNextFace(void *const face) const;
-	int IsFaceOpen(const void *const face) const;
-	int GetFaceMaterial(const void *const face) const;
-	int GetFaceIndexCount(const void *const face) const;
+	dgInt32 IsFaceOpen(const void *const face) const;
+	dgInt32 GetFaceMaterial(const void *const face) const;
+	dgInt32 GetFaceIndexCount(const void *const face) const;
 	void GetFaceIndex(const void *const face, int *const indices) const;
 	void GetFaceAttributeIndex(const void *const face, int *const indices) const;
 
@@ -346,7 +346,7 @@ inline dgMeshEffect *dgMeshEffect::GetNextLayer(const dgMeshEffect *const layerS
 }
 
 inline dgFloat64 dgMeshEffect::QuantizeCordinade(dgFloat64 x) const {
-	dgInt32 exp;
+	int exp;
 	dgFloat64 mantissa = frexp(x, &exp);
 	mantissa = DG_MESH_EFFECT_PRECISION_SCALE_INV * floor(mantissa * DG_MESH_EFFECT_PRECISION_SCALE);
 
diff --git a/engines/hpl1/engine/libraries/newton/physics/dgMinkowskiConv.cpp b/engines/hpl1/engine/libraries/newton/physics/dgMinkowskiConv.cpp
index b35bfbdfa9a..a9367d48638 100644
--- a/engines/hpl1/engine/libraries/newton/physics/dgMinkowskiConv.cpp
+++ b/engines/hpl1/engine/libraries/newton/physics/dgMinkowskiConv.cpp
@@ -6859,7 +6859,7 @@ dgInt32 dgWorld::CalculateConvexToConvexContacts(
 		timestep = proxy.m_timestep;
 		mink.CalculateVelocities(proxy.m_timestep);
 
-		maxContaCount = GetMin(proxy.m_maxContacts, 16);
+		maxContaCount = GetMin(proxy.m_maxContacts, dgInt32(16));
 		count = mink.HullHullContinueContacts(proxy.m_timestep, proxy.m_contacts, 0,
 		                                      maxContaCount, proxy.m_unconditionalCast);
 
diff --git a/engines/hpl1/engine/libraries/newton/physics/dgNarrowPhaseCollision.cpp b/engines/hpl1/engine/libraries/newton/physics/dgNarrowPhaseCollision.cpp
index 45af53b0ee5..774227abbeb 100644
--- a/engines/hpl1/engine/libraries/newton/physics/dgNarrowPhaseCollision.cpp
+++ b/engines/hpl1/engine/libraries/newton/physics/dgNarrowPhaseCollision.cpp
@@ -1871,7 +1871,7 @@ dgInt32 dgWorld::CollideContinueSimd(dgCollision *const collisionA,
 
 	dgInt32 count = 0;
 	retTimeStep = dgFloat32(1.0e10f);
-	maxSize = GetMin(DG_MAX_CONTATCS, maxSize);
+	maxSize = GetMin(dgInt32(DG_MAX_CONTATCS), maxSize);
 
 	collideBodyA.m_world = this;
 	collideBodyA.SetContinuesCollisionMode(true);
@@ -1993,7 +1993,7 @@ dgInt32 dgWorld::CollideContinue(dgCollision *const collisionA,
 
 	dgInt32 count = 0;
 	retTimeStep = dgFloat32(1.0e10f);
-	maxSize = GetMin(DG_MAX_CONTATCS, maxSize);
+	maxSize = GetMin(dgInt32(DG_MAX_CONTATCS), maxSize);
 
 	collideBodyA.m_world = this;
 	collideBodyA.SetContinuesCollisionMode(true);
@@ -2111,7 +2111,7 @@ dgInt32 dgWorld::Collide(dgCollision *const collisionA, const dgMatrix &matrixA,
 	dgContactPoint contacts[DG_MAX_CONTATCS];
 
 	dgInt32 count = 0;
-	maxSize = GetMin(DG_MAX_CONTATCS, maxSize);
+	maxSize = GetMin(dgInt32(DG_MAX_CONTATCS), maxSize);
 
 	collideBodyA.m_world = this;
 	collideBodyA.m_masterNode = NULL;
diff --git a/engines/hpl1/engine/libraries/newton/physics/dgWorld.cpp b/engines/hpl1/engine/libraries/newton/physics/dgWorld.cpp
index 96c5245fde4..5cb3610ff56 100644
--- a/engines/hpl1/engine/libraries/newton/physics/dgWorld.cpp
+++ b/engines/hpl1/engine/libraries/newton/physics/dgWorld.cpp
@@ -342,7 +342,7 @@ dgBody *dgWorld::GetSentinelBody() const {
 }
 
 void dgWorld::SetSolverMode(dgInt32 mode) {
-	m_solverMode = dgUnsigned32(GetMax(0, mode));
+	m_solverMode = dgUnsigned32(GetMax(dgInt32(0), mode));
 }
 
 void dgWorld::SetFrictionMode(dgInt32 mode) {
diff --git a/engines/hpl1/engine/libraries/newton/physics/dgWorldDynamicUpdate.cpp b/engines/hpl1/engine/libraries/newton/physics/dgWorldDynamicUpdate.cpp
index 03aa8cbaf12..bef117f394e 100644
--- a/engines/hpl1/engine/libraries/newton/physics/dgWorldDynamicUpdate.cpp
+++ b/engines/hpl1/engine/libraries/newton/physics/dgWorldDynamicUpdate.cpp
@@ -2794,7 +2794,7 @@ void dgJacobianMemory::CalculateSimpleBodyReactionsForces(
 			}
 
 			i = -1;
-			maxPasses = GetMax(maxPasses - 1, 1);
+			maxPasses = GetMax(maxPasses - 1, dgInt32(1));
 
 		} else if (clampedForceIndex >= 0) {
 			akNum = dgFloat32(0.0f);
@@ -2813,7 +2813,7 @@ void dgJacobianMemory::CalculateSimpleBodyReactionsForces(
 			force[clampedForceIndex] = clampedForceIndexValue;
 
 			i = -1;
-			maxPasses = GetMax(maxPasses - 1, 1);
+			maxPasses = GetMax(maxPasses - 1, dgInt32(1));
 
 		} else {
 			accNorm = dgFloat32(0.0f);
@@ -5128,7 +5128,7 @@ dgFloat32 dgJacobianMemory::CalculateJointForces(dgInt32 joint,
 			NEWTON_ASSERT(activeRow[clampedForceIndex] == dgFloat32(0.0f));
 
 			i = -1;
-			maxPasses = GetMax(maxPasses - 1, 1);
+			maxPasses = GetMax(maxPasses - 1, dgInt32(1));
 
 		} else if (clampedForceIndex >= 0) {
 			akNum = dgFloat32(0.0f);
@@ -5149,7 +5149,7 @@ dgFloat32 dgJacobianMemory::CalculateJointForces(dgInt32 joint,
 			force[clampedForceIndex + first] = clampedForceIndexValue;
 
 			i = -1;
-			maxPasses = GetMax(maxPasses - 1, 1);
+			maxPasses = GetMax(maxPasses - 1, dgInt32(1));
 
 		} else {
 			accNorm = dgFloat32(0.0f);




More information about the Scummvm-git-logs mailing list