r14161 - packages/trunk/mu-cade/debian/patches
Peter De Wachter
pdewacht-guest at alioth.debian.org
Sun May 26 17:58:44 UTC 2013
Author: pdewacht-guest
Date: 2013-05-26 17:58:43 +0000 (Sun, 26 May 2013)
New Revision: 14161
Added:
packages/trunk/mu-cade/debian/patches/imports_ode.patch
Modified:
packages/trunk/mu-cade/debian/patches/dlang_v2.patch
packages/trunk/mu-cade/debian/patches/fixes.patch
packages/trunk/mu-cade/debian/patches/ode.patch
packages/trunk/mu-cade/debian/patches/series
Log:
mu-cade: fix deprecation warnings in ode imports
Modified: packages/trunk/mu-cade/debian/patches/dlang_v2.patch
===================================================================
--- packages/trunk/mu-cade/debian/patches/dlang_v2.patch 2013-05-26 17:38:11 UTC (rev 14160)
+++ packages/trunk/mu-cade/debian/patches/dlang_v2.patch 2013-05-26 17:58:43 UTC (rev 14161)
@@ -3,176 +3,6 @@
triggering deprecated feature warnings/errors.
Author: Peter De Wachter <pdewacht at gmail.com>
---- a/import/ode/collision.d
-+++ b/import/ode/collision.d
-@@ -38,12 +38,12 @@
- void dGeomSetBody (dGeomID, dBodyID);
- dBodyID dGeomGetBody (dGeomID);
- void dGeomSetPosition (dGeomID, dReal x, dReal y, dReal z);
--void dGeomSetRotation (dGeomID, dMatrix3 R);
--void dGeomSetQuaternion (dGeomID, dQuaternion);
-+void dGeomSetRotation (dGeomID, ref dMatrix3 R);
-+void dGeomSetQuaternion (dGeomID, ref dQuaternion);
- dReal * dGeomGetPosition (dGeomID);
- dReal * dGeomGetRotation (dGeomID);
--void dGeomGetQuaternion (dGeomID, dQuaternion result);
--void dGeomGetAABB (dGeomID, dReal aabb[6]);
-+void dGeomGetQuaternion (dGeomID, ref dQuaternion result);
-+void dGeomGetAABB (dGeomID, ref dReal aabb[6]);
- int dGeomIsSpace (dGeomID);
- dSpaceID dGeomGetSpace (dGeomID);
- int dGeomGetClass (dGeomID);
-@@ -61,11 +61,11 @@
- int dCollide (dGeomID o1, dGeomID o2, int flags, dContactGeom *contact,
- int skip);
- //void dSpaceCollide (dSpaceID space, void *data, dNearCallback *callback);
--void dSpaceCollide (dSpaceID space, void *data, void (*fp) (void *data, dGeomID o1, dGeomID o2));
-+void dSpaceCollide (dSpaceID space, void *data, void function(void *data, dGeomID o1, dGeomID o2) fp);
- //void dSpaceCollide2 (dGeomID o1, dGeomID o2, void *data,
- // dNearCallback *callback);
- void dSpaceCollide2 (dGeomID o1, dGeomID o2, void *data,
-- void (*fp) (void *data, dGeomID o1, dGeomID o2));
-+ void function(void *data, dGeomID o1, dGeomID o2) fp);
-
- /* ************************************************************************ */
- /* standard classes */
-@@ -108,12 +108,12 @@
-
- dGeomID dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz);
- void dGeomBoxSetLengths (dGeomID box, dReal lx, dReal ly, dReal lz);
--void dGeomBoxGetLengths (dGeomID box, dVector3 result);
-+void dGeomBoxGetLengths (dGeomID box, ref dVector3 result);
- dReal dGeomBoxPointDepth (dGeomID box, dReal x, dReal y, dReal z);
-
- dGeomID dCreatePlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d);
- void dGeomPlaneSetParams (dGeomID plane, dReal a, dReal b, dReal c, dReal d);
--void dGeomPlaneGetParams (dGeomID plane, dVector4 result);
-+void dGeomPlaneGetParams (dGeomID plane, ref dVector4 result);
- dReal dGeomPlanePointDepth (dGeomID plane, dReal x, dReal y, dReal z);
-
- dGeomID dCreateCCylinder (dSpaceID space, dReal radius, dReal length);
-@@ -126,7 +126,7 @@
- dReal dGeomRayGetLength (dGeomID ray);
- void dGeomRaySet (dGeomID ray, dReal px, dReal py, dReal pz,
- dReal dx, dReal dy, dReal dz);
--void dGeomRayGet (dGeomID ray, dVector3 start, dVector3 dir);
-+void dGeomRayGet (dGeomID ray, ref dVector3 start, ref dVector3 dir);
-
- /*
- * Set/get ray flags that influence ray collision detection.
-@@ -149,27 +149,27 @@
- /* ************************************************************************ */
- /* utility functions */
-
--void dClosestLineSegmentPoints (dVector3 a1, dVector3 a2,
-- dVector3 b1, dVector3 b2,
-- dVector3 cp1, dVector3 cp2);
--
--int dBoxTouchesBox (dVector3 _p1, dMatrix3 R1,
-- dVector3 side1, dVector3 _p2,
-- dMatrix3 R2, dVector3 side2);
-+void dClosestLineSegmentPoints (ref dVector3 a1, ref dVector3 a2,
-+ ref dVector3 b1, ref dVector3 b2,
-+ ref dVector3 cp1, ref dVector3 cp2);
-+
-+int dBoxTouchesBox (ref dVector3 _p1, ref dMatrix3 R1,
-+ ref dVector3 side1, ref dVector3 _p2,
-+ ref dMatrix3 R2, ref dVector3 side2);
-
--void dInfiniteAABB (dGeomID geom, dReal aabb[6]);
-+void dInfiniteAABB (dGeomID geom, ref dReal aabb[6]);
- void dInitODE();
- void dCloseODE();
-
- /* ************************************************************************ */
- /* custom classes */
-
--typedef void dGetAABBFn (dGeomID, dReal aabb[6]);
-+typedef void dGetAABBFn (dGeomID, ref dReal aabb[6]);
- typedef int dColliderFn (dGeomID o1, dGeomID o2,
- int flags, dContactGeom *contact, int skip);
- typedef dColliderFn * dGetColliderFnFn (int num);
- typedef void dGeomDtorFn (dGeomID o);
--typedef int dAABBTestFn (dGeomID o1, dGeomID o2, dReal aabb[6]);
-+typedef int dAABBTestFn (dGeomID o1, dGeomID o2, ref dReal aabb[6]);
-
- struct dGeomClass {
- int bytes;
---- a/import/ode/common.d
-+++ b/import/ode/common.d
-@@ -62,8 +62,8 @@
- */
-
- int dIASSERT(int a) { return 0; }
--int dUASSERT(int a, char* msg) { return 0; }
--int dDEBUGMSG(char* msg) { return 0; }
-+int dUASSERT(int a, const(char)* msg) { return 0; }
-+int dDEBUGMSG(const(char)* msg) { return 0; }
- int dAASSERT(int a) { return 0; }
-
- /* floating point data type, vector, matrix and quaternion types */
-@@ -103,7 +103,7 @@
-
- /* round something up to be a multiple of the EFFICIENT_ALIGNMENT */
-
--int dEFFICIENT_SIZE(int x) { return (((x-1)|(EFFICIENT_ALIGNMENT-1))+1); }
-+size_t dEFFICIENT_SIZE(size_t x) { return (((x-1)|(EFFICIENT_ALIGNMENT-1))+1); }
-
-
- /* alloca aligned to the EFFICIENT_ALIGNMENT. note that this can waste
---- a/import/ode/error.d
-+++ b/import/ode/error.d
-@@ -31,7 +31,7 @@
- /* all user defined error functions have this type. error and debug functions
- * should not return.
- */
--typedef void dMessageFunction (int errnum, char *msg, va_list ap);
-+typedef void dMessageFunction (int errnum, const(char)* msg, va_list ap);
-
- /* set a new error, debug or warning handler. if fn is 0, the default handlers
- * are used.
-@@ -48,6 +48,6 @@
- dMessageFunction *dGetMessageHandler();
-
- /* generate a fatal error, debug trap or a message. */
--void dError (int num, char *msg, ...);
--void dDebug (int num, char *msg, ...);
--void dMessage (int num, char *msg, ...);
-+void dError (int num, const(char)* msg, ...);
-+void dDebug (int num, const(char)* msg, ...);
-+void dMessage (int num, const(char)* msg, ...);
---- a/import/ode/export_dif.d
-+++ b/import/ode/export_dif.d
-@@ -26,4 +26,4 @@
-
- extern(C):
-
--void dWorldExportDIF (dWorldID w, FILE *file, char *world_name);
-+void dWorldExportDIF (dWorldID w, FILE *file, const(char)* world_name);
---- a/import/ode/misc.d
-+++ b/import/ode/misc.d
-@@ -49,7 +49,7 @@
- dReal dRandReal();
-
- /* print out a matrix */
--void dPrintMatrix (dReal *A, int n, int m, char *fmt, FILE *f);
-+void dPrintMatrix (dReal *A, int n, int m, const(char)* fmt, FILE *f);
-
- /* make a random vector with entries between +/- range. A has n elements. */
- void dMakeRandomVector (dReal *A, int n, dReal range);
---- a/import/ode/timer.d
-+++ b/import/ode/timer.d
-@@ -41,8 +41,8 @@
-
- /* code timers */
-
--void dTimerStart (char *description); /* pass a static string here */
--void dTimerNow (char *description); /* pass a static string here */
-+void dTimerStart (const(char)* description); /* pass a static string here */
-+void dTimerNow (const(char)* description); /* pass a static string here */
- void dTimerEnd();
-
- /* print out a timer report. if `average' is nonzero, print out the average
--- a/src/abagames/mcd/barrage.d
+++ b/src/abagames/mcd/barrage.d
@@ -33,7 +33,7 @@
@@ -1814,219 +1644,3 @@
public void init() {
dInitODE();
world = dWorldCreate();
---- a/import/ode/collision_space.d
-+++ b/import/ode/collision_space.d
-@@ -32,7 +32,7 @@
-
- dSpaceID dSimpleSpaceCreate (dSpaceID space);
- dSpaceID dHashSpaceCreate (dSpaceID space);
--dSpaceID dQuadTreeSpaceCreate (dSpaceID space, dVector3 Center, dVector3 Extents, int Depth);
-+dSpaceID dQuadTreeSpaceCreate (dSpaceID space, ref dVector3 Center, ref dVector3 Extents, int Depth);
-
- void dSpaceDestroy (dSpaceID);
-
---- a/import/ode/collision_trimesh.d
-+++ b/import/ode/collision_trimesh.d
-@@ -148,7 +148,7 @@
- * Gets the point on the requested triangle and the given barycentric
- * coordinates.
- */
--void dGeomTriMeshGetPoint(dGeomID g, int Index, dReal u, dReal v, dVector3 Out);
-+void dGeomTriMeshGetPoint(dGeomID g, int Index, dReal u, dReal v, ref dVector3 Out);
-
- /*
-
---- a/import/ode/mass.d
-+++ b/import/ode/mass.d
-@@ -54,7 +54,7 @@
-
- void dMassTranslate (dMass *, dReal x, dReal y, dReal z);
-
--void dMassRotate (dMass *, dMatrix3 R);
-+void dMassRotate (dMass *, ref dMatrix3 R);
-
- void dMassAdd (dMass *a, dMass *b);
-
---- a/import/ode/objects.d
-+++ b/import/ode/objects.d
-@@ -33,14 +33,14 @@
- void dWorldDestroy (dWorldID);
-
- void dWorldSetGravity (dWorldID, dReal x, dReal y, dReal z);
--void dWorldGetGravity (dWorldID, dVector3 gravity);
-+void dWorldGetGravity (dWorldID, ref dVector3 gravity);
- void dWorldSetERP (dWorldID, dReal erp);
- dReal dWorldGetERP (dWorldID);
- void dWorldSetCFM (dWorldID, dReal cfm);
- dReal dWorldGetCFM (dWorldID);
- void dWorldStep (dWorldID, dReal stepsize);
- void dWorldImpulseToForce (dWorldID, dReal stepsize,
-- dReal ix, dReal iy, dReal iz, dVector3 force);
-+ dReal ix, dReal iy, dReal iz, ref dVector3 force);
-
- /* World QuickStep functions */
-
-@@ -97,8 +97,8 @@
- void *dBodyGetData (dBodyID);
-
- void dBodySetPosition (dBodyID, dReal x, dReal y, dReal z);
--void dBodySetRotation (dBodyID, dMatrix3 R);
--void dBodySetQuaternion (dBodyID, dQuaternion q);
-+void dBodySetRotation (dBodyID, ref dMatrix3 R);
-+void dBodySetQuaternion (dBodyID, ref dQuaternion q);
- void dBodySetLinearVel (dBodyID, dReal x, dReal y, dReal z);
- void dBodySetAngularVel (dBodyID, dReal x, dReal y, dReal z);
- dReal * dBodyGetPosition (dBodyID);
-@@ -129,23 +129,23 @@
- void dBodySetTorque (dBodyID b, dReal x, dReal y, dReal z);
-
- void dBodyGetRelPointPos (dBodyID, dReal px, dReal py, dReal pz,
-- dVector3 result);
-+ ref dVector3 result);
- void dBodyGetRelPointVel (dBodyID, dReal px, dReal py, dReal pz,
-- dVector3 result);
-+ ref dVector3 result);
- void dBodyGetPointVel (dBodyID, dReal px, dReal py, dReal pz,
-- dVector3 result);
-+ ref dVector3 result);
- void dBodyGetPosRelPoint (dBodyID, dReal px, dReal py, dReal pz,
-- dVector3 result);
-+ ref dVector3 result);
- void dBodyVectorToWorld (dBodyID, dReal px, dReal py, dReal pz,
-- dVector3 result);
-+ ref dVector3 result);
- void dBodyVectorFromWorld (dBodyID, dReal px, dReal py, dReal pz,
-- dVector3 result);
-+ ref dVector3 result);
-
- void dBodySetFiniteRotationMode (dBodyID, int mode);
- void dBodySetFiniteRotationAxis (dBodyID, dReal x, dReal y, dReal z);
-
- int dBodyGetFiniteRotationMode (dBodyID);
--void dBodyGetFiniteRotationAxis (dBodyID, dVector3 result);
-+void dBodyGetFiniteRotationAxis (dBodyID, ref dVector3 result);
-
- int dBodyGetNumJoints (dBodyID b);
- dJointID dBodyGetJoint (dBodyID, int index);
-@@ -212,37 +212,37 @@
- void dJointSetAMotorMode (dJointID, int mode);
- void dJointAddAMotorTorques (dJointID, dReal torque1, dReal torque2, dReal torque3);
-
--void dJointGetBallAnchor (dJointID, dVector3 result);
--void dJointGetBallAnchor2 (dJointID, dVector3 result);
--void dJointGetHingeAnchor (dJointID, dVector3 result);
--void dJointGetHingeAnchor2 (dJointID, dVector3 result);
--void dJointGetHingeAxis (dJointID, dVector3 result);
-+void dJointGetBallAnchor (dJointID, ref dVector3 result);
-+void dJointGetBallAnchor2 (dJointID, ref dVector3 result);
-+void dJointGetHingeAnchor (dJointID, ref dVector3 result);
-+void dJointGetHingeAnchor2 (dJointID, ref dVector3 result);
-+void dJointGetHingeAxis (dJointID, ref dVector3 result);
- dReal dJointGetHingeParam (dJointID, int parameter);
- dReal dJointGetHingeAngle (dJointID);
- dReal dJointGetHingeAngleRate (dJointID);
- dReal dJointGetSliderPosition (dJointID);
- dReal dJointGetSliderPositionRate (dJointID);
--void dJointGetSliderAxis (dJointID, dVector3 result);
-+void dJointGetSliderAxis (dJointID, ref dVector3 result);
- dReal dJointGetSliderParam (dJointID, int parameter);
--void dJointGetHinge2Anchor (dJointID, dVector3 result);
--void dJointGetHinge2Anchor2 (dJointID, dVector3 result);
--void dJointGetHinge2Axis1 (dJointID, dVector3 result);
--void dJointGetHinge2Axis2 (dJointID, dVector3 result);
-+void dJointGetHinge2Anchor (dJointID, ref dVector3 result);
-+void dJointGetHinge2Anchor2 (dJointID, ref dVector3 result);
-+void dJointGetHinge2Axis1 (dJointID, ref dVector3 result);
-+void dJointGetHinge2Axis2 (dJointID, ref dVector3 result);
- dReal dJointGetHinge2Param (dJointID, int parameter);
- dReal dJointGetHinge2Angle1 (dJointID);
- dReal dJointGetHinge2Angle1Rate (dJointID);
- dReal dJointGetHinge2Angle2Rate (dJointID);
--void dJointGetUniversalAnchor (dJointID, dVector3 result);
--void dJointGetUniversalAnchor2 (dJointID, dVector3 result);
--void dJointGetUniversalAxis1 (dJointID, dVector3 result);
--void dJointGetUniversalAxis2 (dJointID, dVector3 result);
-+void dJointGetUniversalAnchor (dJointID, ref dVector3 result);
-+void dJointGetUniversalAnchor2 (dJointID, ref dVector3 result);
-+void dJointGetUniversalAxis1 (dJointID, ref dVector3 result);
-+void dJointGetUniversalAxis2 (dJointID, ref dVector3 result);
- dReal dJointGetUniversalParam (dJointID, int parameter);
- dReal dJointGetUniversalAngle1 (dJointID);
- dReal dJointGetUniversalAngle2 (dJointID);
- dReal dJointGetUniversalAngle1Rate (dJointID);
- dReal dJointGetUniversalAngle2Rate (dJointID);
- int dJointGetAMotorNumAxes (dJointID);
--void dJointGetAMotorAxis (dJointID, int anum, dVector3 result);
-+void dJointGetAMotorAxis (dJointID, int anum, ref dVector3 result);
- int dJointGetAMotorAxisRel (dJointID, int anum);
- dReal dJointGetAMotorAngle (dJointID, int anum);
- dReal dJointGetAMotorAngleRate (dJointID, int anum);
---- a/import/ode/odemath.d
-+++ b/import/ode/odemath.d
-@@ -165,8 +165,8 @@
- /*
- * normalize 3x1 and 4x1 vectors (i.e. scale them to unit length)
- */
--void dNormalize3 (dVector3 a);
--void dNormalize4 (dVector4 a);
-+void dNormalize3 (ref dVector3 a);
-+void dNormalize4 (ref dVector4 a);
-
-
- /*
-@@ -177,4 +177,4 @@
- * q wont be.
- */
-
--void dPlaneSpace (dVector3 n, dVector3 p, dVector3 q);
-+void dPlaneSpace (ref dVector3 n, ref dVector3 p, ref dVector3 q);
---- a/import/ode/rotation.d
-+++ b/import/ode/rotation.d
-@@ -27,33 +27,33 @@
- extern(C):
-
-
--void dRSetIdentity (dMatrix3 R);
-+void dRSetIdentity (ref dMatrix3 R);
-
--void dRFromAxisAndAngle (dMatrix3 R, dReal ax, dReal ay, dReal az,
-+void dRFromAxisAndAngle (ref dMatrix3 R, dReal ax, dReal ay, dReal az,
- dReal angle);
-
--void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi);
-+void dRFromEulerAngles (ref dMatrix3 R, dReal phi, dReal theta, dReal psi);
-
--void dRFrom2Axes (dMatrix3 R, dReal ax, dReal ay, dReal az,
-+void dRFrom2Axes (ref dMatrix3 R, dReal ax, dReal ay, dReal az,
- dReal bx, dReal by, dReal bz);
-
--void dRFromZAxis (dMatrix3 R, dReal ax, dReal ay, dReal az);
-+void dRFromZAxis (ref dMatrix3 R, dReal ax, dReal ay, dReal az);
-
--void dQSetIdentity (dQuaternion q);
-+void dQSetIdentity (ref dQuaternion q);
-
--void dQFromAxisAndAngle (dQuaternion q, dReal ax, dReal ay, dReal az,
-+void dQFromAxisAndAngle (ref dQuaternion q, dReal ax, dReal ay, dReal az,
- dReal angle);
-
- /* Quaternion multiplication, analogous to the matrix multiplication routines. */
- /* qa = rotate by qc, then qb */
--void dQMultiply0 (dQuaternion qa, dQuaternion qb, dQuaternion qc);
-+void dQMultiply0 (ref dQuaternion qa, ref dQuaternion qb, ref dQuaternion qc);
- /* qa = rotate by qc, then by inverse of qb */
--void dQMultiply1 (dQuaternion qa, dQuaternion qb, dQuaternion qc);
-+void dQMultiply1 (ref dQuaternion qa, ref dQuaternion qb, ref dQuaternion qc);
- /* qa = rotate by inverse of qc, then by qb */
--void dQMultiply2 (dQuaternion qa, dQuaternion qb, dQuaternion qc);
-+void dQMultiply2 (ref dQuaternion qa, ref dQuaternion qb, ref dQuaternion qc);
- /* qa = rotate by inverse of qc, then by inverse of qb */
--void dQMultiply3 (dQuaternion qa, dQuaternion qb, dQuaternion qc);
-+void dQMultiply3 (ref dQuaternion qa, ref dQuaternion qb, ref dQuaternion qc);
-
--void dRfromQ (dMatrix3 R, dQuaternion q);
--void dQfromR (dQuaternion q, dMatrix3 R);
--void dDQfromW (dReal dq[4], dVector3 w, dQuaternion q);
-+void dRfromQ (ref dMatrix3 R, ref dQuaternion q);
-+void dQfromR (ref dQuaternion q, ref dMatrix3 R);
-+void dDQfromW (ref dReal dq[4], ref dVector3 w, ref dQuaternion q);
Modified: packages/trunk/mu-cade/debian/patches/fixes.patch
===================================================================
--- packages/trunk/mu-cade/debian/patches/fixes.patch 2013-05-26 17:38:11 UTC (rev 14160)
+++ packages/trunk/mu-cade/debian/patches/fixes.patch 2013-05-26 17:58:43 UTC (rev 14161)
@@ -1,71 +1,6 @@
# Copyright (C) 2007 Marcel Unbehaun <frostworks at gmx.de>
# Distributed under the same license as the game. See debian/copyright.
---- a/import/ode/common.d
-+++ b/import/ode/common.d
-@@ -116,13 +116,13 @@
-
- /* internal object types (all prefixed with `dx') */
-
--struct dxWorld; /* dynamics world */
--struct dxSpace; /* collision space */
--struct dxBody; /* rigid body (dynamics object) */
--struct dxGeom; /* geometry (collision object) */
--struct dxJoint;
--struct dxJointNode;
--struct dxJointGroup;
-+struct dxWorld { }; /* dynamics world */
-+struct dxSpace { }; /* collision space */
-+struct dxBody { }; /* rigid body (dynamics object) */
-+struct dxGeom { };
-+struct dxJoint { };
-+struct dxJointNode { };
-+struct dxJointGroup { };
-
- alias dxWorld *dWorldID;
- alias dxSpace *dSpaceID;
---- a/import/ode/ode.d
-+++ b/import/ode/ode.d
-@@ -23,21 +23,21 @@
-
- /* include *everything* here */
-
--import ode.config;
--import ode.compatibility;
--import ode.common;
--import ode.contact;
--import ode.error;
--import ode.memory;
--import ode.odemath;
--import ode.matrix;
--import ode.timer;
--import ode.rotation;
--import ode.mass;
--import ode.misc;
--import ode.objects;
--//import ode.odecpp;
--import ode.collision_space;
--import ode.collision;
--//import ode.odecpp_collision;
--import ode.export_dif;
-+public import ode.config;
-+public import ode.compatibility;
-+public import ode.common;
-+public import ode.contact;
-+public import ode.error;
-+public import ode.memory;
-+public import ode.odemath;
-+public import ode.matrix;
-+public import ode.timer;
-+public import ode.rotation;
-+public import ode.mass;
-+public import ode.misc;
-+public import ode.objects;
-+//public import ode.odecpp;
-+public import ode.collision_space;
-+public import ode.collision;
-+//public import ode.odecpp_collision;
-+public import ode.export_dif;
--- a/src/abagames/mcd/barrage.d
+++ b/src/abagames/mcd/barrage.d
@@ -62,7 +62,8 @@
Added: packages/trunk/mu-cade/debian/patches/imports_ode.patch
===================================================================
--- packages/trunk/mu-cade/debian/patches/imports_ode.patch (rev 0)
+++ packages/trunk/mu-cade/debian/patches/imports_ode.patch 2013-05-26 17:58:43 UTC (rev 14161)
@@ -0,0 +1,691 @@
+Description: port import/ode/ code to D language version 2
+ With this patch the code is accapted by GDC 4.8 without triggering deprecation
+ warnings/errors. It also attempts to make mu-cade compatible with Debian's
+ libode 2:0.10.1-1.
+Author: Peter De Wachter <pdewacht at gmail.com>,
+
+# Copyright (C) 2007 Marcel Unbehaun <frostworks at gmx.de>
+# Distributed under the same license as the game. See debian/copyright.
+
+# Copyright (C) 2009 Peter De Wachter <pdewacht at gmail.com>
+# Distributed under the same license as the game. See debian/copyright.
+
+--- a/import/ode/collision.d
++++ b/import/ode/collision.d
+@@ -38,12 +38,12 @@
+ void dGeomSetBody (dGeomID, dBodyID);
+ dBodyID dGeomGetBody (dGeomID);
+ void dGeomSetPosition (dGeomID, dReal x, dReal y, dReal z);
+-void dGeomSetRotation (dGeomID, dMatrix3 R);
+-void dGeomSetQuaternion (dGeomID, dQuaternion);
++void dGeomSetRotation (dGeomID, ref dMatrix3 R);
++void dGeomSetQuaternion (dGeomID, ref dQuaternion);
+ dReal * dGeomGetPosition (dGeomID);
+ dReal * dGeomGetRotation (dGeomID);
+-void dGeomGetQuaternion (dGeomID, dQuaternion result);
+-void dGeomGetAABB (dGeomID, dReal aabb[6]);
++void dGeomGetQuaternion (dGeomID, ref dQuaternion result);
++void dGeomGetAABB (dGeomID, ref dReal aabb[6]);
+ int dGeomIsSpace (dGeomID);
+ dSpaceID dGeomGetSpace (dGeomID);
+ int dGeomGetClass (dGeomID);
+@@ -61,11 +61,11 @@
+ int dCollide (dGeomID o1, dGeomID o2, int flags, dContactGeom *contact,
+ int skip);
+ //void dSpaceCollide (dSpaceID space, void *data, dNearCallback *callback);
+-void dSpaceCollide (dSpaceID space, void *data, void (*fp) (void *data, dGeomID o1, dGeomID o2));
++void dSpaceCollide (dSpaceID space, void *data, void function(void *data, dGeomID o1, dGeomID o2) fp);
+ //void dSpaceCollide2 (dGeomID o1, dGeomID o2, void *data,
+ // dNearCallback *callback);
+ void dSpaceCollide2 (dGeomID o1, dGeomID o2, void *data,
+- void (*fp) (void *data, dGeomID o1, dGeomID o2));
++ void function(void *data, dGeomID o1, dGeomID o2) fp);
+
+ /* ************************************************************************ */
+ /* standard classes */
+@@ -79,16 +79,19 @@
+ enum {
+ dSphereClass = 0,
+ dBoxClass,
+- dCCylinderClass,
++ dCapsuleClass,
+ dCylinderClass,
+ dPlaneClass,
+ dRayClass,
++ dConvexClass,
+ dGeomTransformClass,
+ dTriMeshClass,
++ dHeightfieldClass,
+
+ dFirstSpaceClass,
+ dSimpleSpaceClass = dFirstSpaceClass,
+ dHashSpaceClass,
++ dSweepAndPruneSpaceClass,
+ dQuadTreeSpaceClass,
+ dLastSpaceClass = dQuadTreeSpaceClass,
+
+@@ -105,12 +108,12 @@
+
+ dGeomID dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz);
+ void dGeomBoxSetLengths (dGeomID box, dReal lx, dReal ly, dReal lz);
+-void dGeomBoxGetLengths (dGeomID box, dVector3 result);
++void dGeomBoxGetLengths (dGeomID box, ref dVector3 result);
+ dReal dGeomBoxPointDepth (dGeomID box, dReal x, dReal y, dReal z);
+
+ dGeomID dCreatePlane (dSpaceID space, dReal a, dReal b, dReal c, dReal d);
+ void dGeomPlaneSetParams (dGeomID plane, dReal a, dReal b, dReal c, dReal d);
+-void dGeomPlaneGetParams (dGeomID plane, dVector4 result);
++void dGeomPlaneGetParams (dGeomID plane, ref dVector4 result);
+ dReal dGeomPlanePointDepth (dGeomID plane, dReal x, dReal y, dReal z);
+
+ dGeomID dCreateCCylinder (dSpaceID space, dReal radius, dReal length);
+@@ -123,7 +126,7 @@
+ dReal dGeomRayGetLength (dGeomID ray);
+ void dGeomRaySet (dGeomID ray, dReal px, dReal py, dReal pz,
+ dReal dx, dReal dy, dReal dz);
+-void dGeomRayGet (dGeomID ray, dVector3 start, dVector3 dir);
++void dGeomRayGet (dGeomID ray, ref dVector3 start, ref dVector3 dir);
+
+ /*
+ * Set/get ray flags that influence ray collision detection.
+@@ -146,33 +149,33 @@
+ /* ************************************************************************ */
+ /* utility functions */
+
+-void dClosestLineSegmentPoints (dVector3 a1, dVector3 a2,
+- dVector3 b1, dVector3 b2,
+- dVector3 cp1, dVector3 cp2);
+-
+-int dBoxTouchesBox (dVector3 _p1, dMatrix3 R1,
+- dVector3 side1, dVector3 _p2,
+- dMatrix3 R2, dVector3 side2);
++void dClosestLineSegmentPoints (ref dVector3 a1, ref dVector3 a2,
++ ref dVector3 b1, ref dVector3 b2,
++ ref dVector3 cp1, ref dVector3 cp2);
++
++int dBoxTouchesBox (ref dVector3 _p1, ref dMatrix3 R1,
++ ref dVector3 side1, ref dVector3 _p2,
++ ref dMatrix3 R2, ref dVector3 side2);
+
+-void dInfiniteAABB (dGeomID geom, dReal aabb[6]);
++void dInfiniteAABB (dGeomID geom, ref dReal aabb[6]);
++void dInitODE();
+ void dCloseODE();
+
+ /* ************************************************************************ */
+ /* custom classes */
+
+-typedef void dGetAABBFn (dGeomID, dReal aabb[6]);
+-typedef int dColliderFn (dGeomID o1, dGeomID o2,
+- int flags, dContactGeom *contact, int skip);
+-typedef dColliderFn * dGetColliderFnFn (int num);
+-typedef void dGeomDtorFn (dGeomID o);
+-typedef int dAABBTestFn (dGeomID o1, dGeomID o2, dReal aabb[6]);
++alias void function(dGeomID, ref dReal aabb[6]) dGetAABBFn;
++alias int function(dGeomID o1, dGeomID o2, int flags, dContactGeom *contact, int skip) dColliderFn;
++alias dColliderFn function(int num) dGetColliderFnFn;
++alias void function(dGeomID o) dGeomDtorFn;
++alias int function(dGeomID o1, dGeomID o2, ref dReal aabb[6]) dAABBTestFn;
+
+ struct dGeomClass {
+ int bytes;
+- dGetColliderFnFn *collider;
+- dGetAABBFn *aabb;
+- dAABBTestFn *aabb_test;
+- dGeomDtorFn *dtor;
++ dGetColliderFnFn collider;
++ dGetAABBFn aabb;
++ dAABBTestFn aabb_test;
++ dGeomDtorFn dtor;
+ };
+
+ int dCreateGeomClass (dGeomClass *classptr);
+--- a/import/ode/collision_space.d
++++ b/import/ode/collision_space.d
+@@ -32,7 +32,7 @@
+
+ dSpaceID dSimpleSpaceCreate (dSpaceID space);
+ dSpaceID dHashSpaceCreate (dSpaceID space);
+-dSpaceID dQuadTreeSpaceCreate (dSpaceID space, dVector3 Center, dVector3 Extents, int Depth);
++dSpaceID dQuadTreeSpaceCreate (dSpaceID space, ref dVector3 Center, ref dVector3 Extents, int Depth);
+
+ void dSpaceDestroy (dSpaceID);
+
+--- a/import/ode/collision_trimesh.d
++++ b/import/ode/collision_trimesh.d
+@@ -91,7 +91,7 @@
+ * Per triangle callback. Allows the user to say if he wants a collision with
+ * a particular triangle.
+ */
+-typedef int dTriCallback(dGeomID TriMesh, dGeomID RefObject, int TriangleIndex);
++alias int dTriCallback(dGeomID TriMesh, dGeomID RefObject, int TriangleIndex);
+ void dGeomTriMeshSetCallback(dGeomID g, dTriCallback* Callback);
+ dTriCallback* dGeomTriMeshGetCallback(dGeomID g);
+
+@@ -99,7 +99,7 @@
+ * Per object callback. Allows the user to get the list of triangles in 1
+ * shot. Maybe we should remove this one.
+ */
+-typedef void dTriArrayCallback(dGeomID TriMesh, dGeomID RefObject, int* TriIndices, int TriCount);
++alias void dTriArrayCallback(dGeomID TriMesh, dGeomID RefObject, int* TriIndices, int TriCount);
+ void dGeomTriMeshSetArrayCallback(dGeomID g, dTriArrayCallback* ArrayCallback);
+ dTriArrayCallback* dGeomTriMeshGetArrayCallback(dGeomID g);
+
+@@ -109,7 +109,7 @@
+ * coords. The user can for example sample a texture with alpha transparency
+ * to determine if a collision should occur.
+ */
+-typedef int dTriRayCallback(dGeomID TriMesh, dGeomID Ray, int TriangleIndex, dReal u, dReal v);
++alias int dTriRayCallback(dGeomID TriMesh, dGeomID Ray, int TriangleIndex, dReal u, dReal v);
+ void dGeomTriMeshSetRayCallback(dGeomID g, dTriRayCallback* Callback);
+ dTriRayCallback* dGeomTriMeshGetRayCallback(dGeomID g);
+
+@@ -148,7 +148,7 @@
+ * Gets the point on the requested triangle and the given barycentric
+ * coordinates.
+ */
+-void dGeomTriMeshGetPoint(dGeomID g, int Index, dReal u, dReal v, dVector3 Out);
++void dGeomTriMeshGetPoint(dGeomID g, int Index, dReal u, dReal v, ref dVector3 Out);
+
+ /*
+
+--- a/import/ode/common.d
++++ b/import/ode/common.d
+@@ -62,8 +62,8 @@
+ */
+
+ int dIASSERT(int a) { return 0; }
+-int dUASSERT(int a, char* msg) { return 0; }
+-int dDEBUGMSG(char* msg) { return 0; }
++int dUASSERT(int a, const(char)* msg) { return 0; }
++int dDEBUGMSG(const(char)* msg) { return 0; }
+ int dAASSERT(int a) { return 0; }
+
+ /* floating point data type, vector, matrix and quaternion types */
+@@ -103,7 +103,7 @@
+
+ /* round something up to be a multiple of the EFFICIENT_ALIGNMENT */
+
+-int dEFFICIENT_SIZE(int x) { return (((x-1)|(EFFICIENT_ALIGNMENT-1))+1); }
++size_t dEFFICIENT_SIZE(size_t x) { return (((x-1)|(EFFICIENT_ALIGNMENT-1))+1); }
+
+
+ /* alloca aligned to the EFFICIENT_ALIGNMENT. note that this can waste
+@@ -116,13 +116,13 @@
+
+ /* internal object types (all prefixed with `dx') */
+
+-struct dxWorld; /* dynamics world */
+-struct dxSpace; /* collision space */
+-struct dxBody; /* rigid body (dynamics object) */
+-struct dxGeom; /* geometry (collision object) */
+-struct dxJoint;
+-struct dxJointNode;
+-struct dxJointGroup;
++struct dxWorld { }; /* dynamics world */
++struct dxSpace { }; /* collision space */
++struct dxBody { }; /* rigid body (dynamics object) */
++struct dxGeom { };
++struct dxJoint { };
++struct dxJointNode { };
++struct dxJointGroup { };
+
+ alias dxWorld *dWorldID;
+ alias dxSpace *dSpaceID;
+@@ -255,6 +255,7 @@
+ dParamSuspensionCFM,
+
+ #define D_ALL_PARAM_NAMES_X(start,x) \
++ dParamGroup ## x = start, \
+ /* parameters for limits and motors */ \
+ dParamLoStop ## x = start, \
+ dParamHiStop ## x, \
+@@ -271,6 +272,8 @@
+
+ enum {
+ D_ALL_PARAM_NAMES(0)
++ dParamsInGroup,
++ D_ALL_PARAM_NAMES_X(0x000,1)
+ D_ALL_PARAM_NAMES_X(0x100,2)
+ D_ALL_PARAM_NAMES_X(0x200,3)
+
+--- a/import/ode/contact.d
++++ b/import/ode/contact.d
+@@ -33,8 +33,9 @@
+ dContactSoftCFM = 0x010,
+ dContactMotion1 = 0x020,
+ dContactMotion2 = 0x040,
+- dContactSlip1 = 0x080,
+- dContactSlip2 = 0x100,
++ dContactMotionN = 0x080,
++ dContactSlip1 = 0x100,
++ dContactSlip2 = 0x200,
+
+ dContactApprox0 = 0x0000,
+ dContactApprox1_1 = 0x1000,
+@@ -42,37 +43,77 @@
+ dContactApprox1 = 0x3000
+ };
+
+-
+-struct dSurfaceParameters {
+- /* must always be defined */
+- int mode;
+- dReal mu;
+-
+- /* only defined if the corresponding flag is set in mode */
+- dReal mu2;
+- dReal bounce;
+- dReal bounce_vel;
+- dReal soft_erp;
+- dReal soft_cfm;
+- dReal motion1,motion2;
+- dReal slip1,slip2;
+-};
+-
++version(X86) {
++ // gdc is supposed to use the same struct layout as gcc, but it
++ // doesn't do that for this struct on i386. (It seems to think
++ // doubles need an 8 byte alignment.) So we introduce this hack.
++ align(1)
++ struct dSurfaceParameters {
++ /* must always be defined */
++ int mode;
++ dReal mu;
++
++ /* only defined if the corresponding flag is set in mode */
++ dReal mu2;
++ dReal bounce;
++ dReal bounce_vel;
++ dReal soft_erp;
++ dReal soft_cfm;
++ dReal motion1,motion2,motionN;
++ dReal slip1,slip2;
++ };
++} else {
++ struct dSurfaceParameters {
++ /* must always be defined */
++ int mode;
++ dReal mu;
++
++ /* only defined if the corresponding flag is set in mode */
++ dReal mu2;
++ dReal bounce;
++ dReal bounce_vel;
++ dReal soft_erp;
++ dReal soft_cfm;
++ dReal motion1,motion2,motionN;
++ dReal slip1,slip2;
++ };
++}
+
+ /* contact info set by collision functions */
+
+-struct dContactGeom {
+- dVector3 pos;
+- dVector3 normal;
+- dReal depth;
+- dGeomID g1,g2;
+-};
++version(X86) {
++ align(1)
++ struct dContactGeom {
++ dVector3 pos;
++ dVector3 normal;
++ dReal depth;
++ dGeomID g1,g2;
++ int side1,side2;
++ };
++} else {
++ struct dContactGeom {
++ dVector3 pos;
++ dVector3 normal;
++ dReal depth;
++ dGeomID g1,g2;
++ int side1,side2;
++ };
++}
+
+
+ /* contact info used by contact joint */
+
+-struct dContact {
+- dSurfaceParameters surface;
+- dContactGeom geom;
+- dVector3 fdir1;
+-};
++version(X86) {
++ align(1)
++ struct dContact {
++ dSurfaceParameters surface;
++ dContactGeom geom;
++ dVector3 fdir1;
++ };
++} else {
++ struct dContact {
++ dSurfaceParameters surface;
++ dContactGeom geom;
++ dVector3 fdir1;
++ };
++}
+--- a/import/ode/error.d
++++ b/import/ode/error.d
+@@ -31,7 +31,7 @@
+ /* all user defined error functions have this type. error and debug functions
+ * should not return.
+ */
+-typedef void dMessageFunction (int errnum, char *msg, va_list ap);
++alias void dMessageFunction (int errnum, const(char)* msg, va_list ap);
+
+ /* set a new error, debug or warning handler. if fn is 0, the default handlers
+ * are used.
+@@ -48,6 +48,6 @@
+ dMessageFunction *dGetMessageHandler();
+
+ /* generate a fatal error, debug trap or a message. */
+-void dError (int num, char *msg, ...);
+-void dDebug (int num, char *msg, ...);
+-void dMessage (int num, char *msg, ...);
++void dError (int num, const(char)* msg, ...);
++void dDebug (int num, const(char)* msg, ...);
++void dMessage (int num, const(char)* msg, ...);
+--- a/import/ode/export_dif.d
++++ b/import/ode/export_dif.d
+@@ -26,4 +26,4 @@
+
+ extern(C):
+
+-void dWorldExportDIF (dWorldID w, FILE *file, char *world_name);
++void dWorldExportDIF (dWorldID w, FILE *file, const(char)* world_name);
+--- a/import/ode/mass.d
++++ b/import/ode/mass.d
+@@ -54,7 +54,7 @@
+
+ void dMassTranslate (dMass *, dReal x, dReal y, dReal z);
+
+-void dMassRotate (dMass *, dMatrix3 R);
++void dMassRotate (dMass *, ref dMatrix3 R);
+
+ void dMassAdd (dMass *a, dMass *b);
+
+@@ -62,6 +62,6 @@
+
+ struct dMass {
+ dReal mass;
+- dVector4 c;
++ dVector3 c;
+ dMatrix3 I;
+ };
+--- a/import/ode/memory.d
++++ b/import/ode/memory.d
+@@ -28,15 +28,15 @@
+ extern(C):
+
+ /* function types to allocate and free memory */
+-typedef void * dAllocFunction (size_t size);
+-typedef void * dReallocFunction (void *ptr, size_t oldsize, size_t newsize);
+-typedef void dFreeFunction (void *ptr, size_t size);
++alias void * function(size_t size) dAllocFunction;
++alias void * function(void *ptr, size_t oldsize, size_t newsize) dReallocFunction;
++alias void function(void *ptr, size_t size) dFreeFunction;
+
+ /* set new memory management functions. if fn is 0, the default handlers are
+ * used. */
+-void dSetAllocHandler (dAllocFunction *fn);
+-void dSetReallocHandler (dReallocFunction *fn);
+-void dSetFreeHandler (dFreeFunction *fn);
++void dSetAllocHandler (dAllocFunction fn);
++void dSetReallocHandler (dReallocFunction fn);
++void dSetFreeHandler (dFreeFunction fn);
+
+ /* get current memory management functions */
+ dAllocFunction *dGetAllocHandler ();
+--- a/import/ode/misc.d
++++ b/import/ode/misc.d
+@@ -49,7 +49,7 @@
+ dReal dRandReal();
+
+ /* print out a matrix */
+-void dPrintMatrix (dReal *A, int n, int m, char *fmt, FILE *f);
++void dPrintMatrix (dReal *A, int n, int m, const(char)* fmt, FILE *f);
+
+ /* make a random vector with entries between +/- range. A has n elements. */
+ void dMakeRandomVector (dReal *A, int n, dReal range);
+--- a/import/ode/objects.d
++++ b/import/ode/objects.d
+@@ -33,14 +33,14 @@
+ void dWorldDestroy (dWorldID);
+
+ void dWorldSetGravity (dWorldID, dReal x, dReal y, dReal z);
+-void dWorldGetGravity (dWorldID, dVector3 gravity);
++void dWorldGetGravity (dWorldID, ref dVector3 gravity);
+ void dWorldSetERP (dWorldID, dReal erp);
+ dReal dWorldGetERP (dWorldID);
+ void dWorldSetCFM (dWorldID, dReal cfm);
+ dReal dWorldGetCFM (dWorldID);
+ void dWorldStep (dWorldID, dReal stepsize);
+ void dWorldImpulseToForce (dWorldID, dReal stepsize,
+- dReal ix, dReal iy, dReal iz, dVector3 force);
++ dReal ix, dReal iy, dReal iz, ref dVector3 force);
+
+ /* World QuickStep functions */
+
+@@ -97,8 +97,8 @@
+ void *dBodyGetData (dBodyID);
+
+ void dBodySetPosition (dBodyID, dReal x, dReal y, dReal z);
+-void dBodySetRotation (dBodyID, dMatrix3 R);
+-void dBodySetQuaternion (dBodyID, dQuaternion q);
++void dBodySetRotation (dBodyID, ref dMatrix3 R);
++void dBodySetQuaternion (dBodyID, ref dQuaternion q);
+ void dBodySetLinearVel (dBodyID, dReal x, dReal y, dReal z);
+ void dBodySetAngularVel (dBodyID, dReal x, dReal y, dReal z);
+ dReal * dBodyGetPosition (dBodyID);
+@@ -129,23 +129,23 @@
+ void dBodySetTorque (dBodyID b, dReal x, dReal y, dReal z);
+
+ void dBodyGetRelPointPos (dBodyID, dReal px, dReal py, dReal pz,
+- dVector3 result);
++ ref dVector3 result);
+ void dBodyGetRelPointVel (dBodyID, dReal px, dReal py, dReal pz,
+- dVector3 result);
++ ref dVector3 result);
+ void dBodyGetPointVel (dBodyID, dReal px, dReal py, dReal pz,
+- dVector3 result);
++ ref dVector3 result);
+ void dBodyGetPosRelPoint (dBodyID, dReal px, dReal py, dReal pz,
+- dVector3 result);
++ ref dVector3 result);
+ void dBodyVectorToWorld (dBodyID, dReal px, dReal py, dReal pz,
+- dVector3 result);
++ ref dVector3 result);
+ void dBodyVectorFromWorld (dBodyID, dReal px, dReal py, dReal pz,
+- dVector3 result);
++ ref dVector3 result);
+
+ void dBodySetFiniteRotationMode (dBodyID, int mode);
+ void dBodySetFiniteRotationAxis (dBodyID, dReal x, dReal y, dReal z);
+
+ int dBodyGetFiniteRotationMode (dBodyID);
+-void dBodyGetFiniteRotationAxis (dBodyID, dVector3 result);
++void dBodyGetFiniteRotationAxis (dBodyID, ref dVector3 result);
+
+ int dBodyGetNumJoints (dBodyID b);
+ dJointID dBodyGetJoint (dBodyID, int index);
+@@ -212,37 +212,37 @@
+ void dJointSetAMotorMode (dJointID, int mode);
+ void dJointAddAMotorTorques (dJointID, dReal torque1, dReal torque2, dReal torque3);
+
+-void dJointGetBallAnchor (dJointID, dVector3 result);
+-void dJointGetBallAnchor2 (dJointID, dVector3 result);
+-void dJointGetHingeAnchor (dJointID, dVector3 result);
+-void dJointGetHingeAnchor2 (dJointID, dVector3 result);
+-void dJointGetHingeAxis (dJointID, dVector3 result);
++void dJointGetBallAnchor (dJointID, ref dVector3 result);
++void dJointGetBallAnchor2 (dJointID, ref dVector3 result);
++void dJointGetHingeAnchor (dJointID, ref dVector3 result);
++void dJointGetHingeAnchor2 (dJointID, ref dVector3 result);
++void dJointGetHingeAxis (dJointID, ref dVector3 result);
+ dReal dJointGetHingeParam (dJointID, int parameter);
+ dReal dJointGetHingeAngle (dJointID);
+ dReal dJointGetHingeAngleRate (dJointID);
+ dReal dJointGetSliderPosition (dJointID);
+ dReal dJointGetSliderPositionRate (dJointID);
+-void dJointGetSliderAxis (dJointID, dVector3 result);
++void dJointGetSliderAxis (dJointID, ref dVector3 result);
+ dReal dJointGetSliderParam (dJointID, int parameter);
+-void dJointGetHinge2Anchor (dJointID, dVector3 result);
+-void dJointGetHinge2Anchor2 (dJointID, dVector3 result);
+-void dJointGetHinge2Axis1 (dJointID, dVector3 result);
+-void dJointGetHinge2Axis2 (dJointID, dVector3 result);
++void dJointGetHinge2Anchor (dJointID, ref dVector3 result);
++void dJointGetHinge2Anchor2 (dJointID, ref dVector3 result);
++void dJointGetHinge2Axis1 (dJointID, ref dVector3 result);
++void dJointGetHinge2Axis2 (dJointID, ref dVector3 result);
+ dReal dJointGetHinge2Param (dJointID, int parameter);
+ dReal dJointGetHinge2Angle1 (dJointID);
+ dReal dJointGetHinge2Angle1Rate (dJointID);
+ dReal dJointGetHinge2Angle2Rate (dJointID);
+-void dJointGetUniversalAnchor (dJointID, dVector3 result);
+-void dJointGetUniversalAnchor2 (dJointID, dVector3 result);
+-void dJointGetUniversalAxis1 (dJointID, dVector3 result);
+-void dJointGetUniversalAxis2 (dJointID, dVector3 result);
++void dJointGetUniversalAnchor (dJointID, ref dVector3 result);
++void dJointGetUniversalAnchor2 (dJointID, ref dVector3 result);
++void dJointGetUniversalAxis1 (dJointID, ref dVector3 result);
++void dJointGetUniversalAxis2 (dJointID, ref dVector3 result);
+ dReal dJointGetUniversalParam (dJointID, int parameter);
+ dReal dJointGetUniversalAngle1 (dJointID);
+ dReal dJointGetUniversalAngle2 (dJointID);
+ dReal dJointGetUniversalAngle1Rate (dJointID);
+ dReal dJointGetUniversalAngle2Rate (dJointID);
+ int dJointGetAMotorNumAxes (dJointID);
+-void dJointGetAMotorAxis (dJointID, int anum, dVector3 result);
++void dJointGetAMotorAxis (dJointID, int anum, ref dVector3 result);
+ int dJointGetAMotorAxisRel (dJointID, int anum);
+ dReal dJointGetAMotorAngle (dJointID, int anum);
+ dReal dJointGetAMotorAngleRate (dJointID, int anum);
+--- a/import/ode/ode.d
++++ b/import/ode/ode.d
+@@ -23,21 +23,21 @@
+
+ /* include *everything* here */
+
+-import ode.config;
+-import ode.compatibility;
+-import ode.common;
+-import ode.contact;
+-import ode.error;
+-import ode.memory;
+-import ode.odemath;
+-import ode.matrix;
+-import ode.timer;
+-import ode.rotation;
+-import ode.mass;
+-import ode.misc;
+-import ode.objects;
+-//import ode.odecpp;
+-import ode.collision_space;
+-import ode.collision;
+-//import ode.odecpp_collision;
+-import ode.export_dif;
++public import ode.config;
++public import ode.compatibility;
++public import ode.common;
++public import ode.contact;
++public import ode.error;
++public import ode.memory;
++public import ode.odemath;
++public import ode.matrix;
++public import ode.timer;
++public import ode.rotation;
++public import ode.mass;
++public import ode.misc;
++public import ode.objects;
++//public import ode.odecpp;
++public import ode.collision_space;
++public import ode.collision;
++//public import ode.odecpp_collision;
++public import ode.export_dif;
+--- a/import/ode/odemath.d
++++ b/import/ode/odemath.d
+@@ -165,8 +165,8 @@
+ /*
+ * normalize 3x1 and 4x1 vectors (i.e. scale them to unit length)
+ */
+-void dNormalize3 (dVector3 a);
+-void dNormalize4 (dVector4 a);
++void dNormalize3 (ref dVector3 a);
++void dNormalize4 (ref dVector4 a);
+
+
+ /*
+@@ -177,4 +177,4 @@
+ * q wont be.
+ */
+
+-void dPlaneSpace (dVector3 n, dVector3 p, dVector3 q);
++void dPlaneSpace (ref dVector3 n, ref dVector3 p, ref dVector3 q);
+--- a/import/ode/rotation.d
++++ b/import/ode/rotation.d
+@@ -27,33 +27,33 @@
+ extern(C):
+
+
+-void dRSetIdentity (dMatrix3 R);
++void dRSetIdentity (ref dMatrix3 R);
+
+-void dRFromAxisAndAngle (dMatrix3 R, dReal ax, dReal ay, dReal az,
++void dRFromAxisAndAngle (ref dMatrix3 R, dReal ax, dReal ay, dReal az,
+ dReal angle);
+
+-void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi);
++void dRFromEulerAngles (ref dMatrix3 R, dReal phi, dReal theta, dReal psi);
+
+-void dRFrom2Axes (dMatrix3 R, dReal ax, dReal ay, dReal az,
++void dRFrom2Axes (ref dMatrix3 R, dReal ax, dReal ay, dReal az,
+ dReal bx, dReal by, dReal bz);
+
+-void dRFromZAxis (dMatrix3 R, dReal ax, dReal ay, dReal az);
++void dRFromZAxis (ref dMatrix3 R, dReal ax, dReal ay, dReal az);
+
+-void dQSetIdentity (dQuaternion q);
++void dQSetIdentity (ref dQuaternion q);
+
+-void dQFromAxisAndAngle (dQuaternion q, dReal ax, dReal ay, dReal az,
++void dQFromAxisAndAngle (ref dQuaternion q, dReal ax, dReal ay, dReal az,
+ dReal angle);
+
+ /* Quaternion multiplication, analogous to the matrix multiplication routines. */
+ /* qa = rotate by qc, then qb */
+-void dQMultiply0 (dQuaternion qa, dQuaternion qb, dQuaternion qc);
++void dQMultiply0 (ref dQuaternion qa, ref dQuaternion qb, ref dQuaternion qc);
+ /* qa = rotate by qc, then by inverse of qb */
+-void dQMultiply1 (dQuaternion qa, dQuaternion qb, dQuaternion qc);
++void dQMultiply1 (ref dQuaternion qa, ref dQuaternion qb, ref dQuaternion qc);
+ /* qa = rotate by inverse of qc, then by qb */
+-void dQMultiply2 (dQuaternion qa, dQuaternion qb, dQuaternion qc);
++void dQMultiply2 (ref dQuaternion qa, ref dQuaternion qb, ref dQuaternion qc);
+ /* qa = rotate by inverse of qc, then by inverse of qb */
+-void dQMultiply3 (dQuaternion qa, dQuaternion qb, dQuaternion qc);
++void dQMultiply3 (ref dQuaternion qa, ref dQuaternion qb, ref dQuaternion qc);
+
+-void dRfromQ (dMatrix3 R, dQuaternion q);
+-void dQfromR (dQuaternion q, dMatrix3 R);
+-void dDQfromW (dReal dq[4], dVector3 w, dQuaternion q);
++void dRfromQ (ref dMatrix3 R, ref dQuaternion q);
++void dQfromR (ref dQuaternion q, ref dMatrix3 R);
++void dDQfromW (ref dReal dq[4], ref dVector3 w, ref dQuaternion q);
+--- a/import/ode/timer.d
++++ b/import/ode/timer.d
+@@ -41,8 +41,8 @@
+
+ /* code timers */
+
+-void dTimerStart (char *description); /* pass a static string here */
+-void dTimerNow (char *description); /* pass a static string here */
++void dTimerStart (const(char)* description); /* pass a static string here */
++void dTimerNow (const(char)* description); /* pass a static string here */
+ void dTimerEnd();
+
+ /* print out a timer report. if `average' is nonzero, print out the average
Modified: packages/trunk/mu-cade/debian/patches/ode.patch
===================================================================
--- packages/trunk/mu-cade/debian/patches/ode.patch 2013-05-26 17:38:11 UTC (rev 14160)
+++ packages/trunk/mu-cade/debian/patches/ode.patch 2013-05-26 17:58:43 UTC (rev 14161)
@@ -3,185 +3,6 @@
This is an attempt to make mu-cade compatible with libode 2:0.10.1-1
---- a/import/ode/common.d
-+++ b/import/ode/common.d
-@@ -255,6 +255,7 @@
- dParamSuspensionCFM,
-
- #define D_ALL_PARAM_NAMES_X(start,x) \
-+ dParamGroup ## x = start, \
- /* parameters for limits and motors */ \
- dParamLoStop ## x = start, \
- dParamHiStop ## x, \
-@@ -271,6 +272,8 @@
-
- enum {
- D_ALL_PARAM_NAMES(0)
-+ dParamsInGroup,
-+ D_ALL_PARAM_NAMES_X(0x000,1)
- D_ALL_PARAM_NAMES_X(0x100,2)
- D_ALL_PARAM_NAMES_X(0x200,3)
-
---- a/import/ode/collision.d
-+++ b/import/ode/collision.d
-@@ -79,16 +79,19 @@
- enum {
- dSphereClass = 0,
- dBoxClass,
-- dCCylinderClass,
-+ dCapsuleClass,
- dCylinderClass,
- dPlaneClass,
- dRayClass,
-+ dConvexClass,
- dGeomTransformClass,
- dTriMeshClass,
-+ dHeightfieldClass,
-
- dFirstSpaceClass,
- dSimpleSpaceClass = dFirstSpaceClass,
- dHashSpaceClass,
-+ dSweepAndPruneSpaceClass,
- dQuadTreeSpaceClass,
- dLastSpaceClass = dQuadTreeSpaceClass,
-
-@@ -155,6 +158,7 @@
- dMatrix3 R2, dVector3 side2);
-
- void dInfiniteAABB (dGeomID geom, dReal aabb[6]);
-+void dInitODE();
- void dCloseODE();
-
- /* ************************************************************************ */
---- a/import/ode/mass.d
-+++ b/import/ode/mass.d
-@@ -62,6 +62,6 @@
-
- struct dMass {
- dReal mass;
-- dVector4 c;
-+ dVector3 c;
- dMatrix3 I;
- };
---- a/import/ode/contact.d
-+++ b/import/ode/contact.d
-@@ -33,8 +33,9 @@
- dContactSoftCFM = 0x010,
- dContactMotion1 = 0x020,
- dContactMotion2 = 0x040,
-- dContactSlip1 = 0x080,
-- dContactSlip2 = 0x100,
-+ dContactMotionN = 0x080,
-+ dContactSlip1 = 0x100,
-+ dContactSlip2 = 0x200,
-
- dContactApprox0 = 0x0000,
- dContactApprox1_1 = 0x1000,
-@@ -42,37 +43,77 @@
- dContactApprox1 = 0x3000
- };
-
--
--struct dSurfaceParameters {
-- /* must always be defined */
-- int mode;
-- dReal mu;
--
-- /* only defined if the corresponding flag is set in mode */
-- dReal mu2;
-- dReal bounce;
-- dReal bounce_vel;
-- dReal soft_erp;
-- dReal soft_cfm;
-- dReal motion1,motion2;
-- dReal slip1,slip2;
--};
--
-+version(X86) {
-+ // gdc is supposed to use the same struct layout as gcc, but it
-+ // doesn't do that for this struct on i386. (It seems to think
-+ // doubles need an 8 byte alignment.) So we introduce this hack.
-+ align(1)
-+ struct dSurfaceParameters {
-+ /* must always be defined */
-+ int mode;
-+ dReal mu;
-+
-+ /* only defined if the corresponding flag is set in mode */
-+ dReal mu2;
-+ dReal bounce;
-+ dReal bounce_vel;
-+ dReal soft_erp;
-+ dReal soft_cfm;
-+ dReal motion1,motion2,motionN;
-+ dReal slip1,slip2;
-+ };
-+} else {
-+ struct dSurfaceParameters {
-+ /* must always be defined */
-+ int mode;
-+ dReal mu;
-+
-+ /* only defined if the corresponding flag is set in mode */
-+ dReal mu2;
-+ dReal bounce;
-+ dReal bounce_vel;
-+ dReal soft_erp;
-+ dReal soft_cfm;
-+ dReal motion1,motion2,motionN;
-+ dReal slip1,slip2;
-+ };
-+}
-
- /* contact info set by collision functions */
-
--struct dContactGeom {
-- dVector3 pos;
-- dVector3 normal;
-- dReal depth;
-- dGeomID g1,g2;
--};
-+version(X86) {
-+ align(1)
-+ struct dContactGeom {
-+ dVector3 pos;
-+ dVector3 normal;
-+ dReal depth;
-+ dGeomID g1,g2;
-+ int side1,side2;
-+ };
-+} else {
-+ struct dContactGeom {
-+ dVector3 pos;
-+ dVector3 normal;
-+ dReal depth;
-+ dGeomID g1,g2;
-+ int side1,side2;
-+ };
-+}
-
-
- /* contact info used by contact joint */
-
--struct dContact {
-- dSurfaceParameters surface;
-- dContactGeom geom;
-- dVector3 fdir1;
--};
-+version(X86) {
-+ align(1)
-+ struct dContact {
-+ dSurfaceParameters surface;
-+ dContactGeom geom;
-+ dVector3 fdir1;
-+ };
-+} else {
-+ struct dContact {
-+ dSurfaceParameters surface;
-+ dContactGeom geom;
-+ dVector3 fdir1;
-+ };
-+}
--- a/src/abagames/util/ode/world.d
+++ b/src/abagames/util/ode/world.d
@@ -28,6 +28,7 @@
Modified: packages/trunk/mu-cade/debian/patches/series
===================================================================
--- packages/trunk/mu-cade/debian/patches/series 2013-05-26 17:38:11 UTC (rev 14160)
+++ packages/trunk/mu-cade/debian/patches/series 2013-05-26 17:58:43 UTC (rev 14161)
@@ -1,4 +1,5 @@
imports.patch
+imports_ode.patch
fixes.patch
directories.patch
windowed.patch
More information about the Pkg-games-commits
mailing list