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

cpage88 at users.sourceforge.net cpage88 at users.sourceforge.net
Tue Aug 5 04:11:01 CEST 2008


Revision: 33628
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33628&view=rev
Author:   cpage88
Date:     2008-08-05 02:11:00 +0000 (Tue, 05 Aug 2008)

Log Message:
-----------
Made changes to keep KYRA and PARA compatible with RTL/GMM

Modified Paths:
--------------
    scummvm/branches/gsoc2008-rtl/engines/kyra/lol.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_br.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_ns.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_ns.cpp

Modified: scummvm/branches/gsoc2008-rtl/engines/kyra/lol.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/kyra/lol.cpp	2008-08-05 00:27:25 UTC (rev 33627)
+++ scummvm/branches/gsoc2008-rtl/engines/kyra/lol.cpp	2008-08-05 02:11:00 UTC (rev 33628)
@@ -180,15 +180,11 @@
 
 	while (_eventMan->pollEvent(event)) {
 		switch (event.type) {
-		case Common::EVENT_QUIT:
-			_quitFlag = true;
-			break;
-
 		case Common::EVENT_KEYDOWN:
 			if (event.kbd.keycode == '.' || event.kbd.keycode == Common::KEYCODE_ESCAPE)
 				_eventList.push_back(Event(event, true));
 			else if (event.kbd.keycode == 'q' && event.kbd.flags == Common::KBD_CTRL)
-				_quitFlag = true;
+				quitGame();
 			else
 				_eventList.push_back(event);
 			break;
@@ -301,7 +297,7 @@
 	_screen->hideMouse();
 
 	uint32 palNextFadeStep = 0;
-	while (!_tim->finished() && !_quitFlag && !skipFlag()) {
+	while (!_tim->finished() && !quit() && !skipFlag()) {
 		updateInput();
 		_tim->exec(intro, false);
 		_screen->checkedPageUpdate(8, 4);
@@ -379,14 +375,14 @@
 	_screen->fadePalette(_screen->getPalette(0), 30, 0);
 	
 	bool kingIntro = true;
-	while (!_quitFlag) {
+	while (!quit()) {
 		if (kingIntro)
 			kingSelectionIntro();
 
 		if (_charSelection < 0)
 			processCharacterSelection();
 
-		if (_quitFlag)
+		if (quit())
 			break;
 
 		if (_charSelection == 100) {
@@ -407,11 +403,11 @@
 		}
 	}
 
-	if (_quitFlag)
+	if (quit())
 		return -1;
 
 	uint32 waitTime = _system->getMillis() + 420 * _tickLength;
-	while (waitTime > _system->getMillis() && !skipFlag() && !_quitFlag) {
+	while (waitTime > _system->getMillis() && !skipFlag() && !quit()) {
 		updateInput();
 		_system->delayMillis(10);
 	}
@@ -443,7 +439,7 @@
 	_chargenWSA->setDrawPage(0);
 	
 	int index = 4;
-	while (_sound->voiceIsPlaying("KING01") && _charSelection == -1 && !_quitFlag && !skipFlag()) {
+	while (_sound->voiceIsPlaying("KING01") && _charSelection == -1 && !quit() && !skipFlag()) {
 		index = MAX(index, 4);
 
 		_chargenWSA->displayFrame(_chargenFrameTable[index], 0, 0, 0);
@@ -454,7 +450,7 @@
 		_screen->updateScreen();
 
 		uint32 waitEnd = _system->getMillis() + 7 * _tickLength;
-		while (waitEnd > _system->getMillis() && _charSelection == -1 && !_quitFlag && !skipFlag()) {
+		while (waitEnd > _system->getMillis() && _charSelection == -1 && !quit() && !skipFlag()) {
 			_charSelection = getCharSelection();
 			_system->delayMillis(10);
 		}
@@ -485,7 +481,7 @@
 	_chargenWSA->setDrawPage(0);
 	
 	int index = 0;
-	while (_sound->voiceIsPlaying("KING02") && _charSelection == -1 && !_quitFlag && index < 15) {
+	while (_sound->voiceIsPlaying("KING02") && _charSelection == -1 && !quit() && index < 15) {
 		_chargenWSA->displayFrame(_chargenFrameTable[index+9], 0, 0, 0);
 		_screen->copyRegion(_selectionPosTable[_reminderChar1IdxTable[index]*2+0], _selectionPosTable[_reminderChar1IdxTable[index]*2+1], _charPreviews[0].x, _charPreviews[0].y, 32, 32, 4, 0);
 		_screen->copyRegion(_selectionPosTable[_reminderChar2IdxTable[index]*2+0], _selectionPosTable[_reminderChar2IdxTable[index]*2+1], _charPreviews[1].x, _charPreviews[1].y, 32, 32, 4, 0);
@@ -494,7 +490,7 @@
 		_screen->updateScreen();
 
 		uint32 waitEnd = _system->getMillis() + 8 * _tickLength;
-		while (waitEnd > _system->getMillis() && !_quitFlag) {
+		while (waitEnd > _system->getMillis() && !quit()) {
 			_charSelection = getCharSelection();
 			_system->delayMillis(10);
 		}
@@ -515,14 +511,14 @@
 	_chargenWSA->setDrawPage(0);
 
 	int index = 0;
-	while (_sound->voiceIsPlaying("KING03") && !_quitFlag && !skipFlag()) {
+	while (_sound->voiceIsPlaying("KING03") && !quit() && !skipFlag()) {
 		index = MAX(index, 4);
 
 		_chargenWSA->displayFrame(_chargenFrameTable[index], 0, 0, 0);
 		_screen->updateScreen();
 
 		uint32 waitEnd = _system->getMillis() + 8 * _tickLength;
-		while (waitEnd > _system->getMillis() && !_quitFlag && !skipFlag()) {
+		while (waitEnd > _system->getMillis() && !quit() && !skipFlag()) {
 			updateInput();
 			_system->delayMillis(10);
 		}
@@ -541,10 +537,10 @@
 	debugC(9, kDebugLevelMain, "LoLEngine::processCharacterSelection()");
 	
 	_charSelection = -1;
-	while (!_quitFlag && _charSelection == -1) {
+	while (!quit() && _charSelection == -1) {
 		uint32 nextKingMessage = _system->getMillis() + 900 * _tickLength;
 
-		while (nextKingMessage > _system->getMillis() && _charSelection == -1 && !_quitFlag) {
+		while (nextKingMessage > _system->getMillis() && _charSelection == -1 && !quit()) {
 			updateSelectionAnims();
 			_charSelection = getCharSelection();
 			_system->delayMillis(10);
@@ -663,12 +659,12 @@
 	int index = 0;
 	file[4] = '0';
 	
-	while (_charSelectionInfoResult == -1 && !_quitFlag) {
+	while (_charSelectionInfoResult == -1 && !quit()) {
 		if (!_sound->voicePlay(file))
 			break;
 
 		int i = 0;
-		while (_sound->voiceIsPlaying(file) && _charSelectionInfoResult == -1 && !_quitFlag) {
+		while (_sound->voiceIsPlaying(file) && _charSelectionInfoResult == -1 && !quit()) {
 			_screen->drawShape(0, _screen->getPtrToShape(_screen->getCPagePtr(9), _charInfoFrameTable[i]), 11, 130, 0, 0);
 			_screen->updateScreen();
 

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_br.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_br.cpp	2008-08-05 00:27:25 UTC (rev 33627)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_br.cpp	2008-08-05 02:11:00 UTC (rev 33628)
@@ -166,8 +166,9 @@
 
 	void performChoice(int selectedItem) {
 		switch (selectedItem) {
-		case kMenuQuit:
-			_engineFlags |= kEngineQuit;
+		case kMenuQuit: {
+			_vm->quitGame();
+		}
 			break;
 
 		case kMenuLoadGame:

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_ns.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_ns.cpp	2008-08-05 00:27:25 UTC (rev 33627)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/gui_ns.cpp	2008-08-05 02:11:00 UTC (rev 33628)
@@ -701,7 +701,7 @@
 		}
 
 		if (_isDemo) {
-			_engineFlags |= kEngineQuit;
+			_vm->quitGame();
 			return 0;
 		}
 

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_ns.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_ns.cpp	2008-08-05 00:27:25 UTC (rev 33627)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction_ns.cpp	2008-08-05 02:11:00 UTC (rev 33628)
@@ -28,6 +28,7 @@
 #include "common/config-manager.h"
 
 #include "parallaction/parallaction.h"
+#include "parallaction/gui.h"
 #include "parallaction/input.h"
 #include "parallaction/sound.h"
 
@@ -219,7 +220,7 @@
 	renameOldSavefiles();
 
 	_globalTable = _disk->loadTable("global");
-
+/*
 	// If requested, load a savegame instead of showing the intro
 	if (ConfMan.hasKey("save_slot")) {
 		_gameToLoad = ConfMan.getInt("save_slot");
@@ -237,7 +238,7 @@
 		new ChooseLanguageInputState_NS(this, _menuHelper);
 		doLoadGame(_gameToLoad);
 	}
-	
+*/	
 	startGui();
 
 	while (!quit()) {


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