aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tony/custom.cpp2
-rw-r--r--engines/tony/tony.cpp10
-rw-r--r--engines/tony/tony.h1
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);