[Scummvm-git-logs] scummvm master -> 4c06e04a876be94bb541884bd2d0bee36b438761
bluegr
noreply at scummvm.org
Sat Jun 18 18:58:33 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4c06e04a87 SCUMM: [RFC] Make clicking the Maniac Mansion sentence line work like the manual says
Commit: 4c06e04a876be94bb541884bd2d0bee36b438761
https://github.com/scummvm/scummvm/commit/4c06e04a876be94bb541884bd2d0bee36b438761
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2022-06-18T21:58:30+03:00
Commit Message:
SCUMM: [RFC] Make clicking the Maniac Mansion sentence line work like the manual says
According to the manual, you can execute commands by clicking on the
sentence line. But this doesn't work with the v1 or v2 DOS versions,
even though it works with the C64 demo. This is because the verb script
doesn't for this, so we have to do that ourselves. This is loosely based
on how Zak McKracken does it.
Changed paths:
engines/scumm/detection_tables.h
engines/scumm/script_v2.cpp
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index d3235aa2c35..07fb758171a 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -156,10 +156,10 @@ static const GameSettings gameVariantsTable[] = {
{"maniac", "Apple II", 0, GID_MANIAC, 0, 0, MDT_APPLEIIGS, 0, Common::kPlatformApple2GS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"maniac", "C64", 0, GID_MANIAC, 0, 0, MDT_C64, 0, Common::kPlatformC64, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI) },
{"maniac", "C64 Demo", 0, GID_MANIAC, 0, 0, MDT_C64, GF_DEMO, Common::kPlatformC64, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI) },
- {"maniac", "V1", "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, 0, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"maniac", "V1", "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, 0, Common::kPlatformDOS, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
{"maniac", "V1 Demo", "v1", GID_MANIAC, 1, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"maniac", "NES", 0, GID_MANIAC, 1, 0, MDT_NONE, 0, Common::kPlatformNES, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_NOASPECT, GUIO_ENHANCEMENTS)},
- {"maniac", "V2", "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+ {"maniac", "V2", "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO3(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_ENHANCEMENTS)},
{"maniac", "V2 Demo", "v2", GID_MANIAC, 2, 0, MDT_PCSPK | MDT_PCJR, GF_DEMO, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
{"zak", "V1", "v1", GID_ZAK, 1, 0, MDT_PCSPK | MDT_PCJR, 0, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index efe0ffcc79b..ba5d347578e 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -451,6 +451,25 @@ void ScummEngine_v2::writeVar(uint var, int value) {
value = 27;
}
+ // WORKAROUND: According to the Maniac Mansion manual, you should be
+ // able to execute your command by clicking on the sentence line. But
+ // this does not work until later games. The main difference between
+ // the verb scripts (script 4) in Maniac Mansion and Zak McKracken is
+ // that Zak will set variable 34 when you click on the sentence line
+ // (as indicated by VAR_CLICK_AREA), and Maniac Mansion will not.
+ //
+ // When VAR_CLICK_AREA is 5, there is only one place where variable 34
+ // is initialized to 0, so that seems like a good place to inject our
+ // own check.
+
+ if (_game.id == GID_MANIAC && (_game.version == 1 || _game.version == 2)
+ && _game.platform != Common::kPlatformNES
+ && vm.slot[_currentScript].number == 4
+ && VAR(VAR_CLICK_AREA) == kSentenceClickArea
+ && var == 34 && value == 0 && _enableEnhancements) {
+ value = 1;
+ }
+
_scummVars[var] = value;
}
More information about the Scummvm-git-logs
mailing list