diff options
author | Alyssa Milburn | 2012-09-25 17:33:49 +0200 |
---|---|---|
committer | Alyssa Milburn | 2012-09-25 17:33:49 +0200 |
commit | 050a02c6f85ffec8099acaf21cd7a3cf90cefff3 (patch) | |
tree | a0ae6f73ba08680e13925bd33de12b797989d5a9 /engines | |
parent | 0093c4d13ec23af4b1e72f2caa2d879673397c54 (diff) | |
download | scummvm-rg350-050a02c6f85ffec8099acaf21cd7a3cf90cefff3.tar.gz scummvm-rg350-050a02c6f85ffec8099acaf21cd7a3cf90cefff3.tar.bz2 scummvm-rg350-050a02c6f85ffec8099acaf21cd7a3cf90cefff3.zip |
TONY: Replace abortGame() with nicer error() calls.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tony/custom.cpp | 2 | ||||
-rw-r--r-- | engines/tony/tony.cpp | 10 | ||||
-rw-r--r-- | engines/tony/tony.h | 1 |
3 files changed, 4 insertions, 9 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp index 8cc459b493..8f260c4f06 100644 --- a/engines/tony/custom.cpp +++ b/engines/tony/custom.cpp @@ -1310,7 +1310,7 @@ void autoSave(CORO_PARAM, uint32, uint32, uint32, uint32) { } void abortGame(CORO_PARAM, uint32, uint32, uint32, uint32) { - g_vm->abortGame(); + error("script called abortGame"); } void shakeScreen(CORO_PARAM, uint32 nScosse, uint32, uint32, uint32) { diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp index c9583525d0..710fe7ca68 100644 --- a/engines/tony/tony.cpp +++ b/engines/tony/tony.cpp @@ -323,7 +323,7 @@ void TonyEngine::playMusic(int nChannel, const Common::String &fname, int nFX, b if (!getIsDemo()) { if (!_stream[GLOBALS._nextChannel]->loadFile(fname, FPCODEC_ADPCM, nSync)) - g_vm->abortGame(); + error("failed to open music file '%s'", fname.c_str()); } else { _stream[GLOBALS._nextChannel]->loadFile(fname, FPCODEC_ADPCM, nSync); } @@ -335,7 +335,7 @@ void TonyEngine::playMusic(int nChannel, const Common::String &fname, int nFX, b } else { if (!getIsDemo()) { if (!_stream[nChannel]->loadFile(fname, FPCODEC_ADPCM, nSync)) - g_vm->abortGame(); + error("failed to open music file '%s'", fname.c_str()); } else { _stream[nChannel]->loadFile(fname, FPCODEC_ADPCM, nSync); } @@ -356,7 +356,7 @@ void TonyEngine::doNextMusic(CORO_PARAM, const void *param) { if (!g_vm->getIsDemo()) { if (!streams[GLOBALS._nextChannel]->loadFile(GLOBALS._nextMusic, FPCODEC_ADPCM, GLOBALS._nextSync)) - g_vm->abortGame(); + error("failed to open next music file '%s'", GLOBALS._nextMusic.c_str()); } else { streams[GLOBALS._nextChannel]->loadFile(GLOBALS._nextMusic, FPCODEC_ADPCM, GLOBALS._nextSync); } @@ -631,10 +631,6 @@ void TonyEngine::openInitOptions(CORO_PARAM) { _theEngine.openOptionScreen(coroParam, 2); } -void TonyEngine::abortGame() { - _bQuitNow = true; -} - /** * Main process for playing the game. * diff --git a/engines/tony/tony.h b/engines/tony/tony.h index 22090dfe51..8b29773fbd 100644 --- a/engines/tony/tony.h +++ b/engines/tony/tony.h @@ -169,7 +169,6 @@ public: void play(); void close(); - void abortGame(); void getDataDirectory(DataDir dir, char *path); |