[Scummvm-cvs-logs] SF.net SVN: scummvm:[44113] scummvm/trunk/engines/teenagent/scene.cpp
megath at users.sourceforge.net
megath at users.sourceforge.net
Wed Sep 16 00:34:09 CEST 2009
Revision: 44113
http://scummvm.svn.sourceforge.net/scummvm/?rev=44113&view=rev
Author: megath
Date: 2009-09-15 22:34:08 +0000 (Tue, 15 Sep 2009)
Log Message:
-----------
allowed actor animation be visible even if actor was not, minor cleanups
Modified Paths:
--------------
scummvm/trunk/engines/teenagent/scene.cpp
Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp 2009-09-15 22:16:55 UTC (rev 44112)
+++ scummvm/trunk/engines/teenagent/scene.cpp 2009-09-15 22:34:08 UTC (rev 44113)
@@ -159,13 +159,13 @@
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 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 @@
}
}
- 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 @@
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 @@
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;
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