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:
Diffstat (limited to 'source/gameengine/GamePlayer/common')
-rw-r--r--source/gameengine/GamePlayer/common/CMakeLists.txt84
-rw-r--r--source/gameengine/GamePlayer/common/GPC_Engine.cpp11
-rw-r--r--source/gameengine/GamePlayer/common/GPC_Engine.h3
-rw-r--r--source/gameengine/GamePlayer/common/SConscript8
4 files changed, 63 insertions, 43 deletions
diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt
index c865cf5ce25..af25f4b884e 100644
--- a/source/gameengine/GamePlayer/common/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/common/CMakeLists.txt
@@ -25,50 +25,52 @@
# ***** END GPL LICENSE BLOCK *****
SET(SRC
- bmfont.cpp
- GPC_Canvas.cpp
- GPC_Engine.cpp
- GPC_KeyboardDevice.cpp
- GPC_MouseDevice.cpp
- GPC_RawImage.cpp
- GPC_RawLoadDotBlendArray.cpp
- GPC_RawLogoArrays.cpp
- GPC_RenderTools.cpp
- GPC_System.cpp
+ bmfont.cpp
+ GPC_Canvas.cpp
+ GPC_Engine.cpp
+ GPC_KeyboardDevice.cpp
+ GPC_MouseDevice.cpp
+ GPC_RawImage.cpp
+ GPC_RawLoadDotBlendArray.cpp
+ GPC_RawLogoArrays.cpp
+ GPC_RenderTools.cpp
+ GPC_System.cpp
)
SET(INC
- .
- ../../../../intern/string
- ../../../../intern/ghost
- ../../../../intern/guardedalloc
- ../../../../intern/moto/include
- ../../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
- ../../../../source/kernel/gen_system
- ../../../../source/kernel/gen_messaging
- ../../../../source/gameengine/Converter
- ../../../../source/blender/imbuf
- ../../../../source/gameengine/Ketsji
- ../../../../source/blender/blenlib
- ../../../../source/blender/blenkernel
- ../../../../source/blender
- ../../../../source/blender/include
- ../../../../source/blender/makesdna
- ../../../../source/gameengine/Rasterizer
- ../../../../source/gameengine/GameLogic
- ../../../../source/gameengine/Expressions
- ../../../../source/gameengine/Network
- ../../../../source/gameengine/SceneGraph
- ../../../../source/gameengine/Physics/common
- ../../../../source/gameengine/Network/LoopBackNetwork
- ../../../../source/gameengine/GamePlayer/ghost
- ../../../../source/blender/misc
- ../../../../source/blender/blenloader
- ../../../../source/blender/gpu
- ../../../../extern/glew/include
- ${PYTHON_INC}
- ${PNG_INC}
- ${ZLIB_INC}
+ .
+ ../../../../intern/string
+ ../../../../intern/ghost
+ ../../../../intern/guardedalloc
+ ../../../../intern/moto/include
+ ../../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
+ ../../../../source/kernel/gen_system
+ ../../../../source/kernel/gen_messaging
+ ../../../../source/gameengine/Converter
+ ../../../../source/blender/imbuf
+ ../../../../source/gameengine/Ketsji
+ ../../../../source/blender/blenlib
+ ../../../../source/blender/blenkernel
+ ../../../../source/blender
+ ../../../../source/blender/include
+ ../../../../source/blender/makesdna
+ ../../../../source/gameengine/Rasterizer
+ ../../../../source/gameengine/GameLogic
+ ../../../../source/gameengine/Expressions
+ ../../../../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
+ ${PYTHON_INC}
+ ${PNG_INC}
+ ${ZLIB_INC}
)
BLENDERLIB_NOLIST(gp_common "${SRC}" "${INC}")
diff --git a/source/gameengine/GamePlayer/common/GPC_Engine.cpp b/source/gameengine/GamePlayer/common/GPC_Engine.cpp
index 85a362d042a..a46f30c1209 100644
--- a/source/gameengine/GamePlayer/common/GPC_Engine.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_Engine.cpp
@@ -58,6 +58,7 @@
#include "NG_LoopBackNetworkDeviceInterface.h"
#include "RAS_IRenderTools.h"
+#include "SND_DeviceManager.h"
#include "GPC_Engine.h"
#include "GPC_KeyboardDevice.h"
@@ -74,7 +75,8 @@ GPC_Engine::GPC_Engine(char *customLoadingAnimationURL,
m_system(NULL), m_keyboarddev(NULL),
m_mousedev(NULL), m_canvas(NULL), m_rendertools(NULL),
m_portal(NULL), m_sceneconverter(NULL), m_networkdev(NULL),
- m_curarea(NULL), m_customLoadingAnimationURL(NULL),
+ m_audiodevice(NULL), m_curarea(NULL),
+ m_customLoadingAnimationURL(NULL),
m_foregroundColor(foregroundColor), m_backgroundColor(backgroundColor),
m_frameRate(frameRate),
m_BlenderLogo(0), m_Blender3DLogo(0)/*, m_NaNLogo(0)*/
@@ -199,6 +201,7 @@ bool GPC_Engine::StartKetsji(void)
m_keyboarddev,
m_mousedev,
m_networkdev,
+ m_audiodevice,
m_system);
m_system->SetMainLoop(m_portal->m_ketsjieng);
@@ -334,6 +337,12 @@ void GPC_Engine::Exit()
m_networkdev = 0;
}
+ if (m_audiodevice)
+ {
+ SND_DeviceManager::Unsubscribe();
+ m_audiodevice = 0;
+ }
+
m_initialized = false;
}
diff --git a/source/gameengine/GamePlayer/common/GPC_Engine.h b/source/gameengine/GamePlayer/common/GPC_Engine.h
index 42234bcbcd6..b7121599c6e 100644
--- a/source/gameengine/GamePlayer/common/GPC_Engine.h
+++ b/source/gameengine/GamePlayer/common/GPC_Engine.h
@@ -40,6 +40,7 @@ class RAS_IRenderTools;
class KetsjiPortal;
class KX_ISceneConverter;
class NG_LoopBackNetworkDeviceInterface;
+class SND_IAudioDevice;
class GPC_RawImage;
@@ -76,6 +77,8 @@ public:
KX_ISceneConverter* m_sceneconverter;
/** Network interface. */
NG_LoopBackNetworkDeviceInterface* m_networkdev;
+ /** Audiodevice interface */
+ SND_IAudioDevice* m_audiodevice;
struct ScrArea *m_curarea; // for future use, not used yet
diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript
index dd5a48c2b55..1942cde2531 100644
--- a/source/gameengine/GamePlayer/common/SConscript
+++ b/source/gameengine/GamePlayer/common/SConscript
@@ -62,4 +62,10 @@ incs += Split(env['BF_PYTHON_INC'])
incs += Split(env['BF_PNG_INC'])
incs += Split(env['BF_ZLIB_INC'])
-env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype=['player'], priority=[5], cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype='player', priority=5, cxx_compileflags=cxxflags)