diff --git a/src/input/input.h b/src/input/input.h index dae79569..71d88a30 100644 --- a/src/input/input.h +++ b/src/input/input.h @@ -380,8 +380,14 @@ private: void UpdateActionStatus(float seconds); protected: + virtual char const * GetName() + { + return ""; + } virtual void TickGame(float seconds) { + Entity::TickGame(seconds); + UpdateActionStatus(seconds); } diff --git a/test/BtPhysTest.vcxproj b/test/BtPhysTest.vcxproj index 59704e61..468afa48 100644 --- a/test/BtPhysTest.vcxproj +++ b/test/BtPhysTest.vcxproj @@ -37,6 +37,7 @@ + @@ -45,6 +46,7 @@ + @@ -54,6 +56,11 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} + + + true + + {ee203b88-44cf-4859-9d42-7a1f43fecb52} Application diff --git a/test/BtPhysTest.vcxproj.filters b/test/BtPhysTest.vcxproj.filters index 741a463a..baa318a3 100644 --- a/test/BtPhysTest.vcxproj.filters +++ b/test/BtPhysTest.vcxproj.filters @@ -18,6 +18,9 @@ Physics\Include + + Physics\Include + @@ -30,6 +33,9 @@ Physics\Src + + Physics\Src + @@ -45,4 +51,7 @@ {7e5d19e0-b2be-46cc-8fa4-f582ecb4318d} + + + \ No newline at end of file diff --git a/test/Makefile.am b/test/Makefile.am index 81ca88a8..26d7cd6e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -50,7 +50,9 @@ btphystest_SOURCES = BtPhysTest.cpp BtPhysTest.h \ Physics/Src/EasyPhysics.cpp Physics/Include/EasyPhysics.h \ Physics/Include/LolBtPhysicsIntegration.h Physics/Include/LolPhysics.h \ Physics/Src/EasyCharacterController.cpp Physics/Src/EasyConstraint.cpp \ + Physics/Src/BulletCharacterController.cpp \ Physics/Include/EasyCharacterController.h Physics/Include/EasyConstraint.h + Physics/Src/BulletCharacterController.h \ btphystest_CPPFLAGS = @LOL_CFLAGS@ @PIPI_CFLAGS@ -I$(top_builddir)/src/bullet \ -DHAVE_PHYS_USE_BULLET btphystest_LDFLAGS = $(top_builddir)/src/liblol.a @LOL_LIBS@ @PIPI_LIBS@ diff --git a/test/Physics/Include/BulletCharacterController.h b/test/Physics/Include/BulletCharacterController.h new file mode 100644 index 00000000..c03d5a03 --- /dev/null +++ b/test/Physics/Include/BulletCharacterController.h @@ -0,0 +1,37 @@ +// +// Lol Engine +// +// Copyright: (c) 2010-2012 Sam Hocevar +// (c) 2009-2012 Benjamin Huet +// This program is free software; you can redistribute it and/or +// modify it under the terms of the Do What The Fuck You Want To +// Public License, Version 2, as published by Sam Hocevar. See +// http://sam.zoy.org/projects/COPYING.WTFPL for more details. +// + +// +// The BulletCharacterController class +// ------------------ +// This class is a equivalent of btKinematicCharacterController, but more useful for Lol. +// + +#if !defined __BULLETCHARACTERCONTROLLER_BULLETCHARACTERCONTROLLER_H__ +#define __BULLETCHARACTERCONTROLLER_BULLETCHARACTERCONTROLLER_H__ + +#ifdef HAVE_PHYS_USE_BULLET +#include "core.h" +#include "EasyPhysics.h" +#endif + +namespace lol +{ + + namespace phys + { + + } /* namespace phys */ + +} /* namespace lol */ + +#endif /* __BULLETCHARACTERCONTROLLER_BULLETCHARACTERCONTROLLER_H__ */ + diff --git a/test/Physics/Include/EasyCharacterController.h b/test/Physics/Include/EasyCharacterController.h index 6a8c6129..e0806577 100644 --- a/test/Physics/Include/EasyCharacterController.h +++ b/test/Physics/Include/EasyCharacterController.h @@ -73,6 +73,7 @@ public: virtual void SetTransform(const lol::vec3& base_location, const lol::quat& base_rotation); protected: virtual void BaseTransformChanged(const lol::mat4& PreviousMatrix, const lol::mat4& NewMatrix); + virtual char const *GetName(); public: virtual void TickGame(float seconds); diff --git a/test/Physics/Src/BulletCharacterController.cpp b/test/Physics/Src/BulletCharacterController.cpp new file mode 100644 index 00000000..0f3b3162 --- /dev/null +++ b/test/Physics/Src/BulletCharacterController.cpp @@ -0,0 +1,33 @@ +// +// Lol Engine +// +// Copyright: (c) 2010-2012 Sam Hocevar +// (c) 2009-2012 Cédric Lecacheur +// (c) 2009-2012 Benjamin Huet +// This program is free software; you can redistribute it and/or +// modify it under the terms of the Do What The Fuck You Want To +// Public License, Version 2, as published by Sam Hocevar. See +// http://sam.zoy.org/projects/COPYING.WTFPL for more details. +// + +#if defined HAVE_CONFIG_H +# include "config.h" +#endif + +#include "../Include/LolBtPhysicsIntegration.h" +#include "../Include/LolPhysics.h" +#include "../Include/EasyCharacterController.h" + +namespace lol +{ + + namespace phys + { + +#ifdef HAVE_PHYS_USE_BULLET + +#endif // HAVE_PHYS_USE_BULLET + + } /* namespace phys */ + +} /* namespace lol */ diff --git a/test/Physics/Src/EasyCharacterController.cpp b/test/Physics/Src/EasyCharacterController.cpp index 7f31ddae..a3c2ffba 100644 --- a/test/Physics/Src/EasyCharacterController.cpp +++ b/test/Physics/Src/EasyCharacterController.cpp @@ -125,6 +125,12 @@ void EasyCharacterController::BaseTransformChanged(const lol::mat4& PreviousMatr m_base_is_updating = false; } +//--- +char const *EasyCharacterController::GetName() +{ + return ""; +} + //Physic Tick void EasyCharacterController::TickGame(float seconds) {