Permalink
Browse files

STARTREK: Fix some problems on old compilers

  • Loading branch information...
Drenn1 authored and sev- committed Jun 15, 2018
1 parent efda57c commit 28debc6673eb51b764d4d8229a596740df8ec7f5
Showing with 2 additions and 2 deletions.
  1. +1 −1 engines/startrek/common.h
  2. +1 −1 engines/startrek/iwfile.cpp
@@ -25,7 +25,7 @@
#include "common/scummsys.h"

namespace Common {
class Rect;
struct Rect;
class Serializer;
}

@@ -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);

0 comments on commit 28debc6

Please sign in to comment.