diff --git a/include/graphics/GraphicsDrawer.h b/include/graphics/GraphicsDrawer.h index f3b060a8..97dfd19b 100644 --- a/include/graphics/GraphicsDrawer.h +++ b/include/graphics/GraphicsDrawer.h @@ -54,7 +54,7 @@ namespace hpl { class cGfxBufferCompare { public: - bool operator()(const cGfxBufferObject& aObjectA,const cGfxBufferObject& aObjectB); + bool operator()(const cGfxBufferObject& aObjectA,const cGfxBufferObject& aObjectB) const; }; typedef std::multiset tGfxBufferSet; diff --git a/include/graphics/Renderer2D.h b/include/graphics/Renderer2D.h index 6fe7ed9c..074b1523 100644 --- a/include/graphics/Renderer2D.h +++ b/include/graphics/Renderer2D.h @@ -48,14 +48,14 @@ namespace hpl { class cRenderObject2DCompare { public: - bool operator()(const cRenderObject2D &aObjectA,const cRenderObject2D &aObjectB); + bool operator()(const cRenderObject2D &aObjectA,const cRenderObject2D &aObjectB) const; }; //For transparent objects class cRenderTransObjectCompare { public: - bool operator()(const cRenderObject2D &aObjectA,const cRenderObject2D &aObjectB); + bool operator()(const cRenderObject2D &aObjectA,const cRenderObject2D &aObjectB) const; }; typedef std::multiset tRenderObjectSet; diff --git a/include/gui/GuiSet.h b/include/gui/GuiSet.h index d310ccaa..a7e09fe6 100644 --- a/include/gui/GuiSet.h +++ b/include/gui/GuiSet.h @@ -73,7 +73,7 @@ namespace hpl { class cGuiRenderObjectCompare { public: - bool operator()(const cGuiRenderObject& aObjectA, const cGuiRenderObject& aObjectB); + bool operator()(const cGuiRenderObject& aObjectA, const cGuiRenderObject& aObjectB) const; }; typedef std::multiset tGuiRenderObjectSet; diff --git a/sources/graphics/GraphicsDrawer.cpp b/sources/graphics/GraphicsDrawer.cpp index acf28274..ebf85ebf 100644 --- a/sources/graphics/GraphicsDrawer.cpp +++ b/sources/graphics/GraphicsDrawer.cpp @@ -74,7 +74,7 @@ namespace hpl { //----------------------------------------------------------------------- - bool cGfxBufferCompare::operator()(const cGfxBufferObject& aObjectA,const cGfxBufferObject& aObjectB) + bool cGfxBufferCompare::operator()(const cGfxBufferObject& aObjectA,const cGfxBufferObject& aObjectB) const { if(aObjectA.GetZ() != aObjectB.GetZ()) { diff --git a/sources/graphics/Renderer2D.cpp b/sources/graphics/Renderer2D.cpp index 8cfeb355..eae5a67e 100644 --- a/sources/graphics/Renderer2D.cpp +++ b/sources/graphics/Renderer2D.cpp @@ -87,7 +87,7 @@ namespace hpl { //----------------------------------------------------------------------- ////////////////////// RENDER OBJECT COMPARE //////////////////////////// - bool cRenderObject2DCompare::operator()(const cRenderObject2D &aObjectA,const cRenderObject2D &aObjectB) + bool cRenderObject2DCompare::operator()(const cRenderObject2D &aObjectA,const cRenderObject2D &aObjectB) const { if(aObjectA.GetMaterial()->GetTexture(eMaterialTexture_Diffuse) != aObjectB.GetMaterial()->GetTexture(eMaterialTexture_Diffuse)) @@ -115,7 +115,7 @@ namespace hpl { ////////////////////// TRANS RENDER OBJECT COMPARE //////////////////////////// - bool cRenderTransObjectCompare::operator()(const cRenderObject2D &aObjectA,const cRenderObject2D &aObjectB) + bool cRenderTransObjectCompare::operator()(const cRenderObject2D &aObjectA,const cRenderObject2D &aObjectB) const { if(aObjectA.GetZ() != aObjectB.GetZ()) { @@ -895,13 +895,17 @@ namespace hpl { //MAYBE TODO: Fix so that the shadows from different edges share vertices // Add vertexes and indexes to the vertex batcher - mpLowLevelGraphics->AddVertexToBatch(&cVertex(vPointPos[0],ShadowColor)); - mpLowLevelGraphics->AddVertexToBatch(&cVertex(vPointPos[1],ShadowColor)); + cVertex v1 = cVertex(vPointPos[0],ShadowColor); + mpLowLevelGraphics->AddVertexToBatch(&v1); + cVertex v2 = cVertex(vPointPos[1],ShadowColor); + mpLowLevelGraphics->AddVertexToBatch(&v2); mpLowLevelGraphics->AddIndexToBatch(lFirstIndex); mpLowLevelGraphics->AddIndexToBatch(lFirstIndex+1); - mpLowLevelGraphics->AddVertexToBatch(&cVertex(vEndPos[0],ShadowColor)); - mpLowLevelGraphics->AddVertexToBatch(&cVertex(vEndPos[1],ShadowColor)); + cVertex v3 = cVertex(vEndPos[0],ShadowColor); + mpLowLevelGraphics->AddVertexToBatch(&v3); + cVertex v4 = cVertex(vEndPos[1],ShadowColor); + mpLowLevelGraphics->AddVertexToBatch(&v4); mpLowLevelGraphics->AddIndexToBatch(lFirstIndex+2); mpLowLevelGraphics->AddIndexToBatch(lFirstIndex+1); @@ -920,7 +924,8 @@ namespace hpl { //If we had an extra point one for triangle is needed. if(bExtraPos){ - mpLowLevelGraphics->AddVertexToBatch(&cVertex(vExtraPos,ShadowColor)); + cVertex v5 = cVertex(vExtraPos,ShadowColor); + mpLowLevelGraphics->AddVertexToBatch(&v5); mpLowLevelGraphics->AddIndexToBatch(lFirstIndex+3); mpLowLevelGraphics->AddIndexToBatch(lFirstIndex+2); diff --git a/sources/gui/GuiSet.cpp b/sources/gui/GuiSet.cpp index d77e9df8..49cc970b 100644 --- a/sources/gui/GuiSet.cpp +++ b/sources/gui/GuiSet.cpp @@ -64,7 +64,7 @@ namespace hpl { //----------------------------------------------------------------------- bool cGuiRenderObjectCompare::operator()( const cGuiRenderObject& aObjectA, - const cGuiRenderObject& aObjectB) + const cGuiRenderObject& aObjectB) const { //Z float fZA = aObjectA.mvPos.z; diff --git a/sources/impl/LowLevelSystemSDL.cpp b/sources/impl/LowLevelSystemSDL.cpp index 7c28d567..81bad49c 100644 --- a/sources/impl/LowLevelSystemSDL.cpp +++ b/sources/impl/LowLevelSystemSDL.cpp @@ -27,6 +27,7 @@ #endif #ifndef WIN32 +#include // Include FLTK #include "FL/fl_ask.H" #endif diff --git a/sources/impl/PhysicsBodyNewton.cpp b/sources/impl/PhysicsBodyNewton.cpp index 3b4f6efc..757af4b6 100644 --- a/sources/impl/PhysicsBodyNewton.cpp +++ b/sources/impl/PhysicsBodyNewton.cpp @@ -101,7 +101,8 @@ namespace hpl { if(cPhysicsBodyNewton::mbUseCallback==false) return; cPhysicsBodyNewton *pRigidBody = static_cast(apEntity); - NewtonBodySetMatrix(pRigidBody->mpNewtonBody, &apEntity->GetLocalMatrix().GetTranspose().m[0][0]); + hpl::cMatrix transpose = apEntity->GetLocalMatrix().GetTranspose(); + NewtonBodySetMatrix(pRigidBody->mpNewtonBody, &transpose.m[0][0]); if(pRigidBody->mpNode) pRigidBody->mpNode->SetMatrix(apEntity->GetLocalMatrix()); }