From 44acfd9467e126d324a6ac730dccedd30c916480 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 16 Apr 2005 20:59:24 +0000 Subject: Implement sfGetDeltaFrame and sfEnableZone. Fixes freeze when sanctuary gates open and also used in world map. Spelling and indentation fixes here and there. svn-id: r17640 --- saga/animation.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'saga/animation.cpp') diff --git a/saga/animation.cpp b/saga/animation.cpp index 0f2ffca611..5948cb78d5 100644 --- a/saga/animation.cpp +++ b/saga/animation.cpp @@ -157,7 +157,7 @@ int Anim::link(int16 anim_id1, int16 anim_id2) { void Anim::setCycles(uint animId, int cycles) { if (animId >= _anim_count) { - warning("Anim::setStopFrame(): wrong animation number (%d)", animId); + warning("Anim::setCycles(): wrong animation number (%d)", animId); return; } @@ -393,6 +393,15 @@ int Anim::setFrameTime(uint16 anim_id, int time) { return SUCCESS; } +int16 Anim::getCurrentFrame(uint16 animId) { + if (animId >= _anim_count) { + warning("Anim::stop(): wrong animation number (%d)", animId); + return 0; + } + + return _anim_tbl[animId]->current_frame; +} + int Anim::freeId(uint16 anim_id) { ANIMATION *anim; -- cgit v1.2.3