EMI: Split GrimEngine::getUpdateFilename into EmiEngine

This commit is contained in:
Andrea Corna 2013-08-29 23:05:49 +02:00
parent ec0babc733
commit 2cc500aad8
4 changed files with 35 additions and 31 deletions

View File

@ -48,6 +48,35 @@ LuaBase *EMIEngine::createLua() {
return new Lua_V2();
}
const char *EMIEngine::getUpdateFilename() {
if (getGamePlatform() == Common::kPlatformWindows && !(getGameFlags() & ADGF_DEMO)) {
switch (getGameLanguage()) {
case Common::FR_FRA:
return "MonkeyUpdate_FRA.exe";
break;
case Common::DE_DEU:
return "MonkeyUpdate_DEU.exe";
break;
case Common::IT_ITA:
return "MonkeyUpdate_ITA.exe";
break;
case Common::PT_BRA:
return "MonkeyUpdate_BRZ.exe";
break;
case Common::ES_ESP:
return "MonkeyUpdate_ESP.exe";
break;
case Common::EN_ANY:
case Common::EN_GRB:
case Common::EN_USA:
default:
return "MonkeyUpdate.exe";
break;
}
} else
return 0;
}
void EMIEngine::pushText(Common::List<TextObject *> *objects) {
_textstack.push_back(objects);
}

View File

@ -35,6 +35,8 @@ public:
EMIEngine(OSystem *syst, uint32 gameFlags, GrimGameType gameType, Common::Platform platform, Common::Language language);
virtual ~EMIEngine();
virtual const char *getUpdateFilename();
void pushText(Common::List<TextObject *> *objects);
Common::List<TextObject *> *popText();

View File

@ -223,37 +223,10 @@ void GrimEngine::createRenderer() {
}
const char *GrimEngine::getUpdateFilename() {
if (getGamePlatform() != Common::kPlatformWindows || (getGameFlags() & ADGF_DEMO))
return 0;
if (getGameType() == GType_GRIM)
if (!(getGameFlags() & ADGF_DEMO))
return "gfupd101.exe";
else if (getGameType() == GType_MONKEY4) {
switch (getGameLanguage()) {
case Common::FR_FRA:
return "MonkeyUpdate_FRA.exe";
break;
case Common::DE_DEU:
return "MonkeyUpdate_DEU.exe";
break;
case Common::IT_ITA:
return "MonkeyUpdate_ITA.exe";
break;
case Common::PT_BRA:
return "MonkeyUpdate_BRZ.exe";
break;
case Common::ES_ESP:
return "MonkeyUpdate_ESP.exe";
break;
case Common::EN_ANY:
case Common::EN_GRB:
case Common::EN_USA:
default:
return "MonkeyUpdate.exe";
break;
}
}
return 0;
else
return 0;
}
Common::Error GrimEngine::run() {

View File

@ -91,7 +91,7 @@ public:
GrimGameType getGameType() { return _gameType; }
Common::Language getGameLanguage() { return _gameLanguage; }
Common::Platform getGamePlatform() { return _gamePlatform; }
const char *getUpdateFilename();
virtual const char *getUpdateFilename();
bool canLoadGameStateCurrently() { return true; }
Common::Error loadGameState(int slot);