diff engine/core/model/structures/instance.h @ 181:56ac89189bc4

fixed time handling in fife: - the time scaling method was unreliable when changing the time factors (jumping in the moment of the change) - replaced much calls to SDL_GetTicks with TimerManager::instance()->getTime() - some other time related cleanup
author spq@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 31 Jan 2009 04:15:43 +0000
parents 64e7fe3d4288
children 3d0cc4545938
line wrap: on
line diff
--- a/engine/core/model/structures/instance.h	Fri Jan 30 00:58:43 2009 +0000
+++ b/engine/core/model/structures/instance.h	Sat Jan 31 04:15:43 2009 +0000
@@ -185,7 +185,7 @@
 		 *  In case there is no current action, returns -1
 		 * @return action runtime
 		 */
-		int getActionRuntime() const;
+		unsigned int getActionRuntime();
 
 		/** Performs given named action to the instance. While performing the action
 		 *  moves instance to given target with given speed
@@ -221,12 +221,11 @@
 		const std::string* getSayText() const;
 
 		/** Updates the instance related to the current action
-		 * @param curticks current tick count of the system
 		 * @note call this only once in engine update cycle, so that tracking between
 		 *  current position and previous position keeps in sync.
 		 * @returns marked changes
 		 */
-		InstanceChangeInfo update(unsigned int curticks=0);
+		InstanceChangeInfo update();
 		
 		/** Sets visualization to be used. Transfers ownership.
 		 */
@@ -248,6 +247,11 @@
 		*/
 		float getTotalTimeMultiplier();
 		
+		/** Gets the scaled runtime in milliseconds
+		 * @return runtime
+		 */
+		unsigned int getRuntime();
+
 		/** Refreshes instance e.g. in case location is updated directly (not via setLocation)
 		 * In this case e.g. instance's master time provider is changed, so it needs to be updated
 		 */