mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
ZVISION: Error out when the game string file isn't found
This commit is contained in:
parent
f364756bcf
commit
b51852c641
@ -43,21 +43,18 @@ StringManager::~StringManager() {
|
||||
}
|
||||
|
||||
void StringManager::initialize(ZVisionGameId gameId) {
|
||||
if (gameId == GID_NEMESIS) {
|
||||
// TODO: Check this hardcoded filename against all versions of Nemesis
|
||||
if (gameId == GID_NEMESIS)
|
||||
loadStrFile("nemesis.str");
|
||||
} else if (gameId == GID_GRANDINQUISITOR) {
|
||||
// TODO: Check this hardcoded filename against all versions of Grand Inquisitor
|
||||
else if (gameId == GID_GRANDINQUISITOR)
|
||||
loadStrFile("inquis.str");
|
||||
}
|
||||
}
|
||||
|
||||
void StringManager::loadStrFile(const Common::String &fileName) {
|
||||
Common::File file;
|
||||
if (!_engine->getSearchManager()->openFile(file, fileName)) {
|
||||
warning("%s does not exist. String parsing failed", fileName.c_str());
|
||||
return;
|
||||
error("%s does not exist. String parsing failed", fileName.c_str());
|
||||
}
|
||||
|
||||
uint lineNumber = 0;
|
||||
while (!file.eos()) {
|
||||
_lines[lineNumber] = readWideLine(file);
|
||||
|
Loading…
x
Reference in New Issue
Block a user