From 28debc6673eb51b764d4d8229a596740df8ec7f5 Mon Sep 17 00:00:00 2001 From: Matthew Stewart Date: Fri, 15 Jun 2018 17:44:43 -0400 Subject: STARTREK: Fix some problems on old compilers --- engines/startrek/common.h | 2 +- engines/startrek/iwfile.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/startrek/common.h b/engines/startrek/common.h index e4930b6f05..d76ef66c28 100644 --- a/engines/startrek/common.h +++ b/engines/startrek/common.h @@ -25,7 +25,7 @@ #include "common/scummsys.h" namespace Common { -class Rect; +struct Rect; class Serializer; } diff --git a/engines/startrek/iwfile.cpp b/engines/startrek/iwfile.cpp index 830cb78855..d97c20e7ea 100644 --- a/engines/startrek/iwfile.cpp +++ b/engines/startrek/iwfile.cpp @@ -63,7 +63,7 @@ int IWFile::getClosestKeyPosition(int16 x, int16 y) { for (int i = 0; i < _numEntries; i++) { sortedIndices[i].x = i; - sortedIndices[i].y = sqrt(_keyPositions[i].sqrDist(Common::Point(x, y))); + sortedIndices[i].y = (int16)sqrt((double)_keyPositions[i].sqrDist(Common::Point(x, y))); } sort(sortedIndices, sortedIndices + _numEntries, &iwSorter); -- cgit v1.2.3