diff --git a/CMakeLists.txt b/CMakeLists.txt index da3f64750..4a5b23dd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,6 +166,19 @@ set(OENGINE_GUI ${LIBDIR}/openengine/gui/manager.cpp ) +set(OENGINE_BULLET + ${LIBDIR}/openengine/bullet/btKinematicCharacterController.cpp + ${LIBDIR}/openengine/bullet/btKinematicCharacterController.h + ${LIBDIR}/openengine/bullet/BtOgre.cpp + ${LIBDIR}/openengine/bullet/BtOgreExtras.h + ${LIBDIR}/openengine/bullet/BtOgreGP.h + ${LIBDIR}/openengine/bullet/BtOgrePG.h + ${LIBDIR}/openengine/bullet/CMotionState.cpp + ${LIBDIR}/openengine/bullet/CMotionState.h + ${LIBDIR}/openengine/bullet/physic.cpp + ${LIBDIR}/openengine/bullet/physic.hpp +) + # Sound setup if (USE_AUDIERE) set(MANGLE_SOUND_OUTPUT @@ -206,7 +219,7 @@ set(OENGINE_SOUND ${LIBDIR}/mangle/sound/outputs/openal_out.cpp ${MANGLE_SOUND_OUTPUT} ) -set(OENGINE_ALL ${OENGINE_OGRE} ${OENGINE_GUI} ${OENGINE_SOUND}) +set(OENGINE_ALL ${OENGINE_OGRE} ${OENGINE_GUI} ${OENGINE_SOUND} ${OENGINE_BULLET}) source_group(libs\\openengine FILES ${OENGINE_ALL}) set(OPENMW_LIBS ${MANGLE_ALL} ${OENGINE_ALL}) diff --git a/apps/openmw/mwrender/mwscene.hpp b/apps/openmw/mwrender/mwscene.hpp index 3a49d5e36..3e1470e8d 100644 --- a/apps/openmw/mwrender/mwscene.hpp +++ b/apps/openmw/mwrender/mwscene.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/apps/openmw/mwworld/world.hpp b/apps/openmw/mwworld/world.hpp index 9ae1e9510..becdd7072 100644 --- a/apps/openmw/mwworld/world.hpp +++ b/apps/openmw/mwworld/world.hpp @@ -14,7 +14,7 @@ #include "ptr.hpp" #include "globals.hpp" -#include "openengine\bullet\physic.hpp" +#include namespace Ogre { diff --git a/components/nifbullet/bullet_nif_loader.hpp b/components/nifbullet/bullet_nif_loader.hpp index 64c4db746..cae444314 100644 --- a/components/nifbullet/bullet_nif_loader.hpp +++ b/components/nifbullet/bullet_nif_loader.hpp @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -77,8 +77,8 @@ protected: public: - BulletShape(Ogre::ResourceManager *creator, const Ogre::String &name, - Ogre::ResourceHandle handle, const Ogre::String &group, bool isManual = false, + BulletShape(Ogre::ResourceManager *creator, const Ogre::String &name, + Ogre::ResourceHandle handle, const Ogre::String &group, bool isManual = false, Ogre::ManualResourceLoader *loader = 0); virtual ~BulletShape(); @@ -91,12 +91,12 @@ public: /** * */ -class BulletShapePtr : public Ogre::SharedPtr +class BulletShapePtr : public Ogre::SharedPtr { public: BulletShapePtr() : Ogre::SharedPtr() {} explicit BulletShapePtr(BulletShape *rep) : Ogre::SharedPtr(rep) {} - BulletShapePtr(const BulletShapePtr &r) : Ogre::SharedPtr(r) {} + BulletShapePtr(const BulletShapePtr &r) : Ogre::SharedPtr(r) {} BulletShapePtr(const Ogre::ResourcePtr &r) : Ogre::SharedPtr() { if( r.isNull() ) @@ -136,7 +136,7 @@ public: }; /** -*Hold any BulletShape that was created by the ManualBulletShapeLoader. +*Hold any BulletShape that was created by the ManualBulletShapeLoader. * *To get a bulletShape, you must load it first. *First, create a manualBulletShapeLoader. Then call ManualBulletShapeManager->load(). This create an "empty" resource. @@ -145,7 +145,7 @@ public: *When you use the resource no more, just use BulletShapeManager->unload(). It won't completly delete the resource, but it will *"empty" it.This allow a better management of memory: when you are leaving a cell, just unload every useless shape. * -*Alternatively, you can call BulletShape->load() in order to actually load the resource. +*Alternatively, you can call BulletShape->load() in order to actually load the resource. *When you are finished with it, just call BulletShape->unload(). * *IMO: prefere the first methode, i am not completly sure about the 2nd. @@ -156,10 +156,10 @@ public: class BulletShapeManager : public Ogre::ResourceManager, public Ogre::Singleton { protected: - + // must implement this from ResourceManager's interface - Ogre::Resource *createImpl(const Ogre::String &name, Ogre::ResourceHandle handle, - const Ogre::String &group, bool isManual, Ogre::ManualResourceLoader *loader, + Ogre::Resource *createImpl(const Ogre::String &name, Ogre::ResourceHandle handle, + const Ogre::String &group, bool isManual, Ogre::ManualResourceLoader *loader, const Ogre::NameValuePairList *createParams); public: @@ -200,7 +200,7 @@ public: void loadResource(Ogre::Resource *resource); /** - *This function load a new bulletShape from a NIF file into the BulletShapeManager. + *This function load a new bulletShape from a NIF file into the BulletShapeManager. *When the file is loaded, you can then use BulletShapeManager::getByName() to retrive the bulletShape. *Warning: this function will just crash if the resourceGroup doesn't exist! */ diff --git a/libs/openengine b/libs/openengine index 7185eab18..6c1338821 160000 --- a/libs/openengine +++ b/libs/openengine @@ -1 +1 @@ -Subproject commit 7185eab18c29a0a5e03e44690d6bd8ece7e3792b +Subproject commit 6c1338821e6bf640a0d54f36effc943aa4d86c6a