HDB: Modify setGameFlags() to getGameFlags()

This commit is contained in:
Nipun Garg 2019-06-05 02:52:51 +05:30 committed by Eugene Sandulenko
parent bc638cf251
commit 094bf4c06b
3 changed files with 7 additions and 13 deletions

View File

@ -34,13 +34,8 @@ const char *HDBGame::getGameFile() const {
return _gameDescription->filesDescriptions[0].fileName;
}
void HDBGame::setGameFlags() {
_voiceless = false;
if (_gameDescription->flags & ADGF_DEMO) {
_isDemo = true;
return;
}
_isDemo = false;
uint32 HDBGame::getGameFlags() const {
return _gameDescription->flags;
}
} // End of namespace HDB

View File

@ -54,14 +54,11 @@ HDBGame::~HDBGame() {
}
bool HDBGame::init() {
_voiceless = false;
/*
Game Subsystem Initializations
*/
// Init fileMan
setGameFlags();
if (!fileMan->openMPC(getGameFile())) {
error("FileMan::openMPC: Cannot find the hyperspace.mpc data file.");

View File

@ -47,6 +47,10 @@ struct ADGameDescription;
namespace HDB {
enum GameFeatures {
ADGF_TALKIE = 1 << 0
};
enum HDBDebugChannels {
kDebugExample1 = 1 << 0,
kDebugExample2 = 1 << 1
@ -70,7 +74,7 @@ public:
const ADGameDescription *_gameDescription;
const char *getGameId() const;
const char *getGameFile() const;
void setGameFlags();
uint32 getGameFlags() const;
Common::Platform getPlatform() const;
/*
@ -96,8 +100,6 @@ private:
bool _systemInit;
GameState _gameState;
bool _voiceless;
bool _isDemo;
};