aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kasak2009-07-19 14:54:16 +0000
committerDenis Kasak2009-07-19 14:54:16 +0000
commit18301b6f78fd6d7eb77b5055129b71d2b8dce270 (patch)
tree82ea06a463ae855bd557e80fe9613354ac1ba26c
parent1ec375bbd5ee497e6ce29771fbc584a3cb6de961 (diff)
downloadscummvm-rg350-18301b6f78fd6d7eb77b5055129b71d2b8dce270.tar.gz
scummvm-rg350-18301b6f78fd6d7eb77b5055129b71d2b8dce270.tar.bz2
scummvm-rg350-18301b6f78fd6d7eb77b5055129b71d2b8dce270.zip
* Used ldexp() in real_to_double() instead of doing the calculation manually
* Moved static declaration of real_to_double() to game.cpp svn-id: r42616
-rw-r--r--engines/draci/game.cpp6
-rw-r--r--engines/draci/game.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index 03d87b8c6b..d913eb904f 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -35,6 +35,8 @@
namespace Draci {
+static double real_to_double(byte real[6]);
+
Game::Game(DraciEngine *vm) : _vm(vm) {
unsigned int i;
Common::String path("INIT.DFW");
@@ -555,9 +557,7 @@ static double real_to_double(byte real[6]) {
}
// Calculate final value
- return mantissa * pow(2.0, exp);
+ return ldexp(mantissa, exp);
}
-
-
}
diff --git a/engines/draci/game.h b/engines/draci/game.h
index 6600813b8f..0c3dddae20 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -43,8 +43,6 @@ enum StructSizes {
personSize = sizeof(uint16) * 2 + sizeof(byte)
};
-static double real_to_double(byte real[6]);
-
class WalkingMap {
public: