diff options
author | johndoe123 | 2014-01-30 20:18:55 +0100 |
---|---|---|
committer | johndoe123 | 2014-01-30 20:18:55 +0100 |
commit | cf51529cfd0fedb33b1b0c70beb59997b21cfc5b (patch) | |
tree | 1df30e23c7f1eac7ca4a8ddfba40c89c2577dda7 /engines/agi | |
parent | 542197a891eac799855571fe2849e0dca43bdd2b (diff) | |
parent | 462f7c1c24a48b7555316a3afae357bad14cc14b (diff) | |
download | scummvm-rg350-cf51529cfd0fedb33b1b0c70beb59997b21cfc5b.tar.gz scummvm-rg350-cf51529cfd0fedb33b1b0c70beb59997b21cfc5b.tar.bz2 scummvm-rg350-cf51529cfd0fedb33b1b0c70beb59997b21cfc5b.zip |
Merge remote-tracking branch 'origin/master' into bbvs
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/configure.engine | 3 | ||||
-rw-r--r-- | engines/agi/detection_tables.h | 1 | ||||
-rw-r--r-- | engines/agi/loader_v1.cpp | 2 | ||||
-rw-r--r-- | engines/agi/loader_v2.cpp | 2 | ||||
-rw-r--r-- | engines/agi/loader_v3.cpp | 2 | ||||
-rw-r--r-- | engines/agi/opcodes.cpp | 24 | ||||
-rw-r--r-- | engines/agi/preagi_mickey.cpp | 2 | ||||
-rw-r--r-- | engines/agi/words.cpp | 23 |
8 files changed, 37 insertions, 22 deletions
diff --git a/engines/agi/configure.engine b/engines/agi/configure.engine new file mode 100644 index 0000000000..fad659f86d --- /dev/null +++ b/engines/agi/configure.engine @@ -0,0 +1,3 @@ +# This file is included from the main "configure" script +# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] +add_engine agi "AGI" yes diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h index f1bb079ffc..a7a3920df8 100644 --- a/engines/agi/detection_tables.h +++ b/engines/agi/detection_tables.h @@ -849,6 +849,7 @@ static const AGIGameDescription gameDescriptions[] = { FANMADE("Tonight The Shrieking Corpses Bleed (Demo v0.11)", "bcc57a7c8d563fa0c333107ae1c0a6e6"), FANMADE("Tonight The Shrieking Corpses Bleed (v1.01)", "36b38f621b38e8d104aa0807302dc8c9"), FANMADE("Turks' Quest - Heir to the Planet", "3d19254b737c8b218e5bc4580542b79a"), + FANMADE("Ultimate AGI Fangame (Demo)", "2d14d6fa2a2136d681e46e06821905bf"), FANMADE("URI Quest (v0.173 Feb 27)", "3986eefcf546dafc45f920ae91a697c3"), FANMADE("URI Quest (v0.173 Jan 29)", "494150940d34130605a4f2e67ee40b12"), { diff --git a/engines/agi/loader_v1.cpp b/engines/agi/loader_v1.cpp index 33e956af41..3b862ed91f 100644 --- a/engines/agi/loader_v1.cpp +++ b/engines/agi/loader_v1.cpp @@ -202,7 +202,7 @@ int AgiLoader_v1::loadResource(int t, int n) { uint8 *data = NULL; debugC(3, kDebugLevelResources, "(t = %d, n = %d)", t, n); - if (n > MAX_DIRS) + if (n >= MAX_DIRS) return errBadResource; switch (t) { diff --git a/engines/agi/loader_v2.cpp b/engines/agi/loader_v2.cpp index ee69bb5b27..458927a3bc 100644 --- a/engines/agi/loader_v2.cpp +++ b/engines/agi/loader_v2.cpp @@ -178,7 +178,7 @@ int AgiLoader_v2::loadResource(int t, int n) { uint8 *data = NULL; debugC(3, kDebugLevelResources, "(t = %d, n = %d)", t, n); - if (n > MAX_DIRS) + if (n >= MAX_DIRS) return errBadResource; switch (t) { diff --git a/engines/agi/loader_v3.cpp b/engines/agi/loader_v3.cpp index 250d8e7615..1dd00dc18e 100644 --- a/engines/agi/loader_v3.cpp +++ b/engines/agi/loader_v3.cpp @@ -257,7 +257,7 @@ int AgiLoader_v3::loadResource(int t, int n) { int ec = errOK; uint8 *data = NULL; - if (n > MAX_DIRS) + if (n >= MAX_DIRS) return errBadResource; switch (t) { diff --git a/engines/agi/opcodes.cpp b/engines/agi/opcodes.cpp index 807ab2dc2c..d893e44c12 100644 --- a/engines/agi/opcodes.cpp +++ b/engines/agi/opcodes.cpp @@ -367,6 +367,18 @@ void AgiEngine::setupOpcodes() { logicNamesTest = insV2Test; logicNamesCmd = insV2; + + // Alter opcode parameters for specific games + // TODO: This could be either turned into a game feature, or a version + // specific check, instead of a game version check + + // The Apple IIGS versions of MH1 and Goldrush both have a parameter for + // show.mouse and hide.mouse. Fixes bugs #3577754 and #3426946. + if ((getGameID() == GID_MH1 || getGameID() == GID_GOLDRUSH) && + getPlatform() == Common::kPlatformApple2GS) { + logicNamesCmd[176].args = "n"; // hide.mouse + logicNamesCmd[178].args = "n"; // show.mouse + } } else { for (int i = 0; i < ARRAYSIZE(insV1Test); ++i) _agiCondCommands[i] = insV1Test[i].func; @@ -376,18 +388,6 @@ void AgiEngine::setupOpcodes() { logicNamesTest = insV1Test; logicNamesCmd = insV1; } - - // Alter opcode parameters for specific games - // TODO: This could be either turned into a game feature, or a version - // specific check, instead of a game version check - - // The Apple IIGS versions of MH1 and Goldrush both have a parameter for - // show.mouse and hide.mouse. Fixes bugs #3577754 and #3426946. - if ((getGameID() == GID_MH1 || getGameID() == GID_GOLDRUSH) && - getPlatform() == Common::kPlatformApple2GS) { - logicNamesCmd[176].args = "n"; // hide.mouse - logicNamesCmd[178].args = "n"; // show.mouse - } } } diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp index ed4882fcab..d0f6540651 100644 --- a/engines/agi/preagi_mickey.cpp +++ b/engines/agi/preagi_mickey.cpp @@ -850,7 +850,7 @@ void MickeyEngine::drawRoomAnimation() { } void MickeyEngine::drawRoom() { - uint8 buffer[256]; + uint8 buffer[512]; int pBuf = 0; int nObjs; diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp index 9c5b3d349a..f423995de8 100644 --- a/engines/agi/words.cpp +++ b/engines/agi/words.cpp @@ -93,14 +93,25 @@ int AgiEngine::loadWords(const char *fname) { } while (!(c & 0x80) && k < (int)sizeof(str) - 1); str[k] = 0; - // And store it in our internal dictionary - AgiWord *w = new AgiWord; - w->word = myStrndup(str, k); - w->id = fp.readUint16BE(); - _game.words[i].push_back(w); + // WORKAROUND: + // The SQ0 fan game stores words starting with numbers (like '7up') + // in its dictionary under the 'a' entry. We skip these. + // See bug #3615061 + if (str[0] == 'a' + i) { + // And store it in our internal dictionary + AgiWord *w = new AgiWord; + w->word = myStrndup(str, k); + w->id = fp.readUint16BE(); + _game.words[i].push_back(w); + } + + k = fp.readByte(); // Are there more words with an already known prefix? - if (!(k = fp.readByte())) + // WORKAROUND: We only break after already seeing words with the + // right prefix, for the SQ0 words starting with digits filed under + // 'a'. See above comment and bug #3615061. + if (k == 0 && str[0] >= 'a' + i) break; } } |