diff options
author | Kari Salminen | 2008-01-05 21:10:49 +0000 |
---|---|---|
committer | Kari Salminen | 2008-01-05 21:10:49 +0000 |
commit | 64601d446f3de6099e3f2d043bfde3136e4a330d (patch) | |
tree | ba333611f7e7c29355e4bad60a994a0d107e3d64 | |
parent | 3f6b2c97b7c406ffc2c81892a008053f5ebd38bd (diff) | |
download | scummvm-rg350-64601d446f3de6099e3f2d043bfde3136e4a330d.tar.gz scummvm-rg350-64601d446f3de6099e3f2d043bfde3136e4a330d.tar.bz2 scummvm-rg350-64601d446f3de6099e3f2d043bfde3136e4a330d.zip |
Workaround for Amiga Gold Rush's broken picture 147 by patching it.
svn-id: r30263
-rw-r--r-- | engines/agi/agi.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index a50241e70c..109278fb94 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -24,7 +24,7 @@ */ - +#include "common/md5.h" #include "common/events.h" #include "common/file.h" #include "common/savefile.h" @@ -515,6 +515,23 @@ int AgiEngine::agiLoadResource(int r, int n) { i = _loader->loadResource(r, n); + // WORKAROUND: Patches broken picture 147 in a corrupted Amiga version of Gold Rush! (v2.05 1989-03-09). + // The picture can be seen in room 147 after dropping through the outhouse's hole in room 146. + if (i == errOK && getGameID() == GID_GOLDRUSH && r == rPICTURE && n == 147 && _game.dirPic[n].len == 1982) { + uint8 *pic = _game.pictures[n].rdata; + Common::MemoryReadStream picStream(pic, _game.dirPic[n].len); + char md5str[32+1]; + Common::md5_file_string(picStream, md5str, _game.dirPic[n].len); + if (scumm_stricmp(md5str, "1c685eb048656cedcee4eb6eca2cecea") == 0) { + pic[0x042] = 0x4B; // 0x49 -> 0x4B + pic[0x043] = 0x66; // 0x26 -> 0x66 + pic[0x204] = 0x68; // 0x28 -> 0x68 + pic[0x6C0] = 0x2D; // 0x25 -> 0x2D + pic[0x6F0] = 0xF0; // 0x70 -> 0xF0 + pic[0x734] = 0x6F; // 0x2F -> 0x6F + } + } + return i; } |