aboutsummaryrefslogtreecommitdiff
path: root/engines/adl/hires5.cpp
diff options
context:
space:
mode:
authorWalter van Niftrik2016-12-18 17:26:57 +0100
committerWalter van Niftrik2016-12-18 18:41:02 +0100
commit2c62e5f99c3bf24630eb37d6ddd34eac330b3d91 (patch)
tree8ba9ebad00905308bafffd0b045d9dbedc1cc8f4 /engines/adl/hires5.cpp
parent87609ef75a446b97de8c834a5ca395ac6e2f998f (diff)
downloadscummvm-rg350-2c62e5f99c3bf24630eb37d6ddd34eac330b3d91.tar.gz
scummvm-rg350-2c62e5f99c3bf24630eb37d6ddd34eac330b3d91.tar.bz2
scummvm-rg350-2c62e5f99c3bf24630eb37d6ddd34eac330b3d91.zip
ADL: Add workarounds for hires5
Diffstat (limited to 'engines/adl/hires5.cpp')
-rw-r--r--engines/adl/hires5.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/engines/adl/hires5.cpp b/engines/adl/hires5.cpp
index f298cecf55..a3ed6d890e 100644
--- a/engines/adl/hires5.cpp
+++ b/engines/adl/hires5.cpp
@@ -45,6 +45,8 @@ private:
void runIntro();
void init();
void initGameState();
+ void applyRegionWorkarounds();
+ void applyRoomWorkarounds(byte roomNr);
// AdlEngine_v4
bool isInventoryFull();
@@ -297,6 +299,36 @@ void HiRes5Engine::initGameState() {
_state.room = 5;
}
+void HiRes5Engine::applyRegionWorkarounds() {
+ // WORKAROUND: Remove/fix buggy commands
+ switch (_state.region) {
+ case 3:
+ // "USE PIN" references a missing message, but cannot
+ // be triggered due to shadowing of the "USE" verb.
+ // We remove it anyway to allow script dumping to proceed.
+ // TODO: Investigate if we should fix this command instead
+ // of removing it.
+ removeCommand(_roomCommands, 12);
+ break;
+ case 14:
+ // "WITH SHOVEL" references a missing message. This bug
+ // is game-breaking in the original, but unlikely to occur
+ // in practice due to the "DIG" command not asking for what
+ // to dig with. Probably a remnant of an earlier version
+ // of the script.
+ removeCommand(_roomCommands, 0);
+ }
+}
+
+void HiRes5Engine::applyRoomWorkarounds(byte roomNr) {
+ // WORKAROUND: Remove/fix buggy commands
+ if (_state.region == 17 && roomNr == 49) {
+ // "GET WATER" references a missing message when you already
+ // have water. This message should be 117 instead of 17.
+ getCommand(_roomData.commands, 8).script[4] = 117;
+ }
+}
+
Engine *HiRes5Engine_create(OSystem *syst, const AdlGameDescription *gd) {
return new HiRes5Engine(syst, gd);
}