From: Côme Chilliet Date: Mon, 19 Dec 2016 22:10:56 +0000 (+0100) Subject: Fixed methods signatures to fix build X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=5b566d01a77224e445ebb683184a1c59830a10b5;p=lugaru.git Fixed methods signatures to fix build --- diff --git a/Source/Game.hpp b/Source/Game.hpp index efa119e..f276ef0 100644 --- a/Source/Game.hpp +++ b/Source/Game.hpp @@ -156,6 +156,10 @@ void fireSound(int sound = fireendsound); void inputText(std::string& str, unsigned* charselected); void flash(float amount = 1, int delay = 1); } +float roughDirection(XYZ vec); +float roughDirectionTo(XYZ start, XYZ end); +float pitchTo(XYZ start, XYZ end); +float sq(float n); #ifndef __forceinline # ifdef __GNUC__ diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index f4b9a7c..7d66b43 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -176,7 +176,7 @@ STATIC_ASSERT (rabbittype == 0 && wolftype == 1) // utility functions // TODO: this is slightly incorrect -inline float roughDirection(XYZ vec) +float roughDirection(XYZ vec) { Normalise(&vec); float angle = -asin(-vec.x) * 180 / M_PI; @@ -184,7 +184,7 @@ inline float roughDirection(XYZ vec) angle = 180 - angle; return angle; } -inline float roughDirectionTo(XYZ start, XYZ end) +float roughDirectionTo(XYZ start, XYZ end) { return roughDirection(end - start); } @@ -193,11 +193,11 @@ inline float pitchOf(XYZ vec) Normalise(&vec); return -asin(vec.y) * 180 / M_PI; } -inline float pitchTo(XYZ start, XYZ end) +float pitchTo(XYZ start, XYZ end) { return pitchOf(end - start); } -inline float sq(float n) +float sq(float n) { return n * n; } diff --git a/Source/Objects/Person.cpp b/Source/Objects/Person.cpp index ced39db..6e286f4 100644 --- a/Source/Objects/Person.cpp +++ b/Source/Objects/Person.cpp @@ -6945,10 +6945,6 @@ bool Person::addClothes(const int& clothesId) } } -extern float sq(float n); -extern float roughDirectionTo(XYZ start, XYZ end); -extern float pitchTo(XYZ start, XYZ end); - void Person::doAI() { if (aitype != playercontrolled && !Dialog::inDialog()) {