diff options
Diffstat (limited to 'engines/neverhood/graphics.cpp')
-rw-r--r-- | engines/neverhood/graphics.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/neverhood/graphics.cpp b/engines/neverhood/graphics.cpp index 900ad57d56..5bb9424f57 100644 --- a/engines/neverhood/graphics.cpp +++ b/engines/neverhood/graphics.cpp @@ -312,4 +312,10 @@ void unpackSpriteNormal(byte *source, int width, int height, byte *dest, int des } +int calcDistance(int16 x1, int16 y1, int16 x2, int16 y2) { + int16 deltaX = ABS(x1 - x2); + int16 deltaY = ABS(y1 - y2); + return sqrt((double)(deltaX * deltaX + deltaY * deltaY)); +} + } // End of namespace Neverhood |