SCI: Add kDisplay workarounds for the Hero's Quest demo

svn-id: r51742
This commit is contained in:
Matthew Hoops 2010-08-04 17:50:09 +00:00
parent e5ffc7847c
commit 642b03fb44
3 changed files with 13 additions and 6 deletions

View file

@ -68,6 +68,11 @@ const Common::String &Kernel::getSelectorName(uint selector) {
for (uint loopSelector = _selectorNames.size(); loopSelector <= selector; ++loopSelector) for (uint loopSelector = _selectorNames.size(); loopSelector <= selector; ++loopSelector)
_selectorNames.push_back(Common::String::printf("<noname%d>", 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]; return _selectorNames[selector];
} }

View file

@ -173,7 +173,8 @@ const SciWorkaroundEntry kDeviceInfo_workarounds[] = {
// gameID, room,script,lvl, object-name, method-name, call,index, workaround // gameID, room,script,lvl, object-name, method-name, call,index, workaround
const SciWorkaroundEntry kDisplay_workarounds[] = { 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_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, "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 { 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 SCI_WORKAROUNDENTRY_TERMINATOR

View file

@ -459,8 +459,8 @@ void GfxPaint16::kernelGraphRedrawBox(Common::Rect rect) {
#define SCI_DISPLAY_WIDTH 106 #define SCI_DISPLAY_WIDTH 106
#define SCI_DISPLAY_SAVEUNDER 107 #define SCI_DISPLAY_SAVEUNDER 107
#define SCI_DISPLAY_RESTOREUNDER 108 #define SCI_DISPLAY_RESTOREUNDER 108
#define SCI_DISPLAY_DUMMY1 114 // used in longbow-demo, not supported in sierra sci - no parameters #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_DUMMY2 115 // used in longbow demo, not supported in sierra sci - has 1 parameter
#define SCI_DISPLAY_DONTSHOWBITS 121 #define SCI_DISPLAY_DONTSHOWBITS 121
reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { 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; break;
// 2 Dummy functions, longbow-demo is using those several times but sierra sci doesn't support them at all // 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_DUMMY1:
case SCI_DISPLAY_DUMMY2: case SCI_DISPLAY_DUMMY2:
if (!((g_sci->getGameId() == GID_LONGBOW) && (g_sci->isDemo()))) if (!g_sci->isDemo() || (g_sci->getGameId() != GID_LONGBOW && g_sci->getGameId() != GID_QFG1))
error("Unknown kDisplay argument %X", displayArg.offset); error("Unknown kDisplay argument %d", displayArg.offset);
if (displayArg.offset == SCI_DISPLAY_DUMMY2) { if (displayArg.offset == SCI_DISPLAY_DUMMY2) {
if (argc) { if (argc) {
argc--; argv++; argc--; argv++;
} else { } else {
error("No parameter left for kDisplay(0x73)"); error("No parameter left for kDisplay(115)");
} }
} }
break; break;