From: Daniel Karbach Date: Mon, 20 Aug 2012 21:36:39 +0000 (+0200) Subject: broadened animation runner interface X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=ecaa8da8d8e57da061443aa5cc5a68d353126bf8;p=l2e.git broadened animation runner interface --- 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()); }