aboutsummaryrefslogtreecommitdiff
path: root/engines/teenagent/scene.cpp
diff options
context:
space:
mode:
authorVladimir Menshakov2009-11-17 07:44:40 +0000
committerVladimir Menshakov2009-11-17 07:44:40 +0000
commitb0ca65a9a80513b86894659561c6b672871f343e (patch)
treecdf0e45a5326eac69ed44d33fa78b48f54009d64 /engines/teenagent/scene.cpp
parent61ed19f89259ecdaa828153a8d8b5272c37f6add (diff)
downloadscummvm-rg350-b0ca65a9a80513b86894659561c6b672871f343e.tar.gz
scummvm-rg350-b0ca65a9a80513b86894659561c6b672871f343e.tar.bz2
scummvm-rg350-b0ca65a9a80513b86894659561c6b672871f343e.zip
reverted old z-order
svn-id: r45946
Diffstat (limited to 'engines/teenagent/scene.cpp')
-rw-r--r--engines/teenagent/scene.cpp107
1 files changed, 52 insertions, 55 deletions
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index 87e96cfaa5..fbb4465959 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -581,6 +581,58 @@ 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();
+ }
+ }
+
{
Surface *mark = actor_animation.currentFrame();
if (mark != NULL) {
@@ -635,7 +687,6 @@ bool Scene::render(OSystem *system) {
}
}
-
//render on
if (on.pixels != NULL && debug_features.feature[DebugFeatures::kShowOn]) {
if (_id != 16 || getOns(16)[0] != 0) {
@@ -643,60 +694,6 @@ 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) {