[Scummvm-cvs-logs] scummvm master -> 050a02c6f85ffec8099acaf21cd7a3cf90cefff3

fuzzie fuzzie at fuzzie.org
Tue Sep 25 17:35:30 CEST 2012


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0093c4d13e TONY: Don't error out on invalid ReleaseOwnership calls.
050a02c6f8 TONY: Replace abortGame() with nicer error() calls.


Commit: 0093c4d13ec23af4b1e72f2caa2d879673397c54
    https://github.com/scummvm/scummvm/commit/0093c4d13ec23af4b1e72f2caa2d879673397c54
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2012-09-25T08:32:34-07:00

Commit Message:
TONY: Don't error out on invalid ReleaseOwnership calls.

A script triggers this at the end of the scene where you give the
flowers to the bearded woman.

Changed paths:
    engines/tony/custom.cpp



diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index 99debbf..8cc459b 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -1989,8 +1989,10 @@ void releaseOwnership(CORO_PARAM, uint32 num, uint32, uint32, uint32) {
 		return;
 	}
 
-	if (GLOBALS._mut[num]._ownerPid != (uint32)CoroScheduler.getCurrentPID())
-		error("ReleaseOwnership tried to release mutex %d, which is held by a different process", num);
+	if (GLOBALS._mut[num]._ownerPid != (uint32)CoroScheduler.getCurrentPID()) {
+		warning("ReleaseOwnership tried to release mutex %d, which is held by a different process", num);
+		return;
+	}
 
 	GLOBALS._mut[num]._lockCount--;
 	if (!GLOBALS._mut[num]._lockCount) {


Commit: 050a02c6f85ffec8099acaf21cd7a3cf90cefff3
    https://github.com/scummvm/scummvm/commit/050a02c6f85ffec8099acaf21cd7a3cf90cefff3
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2012-09-25T08:33:49-07:00

Commit Message:
TONY: Replace abortGame() with nicer error() calls.

Changed paths:
    engines/tony/custom.cpp
    engines/tony/tony.cpp
    engines/tony/tony.h



diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index 8cc459b..8f260c4 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 c958352..710fe7c 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 22090df..8b29773 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);
 






More information about the Scummvm-git-logs mailing list