diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/POTFILES | 1 | ||||
-rw-r--r-- | engines/access/resources.cpp | 12 | ||||
-rw-r--r-- | engines/drascula/POTFILES | 1 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 12 | ||||
-rw-r--r-- | engines/hugo/POTFILES | 1 | ||||
-rw-r--r-- | engines/hugo/hugo.cpp | 12 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 2 | ||||
-rw-r--r-- | engines/lure/POTFILES | 1 | ||||
-rw-r--r-- | engines/lure/lure.cpp | 7 | ||||
-rw-r--r-- | engines/mortevielle/POTFILES | 1 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.cpp | 18 | ||||
-rw-r--r-- | engines/sky/compact.cpp | 12 | ||||
-rw-r--r-- | engines/teenagent/resources.cpp | 5 | ||||
-rw-r--r-- | engines/titanic/moves/enter_exit_first_class_state.cpp | 13 | ||||
-rw-r--r-- | engines/titanic/moves/enter_exit_first_class_state.h | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_text.cpp | 29 | ||||
-rw-r--r-- | engines/titanic/titanic.h | 1 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_npc_script.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_sentence.cpp | 4 | ||||
-rw-r--r-- | engines/tony/POTFILES | 1 | ||||
-rw-r--r-- | engines/tony/tony.cpp | 14 | ||||
-rw-r--r-- | engines/toon/toon.cpp | 11 |
22 files changed, 99 insertions, 63 deletions
diff --git a/engines/access/POTFILES b/engines/access/POTFILES new file mode 100644 index 0000000000..eafbe17056 --- /dev/null +++ b/engines/access/POTFILES @@ -0,0 +1 @@ +engines/access/resources.cpp diff --git a/engines/access/resources.cpp b/engines/access/resources.cpp index 096fb15b35..a7b23eb56d 100644 --- a/engines/access/resources.cpp +++ b/engines/access/resources.cpp @@ -24,6 +24,7 @@ #include "access/access.h" #include "access/amazon/amazon_resources.h" #include "access/martian/martian_resources.h" +#include "common/translation.h" namespace Access { @@ -38,8 +39,9 @@ Resources *Resources::init(AccessEngine *vm) { bool Resources::load(Common::String &errorMessage) { Common::File f; - if (!f.open("access.dat")) { - errorMessage = "Could not locate required access.dat file"; + Common::String filename = "access.dat"; + if (!f.open(filename.c_str())) { + errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str()); return false; } @@ -47,7 +49,7 @@ bool Resources::load(Common::String &errorMessage) { char buffer[4]; f.read(buffer, 4); if (strncmp(buffer, "SVMA", 4)) { - errorMessage = "Located access.dat file had invalid contents"; + errorMessage = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str()); return false; } @@ -56,8 +58,8 @@ bool Resources::load(Common::String &errorMessage) { uint version = f.readUint16LE(); if (version != expectedVersion) { errorMessage = Common::String::format( - "Incorrect version of access.dat found. Expected %d but got %d", - expectedVersion, version); + _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."), + filename.c_str(), expectedVersion, 0, version, 0); return false; } diff --git a/engines/drascula/POTFILES b/engines/drascula/POTFILES index ea79f9e066..925b309996 100644 --- a/engines/drascula/POTFILES +++ b/engines/drascula/POTFILES @@ -1,2 +1,3 @@ +engines/drascula/drascula.cpp engines/drascula/detection.cpp engines/drascula/saveload.cpp diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index ab91056480..655af480f2 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -25,6 +25,7 @@ #include "common/file.h" #include "common/config-manager.h" #include "common/textconsole.h" +#include "common/translation.h" #include "backends/audiocd/audiocd.h" @@ -955,12 +956,13 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ bool DrasculaEngine::loadDrasculaDat() { Common::File in; + Common::String filename = "drascula.dat"; int i; - in.open("drascula.dat"); + in.open(filename.c_str()); if (!in.isOpen()) { - Common::String errorMessage = "You're missing the 'drascula.dat' file. Get it from the ScummVM website"; + Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str()); GUIErrorMessage(errorMessage); warning("%s", errorMessage.c_str()); @@ -974,7 +976,7 @@ bool DrasculaEngine::loadDrasculaDat() { buf[8] = '\0'; if (strcmp(buf, "DRASCULA") != 0) { - Common::String errorMessage = "File 'drascula.dat' is corrupt. Get it from the ScummVM website"; + Common::String errorMessage = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str()); GUIErrorMessage(errorMessage); warning("%s", errorMessage.c_str()); @@ -984,7 +986,9 @@ bool DrasculaEngine::loadDrasculaDat() { ver = in.readByte(); if (ver != DRASCULA_DAT_VER) { - Common::String errorMessage = Common::String::format("File 'drascula.dat' is wrong version. Expected %d but got %d. Get it from the ScummVM website", DRASCULA_DAT_VER, ver); + Common::String errorMessage = Common::String::format( + _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."), + filename.c_str(), DRASCULA_DAT_VER, 0, ver, 0); GUIErrorMessage(errorMessage); warning("%s", errorMessage.c_str()); diff --git a/engines/hugo/POTFILES b/engines/hugo/POTFILES index ff61e12ca5..b7b99ca095 100644 --- a/engines/hugo/POTFILES +++ b/engines/hugo/POTFILES @@ -1 +1,2 @@ +engines/hugo/hugo.cpp engines/hugo/file.cpp diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 267eb08436..6881278cee 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -27,6 +27,7 @@ #include "common/debug-channels.h" #include "common/config-manager.h" #include "common/textconsole.h" +#include "common/translation.h" #include "hugo/hugo.h" #include "hugo/console.h" @@ -429,10 +430,11 @@ void HugoEngine::runMachine() { */ bool HugoEngine::loadHugoDat() { Common::File in; - in.open("hugo.dat"); + Common::String filename = "hugo.dat"; + in.open(filename.c_str()); if (!in.isOpen()) { - Common::String errorMessage = "You're missing the 'hugo.dat' file. Get it from the ScummVM website"; + Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str()); GUIErrorMessage(errorMessage); warning("%s", errorMessage.c_str()); return false; @@ -443,7 +445,7 @@ bool HugoEngine::loadHugoDat() { in.read(buf, 4); if (memcmp(buf, "HUGO", 4)) { - Common::String errorMessage = "File 'hugo.dat' is corrupt. Get it from the ScummVM website"; + Common::String errorMessage = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str()); GUIErrorMessage(errorMessage); return false; } @@ -452,7 +454,9 @@ bool HugoEngine::loadHugoDat() { int minVer = in.readByte(); if ((majVer != HUGO_DAT_VER_MAJ) || (minVer != HUGO_DAT_VER_MIN)) { - Common::String errorMessage = Common::String::format("File 'hugo.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from the ScummVM website", HUGO_DAT_VER_MAJ, HUGO_DAT_VER_MIN, majVer, minVer); + Common::String errorMessage = Common::String::format( + _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."), + filename.c_str(),HUGO_DAT_VER_MAJ, HUGO_DAT_VER_MIN, majVer, minVer); GUIErrorMessage(errorMessage); return false; } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 65f31985d6..5a45566c9a 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -161,7 +161,7 @@ bool StaticResource::loadStaticResourceFile() { } if (!foundWorkingKyraDat) { - Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' file or it got corrupted, (re)get it from the ScummVM website"; + Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' engine data file or it got corrupted."; GUIErrorMessage(errorMessage); error("%s", errorMessage.c_str()); } diff --git a/engines/lure/POTFILES b/engines/lure/POTFILES new file mode 100644 index 0000000000..d4fde2ab7b --- /dev/null +++ b/engines/lure/POTFILES @@ -0,0 +1 @@ +engines/lure/lure.cpp diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp index 45fe0af025..8eac519d8c 100644 --- a/engines/lure/lure.cpp +++ b/engines/lure/lure.cpp @@ -24,6 +24,7 @@ #include "common/debug-channels.h" #include "common/system.h" #include "common/savefile.h" +#include "common/translation.h" #include "engines/util.h" @@ -60,7 +61,7 @@ Common::Error LureEngine::init() { Common::File f; VersionStructure version; if (!f.open(SUPPORT_FILENAME)) { - GUIError("Could not locate Lure support file"); + GUIError(_("Unable to locate the '%s' engine data file."), SUPPORT_FILENAME); return Common::kUnknownError; } @@ -69,10 +70,10 @@ Common::Error LureEngine::init() { f.close(); if (READ_LE_UINT16(&version.id) != 0xffff) { - GUIError("Error validating %s - file is invalid or out of date", SUPPORT_FILENAME); + GUIError(_("The '%s' engine data file is corrupt."), SUPPORT_FILENAME); return Common::kUnknownError; } else if ((version.vMajor != LURE_DAT_MAJOR) || (version.vMinor != LURE_DAT_MINOR)) { - GUIError("Incorrect version of %s file - expected %d.%d but got %d.%d", + GUIError(_("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."), SUPPORT_FILENAME, LURE_DAT_MAJOR, LURE_DAT_MINOR, version.vMajor, version.vMinor); return Common::kUnknownError; diff --git a/engines/mortevielle/POTFILES b/engines/mortevielle/POTFILES new file mode 100644 index 0000000000..ee7ef3ed69 --- /dev/null +++ b/engines/mortevielle/POTFILES @@ -0,0 +1 @@ +engines/mortevielle/mortevielle.cpp diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp index 4f0899deb4..59004cba7f 100644 --- a/engines/mortevielle/mortevielle.cpp +++ b/engines/mortevielle/mortevielle.cpp @@ -37,6 +37,7 @@ #include "common/system.h" #include "common/config-manager.h" #include "common/debug-channels.h" +#include "common/translation.h" #include "engines/util.h" #include "engines/engine.h" #include "graphics/palette.h" @@ -302,7 +303,8 @@ Common::ErrorCode MortevielleEngine::loadMortDat() { // Open the mort.dat file if (!f.open(MORT_DAT)) { - GUIErrorMessage("Could not locate 'mort.dat'."); + Common::String msg = Common::String::format(_("Unable to locate the '%s' engine data file."), MORT_DAT); + GUIErrorMessage(msg); return Common::kReadingFailed; } @@ -310,16 +312,22 @@ Common::ErrorCode MortevielleEngine::loadMortDat() { char fileId[4]; f.read(fileId, 4); if (strncmp(fileId, "MORT", 4) != 0) { - GUIErrorMessage("The located mort.dat data file is invalid"); + Common::String msg = Common::String::format(_("The '%s' engine data file is corrupt."), MORT_DAT); + GUIErrorMessage(msg); return Common::kReadingFailed; } // Check the version - if (f.readByte() < MORT_DAT_REQUIRED_VERSION) { - GUIErrorMessage("The located mort.dat data file is too old, please download an updated version on scummvm.org"); + int majVer = f.readByte(); + int minVer = f.readByte(); + + if (majVer < MORT_DAT_REQUIRED_VERSION) { + Common::String msg = Common::String::format( + _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."), + MORT_DAT, MORT_DAT_REQUIRED_VERSION, 0, majVer, minVer); + GUIErrorMessage(msg); return Common::kReadingFailed; } - f.readByte(); // Minor version // Loop to load resources from the data file while (f.pos() < f.size()) { diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp index c2ca557ec2..ab244c1f84 100644 --- a/engines/sky/compact.cpp +++ b/engines/sky/compact.cpp @@ -126,11 +126,11 @@ static const uint32 turnTableOffsets[] = { SkyCompact::SkyCompact() { _cptFile = new Common::File(); - if (!_cptFile->open("sky.cpt")) { - GUI::MessageDialog dialog(_("Unable to find \"sky.cpt\" file!\n" - "Please download it from www.scummvm.org"), _("OK"), NULL); - dialog.runModal(); - error("Unable to find \"sky.cpt\" file\nPlease download it from www.scummvm.org"); + Common::String filename = "sky.cpt"; + if (!_cptFile->open(filename.c_str())) { + Common::String msg = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str()); + GUIErrorMessage(msg); + error("%s", msg.c_str()); } uint16 fileVersion = _cptFile->readUint16LE(); @@ -138,7 +138,7 @@ SkyCompact::SkyCompact() { error("unknown \"sky.cpt\" version"); if (SKY_CPT_SIZE != _cptFile->size()) { - GUI::MessageDialog dialog(_("The \"sky.cpt\" file has an incorrect size.\nPlease (re)download it from www.scummvm.org"), _("OK"), NULL); + GUI::MessageDialog dialog(_("The \"sky.cpt\" engine data file has an incorrect size."), _("OK"), NULL); dialog.runModal(); error("Incorrect sky.cpt size (%d, expected: %d)", _cptFile->size(), SKY_CPT_SIZE); } diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp index 3cf566a0e5..b7e0d558f1 100644 --- a/engines/teenagent/resources.cpp +++ b/engines/teenagent/resources.cpp @@ -91,9 +91,10 @@ void Resources::precomputeDialogOffsets() { bool Resources::loadArchives(const ADGameDescription *gd) { Common::File *dat_file = new Common::File(); - if (!dat_file->open("teenagent.dat")) { + Common::String filename = "teenagent.dat"; + if (!dat_file->open(filename.c_str())) { delete dat_file; - Common::String errorMessage = _("You're missing the 'teenagent.dat' file. Get it from the ScummVM website"); + Common::String errorMessage = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str()); warning("%s", errorMessage.c_str()); GUIErrorMessage(errorMessage); return false; diff --git a/engines/titanic/moves/enter_exit_first_class_state.cpp b/engines/titanic/moves/enter_exit_first_class_state.cpp index efdead533a..4b58c1b86d 100644 --- a/engines/titanic/moves/enter_exit_first_class_state.cpp +++ b/engines/titanic/moves/enter_exit_first_class_state.cpp @@ -21,6 +21,7 @@ */ #include "titanic/moves/enter_exit_first_class_state.h" +#include "titanic/titanic.h" namespace Titanic { @@ -30,13 +31,13 @@ END_MESSAGE_MAP() void CEnterExitFirstClassState::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeQuotedLine(_viewName, indent); + file->writeQuotedLine(g_vm->_stateRoomExitView, indent); CGameObject::save(file, indent); } void CEnterExitFirstClassState::load(SimpleFile *file) { file->readNumber(); - _viewName = file->readString(); + g_vm->_stateRoomExitView = file->readString(); CGameObject::load(file); } @@ -44,10 +45,12 @@ bool CEnterExitFirstClassState::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { switch (getPassengerClass()) { case 1: if (compareRoomNameTo("1stClassLobby")) { - _viewName = getRoomNodeName() + ".E"; - changeView(_viewName); + // Entering room, so save where you were and change to stateroom + g_vm->_stateRoomExitView = getRoomNodeName() + ".E"; + changeView("1stClassState.Node 1.S"); } else if (compareRoomNameTo("1stClassState")) { - changeView(_viewName); + // Return to where you entered room from + changeView(g_vm->_stateRoomExitView); } break; diff --git a/engines/titanic/moves/enter_exit_first_class_state.h b/engines/titanic/moves/enter_exit_first_class_state.h index fe63e553de..ea5c52a35e 100644 --- a/engines/titanic/moves/enter_exit_first_class_state.h +++ b/engines/titanic/moves/enter_exit_first_class_state.h @@ -30,8 +30,6 @@ namespace Titanic { class CEnterExitFirstClassState : public CGameObject { DECLARE_MESSAGE_MAP; bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); -private: - CString _viewName; public: CLASSDEF; diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp index 7bb0bad16e..05038d2fd0 100644 --- a/engines/titanic/pet_control/pet_text.cpp +++ b/engines/titanic/pet_control/pet_text.cpp @@ -249,20 +249,21 @@ void CPetText::setColor(byte r, byte g, byte b) { } void CPetText::remapColors(uint count, uint *srcColors, uint *destColors) { - if (_lineCount >= 0) { - for (int lineNum = 0; lineNum <= _lineCount; ++lineNum) { - // Get the rgb values - uint r = _array[lineNum]._rgb[1]; - uint g = _array[lineNum]._rgb[2]; - uint b = _array[lineNum]._rgb[3]; - uint color = r | (g << 8) | (b << 16); - - for (uint index = 0; index < count; ++index) { - if (color == srcColors[index]) { - // Found a match, so replace the color - setLineColor(lineNum, destColors[lineNum]); - break; - } + for (int lineNum = 0; lineNum <= _lineCount; ++lineNum) { + if (_array[lineNum]._rgb.empty()) + continue; + + // Get the rgb values + uint r = _array[lineNum]._rgb[1]; + uint g = _array[lineNum]._rgb[2]; + uint b = _array[lineNum]._rgb[3]; + uint color = r | (g << 8) | (b << 16); + + for (uint index = 0; index < count; ++index) { + if (color == srcColors[index]) { + // Found a match, so replace the color + setLineColor(lineNum, destColors[lineNum]); + break; } } } diff --git a/engines/titanic/titanic.h b/engines/titanic/titanic.h index d8e0f880f7..43f3fa07f3 100644 --- a/engines/titanic/titanic.h +++ b/engines/titanic/titanic.h @@ -123,6 +123,7 @@ public: StringArray _itemIds; StringArray _roomNames; Strings _strings; + CString _stateRoomExitView; public: TitanicEngine(OSystem *syst, const TitanicGameDescription *gameDesc); virtual ~TitanicEngine(); diff --git a/engines/titanic/true_talk/tt_npc_script.cpp b/engines/titanic/true_talk/tt_npc_script.cpp index 7540a738b5..2a5c155421 100644 --- a/engines/titanic/true_talk/tt_npc_script.cpp +++ b/engines/titanic/true_talk/tt_npc_script.cpp @@ -707,7 +707,7 @@ int TTnpcScript::processEntries(const TTsentenceEntries *entries, uint entryCoun for (uint loopCtr = 0; loopCtr < 2; ++loopCtr) { for (uint entryCtr = 0; entryCtr < entryCount; ++entryCtr) { const TTsentenceEntry &entry = (*entries)[entryCtr]; - if (entry._category != categoryNum && (loopCtr == 0 || entry._category)) + if (entry._category == categoryNum && (loopCtr == 0 || entry._category)) continue; bool flag; diff --git a/engines/titanic/true_talk/tt_sentence.cpp b/engines/titanic/true_talk/tt_sentence.cpp index 451582383d..8d897aaa38 100644 --- a/engines/titanic/true_talk/tt_sentence.cpp +++ b/engines/titanic/true_talk/tt_sentence.cpp @@ -212,7 +212,7 @@ bool TTsentence::fn2(int slotIndex, const TTstring &str, const TTconceptNode *no if (g_vm->_exeResources._owner->_concept1P && (slotIndex == 0 || slotIndex == 2 || slotIndex == 3 || slotIndex == 4 || slotIndex == 5)) { - if (str == g_vm->_exeResources._owner->_concept2P->getText() && + if (str == g_vm->_exeResources._owner->_concept1P->getText() && (conceptText == "it" || conceptText == "that" || conceptText == "he" || conceptText == "she" || conceptText == "him" || conceptText == "her" || conceptText == "them" || conceptText == "they" || conceptText == "those" || @@ -221,7 +221,7 @@ bool TTsentence::fn2(int slotIndex, const TTstring &str, const TTconceptNode *no } if (g_vm->_exeResources._owner->_concept1P && (slotIndex == 0 || slotIndex == 2)) { - if (conceptText == "?" && str == g_vm->_exeResources._owner->_concept2P->getText()) { + if (conceptText == "?" && str == g_vm->_exeResources._owner->_concept1P->getText()) { delete concept; concept = getFrameSlot(5, node); conceptText = concept->getText(); diff --git a/engines/tony/POTFILES b/engines/tony/POTFILES new file mode 100644 index 0000000000..a2e3c09eab --- /dev/null +++ b/engines/tony/POTFILES @@ -0,0 +1 @@ +engines/tony/tony.cpp diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp index c51f449aa1..8a7b676918 100644 --- a/engines/tony/tony.cpp +++ b/engines/tony/tony.cpp @@ -27,6 +27,7 @@ #include "common/events.h" #include "common/file.h" #include "common/installshield_cab.h" +#include "common/translation.h" #include "tony/tony.h" #include "tony/custom.h" #include "tony/debugger.h" @@ -189,11 +190,12 @@ Common::ErrorCode TonyEngine::init() { bool TonyEngine::loadTonyDat() { Common::String msg; Common::File in; + Common::String filename = "tony.dat"; - in.open("tony.dat"); + in.open(filename.c_str()); if (!in.isOpen()) { - msg = "You're missing the 'tony.dat' file. Get it from the ScummVM website"; + msg = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str()); GUIErrorMessage(msg); warning("%s", msg.c_str()); return false; @@ -205,7 +207,7 @@ bool TonyEngine::loadTonyDat() { buf[4] = '\0'; if (strcmp(buf, "TONY")) { - msg = "File 'tony.dat' is corrupt. Get it from the ScummVM website"; + msg = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str()); GUIErrorMessage(msg); warning("%s", msg.c_str()); return false; @@ -215,7 +217,9 @@ bool TonyEngine::loadTonyDat() { int minVer = in.readByte(); if ((majVer != TONY_DAT_VER_MAJ) || (minVer != TONY_DAT_VER_MIN)) { - msg = Common::String::format("File 'tony.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from the ScummVM website", TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer); + msg = Common::String::format( + _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."), + filename.c_str(), TONY_DAT_VER_MAJ, TONY_DAT_VER_MIN, majVer, minVer); GUIErrorMessage(msg); warning("%s", msg.c_str()); @@ -251,7 +255,7 @@ bool TonyEngine::loadTonyDat() { int numVariant = in.readUint16BE(); if (expectedLangVariant > numVariant - 1) { - msg = Common::String::format("Font variant not present in 'tony.dat'. Get it from the ScummVM website"); + msg = Common::String::format(_("Font variant not present in '%s' engine data file."), filename.c_str()); GUIErrorMessage(msg); warning("%s", msg.c_str()); diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 43fb3a1b1f..dc1c515e1c 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -4909,12 +4909,13 @@ void ToonEngine::createShadowLUT() { bool ToonEngine::loadToonDat() { Common::File in; Common::String msg; + Common::String filename = "toon.dat"; int majVer, minVer; - in.open("toon.dat"); + in.open(filename.c_str()); if (!in.isOpen()) { - msg = _("You're missing the 'toon.dat' file. Get it from the ScummVM website"); + msg = Common::String::format(_("Unable to locate the '%s' engine data file."), filename.c_str()); GUIErrorMessage(msg); warning("%s", msg.c_str()); return false; @@ -4926,7 +4927,7 @@ bool ToonEngine::loadToonDat() { buf[4] = '\0'; if (strcmp(buf, "TOON")) { - msg = _("File 'toon.dat' is corrupt. Get it from the ScummVM website"); + msg = Common::String::format(_("The '%s' engine data file is corrupt."), filename.c_str()); GUIErrorMessage(msg); warning("%s", msg.c_str()); return false; @@ -4936,7 +4937,9 @@ bool ToonEngine::loadToonDat() { minVer = in.readByte(); if ((majVer != TOON_DAT_VER_MAJ) || (minVer != TOON_DAT_VER_MIN)) { - msg = Common::String::format(_("File 'toon.dat' is wrong version. Expected %d.%d but got %d.%d. Get it from the ScummVM website"), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer); + msg = Common::String::format( + _("Incorrect version of the '%s' engine data file found. Expected %d.%d but got %d.%d."), + filename.c_str(), TOON_DAT_VER_MAJ, TOON_DAT_VER_MIN, majVer, minVer); GUIErrorMessage(msg); warning("%s", msg.c_str()); |