aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-05-19 07:34:24 +0000
committerTorbjörn Andersson2006-05-19 07:34:24 +0000
commit3a028875a182032319d6bafcc4b9d348fa367257 (patch)
tree7b84b3ab4d9f9c885da6cd086dc92dea880aadda /engines
parentbafa215e5faefe023313048e1ae00130f807db73 (diff)
downloadscummvm-rg350-3a028875a182032319d6bafcc4b9d348fa367257.tar.gz
scummvm-rg350-3a028875a182032319d6bafcc4b9d348fa367257.tar.bz2
scummvm-rg350-3a028875a182032319d6bafcc4b9d348fa367257.zip
Using assert(_something->init()) is a bad idea. Assertions can be disabled.
svn-id: r22533
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/kyra.cpp6
-rw-r--r--engines/kyra/kyra3.cpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp
index aa72d887da..f79d6d45a1 100644
--- a/engines/kyra/kyra.cpp
+++ b/engines/kyra/kyra.cpp
@@ -175,7 +175,8 @@ int KyraEngine::init() {
assert(_res);
_screen = new Screen(this, _system);
assert(_screen);
- assert(_screen->init());
+ if (!_screen->init())
+ error("_screen->init() failed");
_sprites = new Sprites(this, _system);
assert(_sprites);
_seq = new SeqPlayer(this, _system);
@@ -189,7 +190,8 @@ int KyraEngine::init() {
_staticres = new StaticResource(this);
assert(_staticres);
- assert(_staticres->init());
+ if (!_staticres->init())
+ error("_staticres->init() failed");
initStaticResource();
diff --git a/engines/kyra/kyra3.cpp b/engines/kyra/kyra3.cpp
index 7f357b24a5..3f2d2189da 100644
--- a/engines/kyra/kyra3.cpp
+++ b/engines/kyra/kyra3.cpp
@@ -48,7 +48,8 @@ int KyraEngine_v3::init() {
_soundDigital = new SoundDigital(this, _mixer);
assert(_soundDigital);
- assert(_soundDigital->init());
+ if (!_soundDigital->init())
+ error("_soundDigital->init() failed");
uint32 sz;
_screen->loadFont(Screen::FID_6_FNT, _res->fileData("6.FNT", &sz));