Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct1
-rw-r--r--extern/SConscript4
-rw-r--r--source/blender/src/SConscript4
-rw-r--r--source/gameengine/BlenderRoutines/SConscript13
-rw-r--r--source/gameengine/Converter/SConscript13
-rw-r--r--source/gameengine/GamePlayer/common/SConscript10
-rw-r--r--source/gameengine/GamePlayer/ghost/SConscript7
-rw-r--r--source/gameengine/Ketsji/KX_ClientObjectInfo.h16
-rw-r--r--source/gameengine/Ketsji/KX_ConvertPhysicsObject.h2
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_NearSensor.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_TouchSensor.cpp6
-rw-r--r--source/gameengine/Ketsji/SConscript10
-rw-r--r--source/gameengine/SConscript4
-rwxr-xr-xtools/btools.py3
15 files changed, 68 insertions, 31 deletions
diff --git a/SConstruct b/SConstruct
index 809166586e6..20d8f8fd2ec 100644
--- a/SConstruct
+++ b/SConstruct
@@ -280,6 +280,7 @@ if 'blenderlite' in B.targets:
env['WITH_BF_PNG'] = False
env['WITH_BF_ODE'] = False
env['WITH_BF_BULLET'] = False
+ env['WITH_BF_SOLID'] = False
env['WITH_BF_BINRELOC'] = False
env['BF_BUILDINFO'] = False
env['BF_NO_ELBEEM'] = True
diff --git a/extern/SConscript b/extern/SConscript
index 4c892e1956d..6bc067c0f03 100644
--- a/extern/SConscript
+++ b/extern/SConscript
@@ -5,8 +5,8 @@ Import('env')
SConscript(['glew/SConscript'])
if env['WITH_BF_GAMEENGINE']:
- SConscript(['qhull/SConscript',
- 'solid/SConscript'])
+ if env['WITH_BF_SOLID']:
+ SConscript(['qhull/SConscript', 'solid/SConscript'])
if env['WITH_BF_BULLET']:
SConscript(['bullet2/src/SConscript'])
diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript
index 384ad1b1bf2..2e5dda6c772 100644
--- a/source/blender/src/SConscript
+++ b/source/blender/src/SConscript
@@ -70,7 +70,9 @@ if env['WITH_BF_ICONV']:
if env['WITH_BF_GAMEENGINE']:
defs.append('GAMEBLENDER=1')
-
+ if env['WITH_BF_SOLID']:
+ defs.append('USE_SUMO_SOLID')
+
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
incs += ' ' + env['BF_FFMPEG_INC']
diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript
index 7a1bf4d9ad6..f2d92384e3c 100644
--- a/source/gameengine/BlenderRoutines/SConscript
+++ b/source/gameengine/BlenderRoutines/SConscript
@@ -2,6 +2,7 @@
Import ('env')
sources = env.Glob('*.cpp')
+defs = []
incs = '. #source/kernel/gen_system #intern/string #intern/guardedalloc'
incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #intern/bmfont'
@@ -12,13 +13,17 @@ incs += ' #source/blender/blenkernel #source/blender #source/blender/include'
incs += ' #source/blender/makesdna #source/gameengine/Rasterizer #source/gameengine/GameLogic'
incs += ' #source/gameengine/Expressions #source/gameengine/Network'
incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common'
-incs += ' #source/gameengine/Physics/Bullet #source/gameengine/Physics/Sumo'
-incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
+incs += ' #source/gameengine/Physics/Bullet'
+incs += ' #source/gameengine/Network/LoopBackNetwork'
incs += ' #intern/SoundSystem #source/blender/misc #source/blender/blenloader'
incs += ' #extern/glew/include #source/blender/gpu'
+if env['WITH_BF_SOLID']:
+ incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/Fuzzics/include'
+ incs += ' ' + env['BF_SOLID_INC']
+ defs.append('USE_SUMO_SOLID')
+
incs += ' ' + env['BF_PYTHON_INC']
-incs += ' ' + env['BF_SOLID_INC']
incs += ' ' + env['BF_BULLET_INC']
incs += ' ' + env['BF_OPENGL_INC']
@@ -27,4 +32,4 @@ if env['OURPLATFORM']=='win32-vc':
cxxflags.append ('/GR')
cxxflags.append ('/O2')
-env.BlenderLib ( 'bf_bloutines', sources, Split(incs), [], libtype=['game', 'game2', 'player'], priority=[0, 0, 55] , cxx_compileflags=cxxflags)
+env.BlenderLib ( 'bf_bloutines', sources, Split(incs), defs, libtype=['game', 'game2', 'player'], priority=[0, 0, 55] , cxx_compileflags=cxxflags)
diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript
index 3be352c568b..361dca58005 100644
--- a/source/gameengine/Converter/SConscript
+++ b/source/gameengine/Converter/SConscript
@@ -2,6 +2,7 @@
Import ('env')
sources = env.Glob('*.cpp')
+defs = []
incs = '. #source/kernel/gen_system #intern/string #intern/guardedalloc'
incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #intern/bmfont'
@@ -14,12 +15,16 @@ incs += ' #source/blender/include #source/blender/makesdna #source/gameengine/Ra
incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #source/gameengine/GameLogic'
incs += ' #source/gameengine/Expressions #source/gameengine/Network #source/gameengine/SceneGraph'
incs += ' #source/gameengine/Physics/common #source/gameengine/Physics/Bullet #source/gameengine/Physics/BlOde'
-incs += ' #source/gameengine/Physics/Dummy #source/gameengine/Physics/Sumo'
-incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
+incs += ' #source/gameengine/Physics/Dummy'
+incs += ' #source/gameengine/Network/LoopBackNetwork'
incs += ' #source/blender/misc #source/blender/blenloader #source/blender/gpu'
+if env['WITH_BF_SOLID']:
+ incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/Fuzzics/include'
+ incs += ' ' + env['BF_SOLID_INC']
+ defs.append('USE_SUMO_SOLID')
+
incs += ' ' + env['BF_PYTHON_INC']
-incs += ' ' + env['BF_SOLID_INC']
incs += ' ' + env['BF_BULLET_INC']
-env.BlenderLib ( 'bf_converter', sources, Split(incs), [], libtype=['game','player'], priority=[5,70] )
+env.BlenderLib ( 'bf_converter', sources, Split(incs), defs, libtype=['game','player'], priority=[5,70] )
diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript
index c9bda78d905..23ad413350b 100644
--- a/source/gameengine/GamePlayer/common/SConscript
+++ b/source/gameengine/GamePlayer/common/SConscript
@@ -39,15 +39,13 @@ incs = ['.',
'#source/gameengine/Network',
'#source/gameengine/SceneGraph',
'#source/gameengine/Physics/common',
- '#source/gameengine/Physics/Sumo',
- '#source/gameengine/Physics/Sumo/Fuzzics/include',
'#source/gameengine/Network/LoopBackNetwork',
'#source/gameengine/GamePlayer/ghost',
'#source/blender/misc',
'#source/blender/blenloader',
'#source/blender/gpu',
'#extern/glew/include']
-
+
#This is all plugin stuff!
#if sys.platform=='win32':
# source_files += ['windows/GPW_Canvas.cpp',
@@ -62,8 +60,12 @@ incs = ['.',
# 'unix/GPU_System.cpp']
# gp_common_env.Append ( CPPPATH = ['unix'])
+if env['WITH_BF_SOLID']:
+ incs.append('#source/gameengine/Physics/Sumo')
+ incs.append('#source/gameengine/Physics/Sumo/Fuzzics/include')
+ incs += Split(env['BF_SOLID_INC'])
+
incs += Split(env['BF_PYTHON_INC'])
-incs += Split(env['BF_SOLID_INC'])
incs += Split(env['BF_PNG_INC'])
incs += Split(env['BF_ZLIB_INC'])
diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript
index 0785ce4bd0d..dd8761e0a45 100644
--- a/source/gameengine/GamePlayer/ghost/SConscript
+++ b/source/gameengine/GamePlayer/ghost/SConscript
@@ -34,8 +34,6 @@ incs = ['.',
'#source/gameengine/Network',
'#source/gameengine/SceneGraph',
'#source/gameengine/Physics/common',
- '#source/gameengine/Physics/Sumo',
- '#source/gameengine/Physics/Sumo/Fuzzics/include',
'#source/gameengine/Network/LoopBackNetwork',
'#source/gameengine/GamePlayer/common',
'#source/blender/misc',
@@ -43,8 +41,11 @@ incs = ['.',
'#source/blender/gpu',
'#extern/glew/include']
+if env['WITH_BF_SOLID']:
+ incs.append(['#source/gameengine/Physics/Sumo', '#source/gameengine/Physics/Sumo/Fuzzics/include'])
+ incs += Split(env['BF_SOLID_INC'])
+
incs += Split(env['BF_PYTHON_INC'])
-incs += Split(env['BF_SOLID_INC'])
cxxflags = []
if env['OURPLATFORM']=='win32-vc':
diff --git a/source/gameengine/Ketsji/KX_ClientObjectInfo.h b/source/gameengine/Ketsji/KX_ClientObjectInfo.h
index 5e8af0f040c..7345edb054b 100644
--- a/source/gameengine/Ketsji/KX_ClientObjectInfo.h
+++ b/source/gameengine/Ketsji/KX_ClientObjectInfo.h
@@ -29,7 +29,10 @@
#ifndef __KX_CLIENTOBJECT_INFO_H
#define __KX_CLIENTOBJECT_INFO_H
+/* Note, the way this works with/without sumo is a bit odd */
+#ifdef USE_SUMO_SOLID
#include <SM_Object.h>
+#endif //USE_SUMO_SOLID
#include <list>
@@ -38,7 +41,10 @@ class KX_GameObject;
/**
* Client Type and Additional Info. This structure can be use instead of a bare void* pointer, for safeness, and additional info for callbacks
*/
-struct KX_ClientObjectInfo : public SM_ClientObject
+struct KX_ClientObjectInfo
+#ifdef USE_SUMO_SOLID
+ : public SM_ClientObject
+#endif
{
enum clienttype {
STATIC,
@@ -52,14 +58,18 @@ struct KX_ClientObjectInfo : public SM_ClientObject
std::list<SCA_ISensor*> m_sensors;
public:
KX_ClientObjectInfo(KX_GameObject *gameobject, clienttype type = STATIC, void *auxilary_info = NULL) :
+#ifdef USE_SUMO_SOLID
SM_ClientObject(),
+#endif
m_type(type),
m_gameobject(gameobject),
m_auxilary_info(auxilary_info)
{}
- KX_ClientObjectInfo(const KX_ClientObjectInfo &copy)
- : SM_ClientObject(copy),
+ KX_ClientObjectInfo(const KX_ClientObjectInfo &copy) :
+#ifdef USE_SUMO_SOLID
+ SM_ClientObject(copy),
+#endif
m_type(copy.m_type),
m_gameobject(copy.m_gameobject),
m_auxilary_info(copy.m_auxilary_info)
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
index 53486cecf73..edacf38ab43 100644
--- a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
+++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
@@ -32,7 +32,7 @@
/* These are defined by the build system... */
//but the build system is broken, because it doesn't allow for 2 or more defines at once.
//Please leave Sumo _AND_ Bullet enabled
-#define USE_SUMO_SOLID
+//#define USE_SUMO_SOLID // scons defines this
#define USE_BULLET
//#define USE_ODE
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index 074b3195121..87f348799df 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -59,7 +59,10 @@
#include "KX_PythonInit.h"
#include "KX_PyConstraintBinding.h"
#include "PHY_IPhysicsEnvironment.h"
+
+#ifdef USE_SUMO_SOLID
#include "SumoPhysicsEnvironment.h"
+#endif
#include "SND_Scene.h"
#include "SND_IAudioDevice.h"
diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp
index fb38f16c169..5b1df8b1fe1 100644
--- a/source/gameengine/Ketsji/KX_NearSensor.cpp
+++ b/source/gameengine/Ketsji/KX_NearSensor.cpp
@@ -37,7 +37,6 @@
#include "PHY_IPhysicsEnvironment.h"
#include "PHY_IPhysicsController.h"
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -272,7 +271,7 @@ bool KX_NearSensor::NewHandleCollision(void* obj1,void* obj2,const PHY_CollData
//}
}
- return DT_CONTINUE;
+ return false; // was DT_CONTINUE; but this was defined in Sumo as false
}
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp
index 117adb44742..0b4d66dbb34 100644
--- a/source/gameengine/Ketsji/KX_TouchSensor.cpp
+++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp
@@ -34,7 +34,9 @@
#include "SCA_LogicManager.h"
#include "KX_GameObject.h"
#include "KX_TouchEventManager.h"
-#include "KX_SumoPhysicsController.h"
+
+#include "PHY_IPhysicsController.h"
+
#include <iostream>
#include "PHY_IPhysicsEnvironment.h"
@@ -214,7 +216,7 @@ bool KX_TouchSensor::NewHandleCollision(void*object1,void*object2,const PHY_Coll
}
}
- return DT_CONTINUE;
+ return false; // was DT_CONTINUE but this was defined in sumo as false.
}
diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript
index 40cbc35e7f3..5989d9d8b52 100644
--- a/source/gameengine/Ketsji/SConscript
+++ b/source/gameengine/Ketsji/SConscript
@@ -31,11 +31,15 @@ incs += ' #source/blender/makesdna #source/blender/python #source/gameengine/Ras
incs += ' #source/gameengine/GameLogic #source/gameengine/Expressions #source/gameengine/Network'
incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common #source/gameengine/Physics/Bullet'
incs += ' #source/gameengine/Physics/BlOde #source/gameengine/Physics/Dummy'
-incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/include'
-incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
incs += ' #source/blender/misc #source/blender/blenloader #extern/glew/include #source/blender/gpu'
-incs += ' ' + env['BF_SOLID_INC']
+if env['WITH_BF_SOLID']:
+ incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/include'
+ incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork'
+ incs += ' ' + env['BF_SOLID_INC']
+ defs += ' USE_SUMO_SOLID'
+
+
incs += ' ' + env['BF_PYTHON_INC']
incs += ' ' + env['BF_BULLET_INC']
incs += ' ' + env['BF_OPENGL_INC']
diff --git a/source/gameengine/SConscript b/source/gameengine/SConscript
index e841f206eee..51a05e70a07 100644
--- a/source/gameengine/SConscript
+++ b/source/gameengine/SConscript
@@ -15,10 +15,12 @@ SConscript(['BlenderRoutines/SConscript',
'Rasterizer/RAS_OpenGLRasterizer/SConscript',
'SceneGraph/SConscript',
'Physics/Bullet/SConscript',
- 'Physics/Sumo/SConscript',
'VideoTexture/SConscript'
])
+if env['WITH_BF_SOLID']:
+ SConscript(['Physics/Sumo/SConscript'])
+
if env['WITH_BF_PLAYER']:
SConscript(['GamePlayer/SConscript'])
diff --git a/tools/btools.py b/tools/btools.py
index 21ab547b11a..79f4717a262 100755
--- a/tools/btools.py
+++ b/tools/btools.py
@@ -44,7 +44,7 @@ def validate_arguments(args, bc):
'BF_GETTEXT', 'BF_GETTEXT_INC', 'BF_GETTEXT_LIB', 'BF_GETTEXT_LIBPATH',
'WITH_BF_ICONV', 'BF_ICONV', 'BF_ICONV_INC', 'BF_ICONV_LIB', 'BF_ICONV_LIBPATH',
'WITH_BF_ODE', 'BF_ODE', 'BF_ODE_INC', 'BF_ODE_LIB',
- 'WITH_BF_GAMEENGINE', 'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
+ 'WITH_BF_GAMEENGINE', 'WITH_BF_SOLID', 'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
'BF_SOLID', 'BF_SOLID_INC', 'BF_WINTAB', 'BF_WINTAB_INC',
'WITH_BF_YAFRAY',
'WITH_BF_FREETYPE', 'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH',
@@ -276,6 +276,7 @@ def read_opts(cfg, args):
('BF_BULLET_INC', 'Bullet include path', ''),
('BF_BULLET_LIB', 'Bullet library', ''),
+ (BoolVariable('WITH_BF_SOLID', 'Use Sumo/Solid deprecated physics system if true', True)),
('BF_SOLID', 'Solid base dir', '#/extern/solid'),
('BF_SOLID_INC', 'Solid include path', ''),
('BF_WINTAB', 'WinTab base dir', ''),