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

cpage88 at users.sourceforge.net cpage88 at users.sourceforge.net
Fri Jul 11 01:03:35 CEST 2008


Revision: 32997
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32997&view=rev
Author:   cpage88
Date:     2008-07-10 16:03:34 -0700 (Thu, 10 Jul 2008)

Log Message:
-----------
Parallaction works with the new GMM implementation

Modified Paths:
--------------
    scummvm/branches/gsoc2008-rtl/engines/parallaction/dialogue.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_ns.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_br.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/input.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.h
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_br.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_ns.cpp

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/dialogue.cpp	2008-07-10 22:34:48 UTC (rev 32996)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/dialogue.cpp	2008-07-10 23:03:34 UTC (rev 32997)
@@ -104,11 +104,6 @@
 		e.kbd.ascii = 0;
 
 		if (g_system->getEventManager()->pollEvent(e)) {
-			if (e.type == Common::EVENT_QUIT) {
-				_vm->_quit = true;
-				break;
-			}
-
 			if ((e.type == Common::EVENT_KEYDOWN) && isdigit(e.kbd.ascii)) {
 				_password[passwordLen] = e.kbd.ascii;
 				passwordLen++;
@@ -230,7 +225,7 @@
 
 		displayQuestion();
 		
-		if (_vm->_quit)
+		if (_vm->quit())
 			return;
 
 		if (_q->_answers[0] == NULL) break;
@@ -239,7 +234,7 @@
 			if (!displayAnswers()) break;
 			answer = getAnswer();
 
-			if (_vm->_quit)
+			if (_vm->quit())
 				return;
 
 			cmdlist = &_q->_answers[answer]->_commands;
@@ -272,7 +267,7 @@
 
 	uint32 event;
 	Common::Point p;
-	while (!_vm->_quit) {
+	while (!_vm->quit()) {
 
 		_vm->_input->readInput();
 		_vm->_input->getCursorPos(p);

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_ns.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_ns.cpp	2008-07-10 22:34:48 UTC (rev 32996)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_ns.cpp	2008-07-10 23:03:34 UTC (rev 32997)
@@ -297,7 +297,8 @@
 
 
 DECLARE_COMMAND_OPCODE(quit) {
-	_vm->_quit = true;
+	_quit = true;
+	_vm->quitGame();
 }
 
 
@@ -427,7 +428,7 @@
 		CommandPtr cmd = *it;
 		uint32 v8 = getLocationFlags();
 
-		if (_vm->_quit)
+		if (_vm->quit())
 			break;
 
 		if (cmd->_flagsOn & kFlagsGlobal) {
@@ -519,7 +520,7 @@
 
 	case kZoneSpeak:
 		runDialogue(z->u.speak);
-		if (_vm->_quit)
+		if (_vm->quit())
 			return 0;
 		break;
 

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_br.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_br.cpp	2008-07-10 22:34:48 UTC (rev 32996)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_br.cpp	2008-07-10 23:03:34 UTC (rev 32997)
@@ -50,7 +50,8 @@
 	int option = guiShowMenu();
 	switch (option) {
 	case kMenuQuit:
-		_vm->_quit = true;
+		_quit = true;
+		_vm->quitGame();
 		break;
 
 	case kMenuLoadGame:

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/input.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/input.cpp	2008-07-10 22:34:48 UTC (rev 32996)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/input.cpp	2008-07-10 23:03:34 UTC (rev 32997)
@@ -80,7 +80,6 @@
 			break;
 
 		case Common::EVENT_QUIT:
-			_vm->_quit = true;
 			return KeyDown;
 
 		default:

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.cpp	2008-07-10 22:34:48 UTC (rev 32996)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.cpp	2008-07-10 23:03:34 UTC (rev 32997)
@@ -118,6 +118,8 @@
 	_location._comment = NULL;
 	_location._endComment = NULL;
 
+	_quit = false;
+	
 	_pathBuffer = 0;
 
 	_screenSize = _screenWidth * _screenHeight;
@@ -331,7 +333,8 @@
 		break;
 
 	case kEvQuitGame:
-		_vm->_quit = true;
+		_quit = true;
+		_vm->quitGame();
 		break;
 
 	case kEvSaveGame:
@@ -358,19 +361,19 @@
 		processInput(data);
 	}
 
-	if (_vm->_quit)
+	if (_vm->quit())
 		return;
 
 	runPendingZones();
 
-	if (_vm->_quit)
+	if (_vm->quit())
 		return;
 
 	if (_engineFlags & kEngineChangeLocation) {
 		changeLocation(_location._name);
 	}
 
-	if (_vm->_quit)
+	if (_vm->quit())
 		return;
 
 	_gfx->beginFrame();

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.h	2008-07-10 22:34:48 UTC (rev 32996)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.h	2008-07-10 23:03:34 UTC (rev 32997)
@@ -256,6 +256,11 @@
 	virtual bool loadGame() = 0;
 	virtual bool saveGame() = 0;
 
+	bool _quit;   /* The only reason this flag exists is for freeZones() to properly 
+		       * delete all zones when necessary. THIS FLAG IS NOT THE ENGINE QUIT FLAG, 
+		       * use _eventMan->shouldQuit() for that.
+		       */
+
 	Input	*_input;
 
 	OpcodeSet	_commandOpcodes;

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_br.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_br.cpp	2008-07-10 22:34:48 UTC (rev 32996)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_br.cpp	2008-07-10 23:03:34 UTC (rev 32997)
@@ -105,17 +105,17 @@
 	guiSplash("dyna");
 	guiSplash("core");
 
-	while (_vm->_quit == 0) {
+	while (quit() == 0) {
 
 		guiStart();
 
-		if (_vm->_quit)
-			return _rtl;
+		if (quit())
+			return _eventMan->shouldRTL();
 
 //		initCharacter();
 
 		_input->_inputMode = Input::kInputModeGame;
-		while (((_engineFlags & kEngineReturn) == 0) && (!_vm->_quit)) {
+		while (((_engineFlags & kEngineReturn) == 0) && (!quit())) {
 			runGame();
 		}
 		_engineFlags &= ~kEngineReturn;
@@ -125,7 +125,7 @@
 
 	}
 
-	return _rtl;
+	return _eventMan->shouldRTL();
 }
 
 

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_ns.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_ns.cpp	2008-07-10 22:34:48 UTC (rev 32996)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_ns.cpp	2008-07-10 23:03:34 UTC (rev 32997)
@@ -236,20 +236,20 @@
 
 	guiStart();
 	
-	if (_vm->_quit)
-		return _rtl;
+	if (quit())
+		return _eventMan->shouldRTL();
 	
 	changeLocation(_location._name);
 
-	if (_vm->_quit)
-		return _rtl;
+	if (quit())
+		return _eventMan->shouldRTL();
 
 	_input->_inputMode = Input::kInputModeGame;
-	while (!_vm->_quit) {
+	while (!quit()) {
 		runGame();
 	}
 
-	return _rtl;
+	return _eventMan->shouldRTL();
 }
 
 void Parallaction_ns::switchBackground(const char* background, const char* mask) {


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