Mercurial > projects > chipmunkd
comparison trunk/tests/ChipmunkDemos/samples/Tumble.d @ 31:4604c914f2ab default tip
removed workaround for dmd-bug #5249
author | Extrawurst |
---|---|
date | Thu, 30 Dec 2010 13:50:40 +0100 |
parents | af2f61a96318 |
children |
comparison
equal
deleted
inserted
replaced
30:34b36b5193af | 31:4604c914f2ab |
---|---|
80 // update it ourselves. (see above). | 80 // update it ourselves. (see above). |
81 // NOTE: Normally you would want to add the segments as normal and not static shapes. | 81 // NOTE: Normally you would want to add the segments as normal and not static shapes. |
82 // I'm just doing it to demonstrate the cpSpaceRehashStatic() function. | 82 // I'm just doing it to demonstrate the cpSpaceRehashStatic() function. |
83 staticBody.w = 0.4f; | 83 staticBody.w = 0.4f; |
84 | 84 |
85 int foo; | |
86 // Add the bricks. | 85 // Add the bricks. |
87 for(int i=0; i<3; i++){ | 86 for(int i=0; i<3; i++){ |
88 for(int j=0; j<7; j++){ | 87 for(int j=0; j<7; j++){ |
89 _body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForPoly(1.0f, num, verts.ptr, cpvzero))); | 88 _body = cpSpaceAddBody(space, cpBodyNew(1.0f, cpMomentForPoly(1.0f, num, verts.ptr, cpvzero))); |
90 _body.p = cpv(i*60 - 150, j*30 - 150); | 89 _body.p = cpv(i*60 - 150, j*30 - 150); |
91 | |
92 //BUG: crazy fucking dmd codegen bug when optimizing (2.050) | |
93 foo = i+j; | |
94 | 90 |
95 shape = cpSpaceAddShape(space, cpPolyShapeNew(_body, num, verts.ptr, cpvzero)); | 91 shape = cpSpaceAddShape(space, cpPolyShapeNew(_body, num, verts.ptr, cpvzero)); |
96 shape.e = 0.0f; shape.u = 0.7f; | 92 shape.e = 0.0f; shape.u = 0.7f; |
97 } | 93 } |
98 } | 94 } |