aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2/sword2.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-04-26 06:12:03 +0000
committerTorbjörn Andersson2006-04-26 06:12:03 +0000
commit2cbcd49893f0099c8fb0fbee076ac242a2b8c5e0 (patch)
treea0086cb1b470f9e696bda5113e114aa6c6452b5a /engines/sword2/sword2.cpp
parent6b10484513fdfa735608d1f288564fd1a40bad7c (diff)
downloadscummvm-rg350-2cbcd49893f0099c8fb0fbee076ac242a2b8c5e0.tar.gz
scummvm-rg350-2cbcd49893f0099c8fb0fbee076ac242a2b8c5e0.tar.bz2
scummvm-rg350-2cbcd49893f0099c8fb0fbee076ac242a2b8c5e0.zip
If the resource manager fails to initialize itself properly, instead of
printing a fatal error, use the new GUIErrorMessage function and return to the launcher. Also, verify that all files that should be present on "CD 0" (i.e. on the hard disk) are present at startup, at least. (Any other missing CLU file is already requested with an "Insert CD" message.) svn-id: r22168
Diffstat (limited to 'engines/sword2/sword2.cpp')
-rw-r--r--engines/sword2/sword2.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 5982e62e4d..13e97dc0d8 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -244,6 +244,15 @@ int Sword2Engine::init() {
// Get some falling RAM and put it in your pocket, never let it slip
// away
+ _debugger = NULL;
+ _sound = NULL;
+ _fontRenderer = NULL;
+ _screen = NULL;
+ _mouse = NULL;
+ _logic = NULL;
+ _resman = NULL;
+ _memory = NULL;
+
_system->beginGFXTransaction();
initCommonGFX(true);
_screen = new Screen(this, 640, 480);
@@ -258,6 +267,10 @@ int Sword2Engine::init() {
_memory = new MemoryManager(this);
_resman = new ResourceManager(this);
+
+ if (!_resman->init())
+ return 1;
+
_logic = new Logic(this);
_fontRenderer = new FontRenderer(this);
_sound = new Sound(this);