summaryrefslogtreecommitdiff
path: root/games-sports/vdrift/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-sports/vdrift/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-sports/vdrift/files')
-rw-r--r--games-sports/vdrift/files/vdrift-20120722-build.patch28
-rw-r--r--games-sports/vdrift/files/vdrift-20120722-bullet.patch100
2 files changed, 128 insertions, 0 deletions
diff --git a/games-sports/vdrift/files/vdrift-20120722-build.patch b/games-sports/vdrift/files/vdrift-20120722-build.patch
new file mode 100644
index 000000000000..16b6fe4c9ba1
--- /dev/null
+++ b/games-sports/vdrift/files/vdrift-20120722-build.patch
@@ -0,0 +1,28 @@
+--- VDrift.orig/SConstruct
++++ VDrift/SConstruct
+@@ -44,6 +44,7 @@
+ LIBPATH = ['.', '#lib', LOCALBASE + '/lib'],
+ LINKFLAGS = ['-pthread','-lintl'],
+ options = opts)
++ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+ check_headers = ['GL/gl.h', 'GL/glu.h', 'SDL/SDL.h', 'SDL/SDL_image.h', 'SDL/SDL_rotozoom.h', 'vorbis/vorbisfile.h', 'GL/glew.h', 'bullet/btBulletCollisionCommon.h']
+ check_libs = []
+ if 'CC' in os.environ:
+@@ -380,7 +381,7 @@
+ if env['release']:
+ # release build, debugging off, optimizations on
+ if (sys.platform != 'freebsd6') and (sys.platform != 'freebsd7') and (sys.platform != 'freebsd8') and (sys.platform != 'freebsd9') and (sys.platform != 'win32') and (sys.platform != 'cygwin'):
+- env.Append(CCFLAGS = ['-O1', '-pipe'])
++ env.Append(CCFLAGS = ['-pipe'])
+ else:
+ # debug build, lots of debugging, no optimizations
+ env.Append(CCFLAGS = ['-g3'])
+@@ -399,7 +400,6 @@
+ env.Append(CCFLAGS = ['-pg'])
+ env.Append(LINKFLAGS = ['-pg'])
+ env.Append(CCFLAGS = ['-g3'])
+- env.Append(CCFLAGS = ['-O1'])
+
+ #------------------------------------#
+ # compile-time efficiency assessment #
+
diff --git a/games-sports/vdrift/files/vdrift-20120722-bullet.patch b/games-sports/vdrift/files/vdrift-20120722-bullet.patch
new file mode 100644
index 000000000000..907433417ee6
--- /dev/null
+++ b/games-sports/vdrift/files/vdrift-20120722-bullet.patch
@@ -0,0 +1,100 @@
+--- src/cardynamics.cpp Mon Jan 19 23:26:36 1970
++++ src/cardynamics.cpp Mon Jan 19 23:26:36 1970
+@@ -1791,23 +1791,29 @@
+
+ bool CARDYNAMICS::WheelContactCallback(
+ btManifoldPoint& cp,
+- const btCollisionObject* colObj0,
+- int partId0,
++ const btCollisionObjectWrapper* col0,
++ int part0,
+ int index0,
+- const btCollisionObject* colObj1,
+- int partId1,
++ const btCollisionObjectWrapper* col1,
++ int part1,
+ int index1)
+ {
+- // cars are fracture bodies, wheel is a cylinder shape
+- const btCollisionShape* shape = colObj0->getCollisionShape();
+- if ((colObj0->getInternalType() & CO_FRACTURE_TYPE) &&
++#if (BT_BULLET_VERSION < 281)
++ const btCollisionObject* obj = col0;
++ const btCollisionShape* shape = obj->getCollisionShape();
++ const btCollisionShape* rootshape = obj->getRootCollisionShape();
++#else
++ const btCollisionObject* obj = col0->getCollisionObject();
++ const btCollisionShape* shape = col0->getCollisionShape();
++ const btCollisionShape* rootshape = obj->getCollisionShape();
++#endif
++ if ((obj->getInternalType() & CO_FRACTURE_TYPE) &&
+ (shape->getShapeType() == CYLINDER_SHAPE_PROXYTYPE))
+ {
+- // is contact within contact patch?
+- const btCompoundShape* car = static_cast<const btCompoundShape*>(colObj0->getRootCollisionShape());
+- const btCylinderShapeX* wheel = static_cast<const btCylinderShapeX*>(shape);
+- btVector3 contactPoint = cp.m_localPointA - car->getChildTransform(cp.m_index0).getOrigin();
+- if (-direction::up.dot(contactPoint) > 0.5 * wheel->getRadius())
++ const btCompoundShape* carshape = static_cast<const btCompoundShape*>(rootshape);
++ const btCylinderShapeX* wheelshape = static_cast<const btCylinderShapeX*>(shape);
++ btVector3 contactPoint = cp.m_localPointA - carshape->getChildTransform(cp.m_index0).getOrigin();
++ if (-direction::up.dot(contactPoint) > 0.5 * wheelshape->getRadius())
+ {
+ // break contact (hack)
+ cp.m_normalWorldOnB = btVector3(0, 0, 0);
+--- src/cardynamics.h Mon Jan 19 23:26:36 1970
++++ src/cardynamics.h Mon Jan 19 23:26:36 1970
+@@ -25,6 +25,12 @@
+ class FractureBody;
+ class PTree;
+
++#if (BT_BULLET_VERSION < 281)
++#define btCollisionObjectWrapper btCollisionObject
++#else
++struct btCollisionObjectWrapper;
++#endif
++
+ class CARDYNAMICS : public btActionInterface
+ {
+ friend class PERFORMANCE_TESTING;
+@@ -151,11 +157,11 @@
+
+ static bool WheelContactCallback(
+ btManifoldPoint& cp,
+- const btCollisionObject* colObj0,
+- int partId0,
++ const btCollisionObjectWrapper* col0,
++ int part0,
+ int index0,
+- const btCollisionObject* colObj1,
+- int partId1,
++ const btCollisionObjectWrapper* col1,
++ int part1,
+ int index1);
+
+ protected:
+--- src/dynamicsworld.cpp Mon Jan 19 23:26:36 1970
++++ src/dynamicsworld.cpp Mon Jan 19 23:26:36 1970
+@@ -105,7 +105,7 @@
+ int patch_id = -1;
+ const BEZIER * b = 0;
+ const TRACKSURFACE * s = TRACKSURFACE::None();
+- btCollisionObject * c = 0;
++ const btCollisionObject * c = 0;
+
+ MyRayResultCallback ray(origin, p, caster);
+ rayTest(origin, p, ray);
+@@ -221,6 +221,7 @@
+
+ void DynamicsWorld::fractureCallback()
+ {
++#if (BT_BULLET_VERSION < 281)
+ m_activeConnections.resize(0);
+
+ int numManifolds = getDispatcher()->getNumManifolds();
+@@ -268,4 +269,5 @@
+ btRigidBody* child = body->updateConnection(con_id);
+ if (child) addRigidBody(child);
+ }
++#endif
+ } \ No newline at end of file