From 926bbe6b3dfb094e8b19f7ed15875889927a4414 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 13 Aug 2013 22:10:31 +0200 Subject: [PATCH] [DEV] game engine start to work --- ege/ElementGame.cpp | 1 + ege/ElementGame.h | 11 +++++++++++ ege/Scene.cpp | 38 -------------------------------------- ege/Scene.h | 3 ++- ege/debug.cpp | 5 ++++- lutin_ege.py | 3 ++- 6 files changed, 20 insertions(+), 41 deletions(-) diff --git a/ege/ElementGame.cpp b/ege/ElementGame.cpp index 64e04cf..fa4b6a9 100644 --- a/ege/ElementGame.cpp +++ b/ege/ElementGame.cpp @@ -42,6 +42,7 @@ ege::ElementGame::ElementGame(ege::Environement& _env) : m_lifeMax(100), m_group(0), m_fixe(true), + m_radius(0), m_elementInPhysicsSystem(false) { static uint32_t unique=0; diff --git a/ege/ElementGame.h b/ege/ElementGame.h index 48cee51..4a500a9 100644 --- a/ege/ElementGame.h +++ b/ege/ElementGame.h @@ -188,6 +188,17 @@ namespace ege * @return true : The element is fixed. */ inline bool IsFixed(void) { return m_fixe; }; + protected: + float m_radius; //!< Radius of the element (all element have a radius, if ==0 ==> then ghost ... + public: + /** + * @brief Get the current space needed by the element in the workspace + * @return The dimention needed. + */ + inline float GetRadius(void) + { + return m_radius; + }; protected: bool m_elementInPhysicsSystem; public: diff --git a/ege/Scene.cpp b/ege/Scene.cpp index 95a3767..efda31f 100644 --- a/ege/Scene.cpp +++ b/ege/Scene.cpp @@ -78,46 +78,8 @@ ege::Scene::Scene(void) : m_dynamicsWorld->setGravity(btVector3(0,0,0)); m_env.SetDynamicWorld(m_dynamicsWorld); - // Add debug display : - ege::ElementGame* tmpElement = NULL; - // SET THE STATION .. m_camera.SetEye(vec3(0,0,0)); - /* - tmpElement = appl::env::GetCreatorList().CreateElement("Station", "(0,0,0)"); - if (NULL != tmpElement) { - appl::env::AddElementGame(tmpElement); - tmpElement = NULL; - } - // for the debug : - for (int32_t iii=0; iii m_displayElementOrdered; + public: /** * @brief Set the scene in pause for a while */ @@ -124,7 +125,7 @@ namespace ege { protected: // Derived function virtual void OnDraw(void); public: // Derived function - virtual const char * const GetObjectType(void) { return "appl::Game"; }; + virtual const char * const GetObjectType(void) { return "ege::Scene"; }; virtual void SystemDraw(const ewol::DrawProperty& _displayProp); virtual void OnRegenerateDisplay(void); virtual void PeriodicCall(const ewol::EventTime& _event); diff --git a/ege/debug.cpp b/ege/debug.cpp index 874c4ae..d611944 100644 --- a/ege/debug.cpp +++ b/ege/debug.cpp @@ -8,4 +8,7 @@ #include -const char * egamiLibName = "ege "; \ No newline at end of file +const char * egeLibName = "ege "; + + + diff --git a/lutin_ege.py b/lutin_ege.py index 69fec85..84fe0ff 100644 --- a/lutin_ege.py +++ b/lutin_ege.py @@ -8,6 +8,7 @@ def Create(target): # add the file to compile: myModule.AddSrcFile([ + 'ege/debug.cpp', 'ege/AudioElement.cpp', 'ege/AudioEngine.cpp', 'ege/Camera.cpp', @@ -20,7 +21,7 @@ def Create(target): ]) # name of the dependency - myModule.AddModuleDepend(['etk', 'ewol', 'bullet']) + myModule.AddModuleDepend(['ewol', 'bullet']) myModule.CompileFlags_CC([ '-Wno-write-strings',