mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 01:46:42 +00:00
SCI: adding uninit workarounds for cnick games
longbow and king's quest KQ has the same issues as hoyle 3 svn-id: r51063
This commit is contained in:
parent
6ebcb53265
commit
ef69fb1af5
@ -744,9 +744,17 @@ uint Kernel::getSelectorNamesSize() const {
|
||||
return _selectorNames.size();
|
||||
}
|
||||
|
||||
const Common::String &Kernel::getSelectorName(uint selector) const {
|
||||
if (selector >= _selectorNames.size())
|
||||
return _invalid;
|
||||
const Common::String &Kernel::getSelectorName(uint selector) {
|
||||
if (selector >= _selectorNames.size()) {
|
||||
// This should only occur in games w/o a selector-table
|
||||
// We need this for proper workaround tables
|
||||
// TODO: maybe check, if there is a fixed selector-table and error() out in that case
|
||||
for (uint loopSelector = _selectorNames.size(); loopSelector <= selector; loopSelector++) {
|
||||
Common::String newSelectorName;
|
||||
newSelectorName = newSelectorName.printf("<noname %d>", loopSelector);
|
||||
_selectorNames.push_back(newSelectorName);
|
||||
}
|
||||
}
|
||||
return _selectorNames[selector];
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ public:
|
||||
~Kernel();
|
||||
|
||||
uint getSelectorNamesSize() const;
|
||||
const Common::String &getSelectorName(uint selector) const;
|
||||
const Common::String &getSelectorName(uint selector);
|
||||
|
||||
uint getKernelNamesSize() const;
|
||||
const Common::String &getKernelName(uint number) const;
|
||||
|
@ -378,6 +378,10 @@ static reg_t arithmetic_lookForWorkaround(const byte opcode, const SciWorkaround
|
||||
|
||||
// gameID, room,script,lvl, object-name, method-name, call, index, replace
|
||||
static const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
|
||||
{ GID_CNICK_KQ, 200, 0, 1, "Character", "<noname 446>", -1, 504, { 0, 0 } }, // checkers, like in hoyle 3
|
||||
{ GID_CNICK_KQ, 200, 0, 1, "Character", "<noname 446>", -1, 505, { 0, 0 } }, // checkers, like in hoyle 3
|
||||
{ GID_CNICK_KQ, -1, 700, 0, "gcWindow", "<noname 183>", -1, -1, { 0, 0 } }, // when entering control menu, like in hoyle 3
|
||||
{ GID_CNICK_LONGBOW, 0, 0, 0, "RH Budget", "<noname 110>", -1, 1, { 0, 0 } }, // when starting the game
|
||||
{ GID_FREDDYPHARKAS, -1, 24, 0, "gcWin", "open", -1, 5, { 0, 0xf } }, // is used as priority for game menu
|
||||
{ GID_FREDDYPHARKAS, -1, 31, 0, "quitWin", "open", -1, 5, { 0, 0xf } }, // is used as priority for game menu
|
||||
{ GID_GK1, -1, 64950, 1, "Feature", "handleEvent", -1, 0, { 0, 0 } }, // sometimes when walk-clicking
|
||||
|
Loading…
x
Reference in New Issue
Block a user