diff options
author | Matthew Hoops | 2010-08-04 17:50:09 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-08-04 17:50:09 +0000 |
commit | 642b03fb44a19109d8f098174fdfa326d2ae5ee5 (patch) | |
tree | 961de07b14e1e7e67d6844b1a999102dccb2bc4d | |
parent | e5ffc7847cb70f792b4658aa032959949e849669 (diff) | |
download | scummvm-rg350-642b03fb44a19109d8f098174fdfa326d2ae5ee5.tar.gz scummvm-rg350-642b03fb44a19109d8f098174fdfa326d2ae5ee5.tar.bz2 scummvm-rg350-642b03fb44a19109d8f098174fdfa326d2ae5ee5.zip |
SCI: Add kDisplay workarounds for the Hero's Quest demo
svn-id: r51742
-rw-r--r-- | engines/sci/engine/kernel.cpp | 5 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.cpp | 3 | ||||
-rw-r--r-- | engines/sci/graphics/paint16.cpp | 11 |
3 files changed, 13 insertions, 6 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 25502100ae..157884fac3 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -68,6 +68,11 @@ const Common::String &Kernel::getSelectorName(uint selector) { for (uint loopSelector = _selectorNames.size(); loopSelector <= selector; ++loopSelector) _selectorNames.push_back(Common::String::printf("<noname%d>", loopSelector)); } + + // Ensure that the selector has a name + if (_selectorNames[selector].empty()) + _selectorNames[selector] = Common::String::printf("<noname%d>", selector); + return _selectorNames[selector]; } diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 63e9089336..9f3509be1d 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -173,7 +173,8 @@ const SciWorkaroundEntry kDeviceInfo_workarounds[] = { // gameID, room,script,lvl, object-name, method-name, call,index, workaround const SciWorkaroundEntry kDisplay_workarounds[] = { { GID_ISLANDBRAIN, 300, 300, 0, "geneDude", "show", -1, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the gene explanation chart - a parameter is an object - { GID_PQ2, 23, 23, 0, "rm23Script", "elements", 0x4ae, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of pate's file - 75h as id + { GID_PQ2, 23, 23, 0, "rm23Script", "elements", 0x4ae, 0, { WORKAROUND_IGNORE, 0 } }, // when looking at the 2nd page of pate's file - 0x75 as id + { GID_QFG1, 11, 11, 0, "battle", "<noname90>", -1, 0, { WORKAROUND_IGNORE, 0 } }, // DEMO: When entering battle, 0x75 as id { GID_SQ4, 391, 391, 0, "doCatalog", "mode", 0x84, 0, { WORKAROUND_IGNORE, 0 } }, // clicking on catalog in roboter sale - a parameter is an object { GID_SQ4, 391, 391, 0, "choosePlug", "changeState", -1, 0, { WORKAROUND_IGNORE, 0 } }, // 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 0685d96073..4551e9dafc 100644 --- a/engines/sci/graphics/paint16.cpp +++ b/engines/sci/graphics/paint16.cpp @@ -459,8 +459,8 @@ 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 // used in longbow-demo, not supported in sierra sci - no parameters -#define SCI_DISPLAY_DUMMY2 115 // used in longbow-demo, not supported in sierra sci - has 1 parameter +#define SCI_DISPLAY_DUMMY1 114 // used in longbow demo/qfg1 ega demo, not supported in sierra sci - no parameters +#define SCI_DISPLAY_DUMMY2 115 // used in longbow demo, not supported in sierra sci - has 1 parameter #define SCI_DISPLAY_DONTSHOWBITS 121 reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { @@ -531,15 +531,16 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { break; // 2 Dummy functions, longbow-demo is using those several times but sierra sci doesn't support them at all + // The Quest for Glory 1 EGA demo also calls kDisplay(114) case SCI_DISPLAY_DUMMY1: case SCI_DISPLAY_DUMMY2: - if (!((g_sci->getGameId() == GID_LONGBOW) && (g_sci->isDemo()))) - error("Unknown kDisplay argument %X", displayArg.offset); + if (!g_sci->isDemo() || (g_sci->getGameId() != GID_LONGBOW && g_sci->getGameId() != GID_QFG1)) + error("Unknown kDisplay argument %d", displayArg.offset); if (displayArg.offset == SCI_DISPLAY_DUMMY2) { if (argc) { argc--; argv++; } else { - error("No parameter left for kDisplay(0x73)"); + error("No parameter left for kDisplay(115)"); } } break; |