From ecaa8da8d8e57da061443aa5cc5a68d353126bf8 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Mon, 20 Aug 2012 23:36:39 +0200 Subject: [PATCH] broadened animation runner interface --- src/graphics/Animation.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/graphics/Animation.h b/src/graphics/Animation.h index 14966e9..ecf71e8 100644 --- a/src/graphics/Animation.h +++ b/src/graphics/Animation.h @@ -53,11 +53,13 @@ private: class AnimationRunner { public: - explicit AnimationRunner(const Animation *a = 0) - : animation(a), colOffset(0), rowOffset(0) { } + explicit AnimationRunner(const Animation *a = 0, int colOffset = 0, int rowOffset = 0) + : animation(a), colOffset(colOffset), rowOffset(rowOffset) { } public: bool Valid() const { return animation; } + void Clear() { animation = 0; timer = app::Timer(); } + void Start(app::State &ctrl) { timer = ctrl.GraphicsTimers().StartInterval(animation->FrameTime()); } -- 2.39.2