[Scummvm-cvs-logs] SF.net SVN: scummvm:[53922] scummvm/trunk/engines

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Oct 29 18:41:30 CEST 2010


Revision: 53922
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53922&view=rev
Author:   lordhoto
Date:     2010-10-29 16:41:30 +0000 (Fri, 29 Oct 2010)

Log Message:
-----------
ENGINE: Add a setPlayTime to SaveStateDescriptor taking an ms value.

Modified Paths:
--------------
    scummvm/trunk/engines/savestate.cpp
    scummvm/trunk/engines/savestate.h

Modified: scummvm/trunk/engines/savestate.cpp
===================================================================
--- scummvm/trunk/engines/savestate.cpp	2010-10-29 16:28:22 UTC (rev 53921)
+++ scummvm/trunk/engines/savestate.cpp	2010-10-29 16:41:30 UTC (rev 53922)
@@ -70,3 +70,9 @@
 	snprintf(buffer, 32, "%.2d:%.2d", hours, minutes);
 	setVal("play_time", buffer);
 }
+
+void SaveStateDescriptor::setPlayTime(uint32 msecs) {
+	uint minutes = msecs / 60000;
+	setPlayTime(minutes / 60, minutes % 60);
+}
+

Modified: scummvm/trunk/engines/savestate.h
===================================================================
--- scummvm/trunk/engines/savestate.h	2010-10-29 16:28:22 UTC (rev 53921)
+++ scummvm/trunk/engines/savestate.h	2010-10-29 16:41:30 UTC (rev 53922)
@@ -127,6 +127,11 @@
 	 * Sets the 'play_time' key properly, based on the given values.
 	 */
 	void setPlayTime(int hours, int minutes);
+
+	/**
+	 * Sets the 'play_time' key properly, based on the given value.
+	 */
+	void setPlayTime(uint32 msecs);
 };
 
 /** List of savestates. */


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