diff options
author | Paul Gilbert | 2018-02-20 18:50:17 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-02-23 15:23:20 -0500 |
commit | 900ef91aca039dc23e4cf300070f7fa5f6f3a335 (patch) | |
tree | 3fb56a267ea2d8d3b36689eb302d44238645879e /engines/xeen/xeen.cpp | |
parent | 1b85d1dbc966b909f9ff9c9cc0eaac4b8ab872ae (diff) | |
download | scummvm-rg350-900ef91aca039dc23e4cf300070f7fa5f6f3a335.tar.gz scummvm-rg350-900ef91aca039dc23e4cf300070f7fa5f6f3a335.tar.bz2 scummvm-rg350-900ef91aca039dc23e4cf300070f7fa5f6f3a335.zip |
XEEN: Creation of create_xeen tool
Diffstat (limited to 'engines/xeen/xeen.cpp')
-rw-r--r-- | engines/xeen/xeen.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp index 0730760d14..8e22965e2f 100644 --- a/engines/xeen/xeen.cpp +++ b/engines/xeen/xeen.cpp @@ -86,10 +86,13 @@ XeenEngine::~XeenEngine() { g_vm = nullptr; } -void XeenEngine::initialize() { +bool XeenEngine::initialize() { // Create sub-objects of the engine _files = new FileManager(this); - _resources = Resources::init(this); + if (!_files->setup()) + return false; + + _resources = new Resources(); _combat = new Combat(this); _debugger = new Debugger(this); _events = new EventsManager(this); @@ -119,12 +122,13 @@ void XeenEngine::initialize() { if (saveSlot >= 0 && saveSlot <= 999) _loadSaveSlot = saveSlot; } + + return true; } Common::Error XeenEngine::run() { - initialize(); - - outerGameLoop(); + if (initialize()) + outerGameLoop(); return Common::kNoError; } @@ -256,4 +260,16 @@ void XeenEngine::syncSoundSettings() { _sound->updateSoundSettings(); } +void XeenEngine::GUIError(const char *msg, ...) { + char buffer[STRINGBUFLEN]; + va_list va; + + // Generate the full error message + va_start(va, msg); + vsnprintf(buffer, STRINGBUFLEN, msg, va); + va_end(va); + + GUIErrorMessage(buffer); +} + } // End of namespace Xeen |