aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.cpp7
-rw-r--r--engines/sci/engine/kmovement.cpp7
2 files changed, 8 insertions, 6 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 9c5997f4ee..d76199c794 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -716,8 +716,11 @@ void Kernel::setDefaultKernelNames(GameFeatures *features) {
_kernelNames = Common::StringArray(s_defaultKernelNames, ARRAYSIZE(s_defaultKernelNames));
// Some (later) SCI versions replaced CanBeHere by CantBeHere
- if (_selectorCache.cantBeHere != -1)
- _kernelNames[0x4d] = "CantBeHere";
+ if (_selectorCache.cantBeHere != -1) {
+ // hoyle 3 has cantBeHere selector but is assuming to call kCanBeHere
+ if (g_sci->getGameId() != GID_HOYLE3)
+ _kernelNames[0x4d] = "CantBeHere";
+ }
switch (getSciVersion()) {
case SCI_VERSION_0_EARLY:
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 95654ce90f..114b6eb755 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -328,9 +328,10 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
bool collision = false;
reg_t cantBeHere = NULL_REG;
- // FIXME here -> cantBeHere detection doesn't work in hoyle 3
- // it's using kCanBeHere but it just has a selector called cantBeHere, so this here doesn't work
if (SELECTOR(cantBeHere) != -1) {
+ // adding this here for hoyle 3 to get happy. CantBeHere is a dummy in hoyle 3 and acc is != 0 so we would
+ // get a collision otherwise
+ s->r_acc = NULL_REG;
invokeSelector(s, client, SELECTOR(cantBeHere), argc, argv);
if (!s->r_acc.isNull())
collision = true;
@@ -357,8 +358,6 @@ reg_t kDoBresen(EngineState *s, int argc, reg_t *argv) {
if (completed)
invokeSelector(s, mover, SELECTOR(moveDone), argc, argv);
- // FIXME here -> cantBeHere detection doesn't work in hoyle 3
- // it's using kCanBeHere but it just has a selector called cantBeHere, so this here doesn't work
if (SELECTOR(cantBeHere) != -1)
return cantBeHere;
return make_reg(0, completed);