From 5d943f6f67bf31264ba4cd914cb34726502c8d41 Mon Sep 17 00:00:00 2001 From: athrxx Date: Sat, 20 Apr 2013 20:43:38 +0200 Subject: KYRA: (EOB) - minor cleanup --- engines/kyra/eob.cpp | 8 ++++++++ engines/kyra/eob.h | 1 + engines/kyra/eobcommon.h | 2 +- engines/kyra/sprites_eob.cpp | 9 --------- 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++) { -- cgit v1.2.3