mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 23:52:41 +00:00
ALL: Unify 'missing engine data' message
This commit is contained in:
parent
5c60a75f94
commit
e1ec91b69a
1
engines/access/POTFILES
Normal file
1
engines/access/POTFILES
Normal file
@ -0,0 +1 @@
|
||||
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(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
engines/drascula/drascula.cpp
|
||||
engines/drascula/detection.cpp
|
||||
engines/drascula/saveload.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(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str());
|
||||
GUIErrorMessage(errorMessage);
|
||||
warning("%s", errorMessage.c_str());
|
||||
|
||||
|
@ -1 +1,2 @@
|
||||
engines/hugo/hugo.cpp
|
||||
engines/hugo/file.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(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str());
|
||||
GUIErrorMessage(errorMessage);
|
||||
warning("%s", errorMessage.c_str());
|
||||
return false;
|
||||
|
1
engines/lure/POTFILES
Normal file
1
engines/lure/POTFILES
Normal file
@ -0,0 +1 @@
|
||||
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(_("You're missing the '%s' file. Get it from the ScummVM website"), SUPPORT_FILENAME);
|
||||
return Common::kUnknownError;
|
||||
}
|
||||
|
||||
|
1
engines/mortevielle/POTFILES
Normal file
1
engines/mortevielle/POTFILES
Normal file
@ -0,0 +1 @@
|
||||
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(_("You're missing the '%s' file. Get it from the ScummVM website"), MORT_DAT);
|
||||
GUIErrorMessage(msg);
|
||||
return Common::kReadingFailed;
|
||||
}
|
||||
|
||||
|
@ -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(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str());
|
||||
GUIErrorMessage(msg);
|
||||
error("%s", msg.c_str());
|
||||
}
|
||||
|
||||
uint16 fileVersion = _cptFile->readUint16LE();
|
||||
|
@ -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(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str());
|
||||
warning("%s", errorMessage.c_str());
|
||||
GUIErrorMessage(errorMessage);
|
||||
return false;
|
||||
|
1
engines/tony/POTFILES
Normal file
1
engines/tony/POTFILES
Normal file
@ -0,0 +1 @@
|
||||
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(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str());
|
||||
GUIErrorMessage(msg);
|
||||
warning("%s", msg.c_str());
|
||||
return false;
|
||||
|
@ -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(_("You're missing the '%s' file. Get it from the ScummVM website"), filename.c_str());
|
||||
GUIErrorMessage(msg);
|
||||
warning("%s", msg.c_str());
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user