mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-07 02:39:56 +00:00
restart default animation in the slot after custom animation has ended.
svn-id: r45750
This commit is contained in:
parent
75bbe04280
commit
4e662b22ca
@ -84,6 +84,10 @@ Surface *Animation::currentFrame(int dt) {
|
||||
return r;
|
||||
}
|
||||
|
||||
void Animation::restart() {
|
||||
paused = false;
|
||||
index = 0;
|
||||
}
|
||||
|
||||
void Animation::free() {
|
||||
id = 0;
|
||||
|
@ -48,6 +48,7 @@ public:
|
||||
~Animation();
|
||||
|
||||
bool empty() const { return frames == NULL; }
|
||||
void restart();
|
||||
|
||||
//uint16 width() const { return frames? frames[0].w: 0; }
|
||||
//uint16 height() const { return frames? frames[0].h: 0; }
|
||||
|
@ -392,6 +392,11 @@ bool Scene::render(OSystem *system) {
|
||||
got_any_animation = true;
|
||||
} else {
|
||||
a = animation + i;
|
||||
if (!custom_animation[i].empty()) {
|
||||
debug(0, "custom animation ended, restart animation in the same slot.");
|
||||
custom_animation[i].free();
|
||||
a->restart();
|
||||
}
|
||||
s = a->currentFrame();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user