mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-23 18:24:59 +00:00
SCI: change the workaround-types
0 is now don't call 1 is do call 2 is don't call and fake acc makes more sense svn-id: r51060
This commit is contained in:
parent
3c97772d6e
commit
0b3f816c8b
@ -231,56 +231,56 @@ static const SciWorkaroundEntry kAbs_workarounds[] = {
|
||||
|
||||
// gameID, room,script,lvl, object-name, method-name, call, index, replace
|
||||
static const SciWorkaroundEntry kDisposeScript_workarounds[] = {
|
||||
{ GID_QFG1, 64, 64, 0, "rm64", "dispose", -1, 0, { 1, 0 } }, // when leaving graveyard, parameter 0 is an object
|
||||
{ GID_QFG1, 64, 64, 0, "rm64", "dispose", -1, 0, { 0, 0 } }, // when leaving graveyard, parameter 0 is an object
|
||||
SCI_WORKAROUNDENTRY_TERMINATOR
|
||||
};
|
||||
|
||||
// gameID, room,script,lvl, object-name, method-name, call, index, replace
|
||||
static const SciWorkaroundEntry kDoSoundFade_workarounds[] = {
|
||||
{ GID_KQ1, -1, 989, 0, "gameSound", "fade", -1, 0, { 1, 0 } }, // gets called in several scenes (e.g. graham cracker) with 0:0
|
||||
{ GID_KQ6, 105, 989, 0, "globalSound", "fade", -1, 0, { 0, 0 } }, // floppy: during intro, parameter 4 is an object
|
||||
{ GID_KQ1, -1, 989, 0, "gameSound", "fade", -1, 0, { 0, 0 } }, // gets called in several scenes (e.g. graham cracker) with 0:0
|
||||
{ GID_KQ6, 105, 989, 0, "globalSound", "fade", -1, 0, { 1, 0 } }, // floppy: during intro, parameter 4 is an object
|
||||
SCI_WORKAROUNDENTRY_TERMINATOR
|
||||
};
|
||||
|
||||
// gameID, room,script,lvl, object-name, method-name, call, index, replace
|
||||
static const SciWorkaroundEntry kGraphRestoreBox_workarounds[] = {
|
||||
{ GID_LSL6, -1, 85, 0, "rScroller", "hide", -1, 0, { 0, 0 } }, // happens when restoring (sometimes), same as the one below
|
||||
{ GID_LSL6, -1, 85, 0, "lScroller", "hide", -1, 0, { 0, 0 } }, // happens when restoring (sometimes), same as the one below
|
||||
{ GID_LSL6, -1, 86, 0, "LL6Inv", "show", -1, 0, { 0, 0 } }, // happens when restoring, is called with hunk segment, but hunk is not allocated at that time
|
||||
{ GID_LSL6, -1, 85, 0, "rScroller", "hide", -1, 0, { 1, 0 } }, // happens when restoring (sometimes), same as the one below
|
||||
{ GID_LSL6, -1, 85, 0, "lScroller", "hide", -1, 0, { 1, 0 } }, // happens when restoring (sometimes), same as the one below
|
||||
{ GID_LSL6, -1, 86, 0, "LL6Inv", "show", -1, 0, { 1, 0 } }, // happens when restoring, is called with hunk segment, but hunk is not allocated at that time
|
||||
// ^^ TODO: check, if this is really a script error or an issue with our restore code
|
||||
{ GID_LSL6, -1, 86, 0, "LL6Inv", "hide", -1, 0, { 0, 0 } }, // happens during the game, gets called with 1 extra parameter
|
||||
{ GID_LSL6, -1, 86, 0, "LL6Inv", "hide", -1, 0, { 1, 0 } }, // happens during the game, gets called with 1 extra parameter
|
||||
SCI_WORKAROUNDENTRY_TERMINATOR
|
||||
};
|
||||
|
||||
// gameID, room,script,lvl, object-name, method-name, call, index, replace
|
||||
static const SciWorkaroundEntry kGraphFillBoxForeground_workarounds[] = {
|
||||
{ GID_LSL6, -1, 0, 0, "LSL6", "hideControls", -1, 0, { 0, 0 } }, // happens when giving the bungee key to merrily (room 240) and at least in room 650 too - gets called with additional 5th parameter
|
||||
{ GID_LSL6, -1, 0, 0, "LSL6", "hideControls", -1, 0, { 1, 0 } }, // happens when giving the bungee key to merrily (room 240) and at least in room 650 too - gets called with additional 5th parameter
|
||||
SCI_WORKAROUNDENTRY_TERMINATOR
|
||||
};
|
||||
|
||||
// gameID, room,script,lvl, object-name, method-name, call, index, replace
|
||||
static const SciWorkaroundEntry kGraphFillBoxAny_workarounds[] = {
|
||||
{ GID_SQ4, -1, 818, 0, "iconTextSwitch", "show", -1, 0, { 0, 0 } }, // game menu "text/speech" display - parameter 5 is missing, but the right color number is on the stack
|
||||
{ GID_SQ4, -1, 818, 0, "iconTextSwitch", "show", -1, 0, { 1, 0 } }, // game menu "text/speech" display - parameter 5 is missing, but the right color number is on the stack
|
||||
SCI_WORKAROUNDENTRY_TERMINATOR
|
||||
};
|
||||
|
||||
// gameID, room,script,lvl, object-name, method-name, call, index, replace
|
||||
static const SciWorkaroundEntry kSetPort_workarounds[] = {
|
||||
{ GID_LSL6, 740, 740, 0, "rm740", "drawPic", -1, 0, { 1, 0 } }, // ending scene, is called with additional 3 (!) parameters
|
||||
{ GID_LSL6, 740, 740, 0, "rm740", "drawPic", -1, 0, { 0, 0 } }, // ending scene, is called with additional 3 (!) parameters
|
||||
SCI_WORKAROUNDENTRY_TERMINATOR
|
||||
};
|
||||
|
||||
// gameID, room,script,lvl, object-name, method-name, call, index, replace
|
||||
static const SciWorkaroundEntry kUnLoad_workarounds[] = {
|
||||
{ GID_LSL6, 130, 130, 0, "recruitLarryScr", "changeState", -1, 0, { 1, 0 } }, // during intro, a 3rd parameter is passed by accident
|
||||
{ GID_LSL6, 740, 740, 0, "showCartoon", "changeState", -1, 0, { 1, 0 } }, // during ending, 4 additional parameters are passed by accident
|
||||
{ GID_SQ1, 43, 303, 0, "slotGuy", "dispose", -1, 0, { 1, 0 } }, // when leaving ulence flats bar, parameter 1 is not passed - script error
|
||||
{ GID_LSL6, 130, 130, 0, "recruitLarryScr", "changeState", -1, 0, { 0, 0 } }, // during intro, a 3rd parameter is passed by accident
|
||||
{ GID_LSL6, 740, 740, 0, "showCartoon", "changeState", -1, 0, { 0, 0 } }, // during ending, 4 additional parameters are passed by accident
|
||||
{ GID_SQ1, 43, 303, 0, "slotGuy", "dispose", -1, 0, { 0, 0 } }, // when leaving ulence flats bar, parameter 1 is not passed - script error
|
||||
SCI_WORKAROUNDENTRY_TERMINATOR
|
||||
};
|
||||
|
||||
// gameID, room,script,lvl, object-name, method-name, call, index, replace
|
||||
static const SciWorkaroundEntry kStrCpy_workarounds[] = {
|
||||
{ GID_ISLANDBRAIN, 260, 45, 0, "aWord", "addOn", -1, 0, { 0, 0 } }, // Hominy Homonym puzzle
|
||||
{ GID_ISLANDBRAIN, 260, 45, 0, "aWord", "addOn", -1, 0, { 1, 0 } }, // Hominy Homonym puzzle
|
||||
SCI_WORKAROUNDENTRY_TERMINATOR
|
||||
};
|
||||
|
||||
|
@ -882,10 +882,17 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) {
|
||||
error("[VM] k%s[%x]: signature mismatch via method %s::%s (script %d, localCall %x)", kernelCall.name, kernelCallNr, originReply.objectName.c_str(), originReply.methodName.c_str(), originReply.scriptNr, originReply.localCallOffset);
|
||||
}
|
||||
// FIXME: implement some real workaround type logic - ignore call, still do call etc.
|
||||
if (workaround.segment == 2)
|
||||
s->r_acc = make_reg(0, workaround.offset);
|
||||
if (workaround.segment)
|
||||
switch (workaround.segment) {
|
||||
case 0: // don't do kernel call, leave acc alone
|
||||
return;
|
||||
case 1: // call kernel anyway
|
||||
break;
|
||||
case 2: // don't do kernel call, fake acc
|
||||
s->r_acc = make_reg(0, workaround.offset);
|
||||
return;
|
||||
default:
|
||||
error("unknown workaround type");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user