[DEV] add extra compilation flags & correct warning
This commit is contained in:
parent
803ae2fc3b
commit
b616a99bfa
@ -36,7 +36,7 @@ btCollisionShape* ege::collision::createShape(const ewol::Mesh* _mesh) {
|
|||||||
return new btEmptyShape();;
|
return new btEmptyShape();;
|
||||||
}
|
}
|
||||||
int32_t count = 0;
|
int32_t count = 0;
|
||||||
for (int32_t iii=0; iii<physiqueProperty.size(); iii++) {
|
for (size_t iii=0; iii<physiqueProperty.size(); iii++) {
|
||||||
if (NULL == physiqueProperty[iii]) {
|
if (NULL == physiqueProperty[iii]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ btCollisionShape* ege::collision::createShape(const ewol::Mesh* _mesh) {
|
|||||||
if (count>1) {
|
if (count>1) {
|
||||||
outputShape = new btCompoundShape();
|
outputShape = new btCompoundShape();
|
||||||
}
|
}
|
||||||
for (int32_t iii=0; iii<physiqueProperty.size(); iii++) {
|
for (size_t iii=0; iii<physiqueProperty.size(); iii++) {
|
||||||
if (NULL == physiqueProperty[iii]) {
|
if (NULL == physiqueProperty[iii]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ ege::ElementGame* ege::Environement::getElementNearest(ege::ElementGame* _source
|
|||||||
}
|
}
|
||||||
vec3 sourcePosition = _sourceRequest->getPosition();
|
vec3 sourcePosition = _sourceRequest->getPosition();
|
||||||
ege::ElementGame* result = NULL;
|
ege::ElementGame* result = NULL;
|
||||||
for (int32_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
for (size_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
||||||
// chack NULL pointer
|
// chack NULL pointer
|
||||||
if (NULL == m_listElementGame[iii]) {
|
if (NULL == m_listElementGame[iii]) {
|
||||||
continue;
|
continue;
|
||||||
@ -53,7 +53,7 @@ void ege::Environement::getElementNearest(const vec3& _sourcePosition,
|
|||||||
ege::Environement::ResultNearestElement result;
|
ege::Environement::ResultNearestElement result;
|
||||||
result.dist = 99999999999.0f;
|
result.dist = 99999999999.0f;
|
||||||
result.element = NULL;
|
result.element = NULL;
|
||||||
for (int32_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
for (size_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
||||||
// chack NULL pointer
|
// chack NULL pointer
|
||||||
result.element = m_listElementGame[iii];
|
result.element = m_listElementGame[iii];
|
||||||
if (NULL == result.element) {
|
if (NULL == result.element) {
|
||||||
@ -79,7 +79,7 @@ void ege::Environement::getElementNearestFixed(const vec3& _sourcePosition,
|
|||||||
ege::Environement::ResultNearestElement result;
|
ege::Environement::ResultNearestElement result;
|
||||||
result.dist = 99999999999.0f;
|
result.dist = 99999999999.0f;
|
||||||
result.element = NULL;
|
result.element = NULL;
|
||||||
for (int32_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
for (size_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
||||||
// chack NULL pointer
|
// chack NULL pointer
|
||||||
result.element = m_listElementGame[iii];
|
result.element = m_listElementGame[iii];
|
||||||
if (NULL == result.element) {
|
if (NULL == result.element) {
|
||||||
@ -96,7 +96,7 @@ void ege::Environement::getElementNearestFixed(const vec3& _sourcePosition,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// try to add the element at the best positions:
|
// try to add the element at the best positions:
|
||||||
int32_t jjj;
|
size_t jjj;
|
||||||
for (jjj=0; jjj<_resultList.size(); jjj++) {
|
for (jjj=0; jjj<_resultList.size(); jjj++) {
|
||||||
if (_resultList[jjj].dist>result.dist) {
|
if (_resultList[jjj].dist>result.dist) {
|
||||||
_resultList.insert(_resultList.begin()+jjj, result);
|
_resultList.insert(_resultList.begin()+jjj, result);
|
||||||
@ -172,7 +172,7 @@ void ege::Environement::addElementGame(ege::ElementGame* _newElement) {
|
|||||||
if (NULL == _newElement) {
|
if (NULL == _newElement) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int32_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
for (size_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
||||||
if (NULL == m_listElementGame[iii]) {
|
if (NULL == m_listElementGame[iii]) {
|
||||||
m_listElementGame[iii] = _newElement;
|
m_listElementGame[iii] = _newElement;
|
||||||
m_listElementGame[iii]->dynamicEnable();
|
m_listElementGame[iii]->dynamicEnable();
|
||||||
@ -188,13 +188,13 @@ void ege::Environement::rmElementGame(ege::ElementGame* _removeElement) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// inform the element that an element has been removed == > this permit to keep pointer on elements ...
|
// inform the element that an element has been removed == > this permit to keep pointer on elements ...
|
||||||
for (int32_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
for (size_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
||||||
if (NULL != m_listElementGame[iii]) {
|
if (NULL != m_listElementGame[iii]) {
|
||||||
m_listElementGame[iii]->elementIsRemoved(_removeElement);
|
m_listElementGame[iii]->elementIsRemoved(_removeElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ream remove on the element :
|
// ream remove on the element :
|
||||||
for (int32_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
for (size_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
||||||
if (_removeElement == m_listElementGame[iii]) {
|
if (_removeElement == m_listElementGame[iii]) {
|
||||||
m_listElementGame[iii]->onDestroy();
|
m_listElementGame[iii]->onDestroy();
|
||||||
m_listElementGame[iii]->dynamicDisable();
|
m_listElementGame[iii]->dynamicDisable();
|
||||||
@ -216,7 +216,7 @@ void ege::Environement::getOrderedElementForDisplay(std::vector<ege::Environemen
|
|||||||
result.dist = 99999999999.0f;
|
result.dist = 99999999999.0f;
|
||||||
result.element = NULL;
|
result.element = NULL;
|
||||||
// for all element in the game we chek if it is needed to display it ...
|
// for all element in the game we chek if it is needed to display it ...
|
||||||
for (int32_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
for (size_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
||||||
// chack NULL pointer
|
// chack NULL pointer
|
||||||
if (NULL == m_listElementGame[iii]) {
|
if (NULL == m_listElementGame[iii]) {
|
||||||
// no pointer null are set in the output list ...
|
// no pointer null are set in the output list ...
|
||||||
@ -238,7 +238,7 @@ void ege::Environement::getOrderedElementForDisplay(std::vector<ege::Environemen
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// try to add the element at the best positions:
|
// try to add the element at the best positions:
|
||||||
int32_t jjj;
|
size_t jjj;
|
||||||
for (jjj=0; jjj<_resultList.size(); jjj++) {
|
for (jjj=0; jjj<_resultList.size(); jjj++) {
|
||||||
if (_resultList[jjj].dist>result.dist) {
|
if (_resultList[jjj].dist>result.dist) {
|
||||||
_resultList.insert(_resultList.begin()+jjj, result);
|
_resultList.insert(_resultList.begin()+jjj, result);
|
||||||
@ -255,7 +255,7 @@ void ege::Environement::getOrderedElementForDisplay(std::vector<ege::Environemen
|
|||||||
|
|
||||||
void ege::Environement::generateInteraction(ege::ElementInteraction& _event) {
|
void ege::Environement::generateInteraction(ege::ElementInteraction& _event) {
|
||||||
// inform the element that an element has been removed == > this permit to keep pointer on elements ...
|
// inform the element that an element has been removed == > this permit to keep pointer on elements ...
|
||||||
for (int32_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
for (size_t iii=0; iii<m_listElementGame.size() ; iii++) {
|
||||||
if (NULL == m_listElementGame[iii]) {
|
if (NULL == m_listElementGame[iii]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ void ege::ParticuleEngine::add(Particule* _particule) {
|
|||||||
EGE_ERROR("Try to add particule NULL");
|
EGE_ERROR("Try to add particule NULL");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (esize_t iii=0; iii<m_particuleList.size(); ++iii) {
|
for (size_t iii=0; iii<m_particuleList.size(); ++iii) {
|
||||||
if (m_particuleList[iii] != NULL) {
|
if (m_particuleList[iii] != NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@ void ege::ParticuleEngine::addRemoved(Particule* _particule) {
|
|||||||
if (_particule == NULL) {
|
if (_particule == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (esize_t iii=0; iii<m_particuleRemoved.size(); ++iii) {
|
for (size_t iii=0; iii<m_particuleRemoved.size(); ++iii) {
|
||||||
if (m_particuleRemoved[iii] != NULL) {
|
if (m_particuleRemoved[iii] != NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ ege::Particule* ege::ParticuleEngine::respown(const char* _particuleType) {
|
|||||||
if (_particuleType == NULL) {
|
if (_particuleType == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
for (esize_t iii=0; iii<m_particuleRemoved.size(); ++iii) {
|
for (size_t iii=0; iii<m_particuleRemoved.size(); ++iii) {
|
||||||
if (m_particuleRemoved[iii] == NULL) {
|
if (m_particuleRemoved[iii] == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -75,14 +75,14 @@ void ege::ParticuleEngine::update(float _deltaTime) {
|
|||||||
if (_deltaTime>(1.0f/60.0f)) {
|
if (_deltaTime>(1.0f/60.0f)) {
|
||||||
_deltaTime = (1.0f/60.0f);
|
_deltaTime = (1.0f/60.0f);
|
||||||
}
|
}
|
||||||
for (esize_t iii=0; iii<m_particuleList.size(); ++iii) {
|
for (size_t iii=0; iii<m_particuleList.size(); ++iii) {
|
||||||
if (m_particuleList[iii] == NULL) {
|
if (m_particuleList[iii] == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
m_particuleList[iii]->update(_deltaTime);
|
m_particuleList[iii]->update(_deltaTime);
|
||||||
}
|
}
|
||||||
// check removing elements
|
// check removing elements
|
||||||
for (esize_t iii=0; iii<m_particuleList.size(); ++iii) {
|
for (size_t iii=0; iii<m_particuleList.size(); ++iii) {
|
||||||
if (m_particuleList[iii] == NULL) {
|
if (m_particuleList[iii] == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ void ege::ParticuleEngine::update(float _deltaTime) {
|
|||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
int32_t nbParticule = 0;
|
int32_t nbParticule = 0;
|
||||||
for (esize_t iii=0; iii<m_particuleList.size(); ++iii) {
|
for (int32_t iii=0; iii<m_particuleList.size(); ++iii) {
|
||||||
if (m_particuleList[iii] == NULL) {
|
if (m_particuleList[iii] == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ void ege::ParticuleEngine::update(float _deltaTime) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ege::ParticuleEngine::draw(const ege::Camera& _camera) {
|
void ege::ParticuleEngine::draw(const ege::Camera& _camera) {
|
||||||
for (esize_t iii=0; iii<m_particuleList.size(); ++iii) {
|
for (size_t iii=0; iii<m_particuleList.size(); ++iii) {
|
||||||
if (m_particuleList[iii] == NULL) {
|
if (m_particuleList[iii] == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -120,7 +120,7 @@ void ege::ParticuleEngine::draw(const ege::Camera& _camera) {
|
|||||||
|
|
||||||
void ege::ParticuleEngine::clear(void) {
|
void ege::ParticuleEngine::clear(void) {
|
||||||
// clear element not removed
|
// clear element not removed
|
||||||
for (esize_t iii=0; iii<m_particuleList.size(); ++iii) {
|
for (size_t iii=0; iii<m_particuleList.size(); ++iii) {
|
||||||
if (m_particuleList[iii] == NULL) {
|
if (m_particuleList[iii] == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ void ege::ParticuleEngine::clear(void) {
|
|||||||
}
|
}
|
||||||
m_particuleList.clear();
|
m_particuleList.clear();
|
||||||
// clear element that are auto-removed
|
// clear element that are auto-removed
|
||||||
for (esize_t iii=0; iii<m_particuleRemoved.size(); ++iii) {
|
for (size_t iii=0; iii<m_particuleRemoved.size(); ++iii) {
|
||||||
if (m_particuleRemoved[iii] == NULL) {
|
if (m_particuleRemoved[iii] == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ void ege::Scene::onDraw(void) {
|
|||||||
//EGE_DEBUG("DRAW : " << m_displayElementOrdered.size() << " elements");
|
//EGE_DEBUG("DRAW : " << m_displayElementOrdered.size() << " elements");
|
||||||
|
|
||||||
// TODO : remove this == > no more needed ==> checked in the generate the list of the element ordered
|
// TODO : remove this == > no more needed ==> checked in the generate the list of the element ordered
|
||||||
for (int32_t iii=0; iii<m_displayElementOrdered.size(); iii++) {
|
for (size_t iii=0; iii<m_displayElementOrdered.size(); iii++) {
|
||||||
m_displayElementOrdered[iii].element->preCalculationDraw(*m_camera);
|
m_displayElementOrdered[iii].element->preCalculationDraw(*m_camera);
|
||||||
}
|
}
|
||||||
// note : the first pass is done at the reverse way to prevent multiple display od the same point in the screen
|
// note : the first pass is done at the reverse way to prevent multiple display od the same point in the screen
|
||||||
@ -200,16 +200,16 @@ void ege::Scene::onDraw(void) {
|
|||||||
}
|
}
|
||||||
// for the other pass the user can draw transparent elements ...
|
// for the other pass the user can draw transparent elements ...
|
||||||
for (int32_t pass=1; pass <= NUMBER_OF_SUB_PASS+1; pass++) {
|
for (int32_t pass=1; pass <= NUMBER_OF_SUB_PASS+1; pass++) {
|
||||||
for (int32_t iii=0; iii<m_displayElementOrdered.size(); iii++) {
|
for (size_t iii=0; iii<m_displayElementOrdered.size(); iii++) {
|
||||||
m_displayElementOrdered[iii].element->draw(pass);
|
m_displayElementOrdered[iii].element->draw(pass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int32_t iii=0; iii<m_displayElementOrdered.size(); iii++) {
|
for (size_t iii=0; iii<m_displayElementOrdered.size(); iii++) {
|
||||||
m_displayElementOrdered[iii].element->drawLife(m_debugDrawing, *m_camera);
|
m_displayElementOrdered[iii].element->drawLife(m_debugDrawing, *m_camera);
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (true == m_debugMode) {
|
if (true == m_debugMode) {
|
||||||
for (int32_t iii=0; iii<m_displayElementOrdered.size(); iii++) {
|
for (size_t iii=0; iii<m_displayElementOrdered.size(); iii++) {
|
||||||
m_displayElementOrdered[iii].element->drawDebug(m_debugDrawing, *m_camera);
|
m_displayElementOrdered[iii].element->drawDebug(m_debugDrawing, *m_camera);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ void ege::resource::ParticuleMesh::draw(mat4& _positionMatrix,
|
|||||||
int32_t nbElementDrawTheoric = 0;
|
int32_t nbElementDrawTheoric = 0;
|
||||||
int32_t nbElementDraw = 0;
|
int32_t nbElementDraw = 0;
|
||||||
#endif
|
#endif
|
||||||
for (esize_t kkk=0; kkk<m_listFaces.size(); kkk++) {
|
for (int32_t kkk=0; kkk<m_listFaces.size(); kkk++) {
|
||||||
if (false == m_materials.exist(m_listFaces.getKey(kkk))) {
|
if (false == m_materials.exist(m_listFaces.getKey(kkk))) {
|
||||||
EWOL_WARNING("missing materials : '" << m_listFaces.getKey(kkk) << "'");
|
EWOL_WARNING("missing materials : '" << m_listFaces.getKey(kkk) << "'");
|
||||||
continue;
|
continue;
|
||||||
@ -86,9 +86,9 @@ void ege::resource::ParticuleMesh::draw(mat4& _positionMatrix,
|
|||||||
// remove face that is notin the view ...
|
// remove face that is notin the view ...
|
||||||
std::vector<uint32_t> tmpIndexResult;
|
std::vector<uint32_t> tmpIndexResult;
|
||||||
std::vector<ewol::Face>& tmppFaces = m_listFaces.getValue(kkk).m_faces;
|
std::vector<ewol::Face>& tmppFaces = m_listFaces.getValue(kkk).m_faces;
|
||||||
std::vector<uint32_t>& tmppIndex = m_listFaces.getValue(kkk).m_index;
|
//std::vector<uint32_t>& tmppIndex = m_listFaces.getValue(kkk).m_index;
|
||||||
if (normalModeFace == m_normalMode) {
|
if (normalModeFace == m_normalMode) {
|
||||||
for(int32_t iii=0; iii<tmppFaces.size() ; ++iii) {
|
for(size_t iii=0; iii<tmppFaces.size() ; ++iii) {
|
||||||
if(btDot(mattttt * m_listFacesNormal[tmppFaces[iii].m_normal[0]], cameraNormal) >= 0.0f) {
|
if(btDot(mattttt * m_listFacesNormal[tmppFaces[iii].m_normal[0]], cameraNormal) >= 0.0f) {
|
||||||
tmpIndexResult.push_back(iii*3);
|
tmpIndexResult.push_back(iii*3);
|
||||||
tmpIndexResult.push_back(iii*3+1);
|
tmpIndexResult.push_back(iii*3+1);
|
||||||
@ -96,7 +96,7 @@ void ege::resource::ParticuleMesh::draw(mat4& _positionMatrix,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for(int32_t iii=0; iii<tmppFaces.size() ; ++iii) {
|
for(size_t iii=0; iii<tmppFaces.size() ; ++iii) {
|
||||||
if( (btDot(mattttt * m_listVertexNormal[tmppFaces[iii].m_normal[0]], cameraNormal) >= -0.2f)
|
if( (btDot(mattttt * m_listVertexNormal[tmppFaces[iii].m_normal[0]], cameraNormal) >= -0.2f)
|
||||||
|| (btDot(mattttt * m_listVertexNormal[tmppFaces[iii].m_normal[1]], cameraNormal) >= -0.2f)
|
|| (btDot(mattttt * m_listVertexNormal[tmppFaces[iii].m_normal[1]], cameraNormal) >= -0.2f)
|
||||||
|| (btDot(mattttt * m_listVertexNormal[tmppFaces[iii].m_normal[2]], cameraNormal) >= -0.2f) ) {
|
|| (btDot(mattttt * m_listVertexNormal[tmppFaces[iii].m_normal[2]], cameraNormal) >= -0.2f) ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user