aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/eob.cpp8
-rw-r--r--engines/kyra/eob.h1
-rw-r--r--engines/kyra/eobcommon.h2
-rw-r--r--engines/kyra/sprites_eob.cpp9
4 files changed, 10 insertions, 10 deletions
diff --git a/engines/kyra/eob.cpp b/engines/kyra/eob.cpp
index 1fb4d0a790..05b1e03b96 100644
--- a/engines/kyra/eob.cpp
+++ b/engines/kyra/eob.cpp
@@ -338,6 +338,14 @@ void EoBEngine::replaceMonster(int unit, uint16 block, int pos, int dir, int typ
}
}
+bool EoBEngine::killMonsterExtra(EoBMonsterInPlay *m) {
+ if (m->type == 21) {
+ _playFinale = true;
+ _runFlag = false;
+ }
+ return true;
+}
+
void EoBEngine::updateScriptTimersExtra() {
int cnt = 0;
for (int i = 1; i < 30; i++) {
diff --git a/engines/kyra/eob.h b/engines/kyra/eob.h
index bf5440b942..b423b0da9d 100644
--- a/engines/kyra/eob.h
+++ b/engines/kyra/eob.h
@@ -74,6 +74,7 @@ private:
// Monsters
void replaceMonster(int unit, uint16 block, int d, int dir, int type, int shpIndex, int mode, int h2, int randItem, int fixedItem);
+ bool killMonsterExtra(EoBMonsterInPlay *m);
void updateScriptTimersExtra();
// Level
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index 1a74321364..6421159dbe 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -487,7 +487,7 @@ protected:
void placeMonster(EoBMonsterInPlay *m, uint16 block, int dir);
virtual void replaceMonster(int b, uint16 block, int pos, int dir, int type, int shpIndex, int mode, int h2, int randItem, int fixedItem) = 0;
void killMonster(EoBMonsterInPlay *m, bool giveExperience);
- virtual bool killMonsterExtra(EoBMonsterInPlay *m);
+ virtual bool killMonsterExtra(EoBMonsterInPlay *m) = 0;
int countSpecificMonsters(int type);
void updateAttackingMonsterFlags();
diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp
index 1d4c143185..b96f2eca08 100644
--- a/engines/kyra/sprites_eob.cpp
+++ b/engines/kyra/sprites_eob.cpp
@@ -213,20 +213,11 @@ void EoBCoreEngine::killMonster(EoBMonsterInPlay *m, bool giveExperience) {
if (killMonsterExtra(m)) {
placeMonster(m, 0, -1);
- if ((_flags.gameID == GI_EOB1) && (m->type == 21)) {
- _playFinale = true;
- _runFlag = false;
- }
-
if (m->mode == 8)
updateAttackingMonsterFlags();
}
}
-bool EoBCoreEngine::killMonsterExtra(EoBMonsterInPlay *) {
- return true;
-}
-
int EoBCoreEngine::countSpecificMonsters(int type) {
int res = 0;
for (int i = 0; i < 30; i++) {