diff options
-rw-r--r-- | engines/fullpipe/motion.cpp | 4 | ||||
-rw-r--r-- | engines/fullpipe/utils.cpp | 16 | ||||
-rw-r--r-- | engines/fullpipe/utils.h | 1 |
3 files changed, 2 insertions, 19 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index c667ac2aa5..67acaedffe 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -2871,8 +2871,8 @@ bool MovGraphLink::load(MfcArchive &file) { debugC(8, kDebugLoading, "GraphNode2"); _graphDst = file.readClass<MovGraphNode>(); - _length = file.readDouble(); - _angle = file.readDouble(); + _length = file.readDoubleLE(); + _angle = file.readDoubleLE(); debugC(8, kDebugLoading, "length: %g, angle: %g", _length, _angle); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 3b60e962c6..aba629de83 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -246,22 +246,6 @@ int MfcArchive::readCount() { return count; } -double MfcArchive::readDouble() { - // FIXME: This is utterly cruel and unportable - // Some articles on the matter: - // http://randomascii.wordpress.com/2013/02/07/float-precision-revisited-nine-digit-float-portability/ - // http://randomascii.wordpress.com/2012/01/11/tricks-with-the-floating-point-format/ - - union { - byte b[8]; - double d; - } tmp; - - read(&tmp.b, 8); - - return tmp.d; -} - enum { kNullObject, kInteraction, diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 6ffafc54bc..a4fae83231 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -56,7 +56,6 @@ public: Common::String readPascalString(bool twoByte = false); void writePascalString(const Common::String &str, bool twoByte = false); int readCount(); - double readDouble(); CObject *parseClass(bool *isCopyReturned); /** ownership of returned object is passed to caller */ |