diff options
author | Vladimir Menshakov | 2009-11-15 21:31:04 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2009-11-15 21:31:04 +0000 |
commit | f6eae4aae526d9e8b992e01bf6f8c8f7263ba0a4 (patch) | |
tree | 286541ebfeeb3223ea7c0b588caa0606a05f70f1 | |
parent | 9a57665abffa2aa3afcafabf3b4ecf0ad9cf458c (diff) | |
download | scummvm-rg350-f6eae4aae526d9e8b992e01bf6f8c8f7263ba0a4.tar.gz scummvm-rg350-f6eae4aae526d9e8b992e01bf6f8c8f7263ba0a4.tar.bz2 scummvm-rg350-f6eae4aae526d9e8b992e01bf6f8c8f7263ba0a4.zip |
z-ordering fixes again :(
svn-id: r45928
-rw-r--r-- | engines/teenagent/scene.cpp | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp index 17d5cdbbf5..9b3c8ef211 100644 --- a/engines/teenagent/scene.cpp +++ b/engines/teenagent/scene.cpp @@ -564,6 +564,7 @@ bool Scene::render(OSystem *system) { Graphics::Surface *surface = system->lockScreen(); + bool got_any_animation = false; if (ons != NULL && debug_features.feature[DebugFeatures::kShowOns]) { for (uint32 i = 0; i < ons_count; ++i) { @@ -573,62 +574,6 @@ bool Scene::render(OSystem *system) { } } - - bool got_any_animation = false; - - - for (byte i = 0; i < 4; ++i) { - Animation *a = custom_animation + i; - Surface *s = a->currentFrame(); - if (s != NULL) { - if (!a->ignore) - busy = true; - else - busy = false; - if (!a->paused && !a->loop) - 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(); - } - - if (current_event.type == SceneEvent::kWaitLanAnimationFrame && current_event.slot == i) { - if (s == NULL) { - restart |= nextEvent(); - continue; - } - int index = a->currentIndex(); - if (index == current_event.animation) { - debug(0, "kWaitLanAnimationFrame(%d, %d) complete", current_event.slot, current_event.animation); - restart |= nextEvent(); - } - } - - if (s == NULL) - continue; - - if (debug_features.feature[DebugFeatures::kShowLan]) - animation_position[i] = s->render(surface); - - if (a->id == 0) - continue; - - Object *obj = getObject(a->id); - if (obj != NULL) { - obj->rect.left = s->x; - obj->rect.top = s->y; - obj->rect.right = s->w + s->x; - obj->rect.bottom = s->h + s->y; - obj->rect.save(); - //obj->dump(); - } - } - { Surface *mark = actor_animation.currentFrame(); if (mark != NULL) { @@ -683,6 +628,7 @@ bool Scene::render(OSystem *system) { } } + //render on if (on.pixels != NULL && debug_features.feature[DebugFeatures::kShowOn]) { if (_id != 16 || getOns(16)[0] != 0) { @@ -690,6 +636,60 @@ bool Scene::render(OSystem *system) { } } + for (byte i = 0; i < 4; ++i) { + Animation *a = custom_animation + i; + Surface *s = a->currentFrame(); + if (s != NULL) { + if (!a->ignore) + busy = true; + else + busy = false; + if (!a->paused && !a->loop) + 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(); + } + + if (current_event.type == SceneEvent::kWaitLanAnimationFrame && current_event.slot == i) { + if (s == NULL) { + restart |= nextEvent(); + continue; + } + int index = a->currentIndex(); + if (index == current_event.animation) { + debug(0, "kWaitLanAnimationFrame(%d, %d) complete", current_event.slot, current_event.animation); + restart |= nextEvent(); + } + } + + if (s == NULL) + continue; + + if (debug_features.feature[DebugFeatures::kShowLan]) + animation_position[i] = s->render(surface); + + if (a->id == 0) + continue; + + Object *obj = getObject(a->id); + if (obj != NULL) { + obj->rect.left = s->x; + obj->rect.top = s->y; + obj->rect.right = s->w + s->x; + obj->rect.bottom = s->h + s->y; + obj->rect.save(); + //obj->dump(); + } + } + + + if (!message.empty()) { bool visible = true; if (message_first_frame != 0 && message_animation != NULL) { |