aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-07-25 18:07:42 +0000
committerMax Horn2003-07-25 18:07:42 +0000
commitce29c4c29558b65b66e05688ac049b63ad820163 (patch)
tree889c21b648b3828585fb342bd605d1fb57ed062f /scumm
parentc520d2d423f90811e2ad2eb6f768d1a88c6c1ca2 (diff)
downloadscummvm-rg350-ce29c4c29558b65b66e05688ac049b63ad820163.tar.gz
scummvm-rg350-ce29c4c29558b65b66e05688ac049b63ad820163.tar.bz2
scummvm-rg350-ce29c4c29558b65b66e05688ac049b63ad820163.zip
fixed setActorCostume for COMI; fixees bug #754421 and hopefully also the issue described in patch #696033
svn-id: r9191
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index 870de11b5a..ef5cef6267 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -1174,17 +1174,31 @@ void Actor::setActorCostume(int c) {
int i;
costumeNeedsInit = true;
-
- if (visible) {
- hideActor();
+
+ if (_vm->_version == 8) {
cost.reset();
+ memset(animVariable, 0, sizeof(animVariable));
costume = c;
- showActor();
+
+ if (visible) {
+ if (costume) {
+ _vm->ensureResourceLoaded(rtCostume, costume);
+ }
+ startAnimActor(initFrame);
+ }
} else {
- costume = c;
- cost.reset();
+ if (visible) {
+ hideActor();
+ cost.reset();
+ costume = c;
+ showActor();
+ } else {
+ costume = c;
+ cost.reset();
+ }
}
+
if (_vm->_features & GF_NEW_COSTUMES) {
for (i = 0; i < 256; i++)
palette[i] = 0xFF;
@@ -1195,7 +1209,6 @@ void Actor::setActorCostume(int c) {
for (i = 0; i < 32; i++)
palette[i] = 0xFF;
}
-
}
void Actor::startWalkActor(int destX, int destY, int dir) {