diff --git a/Aquaria/InGameMenu.cpp b/Aquaria/InGameMenu.cpp index 3901365..108a60d 100644 --- a/Aquaria/InGameMenu.cpp +++ b/Aquaria/InGameMenu.cpp @@ -17,8 +17,8 @@ static InGameMenu *themenu = 0; class FoodHolder; class PetSlot; -std::vector foodHolders; -std::vector petSlots; +static std::vector foodHolders; +static std::vector petSlots; // ---------------- Constants ---------------------------- @@ -31,8 +31,8 @@ const size_t numTreasures = 16*2; const Vector worldLeftCenter(217,250), worldRightCenter(575, 250); const Vector opt_save_original = Vector(350, 350), opt_cancel_original = Vector(450, 350); -const int KEYCONFIG_FIRST_COL_DISTANCE = 170; -const int KEYCONFIG_COL_DISTANCE = 105; +static const int KEYCONFIG_FIRST_COL_DISTANCE = 170; +static const int KEYCONFIG_COL_DISTANCE = 105; // --------- Private class defs, not used outside --------------- @@ -959,7 +959,7 @@ void InGameMenu::reset() optsfxdly = 0; playingSongInMenu = -1; menuSelectDelay = 0; - + dropIngrNames.clear(); create(); diff --git a/BBGE/RenderObject.cpp b/BBGE/RenderObject.cpp index a050d85..3bfa45b 100644 --- a/BBGE/RenderObject.cpp +++ b/BBGE/RenderObject.cpp @@ -122,14 +122,6 @@ RenderObject* RenderObject::getTopParent() const return lastp; } -bool RenderObject::isPieceFlippedHorizontal() const -{ - RenderObject *p = getTopParent(); - if (p) - return p->isfh(); - return isfh(); -} - Vector RenderObject::getInvRotPosition(const Vector &vec) const { @@ -644,7 +636,9 @@ void RenderObject::lookAt(const Vector &pos, float t, float minAngle, float maxA p = p->parent; } - if (isPieceFlippedHorizontal()) + const bool ishfh = this->isfhr(); + + if (ishfh) { angle = 180-angle; @@ -659,7 +653,7 @@ void RenderObject::lookAt(const Vector &pos, float t, float minAngle, float maxA angle = maxAngle; int amt = 10; - if (isPieceFlippedHorizontal()) + if (ishfh) { if (pos.x < myPos.x-amt) { diff --git a/BBGE/RenderObject.h b/BBGE/RenderObject.h index 8b5fe24..64eee4d 100644 --- a/BBGE/RenderObject.h +++ b/BBGE/RenderObject.h @@ -191,7 +191,6 @@ public: Vector getWorldPosition() const; Vector getWorldCollidePosition(const Vector &vec=Vector(0,0,0)) const; Vector getInvRotPosition(const Vector &vec) const; - bool isPieceFlippedHorizontal() const; RenderObject *getTopParent() const;