[Scummvm-cvs-logs] SF.net SVN: scummvm: [33001] scummvm/branches/gsoc2008-rtl/engines/scumm

cpage88 at users.sourceforge.net cpage88 at users.sourceforge.net
Fri Jul 11 03:22:42 CEST 2008


Revision: 33001
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33001&view=rev
Author:   cpage88
Date:     2008-07-10 18:22:37 -0700 (Thu, 10 Jul 2008)

Log Message:
-----------
SCUMM works with new GMM implementation

Modified Paths:
--------------
    scummvm/branches/gsoc2008-rtl/engines/scumm/dialogs.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/he/cup_player_he.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v100he.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v70he.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v72he.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/input.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/resource.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/script_v5.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/script_v6.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/script_v8.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/scumm.cpp
    scummvm/branches/gsoc2008-rtl/engines/scumm/scumm.h
    scummvm/branches/gsoc2008-rtl/engines/scumm/smush/smush_player.cpp

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/dialogs.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/dialogs.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -496,7 +496,7 @@
 		break;
 #endif
 	case kQuitCmd:
-		_vm->_quit = true;
+		_vm->quitGame();
 		close();
 		break;
 	default:

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/he/cup_player_he.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/he/cup_player_he.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/he/cup_player_he.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -99,7 +99,7 @@
 	debug(1, "rate %d width %d height %d", _playbackRate, _width, _height);
 
 	int ticks = _system->getMillis();
-	while (_dataSize != 0 && !_vm->_quit) {
+	while (_dataSize != 0 && !_vm->quit()) {
 		while (parseNextBlockTag(_fileStream)) {
 			if (_fileStream.ioFailed()) {
 				return;
@@ -190,7 +190,7 @@
 	CUP_SfxChannel *sfxChannel = &_sfxChannels[channel];
 	debug(1, "waitForSfxChannel %d", channel);
 	if ((sfxChannel->flags & kSfxFlagLoop) == 0) {
-		while (_mixer->isSoundHandleActive(sfxChannel->handle) && !_vm->_quit) {
+		while (_mixer->isSoundHandleActive(sfxChannel->handle) && !_vm->quit()) {
 			_vm->parseEvents();
 			_system->delayMillis(10);
 		}
@@ -496,7 +496,7 @@
 			for (int i = 0; i < kSfxChannels; ++i) {
 				waitForSfxChannel(i);
 			}
-			_vm->_quit = true;
+			_vm->quitGame();
 			break;
 		case 7: {
 				int channelSync = dataStream.readUint32LE();

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v100he.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v100he.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v100he.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -2147,10 +2147,10 @@
 		break;
 	case 71:
 		// Confirm shutdown
-		shutDown();
+		quitGame();
 		break;
 	case 72:
-		shutDown();
+		quitGame();
 		break;
 	case 73:
 		copyScriptString(string, sizeof(string));

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v70he.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v70he.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v70he.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -634,10 +634,10 @@
 		break;
 	case 160:
 		// Confirm shutdown
-		shutDown();
+		quitGame();
 		break;
 	case 244:
-		shutDown();
+		quitGame();
 		break;
 	case 250:
 		id = pop();

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v72he.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/he/script_v72he.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -1485,10 +1485,10 @@
 		break;
 	case 160:
 		// Confirm shutdown
-		shutDown();
+		quitGame();
 		break;
 	case 244:
-		shutDown();
+		quitGame();
 		break;
 	case 251:
 		copyScriptString(string, sizeof(string));

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/input.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/input.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/input.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -192,10 +192,6 @@
 				_keyPressed = Common::KeyState(Common::KEYCODE_6, 54);	// '6'
 			break;
 
-		case Common::EVENT_QUIT:
-			_quit = true;
-			break;
-
 		default:
 			break;
 		}

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/resource.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/resource.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/resource.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -291,7 +291,7 @@
 
 	if (checkTryMedia(_fileHandle)) {
 		displayMessage(NULL, "You're trying to run game encrypted by ActiveMark. This is not supported.");
-		_quit = true;
+		quitGame();
 
 		return;
 	}

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/script_v5.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/script_v5.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -1769,7 +1769,7 @@
 		pauseGame();
 		break;
 	case 3:		// SO_QUIT
-		shutDown();
+		quitGame();
 		break;
 	default:
 		error("o5_systemOps: unknown subopcode %d", subOp);

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/script_v6.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/script_v6.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/script_v6.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -2310,7 +2310,7 @@
 		pauseGame();
 		break;
 	case 160:		// SO_QUIT
-		shutDown();
+		quitGame();
 		break;
 	default:
 		error("o6_systemOps invalid case %d", subOp);

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/script_v8.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/script_v8.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/script_v8.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -1170,7 +1170,7 @@
 		restart();
 		break;
 	case 0x29:		// SO_SYSTEM_QUIT Quit game
-		shutDown();
+		quitGame();
 		break;
 	default:
 		error("o8_systemOps: invalid case 0x%x", subOp);
@@ -1289,7 +1289,7 @@
 		if (ConfMan.getBool("confirm_exit"))
 			confirmExitDialog();
 		else
-			_quit = true;
+			quitGame();
 		break;
 	case 108:	// buildPaletteShadow
 		setShadowPalette(args[1], args[2], args[3], args[4], args[5], args[6]);

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/scumm.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/scumm.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/scumm.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -143,7 +143,6 @@
 	_objs = NULL;
 	_sound = NULL;
 	memset(&vm, 0, sizeof(vm));
-	_quit = false;
 	_pauseDialog = NULL;
 	_scummMenuDialog = NULL;
 	_versionDialog = NULL;
@@ -815,7 +814,6 @@
 	_syst = syst;
 	_game = dr.game;
 	_filenamePattern = dr.fp,
-	_quit = false;
 
 	_cupPlayer = new CUP_Player(syst, this, _mixer);
 }
@@ -846,9 +844,6 @@
 
 	while (_eventMan->pollEvent(event)) {
 		switch (event.type) {
-		case Common::EVENT_QUIT:
-			_quit = true;
-			break;
 
 		default:
 			break;
@@ -1722,7 +1717,7 @@
 
 	int diff = 0;	// Duration of one loop iteration
 
-	while (!_quit) {
+	while (!quit()) {
 
 		if (_debugger->isAttached())
 			_debugger->onFrame();
@@ -1755,12 +1750,12 @@
 		diff = _system->getMillis() - diff;
 
 
-		if (_quit) {
+		if (quit()) {
 			// TODO: Maybe perform an autosave on exit?
 		}
 	}
 
-	return _rtl;
+	return _eventMan->shouldRTL();
 }
 
 void ScummEngine::waitForTimer(int msec_delay) {
@@ -1773,7 +1768,7 @@
 
 	start_time = _system->getMillis();
 
-	while (!_quit) {
+	while (!quit()) {
 		_sound->updateCD(); // Loop CD Audio if needed
 		parseEvents();
 		_system->updateScreen();
@@ -1896,7 +1891,7 @@
 	checkExecVerbs();
 	checkAndRunSentenceScript();
 
-	if (_quit)
+	if (quit())
 		return;
 
 	// HACK: If a load was requested, immediately perform it. This avoids
@@ -2161,10 +2156,6 @@
 	pauseDialog();
 }
 
-void ScummEngine::shutDown() {
-	_quit = true;
-}
-
 void ScummEngine::restart() {
 // TODO: Check this function - we should probably be reinitting a lot more stuff, and I suspect
 //	 this leaks memory like a sieve
@@ -2317,7 +2308,7 @@
 	ConfirmDialog d(this, 6);
 
 	if (runDialog(d)) {
-		_quit = true;
+		quitGame();
 	}
 }
 

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/scumm.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/scumm.h	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/scumm.h	2008-07-11 01:22:37 UTC (rev 33001)
@@ -496,7 +496,6 @@
 public:
 	void pauseGame();
 	void restart();
-	void shutDown();
 
 protected:
 	Dialog *_pauseDialog;

Modified: scummvm/branches/gsoc2008-rtl/engines/scumm/smush/smush_player.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/scumm/smush/smush_player.cpp	2008-07-11 01:09:48 UTC (rev 33000)
+++ scummvm/branches/gsoc2008-rtl/engines/scumm/smush/smush_player.cpp	2008-07-11 01:22:37 UTC (rev 33001)
@@ -1333,7 +1333,7 @@
 		}
 		if (_endOfFile)
 			break;
-		if (_vm->_quit || _vm->_saveLoadFlag || _vm->_smushVideoShouldFinish) {
+		if (_vm->quit() || _vm->_saveLoadFlag || _vm->_smushVideoShouldFinish) {
 			_smixer->stop();
 			_vm->_mixer->stopHandle(_compressedFileSoundHandle);
 			_vm->_mixer->stopHandle(_IACTchannel);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list