From cc9f514fb31e8400ee9d5d2b244ce2cafdbdacae Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 9 Oct 2013 22:53:35 +0200 Subject: [PATCH] [DEV] start coding style --- ege/CollisionShapeCreator.cpp | 4 ++-- ege/CollisionShapeCreator.h | 2 +- ege/ElementGame.cpp | 14 +++++++------- ege/ElementGame.h | 14 +++++++------- ege/Environement.cpp | 24 ++++++++++++------------ ege/Environement.h | 10 +++++----- ege/Scene.cpp | 4 ++-- ege/Scene.h | 2 +- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/ege/CollisionShapeCreator.cpp b/ege/CollisionShapeCreator.cpp index 11dac89..d64b429 100644 --- a/ege/CollisionShapeCreator.cpp +++ b/ege/CollisionShapeCreator.cpp @@ -25,9 +25,9 @@ // http://bulletphysics.org/mediawiki-1.5.8/index.php/Collision_Shapes #undef __class__ -#define __class__ "CollisionShapeCreator" +#define __class__ "CollisionShapeCreator" -btCollisionShape* ege::collision::CreateShape(const ewol::Mesh* _mesh) +btCollisionShape* ege::collision::createShape(const ewol::Mesh* _mesh) { if (NULL == _mesh) { return new btEmptyShape();; diff --git a/ege/CollisionShapeCreator.h b/ege/CollisionShapeCreator.h index eb68683..3532c7b 100644 --- a/ege/CollisionShapeCreator.h +++ b/ege/CollisionShapeCreator.h @@ -16,7 +16,7 @@ namespace ege { namespace collision { - btCollisionShape* CreateShape(const ewol::Mesh* _mesh); + btCollisionShape* createShape(const ewol::Mesh* _mesh); }; }; #endif diff --git a/ege/ElementGame.cpp b/ege/ElementGame.cpp index bcc929c..ecb896d 100644 --- a/ege/ElementGame.cpp +++ b/ege/ElementGame.cpp @@ -60,9 +60,9 @@ ege::ElementGame::ElementGame(ege::Environement& _env) : ege::ElementGame::~ElementGame(void) { // in every case remove IA - IADisable(); + iaDisable(); // same ... - DynamicDisable(); + dynamicDisable(); removeShape(); ewol::Mesh::release(m_mesh); if (NULL != m_body) { @@ -127,7 +127,7 @@ bool ege::ElementGame::setMesh(ewol::Mesh* _mesh) m_shape = static_cast(m_mesh->getShape()); return true; } - m_mesh->setShape(ege::collision::CreateShape(m_mesh)); + m_mesh->setShape(ege::collision::createShape(m_mesh)); m_mesh->setFreeShapeFunction(&FunctionFreeShape); m_shape = static_cast(m_mesh->getShape()); return true; @@ -503,7 +503,7 @@ void ege::ElementGame::draw(int32_t _pass) } } -void ege::ElementGame::DynamicEnable(void) +void ege::ElementGame::dynamicEnable(void) { if (true == m_elementInPhysicsSystem) { return; @@ -517,7 +517,7 @@ void ege::ElementGame::DynamicEnable(void) m_elementInPhysicsSystem = true; } -void ege::ElementGame::DynamicDisable(void) +void ege::ElementGame::dynamicDisable(void) { if (false == m_elementInPhysicsSystem) { return; @@ -533,7 +533,7 @@ void ege::ElementGame::DynamicDisable(void) m_elementInPhysicsSystem = false; } -void ege::ElementGame::IAEnable(void) +void ege::ElementGame::iaEnable(void) { if (NULL != m_IA) { // IA already started ... @@ -549,7 +549,7 @@ void ege::ElementGame::IAEnable(void) } } -void ege::ElementGame::IADisable(void) +void ege::ElementGame::iaDisable(void) { if (NULL == m_IA) { // IA already stopped ... diff --git a/ege/ElementGame.h b/ege/ElementGame.h index abdc35b..23d8b1b 100644 --- a/ege/ElementGame.h +++ b/ege/ElementGame.h @@ -60,7 +60,7 @@ namespace ege * @return true, the element is corectly initialized. */ virtual bool init(property_te _property, void* _value) { return false; }; - virtual bool UnInit(void) { return true; }; + virtual bool unInit(void) { return true; }; private: uint32_t m_uID; //!< This is a reference on a basic element ID public: @@ -244,11 +244,11 @@ namespace ege /** * @brief set the elment in the physique engine */ - void DynamicEnable(void); + void dynamicEnable(void); /** * @brief remove this element from the physique engine */ - void DynamicDisable(void); + void dynamicDisable(void); private: class localIA : public btActionInterface { @@ -269,7 +269,7 @@ namespace ege // herited function void updateAction(btCollisionWorld* collisionWorld, btScalar step) { - m_element.IAAction(step); + m_element.iaAction(step); } }; localIA* m_IA; @@ -277,16 +277,16 @@ namespace ege /** * @brief enable periodic call Of this object for processing Artificial Intelligence */ - void IAEnable(void); + void iaEnable(void); /** * @brief disable periodic call Of this object for processing Artificial Intelligence */ - void IADisable(void); + void iaDisable(void); /** * @brief periodic call for intelligence artificial. * @param[in] step : step of time in s */ - virtual void IAAction(float _step) { }; + virtual void iaAction(float _step) { }; /** * @brief, call when the element is removed (call only one time */ diff --git a/ege/Environement.cpp b/ege/Environement.cpp index d89be27..b90d9ab 100644 --- a/ege/Environement.cpp +++ b/ege/Environement.cpp @@ -134,7 +134,7 @@ void ege::Environement::addCreator(const etk::UString& _type, ege::createElement getHachTableCreating().add(_type, _creator); } -ege::ElementGame* ege::Environement::CreateElement(const etk::UString& _type, bool _autoAddElement, ege::property_te _property, void* _value) +ege::ElementGame* ege::Environement::createElement(const etk::UString& _type, bool _autoAddElement, ege::property_te _property, void* _value) { if (false == getHachTableCreating().exist(_type)) { EGE_ERROR("Request creating of an type that is not known '" << _type << "'"); @@ -162,19 +162,19 @@ ege::ElementGame* ege::Environement::CreateElement(const etk::UString& _type, bo return tmpElement; } -ege::ElementGame* ege::Environement::CreateElement(const etk::UString& _type, etk::UString& _description, bool _autoAddElement) +ege::ElementGame* ege::Environement::createElement(const etk::UString& _type, etk::UString& _description, bool _autoAddElement) { - return CreateElement(_type, _autoAddElement, ege::typeString, static_cast(&_description)); + return createElement(_type, _autoAddElement, ege::typeString, static_cast(&_description)); } -ege::ElementGame* ege::Environement::CreateElement(const etk::UString& _type, ejson::Value* _value, bool _autoAddElement) +ege::ElementGame* ege::Environement::createElement(const etk::UString& _type, ejson::Value* _value, bool _autoAddElement) { - return CreateElement(_type, _autoAddElement, ege::typeJson, static_cast(_value)); + return createElement(_type, _autoAddElement, ege::typeJson, static_cast(_value)); } -ege::ElementGame* ege::Environement::CreateElement(const etk::UString& _type, exml::Node* _node, bool _autoAddElement) +ege::ElementGame* ege::Environement::createElement(const etk::UString& _type, exml::Node* _node, bool _autoAddElement) { - return CreateElement(_type, _autoAddElement, ege::typeXml, static_cast(_node)); + return createElement(_type, _autoAddElement, ege::typeXml, static_cast(_node)); } @@ -187,15 +187,15 @@ void ege::Environement::addElementGame(ege::ElementGame* _newElement) for (int32_t iii=0; iiiDynamicEnable(); + m_listElementGame[iii]->dynamicEnable(); return; } } m_listElementGame.pushBack(_newElement); - _newElement->DynamicEnable(); + _newElement->dynamicEnable(); } -void ege::Environement::RmElementGame(ege::ElementGame* _removeElement) +void ege::Environement::rmElementGame(ege::ElementGame* _removeElement) { if (NULL == _removeElement) { return; @@ -210,8 +210,8 @@ void ege::Environement::RmElementGame(ege::ElementGame* _removeElement) for (int32_t iii=0; iiionDestroy(); - m_listElementGame[iii]->DynamicDisable(); - m_listElementGame[iii]->UnInit(); + m_listElementGame[iii]->dynamicDisable(); + m_listElementGame[iii]->unInit(); delete(m_listElementGame[iii]); m_listElementGame[iii] = NULL; } diff --git a/ege/Environement.h b/ege/Environement.h index 2c0940b..205fc76 100644 --- a/ege/Environement.h +++ b/ege/Environement.h @@ -90,10 +90,10 @@ namespace ege { * @return NULL if an error occured OR the pointer on the element and it is already added on the system. * @note Pointer is return in case of setting properties on it... */ - ege::ElementGame* CreateElement(const etk::UString& _type, bool _autoAddElement=true, ege::property_te _property=ege::typeNone, void* _value=NULL); - ege::ElementGame* CreateElement(const etk::UString& _type, etk::UString& _description, bool _autoAddElement=true); - ege::ElementGame* CreateElement(const etk::UString& _type, ejson::Value* _value, bool _autoAddElement=true); - ege::ElementGame* CreateElement(const etk::UString& _type, exml::Node* _node, bool _autoAddElement=true); + ege::ElementGame* createElement(const etk::UString& _type, bool _autoAddElement=true, ege::property_te _property=ege::typeNone, void* _value=NULL); + ege::ElementGame* createElement(const etk::UString& _type, etk::UString& _description, bool _autoAddElement=true); + ege::ElementGame* createElement(const etk::UString& _type, ejson::Value* _value, bool _autoAddElement=true); + ege::ElementGame* createElement(const etk::UString& _type, exml::Node* _node, bool _autoAddElement=true); public: class ResultNearestElement { @@ -135,7 +135,7 @@ namespace ege { * @brief remove an element on the list availlable. * @param[in] _removeElement Element to remove. */ - void RmElementGame(ege::ElementGame* _removeElement); + void rmElementGame(ege::ElementGame* _removeElement); /** * @brief get the element order from the nearest to the farest, and remove all element that are not in the camera angle and axes. * @param[in,out] _resultList List of the element ordered. diff --git a/ege/Scene.cpp b/ege/Scene.cpp index 55e097a..b217006 100644 --- a/ege/Scene.cpp +++ b/ege/Scene.cpp @@ -297,7 +297,7 @@ void ege::Scene::periodicCall(const ewol::EventTime& _event) victoryPoint++; } EGE_DEBUG("[" << elementList[iii]->getUID() << "] element Removing ... " << elementList[iii]->getType()); - m_env.RmElementGame(elementList[iii]); + m_env.rmElementGame(elementList[iii]); } } } @@ -314,7 +314,7 @@ void ege::Scene::periodicCall(const ewol::EventTime& _event) //#define SCENE_BRUT_PERFO_TEST -void ege::Scene::systemDraw(const ewol::drawProperty& _displayProp) +void ege::Scene::systemDraw(const ewol::DrawProperty& _displayProp) { #ifdef SCENE_BRUT_PERFO_TEST int64_t tmp___startTime0 = ewol::getTime(); diff --git a/ege/Scene.h b/ege/Scene.h index b78dc91..ea8ff9c 100644 --- a/ege/Scene.h +++ b/ege/Scene.h @@ -124,7 +124,7 @@ namespace ege { virtual void onDraw(void); public: // Derived function virtual const char * const getObjectType(void) { return "ege::Scene"; }; - virtual void systemDraw(const ewol::drawProperty& _displayProp); + virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void onRegenerateDisplay(void); virtual void periodicCall(const ewol::EventTime& _event); };