aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/items_eob.cpp2
-rw-r--r--engines/kyra/script_eob.cpp3
-rw-r--r--engines/kyra/sprites_eob.cpp4
3 files changed, 3 insertions, 6 deletions
diff --git a/engines/kyra/items_eob.cpp b/engines/kyra/items_eob.cpp
index 98cd634405..f7aed1b920 100644
--- a/engines/kyra/items_eob.cpp
+++ b/engines/kyra/items_eob.cpp
@@ -99,7 +99,7 @@ Kyra::Item EobCoreEngine::duplicateItem(Item itemIndex) {
if (!foundSlot)
return 0;
- memcpy(&_items[i], &_items[itemIndex], sizeof(EobItem));
+ memcpy(&_items[i], itm, sizeof(EobItem));
return i;
}
diff --git a/engines/kyra/script_eob.cpp b/engines/kyra/script_eob.cpp
index c514c8d239..9e18a14fb2 100644
--- a/engines/kyra/script_eob.cpp
+++ b/engines/kyra/script_eob.cpp
@@ -80,8 +80,6 @@ EobInfProcessor::EobInfProcessor(EobCoreEngine *engine, Screen_Eob *screen) : _v
_commandMin(engine->game() == GI_EOB1 ? -27 : -31) {
#define Opcode(x) _opcodes.push_back(new InfProc(this, &EobInfProcessor::x))
-//#define OpcodeAltV(x, y) if (_vm->game() == GI_EOB1) Opcode(x); else Opcode(y);
-//#define OpcodeAlt(x) OpcodeAltV(x##_v1, x##_v2)
#define OpcodeAlt(x) if (_vm->game() == GI_EOB1) Opcode(x##_v1); else Opcode(x##_v2);
Opcode(oeob_setWallType);
Opcode(oeob_toggleWallState);
@@ -114,7 +112,6 @@ EobInfProcessor::EobInfProcessor(EobCoreEngine *engine, Screen_Eob *screen) : _v
Opcode(oeob_dialogue);
Opcode(oeob_specialEvent);
#undef Opcode
-//#undef OpcodeAltV
#undef OpcodeAlt
_scriptData = 0;
diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp
index 1fa89ead3c..109d244569 100644
--- a/engines/kyra/sprites_eob.cpp
+++ b/engines/kyra/sprites_eob.cpp
@@ -941,7 +941,7 @@ bool EobCoreEngine::updateMonsterTryDistanceAttack(EobMonsterInPlay *m) {
case 11:
itm = duplicateItem(60);
if (itm) {
- if (launchObject(-1, itm, m->block, m->pos, m->dir, _items[itm].type))
+ if (!launchObject(-1, itm, m->block, m->pos, m->dir, _items[itm].type))
_items[itm].block = -1;
}
break;
@@ -997,7 +997,7 @@ bool EobCoreEngine::updateMonsterTryDistanceAttack(EobMonsterInPlay *m) {
} else {
itm = duplicateItem(-s);
if (itm) {
- if (launchObject(-1, itm, m->block, m->pos, m->dir, _items[itm].type))
+ if (!launchObject(-1, itm, m->block, m->pos, m->dir, _items[itm].type))
_items[itm].block = -1;
}
}