[DEV] start coding style

This commit is contained in:
Edouard DUPIN 2013-10-09 22:53:35 +02:00
parent 319b4552d1
commit cc9f514fb3
8 changed files with 37 additions and 37 deletions

View File

@ -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();;

View File

@ -16,7 +16,7 @@
namespace ege {
namespace collision {
btCollisionShape* CreateShape(const ewol::Mesh* _mesh);
btCollisionShape* createShape(const ewol::Mesh* _mesh);
};
};
#endif

View File

@ -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<btCollisionShape*>(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<btCollisionShape*>(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 ...

View File

@ -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
*/

View File

@ -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<void*>(&_description));
return createElement(_type, _autoAddElement, ege::typeString, static_cast<void*>(&_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<void*>(_value));
return createElement(_type, _autoAddElement, ege::typeJson, static_cast<void*>(_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<void*>(_node));
return createElement(_type, _autoAddElement, ege::typeXml, static_cast<void*>(_node));
}
@ -187,15 +187,15 @@ void ege::Environement::addElementGame(ege::ElementGame* _newElement)
for (int32_t iii=0; iii<m_listElementGame.size() ; iii++) {
if (NULL == m_listElementGame[iii]) {
m_listElementGame[iii] = _newElement;
m_listElementGame[iii]->DynamicEnable();
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; iii<m_listElementGame.size() ; iii++) {
if (_removeElement == m_listElementGame[iii]) {
m_listElementGame[iii]->onDestroy();
m_listElementGame[iii]->DynamicDisable();
m_listElementGame[iii]->UnInit();
m_listElementGame[iii]->dynamicDisable();
m_listElementGame[iii]->unInit();
delete(m_listElementGame[iii]);
m_listElementGame[iii] = NULL;
}

View File

@ -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.

View File

@ -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();

View File

@ -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);
};