r15684 - in packages/trunk/mu-cade/debian: . patches

Peter De Wachter pdewacht-guest at moszumanska.debian.org
Thu Dec 31 15:07:22 UTC 2015


Author: pdewacht-guest
Date: 2015-12-31 15:07:21 +0000 (Thu, 31 Dec 2015)
New Revision: 15684

Modified:
   packages/trunk/mu-cade/debian/changelog
   packages/trunk/mu-cade/debian/patches/imports_ode.patch
Log:
mu-cade: Fix the ode imports to be compatible with libode4


Modified: packages/trunk/mu-cade/debian/changelog
===================================================================
--- packages/trunk/mu-cade/debian/changelog	2015-12-31 14:51:53 UTC (rev 15683)
+++ packages/trunk/mu-cade/debian/changelog	2015-12-31 15:07:21 UTC (rev 15684)
@@ -1,3 +1,9 @@
+mu-cade (0.11.dfsg1-10) UNRELEASED; urgency=medium
+
+  * Fix the ode imports to be compatible with libode4. (Closes: #809369)
+
+ -- Peter De Wachter <pdewacht at gmail.com>  Thu, 31 Dec 2015 15:57:04 +0100
+
 mu-cade (0.11.dfsg1-9) unstable; urgency=medium
 
   * Team upload.

Modified: packages/trunk/mu-cade/debian/patches/imports_ode.patch
===================================================================
--- packages/trunk/mu-cade/debian/patches/imports_ode.patch	2015-12-31 14:51:53 UTC (rev 15683)
+++ packages/trunk/mu-cade/debian/patches/imports_ode.patch	2015-12-31 15:07:21 UTC (rev 15684)
@@ -1,18 +1,26 @@
 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.
+  libode4.
 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>
+# Copyright (C) 2009,2015  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 @@
+@@ -21,6 +21,7 @@
+  *************************************************************************/
+ module ode.collision;
+ 
++import core.stdc.config;
+ import ode.common;
+ import ode.collision;
+ import ode.contact;
+@@ -38,19 +39,19 @@
  void dGeomSetBody (dGeomID, dBodyID);
  dBodyID dGeomGetBody (dGeomID);
  void dGeomSetPosition (dGeomID, dReal x, dReal y, dReal z);
@@ -29,7 +37,18 @@
  int dGeomIsSpace (dGeomID);
  dSpaceID dGeomGetSpace (dGeomID);
  int dGeomGetClass (dGeomID);
-@@ -61,11 +61,11 @@
+-void dGeomSetCategoryBits (dGeomID, uint bits);
+-void dGeomSetCollideBits (dGeomID, uint bits);
+-uint dGeomGetCategoryBits (dGeomID);
+-uint dGeomGetCollideBits (dGeomID);
++void dGeomSetCategoryBits (dGeomID, c_ulong bits);
++void dGeomSetCollideBits (dGeomID, c_ulong bits);
++c_ulong dGeomGetCategoryBits (dGeomID);
++c_ulong dGeomGetCollideBits (dGeomID);
+ void dGeomEnable (dGeomID);
+ void dGeomDisable (dGeomID);
+ int dGeomIsEnabled (dGeomID);
+@@ -61,11 +62,11 @@
  int dCollide (dGeomID o1, dGeomID o2, int flags, dContactGeom *contact,
  	      int skip);
  //void dSpaceCollide (dSpaceID space, void *data, dNearCallback *callback);
@@ -43,7 +62,7 @@
  
  /* ************************************************************************ */
  /* standard classes */
-@@ -79,16 +79,19 @@
+@@ -79,16 +80,19 @@
  enum {
    dSphereClass = 0,
    dBoxClass,
@@ -64,7 +83,7 @@
    dQuadTreeSpaceClass,
    dLastSpaceClass = dQuadTreeSpaceClass,
  
-@@ -105,12 +108,12 @@
+@@ -105,12 +109,12 @@
  
  dGeomID dCreateBox (dSpaceID space, dReal lx, dReal ly, dReal lz);
  void dGeomBoxSetLengths (dGeomID box, dReal lx, dReal ly, dReal lz);
@@ -79,7 +98,7 @@
  dReal dGeomPlanePointDepth (dGeomID plane, dReal x, dReal y, dReal z);
  
  dGeomID dCreateCCylinder (dSpaceID space, dReal radius, dReal length);
-@@ -123,7 +126,7 @@
+@@ -123,7 +127,7 @@
  dReal dGeomRayGetLength (dGeomID ray);
  void dGeomRaySet (dGeomID ray, dReal px, dReal py, dReal pz,
  		  dReal dx, dReal dy, dReal dz);
@@ -88,7 +107,7 @@
  
  /*
   * Set/get ray flags that influence ray collision detection.
-@@ -146,33 +149,33 @@
+@@ -146,33 +150,33 @@
  /* ************************************************************************ */
  /* utility functions */
  
@@ -232,15 +251,92 @@
  
  alias dxWorld *dWorldID;
  alias dxSpace *dSpaceID;
-@@ -255,6 +255,7 @@
+@@ -195,6 +195,8 @@
+   dParamLoStop = 0,
+   dParamHiStop,
+   dParamVel,
++  dParamLoVel,
++  dParamHiVel,
+   dParamFMax,
+   dParamFudgeFactor,
+   dParamBounce,
+@@ -204,6 +206,7 @@
+   /* parameters for suspension */
+   dParamSuspensionERP,
    dParamSuspensionCFM,
++  dParamERP,
+ };
  
+ enum {
+@@ -211,6 +214,8 @@
+   dParamLoStop2 = 0x100,
+   dParamHiStop2,
+   dParamVel2,
++  dParamLoVel2,
++  dParamHiVel2,
+   dParamFMax2,
+   dParamFudgeFactor2,
+   dParamBounce2,
+@@ -220,6 +225,7 @@
+   /* parameters for suspension */
+   dParamSuspensionERP2,
+   dParamSuspensionCFM2,
++  dParamERP2,
+ };
+ 
+ enum {
+@@ -227,6 +233,8 @@
+   dParamLoStop3 = 0x200,
+   dParamHiStop3,
+   dParamVel3,
++  dParamLoVel3,
++  dParamHiVel3,
+   dParamFMax3,
+   dParamFudgeFactor3,
+   dParamBounce3,
+@@ -236,6 +244,7 @@
+   /* parameters for suspension */
+   dParamSuspensionERP3,
+   dParamSuspensionCFM3,
++  dParamERP3,
+ };
+ 
+ /+
+@@ -244,6 +253,8 @@
+   dParamLoStop = start, \
+   dParamHiStop, \
+   dParamVel, \
++  dParamLoVel, \
++  dParamHiVel, \
+   dParamFMax, \
+   dParamFudgeFactor, \
+   dParamBounce, \
+@@ -252,13 +263,17 @@
+   dParamStopCFM, \
+   /* parameters for suspension */ \
+   dParamSuspensionERP, \
+-  dParamSuspensionCFM,
++  dParamSuspensionCFM, \
++  dParamERP, \
+ 
  #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 @@
+   dParamVel ## x, \
++  dParamLoVel ## x, \
++  dParamHiVel ## x, \
+   dParamFMax ## x, \
+   dParamFudgeFactor ## x, \
+   dParamBounce ## x, \
+@@ -267,10 +282,13 @@
+   dParamStopCFM ## x, \
+   /* parameters for suspension */ \
+   dParamSuspensionERP ## x, \
+-  dParamSuspensionCFM ## x,
++  dParamSuspensionCFM ## x, \
++  dParamERP ## x,
  
  enum {
    D_ALL_PARAM_NAMES(0)
@@ -251,7 +347,7 @@
  
 --- a/import/ode/contact.d
 +++ b/import/ode/contact.d
-@@ -33,8 +33,9 @@
+@@ -33,46 +33,94 @@
    dContactSoftCFM	= 0x010,
    dContactMotion1	= 0x020,
    dContactMotion2	= 0x040,
@@ -263,11 +359,11 @@
  
    dContactApprox0	= 0x0000,
    dContactApprox1_1	= 0x1000,
-@@ -42,37 +43,77 @@
-   dContactApprox1	= 0x3000
- };
- 
+   dContactApprox1_2	= 0x2000,
+-  dContactApprox1	= 0x3000
+-};
 -
+-
 -struct dSurfaceParameters {
 -  /* must always be defined */
 -  int mode;
@@ -281,8 +377,10 @@
 -  dReal soft_cfm;
 -  dReal motion1,motion2;
 -  dReal slip1,slip2;
--};
--
++  dContactApprox1_N	= 0x4000,
++  dContactApprox1	= 0x7000
+ };
+ 
 +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
@@ -295,6 +393,9 @@
 +
 +    /* only defined if the corresponding flag is set in mode */
 +    dReal mu2;
++    dReal rho;
++    dReal rho2;
++    dReal rhoN;
 +    dReal bounce;
 +    dReal bounce_vel;
 +    dReal soft_erp;
@@ -310,6 +411,9 @@
 +
 +    /* only defined if the corresponding flag is set in mode */
 +    dReal mu2;
++    dReal rho;
++    dReal rho2;
++    dReal rhoN;
 +    dReal bounce;
 +    dReal bounce_vel;
 +    dReal soft_erp;
@@ -442,7 +546,30 @@
  dAllocFunction *dGetAllocHandler ();
 --- a/import/ode/misc.d
 +++ b/import/ode/misc.d
-@@ -49,7 +49,7 @@
+@@ -23,6 +23,7 @@
+ 
+ /* miscellaneous math functions. these are mostly useful for testing */
+ 
++import core.stdc.config;
+ import std.c.stdio;
+ import ode.common;
+ 
+@@ -34,11 +35,11 @@
+ /* return next 32 bit random number. this uses a not-very-random linear
+  * congruential method.
+  */
+-uint dRand();
++c_ulong dRand();
+ 
+ /* get and set the current random number seed. */
+-uint  dRandGetSeed();
+-void dRandSetSeed (uint s);
++c_ulong  dRandGetSeed();
++void dRandSetSeed (c_ulong s);
+ 
+ /* return a random integer between 0..n-1. the distribution will get worse
+  * as n approaches 2^32.
+@@ -49,7 +50,7 @@
  dReal dRandReal();
  
  /* print out a matrix */
@@ -678,8 +805,25 @@
 +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 @@
+@@ -21,6 +21,7 @@
+  *************************************************************************/
+ module ode.timer;
  
++import core.stdc.config;
+ import std.c.stdio;
+ import ode.config;
+ 
+@@ -30,7 +31,7 @@
+ 
+ struct dStopwatch {
+   double time;			/* total clock count */
+-  uint cc[2];		/* clock count since last `start' */
++  c_ulong cc[2];		/* clock count since last `start' */
+ };
+ 
+ void dStopwatchReset (dStopwatch *);
+@@ -41,8 +42,8 @@
+ 
  /* code timers */
  
 -void dTimerStart (char *description);	/* pass a static string here */




More information about the Pkg-games-commits mailing list