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

cpage88 at users.sourceforge.net cpage88 at users.sourceforge.net
Tue Jul 8 02:16:55 CEST 2008


Revision: 32955
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32955&view=rev
Author:   cpage88
Date:     2008-07-07 17:16:55 -0700 (Mon, 07 Jul 2008)

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

Modified Paths:
--------------
    scummvm/branches/gsoc2008-rtl/engines/gob/game_v1.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/game_v2.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/gob.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/inter.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/inter_bargon.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/inter_v1.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/inter_v2.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/mult.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/palanim.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/util.cpp
    scummvm/branches/gsoc2008-rtl/engines/gob/videoplayer.cpp

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/game_v1.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/game_v1.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/game_v1.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -24,6 +24,7 @@
  */
 
 #include "common/endian.h"
+#include "common/events.h"
 #include "common/stream.h"
 
 #include "gob/gob.h"
@@ -63,7 +64,7 @@
 	strcpy(savedTotName, _curTotFile);
 
 	if (skipPlay <= 0) {
-		while (!_vm->_quit) {
+		while (!g_system->getEventManager()->shouldQuit()) {
 			for (int i = 0; i < 4; i++) {
 				_vm->_draw->_fontToSprite[i].sprite = -1;
 				_vm->_draw->_fontToSprite[i].base = -1;
@@ -997,7 +998,7 @@
 		WRITE_VAR(16, 0);
 		_activeCollResId = 0;
 	}
-	while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->_quit);
+	while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !g_system->getEventManager()->shouldQuit());
 
 	if (((uint16) _activeCollResId & ~0x8000) == collResId) {
 		collStackPos = 0;

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/game_v2.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/game_v2.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/game_v2.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -24,6 +24,7 @@
  */
 
 #include "common/endian.h"
+#include "common/events.h"
 #include "common/stream.h"
 
 #include "gob/gob.h"
@@ -70,7 +71,7 @@
 	strcpy(savedTotName, _curTotFile);
 
 	if (skipPlay <= 0) {
-		while (!_vm->_quit) {
+		while (!g_system->getEventManager()->shouldQuit()) {
 			if (_vm->_inter->_variables)
 				_vm->_draw->animateCursor(4);
 
@@ -438,7 +439,7 @@
 
 	timeKey = _vm->_util->getTimeKey();
 	while (1) {
-		if (_vm->_inter->_terminate || _vm->_quit) {
+		if (_vm->_inter->_terminate || g_system->getEventManager()->shouldQuit()) {
 			if (handleMouse)
 				_vm->_draw->blitCursor();
 			return 0;
@@ -1043,7 +1044,7 @@
 		WRITE_VAR(16, 0);
 		_activeCollResId = 0;
 	}
-	while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->_quit);
+	while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !g_system->getEventManager()->shouldQuit());
 
 	if ((_activeCollResId & 0xFFF) == collResId) {
 		collStackPos = 0;
@@ -1465,7 +1466,7 @@
 			key = checkCollisions(handleMouse, -300, collResId, collIndex);
 
 			if ((key != 0) || (*collResId != 0) ||
-					_vm->_inter->_terminate || _vm->_quit)
+					_vm->_inter->_terminate || g_system->getEventManager()->shouldQuit())
 				break;
 
 			if (*pTotTime > 0) {
@@ -1479,7 +1480,7 @@
 		}
 
 		if ((key == 0) || (*collResId != 0) ||
-				_vm->_inter->_terminate || _vm->_quit)
+				_vm->_inter->_terminate || g_system->getEventManager()->shouldQuit())
 			return 0;
 
 		switch (key) {

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/gob.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/gob.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/gob.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -111,11 +111,11 @@
 int GobEngine::go() {
 	_init->initGame(0);
 
-	return _rtl;
+	return _eventMan->shouldRTL();
 }
 
 void GobEngine::shutdown() {
-	_quit = true;
+	g_system->getEventManager()->pushEvent(Common::EVENT_QUIT);
 }
 
 const char *GobEngine::getLangDesc(int16 language) const {

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/inter.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/inter.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/inter.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -26,6 +26,7 @@
 #include <time.h>	// FIXME: for Inter::renewTimeInVars()
 
 #include "common/endian.h"
+#include "common/events.h"
 
 #include "gob/gob.h"
 #include "gob/inter.h"
@@ -249,7 +250,7 @@
 		if (executeFuncOpcode(cmd2, cmd, params))
 			return;
 
-		if (_vm->_quit)
+		if (g_system->getEventManager()->shouldQuit())
 			break;
 
 		if (_break) {
@@ -269,7 +270,7 @@
 void Inter::callSub(int16 retFlag) {
 	byte block;
 
-	while (!_vm->_quit && _vm->_global->_inter_execPtr &&
+	while (!g_system->getEventManager()->shouldQuit() && _vm->_global->_inter_execPtr &&
 			(_vm->_global->_inter_execPtr != _vm->_game->_totFileData)) {
 
 		block = *_vm->_global->_inter_execPtr;

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/inter_bargon.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/inter_bargon.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/inter_bargon.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -24,6 +24,7 @@
  */
 
 #include "common/endian.h"
+#include "common/events.h"
 
 #include "gob/gob.h"
 #include "gob/inter.h"
@@ -750,7 +751,7 @@
 	for (i = 320; i >= 0; i--) {
 		_vm->_util->setScrollOffset(i, 0);
 		if ((_vm->_game->checkKeys(&mouseX, &mouseY, &buttons, 0) == 0x11B) ||
-				_vm->_quit) {
+				g_system->getEventManager()->shouldQuit()) {
 			_vm->_palAnim->fade(0, -2, 0);
 			_vm->_video->clearSurf(_vm->_draw->_frontSurface);
 			memset((char *) _vm->_draw->_vgaPalette, 0, 768);
@@ -760,7 +761,7 @@
 			break;
 		}
 	}
-	if (!_vm->_quit)
+	if (!g_system->getEventManager()->shouldQuit())
 		_vm->_util->setScrollOffset(0, 0);
 	surface = 0;
 	if (VAR(57) == ((uint32) -1))
@@ -799,7 +800,7 @@
 			_vm->_util->longDelay(_vm->_util->getRandom(200));
 		}
 		if ((_vm->_game->checkKeys(&mouseX, &mouseY, &buttons, 0) == 0x11B) ||
-				_vm->_quit) {
+				g_system->getEventManager()->shouldQuit()) {
 			_vm->_sound->blasterStop(10);
 			_vm->_palAnim->fade(0, -2, 0);
 			_vm->_video->clearSurf(_vm->_draw->_frontSurface);

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/inter_v1.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/inter_v1.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/inter_v1.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -24,6 +24,7 @@
  */
 
 #include "common/endian.h"
+#include "common/events.h"
 #include "common/file.h"
 
 #include "gob/gob.h"
@@ -1225,7 +1226,7 @@
 		funcBlock(1);
 		_vm->_global->_inter_execPtr = blockPtr + size + 1;
 		flag = evalBoolResult();
-	} while (!flag && !_break && !_terminate && !_vm->_quit);
+	} while (!flag && !_break && !_terminate && !g_system->getEventManager()->shouldQuit());
 
 	_nestLevel[0]--;
 
@@ -1260,7 +1261,7 @@
 		} else
 			_vm->_global->_inter_execPtr += size;
 
-		if (_break || _terminate || _vm->_quit) {
+		if (_break || _terminate || g_system->getEventManager()->shouldQuit()) {
 			_vm->_global->_inter_execPtr = blockPtr;
 			_vm->_global->_inter_execPtr += size;
 			break;

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/inter_v2.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/inter_v2.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -24,6 +24,8 @@
  */
 
 #include "common/endian.h"
+#include "common/events.h"
+
 #include "sound/mixer.h"
 #include "sound/mods/infogrames.h"
 
@@ -1483,7 +1485,7 @@
 
 	curX = startX;
 	curY = startY;
-	while (!_vm->_quit && ((curX != endX) || (curY != endY))) {
+	while (!g_system->getEventManager()->shouldQuit() && ((curX != endX) || (curY != endY))) {
 		curX = stepX > 0 ? MIN(curX + stepX, (int) endX) :
 			MAX(curX + stepX, (int) endX);
 		curY = stepY > 0 ? MIN(curY + stepY, (int) endY) :

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/mult.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/mult.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/mult.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -24,6 +24,7 @@
  */
 
 #include "common/endian.h"
+#include "common/events.h"
 
 #include "gob/gob.h"
 #include "gob/mult.h"
@@ -197,7 +198,7 @@
 
 		_frame++;
 		_vm->_util->waitEndFrame();
-	} while (!stop && !stopNoClear && !_vm->_quit);
+	} while (!stop && !stopNoClear && !g_system->getEventManager()->shouldQuit());
 
 	if (!stopNoClear) {
 		if (_animDataAllocated) {

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/palanim.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/palanim.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/palanim.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -23,6 +23,8 @@
  *
  */
 
+#include "common/events.h"
+
 #include "gob/gob.h"
 #include "gob/palanim.h"
 #include "gob/global.h"
@@ -131,7 +133,7 @@
 	bool stop;
 	int16 i;
 
-	if (_vm->_quit)
+	if (g_system->getEventManager()->shouldQuit())
 		return;
 
 	_fadeValue = (fadeV < 0) ? -fadeV : 2;

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/util.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/util.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/util.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -72,7 +72,7 @@
 		_vm->_video->waitRetrace();
 		processInput();
 		delay(15);
-	} while (!_vm->_quit &&
+	} while (!g_system->getEventManager()->shouldQuit() &&
 	         ((g_system->getMillis() * _vm->_global->_speedFactor) < time));
 }
 
@@ -118,9 +118,6 @@
 			break;
 		case Common::EVENT_KEYUP:
 			break;
-		case Common::EVENT_QUIT:
-			_vm->_quit = true;
-			break;
 		default:
 			break;
 		}

Modified: scummvm/branches/gsoc2008-rtl/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/gob/videoplayer.cpp	2008-07-07 23:47:39 UTC (rev 32954)
+++ scummvm/branches/gsoc2008-rtl/engines/gob/videoplayer.cpp	2008-07-08 00:16:55 UTC (rev 32955)
@@ -23,6 +23,8 @@
  *
  */
 
+#include "common/events.h"
+
 #include "gob/videoplayer.h"
 #include "gob/global.h"
 #include "gob/util.h"
@@ -568,7 +570,7 @@
 
 	_vm->_util->processInput();
 
-	if (_vm->_quit) {
+	if (g_system->getEventManager()->shouldQuit()) {
 		_primaryVideo->getVideo()->disableSound();
 		return true;
 	}


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