diff options
author | Matthew Stewart | 2018-06-15 17:44:43 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | 28debc6673eb51b764d4d8229a596740df8ec7f5 (patch) | |
tree | 67f5b0508c6a2b28b55de94c3d2f83a0f90156d4 | |
parent | efda57c114ecbf62b4d5b76c12e648837d814cdb (diff) | |
download | scummvm-rg350-28debc6673eb51b764d4d8229a596740df8ec7f5.tar.gz scummvm-rg350-28debc6673eb51b764d4d8229a596740df8ec7f5.tar.bz2 scummvm-rg350-28debc6673eb51b764d4d8229a596740df8ec7f5.zip |
STARTREK: Fix some problems on old compilers
-rw-r--r-- | engines/startrek/common.h | 2 | ||||
-rw-r--r-- | 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); |