r9283 - in packages/trunk/mu-cade/debian: . patches
Peter De Wachter
pdewacht-guest at alioth.debian.org
Sun Mar 29 02:00:27 UTC 2009
Author: pdewacht-guest
Date: 2009-03-29 02:00:27 +0000 (Sun, 29 Mar 2009)
New Revision: 9283
Modified:
packages/trunk/mu-cade/debian/changelog
packages/trunk/mu-cade/debian/patches/ode.patch
Log:
Worked around gdc struct layout problems on i386.
Modified: packages/trunk/mu-cade/debian/changelog
===================================================================
--- packages/trunk/mu-cade/debian/changelog 2009-03-28 16:49:04 UTC (rev 9282)
+++ packages/trunk/mu-cade/debian/changelog 2009-03-29 02:00:27 UTC (rev 9283)
@@ -1,3 +1,9 @@
+mu-cade (0.11.dfsg1-4) unstable; urgency=low
+
+ * Worked around gdc struct layout problems on i386. (Closes: #521618)
+
+ -- Peter De Wachter <pdewacht at gmail.com> Sun, 29 Mar 2009 03:42:38 +0200
+
mu-cade (0.11.dfsg1-3) unstable; urgency=low
[ Miriam Ruiz ]
Modified: packages/trunk/mu-cade/debian/patches/ode.patch
===================================================================
--- packages/trunk/mu-cade/debian/patches/ode.patch 2009-03-28 16:49:04 UTC (rev 9282)
+++ packages/trunk/mu-cade/debian/patches/ode.patch 2009-03-29 02:00:27 UTC (rev 9283)
@@ -35,7 +35,20 @@
--- a/import/ode/collision.d
+++ b/import/ode/collision.d
-@@ -89,6 +89,7 @@
+@@ -79,16 +79,19 @@
+ enum {
+ dSphereClass = 0,
+ dBoxClass,
+- dCCylinderClass,
++ dCapsuleClass,
+ dCylinderClass,
+ dPlaneClass,
+ dRayClass,
++ dConvexClass,
+ dGeomTransformClass,
+ dTriMeshClass,
++ dHeightfieldClass,
+
dFirstSpaceClass,
dSimpleSpaceClass = dFirstSpaceClass,
dHashSpaceClass,
@@ -43,7 +56,7 @@
dQuadTreeSpaceClass,
dLastSpaceClass = dQuadTreeSpaceClass,
-@@ -155,6 +156,7 @@
+@@ -155,6 +158,7 @@
dMatrix3 R2, dVector3 side2);
void dInfiniteAABB (dGeomID geom, dReal aabb[6]);
@@ -75,15 +88,111 @@
dContactApprox0 = 0x0000,
dContactApprox1_1 = 0x1000,
-@@ -54,7 +55,7 @@
- dReal bounce_vel;
- dReal soft_erp;
- dReal soft_cfm;
-- dReal motion1,motion2;
-+ dReal motion1,motion2,motionN;
- dReal slip1,slip2;
+@@ -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
@@ -41,6 +41,7 @@
More information about the Pkg-games-commits
mailing list