From 3abacdae830392ae72d4d5c02c596af87370255e Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 6 Apr 2012 14:17:25 -0400 Subject: PEGASUS: Attempt to fix compilation on MSVC --- engines/pegasus/neighborhood/mars/robotship.cpp | 2 +- engines/pegasus/transition.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/pegasus/neighborhood/mars/robotship.cpp b/engines/pegasus/neighborhood/mars/robotship.cpp index 9776027839..a0ff749910 100644 --- a/engines/pegasus/neighborhood/mars/robotship.cpp +++ b/engines/pegasus/neighborhood/mars/robotship.cpp @@ -262,7 +262,7 @@ void RobotShip::makeVelocityVector(CoordType x1, CoordType y1, CoordType x2, Coo CoordType length = ((PegasusEngine *)g_engine)->getRandomNumber(kVelocityVectorSlop - 1) + kVelocityVectorLength; vector.x = x2 - x1; vector.y = y2 - y1; - float oldLength = sqrt(vector.x * vector.x + vector.y * vector.y); + float oldLength = sqrt((float)(vector.x * vector.x + vector.y * vector.y)); vector.x = (int)(vector.x * length / oldLength); vector.y = (int)(vector.y * length / oldLength); } diff --git a/engines/pegasus/transition.h b/engines/pegasus/transition.h index f32db63ebd..5f2b797d88 100644 --- a/engines/pegasus/transition.h +++ b/engines/pegasus/transition.h @@ -102,4 +102,4 @@ protected: } // End of namespace Pegasus -#endif \ No newline at end of file +#endif -- cgit v1.2.3