diff options
author | Matthew Hoops | 2010-07-28 03:54:14 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-07-28 03:54:14 +0000 |
commit | 50e493f3ef368847b95d443bee13f6918bbab34e (patch) | |
tree | 781784fa8775fc3b156170b3fbcaa777fa54e4e5 | |
parent | 97b1cd34cf5b41c08e3e80f3dd9ce59db9865093 (diff) | |
download | scummvm-rg350-50e493f3ef368847b95d443bee13f6918bbab34e.tar.gz scummvm-rg350-50e493f3ef368847b95d443bee13f6918bbab34e.tar.bz2 scummvm-rg350-50e493f3ef368847b95d443bee13f6918bbab34e.zip |
SCI: Fix bug #3035720 - SQ1SCI demo: Menu crash
kCelWide and kCelHigh are called with the second two parameters as objects instead of integers. We fake return the real width/height of the view in question to allow the quit menu to work. Values found by examining the view passed as the first parameter.
svn-id: r51401
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 4 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.cpp | 12 | ||||
-rw-r--r-- | engines/sci/engine/workarounds.h | 2 |
3 files changed, 16 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 8e245d6b4c..de791c7c51 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -309,8 +309,8 @@ static SciKernelMapEntry s_kernelMap[] = { { "CantBeHere", kCantBeHere32, SIG_SCI32, SIGFOR_ALL, "ol", NULL, NULL }, #endif { MAP_CALL(CantBeHere), SIG_EVERYWHERE, "o(l)", NULL, NULL }, - { MAP_CALL(CelHigh), SIG_EVERYWHERE, "ii(i)", NULL, NULL }, - { MAP_CALL(CelWide), SIG_EVERYWHERE, "ii(i)", NULL, NULL }, + { MAP_CALL(CelHigh), SIG_EVERYWHERE, "ii(i)", NULL, kCelHigh_workarounds }, + { MAP_CALL(CelWide), SIG_EVERYWHERE, "ii(i)", NULL, kCelWide_workarounds }, { MAP_CALL(CheckFreeSpace), SIG_SCI32, SIGFOR_ALL, "r.*", NULL, NULL }, { MAP_CALL(CheckFreeSpace), SIG_SCI11, SIGFOR_ALL, "r(i)", NULL, NULL }, { MAP_CALL(CheckFreeSpace), SIG_EVERYWHERE, "r", NULL, NULL }, diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 0a44707644..244066a6e6 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -123,6 +123,18 @@ const SciWorkaroundEntry kAbs_workarounds[] = { }; // gameID, room,script,lvl, object-name, method-name, call,index, workaround +const SciWorkaroundEntry kCelHigh_workarounds[] = { + { GID_SQ1, 1, 255, 0, "DIcon", "setSize", -1, 0, { WORKAROUND_FAKE, 66 } }, // DEMO: Called with 2nd/3rd parameters as objects when clicking on the menu + SCI_WORKAROUNDENTRY_TERMINATOR +}; + +// gameID, room,script,lvl, object-name, method-name, call,index, workaround +const SciWorkaroundEntry kCelWide_workarounds[] = { + { GID_SQ1, 1, 255, 0, "DIcon", "setSize", -1, 0, { WORKAROUND_FAKE, 78 } }, // DEMO: Called with 2nd/3rd parameters as objects when clicking on the menu + SCI_WORKAROUNDENTRY_TERMINATOR +}; + +// 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_SQ4, 391, 391, 0, "doCatalog", "mode", 0x84, 0, { WORKAROUND_IGNORE, 0 } }, // clicking on catalog in roboter sale - a parameter is an object diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h index 01c7676247..d509d300d7 100644 --- a/engines/sci/engine/workarounds.h +++ b/engines/sci/engine/workarounds.h @@ -73,6 +73,8 @@ extern const SciWorkaroundEntry opcodeOrWorkarounds[]; extern const SciWorkaroundEntry opcodeDptoaWorkarounds[]; extern const SciWorkaroundEntry uninitializedReadWorkarounds[]; extern const SciWorkaroundEntry kAbs_workarounds[]; +extern const SciWorkaroundEntry kCelHigh_workarounds[]; +extern const SciWorkaroundEntry kCelWide_workarounds[]; extern const SciWorkaroundEntry kDisplay_workarounds[]; extern const SciWorkaroundEntry kDisposeScript_workarounds[]; extern const SciWorkaroundEntry kDoSoundFade_workarounds[]; |