aboutsummaryrefslogtreecommitdiff
path: root/engines/neverhood/graphics.cpp
diff options
context:
space:
mode:
authorjohndoe1232011-10-14 08:11:10 +0000
committerWillem Jan Palenstijn2013-05-08 20:39:42 +0200
commit463039c40666c5417cf298365d31690299685e5f (patch)
tree1a5a2cf3a29d2136b57c7a9ba36fb922aa5179f9 /engines/neverhood/graphics.cpp
parentaa789ee02bf55828fb8f0bfa9aa1efe0ecb44310 (diff)
downloadscummvm-rg350-463039c40666c5417cf298365d31690299685e5f.tar.gz
scummvm-rg350-463039c40666c5417cf298365d31690299685e5f.tar.bz2
scummvm-rg350-463039c40666c5417cf298365d31690299685e5f.zip
NEVERHOOD: Add Scene2706
- Move calcDistance from Class521 to graphics.cpp
Diffstat (limited to 'engines/neverhood/graphics.cpp')
-rw-r--r--engines/neverhood/graphics.cpp6
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