diff --git a/source/games/blood/src/endgame.cpp b/source/games/blood/src/endgame.cpp index 5e076dd42..3999730d5 100644 --- a/source/games/blood/src/endgame.cpp +++ b/source/games/blood/src/endgame.cpp @@ -58,11 +58,6 @@ void GameInterface::LevelCompleted(MapRecord *map, int skill) } -CKillMgr::CKillMgr() -{ - Clear(); -} - void CKillMgr::SetCount(int nCount) { TotalKills = nCount; @@ -99,11 +94,6 @@ void CKillMgr::Clear(void) TotalKills = Kills = 0; } -CSecretMgr::CSecretMgr(void) -{ - Clear(); -} - void CSecretMgr::SetCount(int nCount) { Total = nCount; @@ -117,10 +107,6 @@ void CSecretMgr::Found(int nType) return; } else Super++; - - if (gGameOptions.nGameType == 0) { - viewSetMessage(GStrings(FStringf("TXTB_SECRET%d", Random(2))), 0, MESSAGE_PRIORITY_SECRET); - } } void CSecretMgr::Clear(void) diff --git a/source/games/blood/src/endgame.h b/source/games/blood/src/endgame.h index ffafa7de1..63d318cd0 100644 --- a/source/games/blood/src/endgame.h +++ b/source/games/blood/src/endgame.h @@ -29,7 +29,6 @@ BEGIN_BLD_NS class CKillMgr { public: int TotalKills, Kills; - CKillMgr(); void SetCount(int); void AddNewKill(int); void AddKill(spritetype *pSprite); @@ -40,7 +39,6 @@ public: class CSecretMgr { public: int Total, Founds, Super; - CSecretMgr(); void SetCount(int); void Found(int); void Clear(void); diff --git a/source/games/blood/src/eventq.cpp b/source/games/blood/src/eventq.cpp index ab499193a..556129f24 100644 --- a/source/games/blood/src/eventq.cpp +++ b/source/games/blood/src/eventq.cpp @@ -391,13 +391,20 @@ void evSend(int nIndex, int nType, int rxId, COMMAND_ID command) return; #endif case kChannelSetTotalSecrets: - if (command >= kCmdNumberic) levelSetupSecret(command - kCmdNumberic); + if (command >= kCmdNumberic) gSecretMgr.SetCount(command - kCmdNumberic); else viewSetSystemMessage("Invalid Total-Secrets command by xobject #%d (object type %d)", nIndex, nType); break; case kChannelSecretFound: if (SECRET_Trigger(nIndex + 65536 * nType)) // if the hint system knows this secret it's a retrigger - skip that. { - if (command >= kCmdNumberic) levelTriggerSecret(command - kCmdNumberic); + if (command >= kCmdNumberic) + { + gSecretMgr.Found(command - kCmdNumberic); + if (gGameOptions.nGameType == 0) + { + viewSetMessage(GStrings(FStringf("TXTB_SECRET%d", Random(2))), 0, MESSAGE_PRIORITY_SECRET); + } + } else viewSetSystemMessage("Invalid Trigger-Secret command by xobject #%d (object type %d)", nIndex, nType); } break; diff --git a/source/games/blood/src/levels.cpp b/source/games/blood/src/levels.cpp index 230008145..2a5e2244e 100644 --- a/source/games/blood/src/levels.cpp +++ b/source/games/blood/src/levels.cpp @@ -54,28 +54,6 @@ void levelInitINI(const char *pzIni) strncpy(BloodIniFile, pzIni, BMAX_PATH); } - -void levelOverrideINI(const char *pzIni) -{ - bINIOverride = true; - strcpy(BloodIniFile, pzIni); -} - -void levelClearSecrets(void) -{ - gSecretMgr.Clear(); -} - -void levelSetupSecret(int nCount) -{ - gSecretMgr.SetCount(nCount); -} - -void levelTriggerSecret(int nSecret) -{ - gSecretMgr.Found(nSecret); -} - void CheckSectionAbend(const char *pzSection) { if (!pzSection || !BloodINI->SectionExists(pzSection)) diff --git a/source/games/blood/src/levels.h b/source/games/blood/src/levels.h index fdd0fc019..0b3568667 100644 --- a/source/games/blood/src/levels.h +++ b/source/games/blood/src/levels.h @@ -75,9 +75,6 @@ extern MapRecord* gNextLevel; extern bool gGameStarted; void levelInitINI(const char *pzIni); -void levelOverrideINI(const char *pzIni); -void levelSetupSecret(int nCount); -void levelTriggerSecret(int nSecret); void CheckSectionAbend(const char *pzSection); void CheckKeyAbend(const char *pzSection, const char *pzKey); void levelLoadDefaults(void);