diff options
author | Martin Kiewitz | 2015-04-19 15:49:43 +0200 |
---|---|---|
committer | Martin Kiewitz | 2015-04-19 15:49:43 +0200 |
commit | 062c535d1b0afbad79b6191468d7d70f68fe9443 (patch) | |
tree | 6c3f7a5a767e5d301e4492626908d7dd49d3f60d /engines/sci | |
parent | 270fbf2d6a706f526d765890f48d42db98e43969 (diff) | |
download | scummvm-rg350-062c535d1b0afbad79b6191468d7d70f68fe9443.tar.gz scummvm-rg350-062c535d1b0afbad79b6191468d7d70f68fe9443.tar.bz2 scummvm-rg350-062c535d1b0afbad79b6191468d7d70f68fe9443.zip |
SCI: workaround sig pq2/demo:lb+hq1 migrated
- also kDisplay cleanup, removed dummy opcodes
- workarounds should be used instead
- fixed hq1 workaround entry, it seems we are able
to read vocabulary now
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/workarounds.cpp | 35 | ||||
-rw-r--r-- | engines/sci/graphics/paint16.cpp | 19 |
2 files changed, 28 insertions, 26 deletions
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 5a03b35171..ebf587183c 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -346,15 +346,36 @@ const SciWorkaroundEntry kDeviceInfo_workarounds[] = { SCI_WORKAROUNDENTRY_TERMINATOR }; +// Game: Police Quest 2 +// Calling method: rm23Script::elements +// Subroutine offset: English 1.001.000: 0x04ae, English 1.002.011: 0x04ca, Japanese: 0x04eb (script 23) +// Applies to at least: English PC floppy, Japanese PC-9801 +static const uint16 sig_kDisplay_pq2_1[] = { + 0x35, 0x00, // ldi 00 + 0xa3, 0x09, // sal local[9] + 0x35, 0x01, // ldi 01 + 0xa3, 0x0a, // sal local[0Ah] + 0x38, SIG_ADDTOOFFSET(+2), // pushi selector[drawPic] TODO: implement selectors + 0x7a, // push2 + 0x39, 0x5a, // pushi 5Ah + 0x7a, // push2 + 0x81, 0x02, // lag global[2] + 0x4a, 0x08, // send 08 + SIG_END +}; + // gameID, room,script,lvl, object-name, method-name, call, callSig, index, workaround const SciWorkaroundEntry kDisplay_workarounds[] = { - { GID_ISLANDBRAIN, 300, 300, 0, "geneDude", "show", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the gene explanation chart - a parameter is an object - { GID_PQ2, 23, 23, 0, "rm23Script", "elements", 0x4ae, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of pate's file - 0x75 as id - { GID_PQ2, 23, 23, 0, "rm23Script", "elements", 0x4c1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of pate's file - 0x75 as id (another pq2 version, bug #5223) - { GID_QFG1, 11, 11, 0, "battle", "<noname90>", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: When entering battle, 0x75 as id - { GID_SQ4, 397, 0, 0, "", "export 12", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // FLOPPY: when going into the computer store - bug #5227 - { GID_SQ4, 391, 391, 0, "doCatalog", "mode", 0x84, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // CD: clicking on catalog in roboter sale - a parameter is an object - { GID_SQ4, 391, 391, 0, "choosePlug", "changeState", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // CD: ordering connector in roboter sale - a parameter is an object + { GID_ISLANDBRAIN, 300, 300, 0, "geneDude", "show", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the gene explanation chart - a parameter is an object + { GID_LONGBOW, 95, 95, 0, "countDown", "changeState", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during title screen "Robin Hood! Your bow is needed" + { GID_LONGBOW, 220, 220, 0, "moveOn", "changeState", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during second room "Outwit and outfight..." + { GID_LONGBOW, 210, 210, 0, "mama", "changeState", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during third room "Fall under the spell..." + { GID_LONGBOW, 320, 320, 0, "flyin", "changeState", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: during fourth room "Conspiracies, love..." + { GID_PQ2, 23, 23, 0, "rm23Script", "elements", -1, sig_kDisplay_pq2_1, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of pate's file - 0x75 as id - bug #5223 + { GID_QFG1, 11, 11, 0, "battle", "init", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: When entering battle, 0x75 as id + { GID_SQ4, 397, 0, 0, "", "export 12", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // FLOPPY: when going into the computer store - bug #5227 + { GID_SQ4, 391, 391, 0, "doCatalog", "mode", 0x84, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // CD: clicking on catalog in roboter sale - a parameter is an object + { GID_SQ4, 391, 391, 0, "choosePlug", "changeState", -1, NULL, 0, { WORKAROUND_IGNORE, 0 } }, // CD: ordering connector in roboter sale - a parameter is an object SCI_WORKAROUNDENTRY_TERMINATOR }; diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp index f80703e14d..6004e9ce7a 100644 --- a/engines/sci/graphics/paint16.cpp +++ b/engines/sci/graphics/paint16.cpp @@ -471,9 +471,6 @@ void GfxPaint16::kernelGraphRedrawBox(Common::Rect rect) { #define SCI_DISPLAY_WIDTH 106 #define SCI_DISPLAY_SAVEUNDER 107 #define SCI_DISPLAY_RESTOREUNDER 108 -#define SCI_DISPLAY_DUMMY1 114 -#define SCI_DISPLAY_DUMMY2 115 -#define SCI_DISPLAY_DUMMY3 117 #define SCI_DISPLAY_DONTSHOWBITS 121 reg_t GfxPaint16::kernelDisplay(const char *text, uint16 languageSplitter, int argc, reg_t *argv) { @@ -543,22 +540,6 @@ reg_t GfxPaint16::kernelDisplay(const char *text, uint16 languageSplitter, int a bRedraw = 0; break; - // The following three dummy calls are not supported by the Sierra SCI - // interpreter, but are erroneously called in some game scripts. - case SCI_DISPLAY_DUMMY1: // Longbow demo (all rooms) and QFG1 EGA demo (room 11) - case SCI_DISPLAY_DUMMY2: // Longbow demo (all rooms) - case SCI_DISPLAY_DUMMY3: // QFG1 EGA demo (room 11) and PQ2 (room 23) - if (!(g_sci->getGameId() == GID_LONGBOW && g_sci->isDemo()) && - !(g_sci->getGameId() == GID_QFG1 && g_sci->isDemo()) && - !(g_sci->getGameId() == GID_PQ2)) - error("Unknown kDisplay argument %d", displayArg.getOffset()); - - if (displayArg.getOffset() == SCI_DISPLAY_DUMMY2) { - if (!argc) - error("No parameter left for kDisplay(115)"); - argc--; argv++; - } - break; default: SciTrackOriginReply originReply; SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, kDisplay_workarounds, &originReply); |