[Scummvm-cvs-logs] SF.net SVN: scummvm:[45928] scummvm/trunk/engines/teenagent/scene.cpp
megath at users.sourceforge.net
megath at users.sourceforge.net
Sun Nov 15 22:31:04 CET 2009
Revision: 45928
http://scummvm.svn.sourceforge.net/scummvm/?rev=45928&view=rev
Author: megath
Date: 2009-11-15 21:31:04 +0000 (Sun, 15 Nov 2009)
Log Message:
-----------
z-ordering fixes again :(
Modified Paths:
--------------
scummvm/trunk/engines/teenagent/scene.cpp
Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp 2009-11-15 21:25:26 UTC (rev 45927)
+++ scummvm/trunk/engines/teenagent/scene.cpp 2009-11-15 21:31:04 UTC (rev 45928)
@@ -564,6 +564,7 @@
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 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 @@
}
}
+
//render on
if (on.pixels != NULL && debug_features.feature[DebugFeatures::kShowOn]) {
if (_id != 16 || getOns(16)[0] != 0) {
@@ -690,6 +636,60 @@
}
}
+ 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) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list