* 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
This commit is contained in:
Denis Kasak 2009-07-19 14:54:16 +00:00
parent 1ec375bbd5
commit 18301b6f78
2 changed files with 3 additions and 5 deletions

View File

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

View File

@ -43,8 +43,6 @@ enum StructSizes {
personSize = sizeof(uint16) * 2 + sizeof(byte)
};
static double real_to_double(byte real[6]);
class WalkingMap {
public: