aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2004-07-26 15:14:10 +0000
committerTravis Howell2004-07-26 15:14:10 +0000
commitf28adf7a6c57e16f97d97bd1e919eaaf591d09a4 (patch)
tree13b33e9c1d28d6513a6c2547c3c4ed61707f4a7b /scumm
parentc460aae163fce421c0d3427e7b31e5a88e1e5686 (diff)
downloadscummvm-rg350-f28adf7a6c57e16f97d97bd1e919eaaf591d09a4.tar.gz
scummvm-rg350-f28adf7a6c57e16f97d97bd1e919eaaf591d09a4.tar.bz2
scummvm-rg350-f28adf7a6c57e16f97d97bd1e919eaaf591d09a4.zip
Keep compatbility with older saved games.
svn-id: r14339
Diffstat (limited to 'scumm')
-rw-r--r--scumm/actor.cpp11
-rw-r--r--scumm/saveload.cpp3
-rw-r--r--scumm/scumm.cpp11
-rw-r--r--scumm/scumm.h1
4 files changed, 20 insertions, 6 deletions
diff --git a/scumm/actor.cpp b/scumm/actor.cpp
index c0df1c4903..e9f2f529ff 100644
--- a/scumm/actor.cpp
+++ b/scumm/actor.cpp
@@ -811,6 +811,17 @@ void ScummEngine::putActors() {
}
}
+static const int v1MMActorTalkColor[25] = {
+ 1, 7, 2, 14, 8, 1, 3, 7, 7, 12, 1, 13, 1, 4, 5, 5, 4, 3, 1, 5, 1, 1, 1, 7, 7
+};
+
+void ScummEngine::setupV1ActorTalkColor() {
+ int i;
+
+ for (i = 1; i < _numActors; i++)
+ _actors[i].talkColor = v1MMActorTalkColor[i];
+}
+
void ScummEngine::showActors() {
int i;
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index ce631b40d4..bb1a992a97 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -256,6 +256,9 @@ bool ScummEngine::loadState(int slot, bool compat) {
setDirtyColors(0, 255);
+ if (_gameId == GID_MANIAC && _version == 1)
+ setupV1ActorTalkColor();
+
// Regenerate strip table (for V1/V2 games)
if (_version == 1) {
roomptr = getResourceAddress(rtRoom, _roomResource);
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 5e445f1b58..c43ca59122 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1101,8 +1101,6 @@ void ScummEngine::launch() {
}
}
-int v1MMActorTalkColor[] = {1, 7, 2, 14, 8, 1, 3, 7, 7, 12, 1, 13, 1, 4, 5, 5, 4, 3, 1, 5, 1, 1, 1, 7, 7, 0};
-
void ScummEngine::scummInit() {
int i;
@@ -1166,13 +1164,14 @@ void ScummEngine::scummInit() {
// this is from IDB
if ((_version == 1) || (_gameId == GID_MANIAC && _demoMode)) {
_actors[i].setActorCostume(i);
- _actors[i].talkColor = v1MMActorTalkColor[i];
}
}
- // HACK Some palette changes needed for demo script
- // in Maniac Mansion (Enchanced)
- if (_gameId == GID_MANIAC && _version == 2 && _demoMode) {
+ if (_gameId == GID_MANIAC && _version == 1) {
+ setupV1ActorTalkColor();
+ } else if (_gameId == GID_MANIAC && _version == 2 && _demoMode) {
+ // HACK Some palette changes needed for demo script
+ // in Maniac Mansion (Enchanced)
_actors[3].setPalette(3, 1);
_actors[9].talkColor = 15;
_actors[10].talkColor = 7;
diff --git a/scumm/scumm.h b/scumm/scumm.h
index eb47e1b14d..82ba9704a5 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -798,6 +798,7 @@ protected:
void setActorRedrawFlags();
void putActors();
void showActors();
+ void setupV1ActorTalkColor();
void resetActorBgs();
void processActors();
void processUpperActors();