Skip to content

Commit

Permalink
KYRA: (EOB) - minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
athrxx committed Apr 21, 2013
1 parent e37a542 commit 5d943f6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 8 additions & 0 deletions engines/kyra/eob.cpp
Expand Up @@ -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++) {
Expand Down
1 change: 1 addition & 0 deletions engines/kyra/eob.h
Expand Up @@ -74,6 +74,7 @@ friend class EoBIntroPlayer;

// 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
Expand Down
2 changes: 1 addition & 1 deletion engines/kyra/eobcommon.h
Expand Up @@ -487,7 +487,7 @@ friend class TransferPartyWiz;
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();

Expand Down
9 changes: 0 additions & 9 deletions engines/kyra/sprites_eob.cpp
Expand Up @@ -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++) {
Expand Down

0 comments on commit 5d943f6

Please sign in to comment.