diff options
author | Vladimir Menshakov | 2009-09-15 22:34:08 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2009-09-15 22:34:08 +0000 |
commit | 6fcf8adb0454e3c9c5ec372512db60906dd58363 (patch) | |
tree | 8cee7623ce65dcdeb11f8c4f937e93dc12eeb8f9 /engines | |
parent | eec86941f2ce35e4826abf218c5ad6f35051310b (diff) | |
download | scummvm-rg350-6fcf8adb0454e3c9c5ec372512db60906dd58363.tar.gz scummvm-rg350-6fcf8adb0454e3c9c5ec372512db60906dd58363.tar.bz2 scummvm-rg350-6fcf8adb0454e3c9c5ec372512db60906dd58363.zip |
allowed actor animation be visible even if actor was not, minor cleanups
svn-id: r44113
Diffstat (limited to 'engines')
-rw-r--r-- | engines/teenagent/scene.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp index 0fe9961b69..f4a8c7c5a0 100644 --- a/engines/teenagent/scene.cpp +++ b/engines/teenagent/scene.cpp @@ -159,13 +159,13 @@ void Scene::loadLans() { Resources *res = Resources::instance(); //load lan000 - for (int i = 0; i < 4; ++i) { + for (byte i = 0; i < 4; ++i) { animation[i].free(); uint16 bx = 0xd89e + (_id - 1) * 4 + i; byte bxv = res->dseg.get_byte(bx); uint16 res_id = 4 * (_id - 1) + i + 1; - debug(0, "lan: [%04x] = %02x, resource id: %u", bx, bxv, res_id); + debug(0, "lan[%u]@%04x = %02x, resource id: %u", i, bx, bxv, res_id); if (bxv == 0) continue; @@ -326,7 +326,7 @@ bool Scene::render(OSystem *system) { bool got_any_animation = false; - for (int i = 0; i < 4; ++i) { + for (byte i = 0; i < 4; ++i) { Animation *a = custom_animation + i; Surface *s = a->currentFrame(); if (s != NULL) { @@ -356,9 +356,13 @@ bool Scene::render(OSystem *system) { } } - if (!hide_actor) { + { Surface *mark = actor_animation.currentFrame(); - if (mark == NULL) { + if (mark != NULL) { + actor_animation_position = mark->render(surface); + busy = true; + got_any_animation = true; + } else if (!hide_actor) { actor_animation.free(); if (destination != position) { @@ -384,13 +388,8 @@ bool Scene::render(OSystem *system) { busy = true; } else actor_animation_position = teenagent.render(surface, position, orientation, 0); - } else { - actor_animation_position = mark->render(surface); - busy = true; - got_any_animation = true; } - } else - actor_animation_position = Common::Rect(); + } if (!message.empty()) { res->font7.color = message_color; @@ -505,7 +504,7 @@ bool Scene::processEventQueue() { case SceneEvent::kPlayAnimation: debug(0, "playing animation %u in slot %u", current_event.animation, current_event.lan & 3); - playAnimation(current_event.lan & 0x3, current_event.animation, (current_event.lan & 0x80) != 0, (current_event.lan & 0x40) != 0); + playAnimation(current_event.lan & 3, current_event.animation, (current_event.lan & 0x80) != 0, (current_event.lan & 0x40) != 0); current_event.clear(); break; |