[Scummvm-cvs-logs] SF.net SVN: scummvm:[42616] scummvm/branches/gsoc2009-draci/engines/draci

dkasak13 at users.sourceforge.net dkasak13 at users.sourceforge.net
Sun Jul 19 16:54:16 CEST 2009


Revision: 42616
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42616&view=rev
Author:   dkasak13
Date:     2009-07-19 14:54:16 +0000 (Sun, 19 Jul 2009)

Log Message:
-----------
* Used ldexp() in real_to_double() instead of doing the calculation manually
* Moved static declaration of real_to_double() to game.cpp

Modified Paths:
--------------
    scummvm/branches/gsoc2009-draci/engines/draci/game.cpp
    scummvm/branches/gsoc2009-draci/engines/draci/game.h

Modified: scummvm/branches/gsoc2009-draci/engines/draci/game.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/game.cpp	2009-07-19 14:46:11 UTC (rev 42615)
+++ scummvm/branches/gsoc2009-draci/engines/draci/game.cpp	2009-07-19 14:54:16 UTC (rev 42616)
@@ -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 @@
 	}
 
 	// Calculate final value
-	return mantissa * pow(2.0, exp);	
+	return ldexp(mantissa, exp);	
 }
-	
-	
 
 } 

Modified: scummvm/branches/gsoc2009-draci/engines/draci/game.h
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/game.h	2009-07-19 14:46:11 UTC (rev 42615)
+++ scummvm/branches/gsoc2009-draci/engines/draci/game.h	2009-07-19 14:54:16 UTC (rev 42616)
@@ -43,8 +43,6 @@
 	personSize = sizeof(uint16) * 2 + sizeof(byte)
 };
 
-static double real_to_double(byte real[6]);
-
 class WalkingMap {
 
 public:	


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list