[Scummvm-cvs-logs] SF.net SVN: scummvm:[34245] scummvm/trunk/engines/gob

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Sep 1 19:50:01 CEST 2008


Revision: 34245
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34245&view=rev
Author:   fingolfin
Date:     2008-09-01 17:50:00 +0000 (Mon, 01 Sep 2008)

Log Message:
-----------
Merging more of the GSoC 2008 RTL branch: GOB

Modified Paths:
--------------
    scummvm/trunk/engines/gob/detection.cpp
    scummvm/trunk/engines/gob/game_v1.cpp
    scummvm/trunk/engines/gob/game_v2.cpp
    scummvm/trunk/engines/gob/gob.cpp
    scummvm/trunk/engines/gob/gob.h
    scummvm/trunk/engines/gob/inter.cpp
    scummvm/trunk/engines/gob/inter_bargon.cpp
    scummvm/trunk/engines/gob/inter_v1.cpp
    scummvm/trunk/engines/gob/inter_v2.cpp
    scummvm/trunk/engines/gob/mult.cpp
    scummvm/trunk/engines/gob/palanim.cpp
    scummvm/trunk/engines/gob/sound/sound.cpp
    scummvm/trunk/engines/gob/util.cpp
    scummvm/trunk/engines/gob/videoplayer.cpp

Modified: scummvm/trunk/engines/gob/detection.cpp
===================================================================
--- scummvm/trunk/engines/gob/detection.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/detection.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -1986,9 +1986,15 @@
 		return "Goblins Games (C) Coktel Vision";
 	}
 
+	virtual bool hasFeature(MetaEngineFeature f) const;
 	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
 };
 
+bool GobMetaEngine::hasFeature(MetaEngineFeature f) const {
+	return
+		(f == kSupportsRTL);
+}
+
 bool GobMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const {
 	const Gob::GOBGameDescription *gd = (const Gob::GOBGameDescription *)desc;
 	if (gd) {

Modified: scummvm/trunk/engines/gob/game_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v1.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/game_v1.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -63,7 +63,7 @@
 	strcpy(savedTotName, _curTotFile);
 
 	if (skipPlay <= 0) {
-		while (!_vm->_quitRequested) {
+		while (!_vm->quit()) {
 			for (int i = 0; i < 4; i++) {
 				_vm->_draw->_fontToSprite[i].sprite = -1;
 				_vm->_draw->_fontToSprite[i].base = -1;
@@ -997,7 +997,7 @@
 		WRITE_VAR(16, 0);
 		_activeCollResId = 0;
 	}
-	while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->_quitRequested);
+	while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->quit());
 
 	if (((uint16) _activeCollResId & ~0x8000) == collResId) {
 		collStackPos = 0;

Modified: scummvm/trunk/engines/gob/game_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/game_v2.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/game_v2.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -70,7 +70,7 @@
 	strcpy(savedTotName, _curTotFile);
 
 	if (skipPlay <= 0) {
-		while (!_vm->_quitRequested) {
+		while (!_vm->quit()) {
 			if (_vm->_inter->_variables)
 				_vm->_draw->animateCursor(4);
 
@@ -438,7 +438,7 @@
 
 	timeKey = _vm->_util->getTimeKey();
 	while (1) {
-		if (_vm->_inter->_terminate || _vm->_quitRequested) {
+		if (_vm->_inter->_terminate || _vm->quit()) {
 			if (handleMouse)
 				_vm->_draw->blitCursor();
 			return 0;
@@ -1043,7 +1043,7 @@
 		WRITE_VAR(16, 0);
 		_activeCollResId = 0;
 	}
-	while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->_quitRequested);
+	while ((_activeCollResId == 0) && !_vm->_inter->_terminate && !_vm->quit());
 
 	if ((_activeCollResId & 0xFFF) == collResId) {
 		collStackPos = 0;
@@ -1465,7 +1465,7 @@
 			key = checkCollisions(handleMouse, -300, collResId, collIndex);
 
 			if ((key != 0) || (*collResId != 0) ||
-					_vm->_inter->_terminate || _vm->_quitRequested)
+					_vm->_inter->_terminate || _vm->quit())
 				break;
 
 			if (*pTotTime > 0) {
@@ -1479,7 +1479,7 @@
 		}
 
 		if ((key == 0) || (*collResId != 0) ||
-				_vm->_inter->_terminate || _vm->_quitRequested)
+				_vm->_inter->_terminate || _vm->quit())
 			return 0;
 
 		switch (key) {

Modified: scummvm/trunk/engines/gob/gob.cpp
===================================================================
--- scummvm/trunk/engines/gob/gob.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/gob.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -24,7 +24,6 @@
  */
 
 #include "common/endian.h"
-#include "common/events.h"
 
 #include "base/plugins.h"
 #include "common/config-manager.h"
@@ -84,7 +83,6 @@
 	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
 
 	_copyProtection = ConfMan.getBool("copy_protection");
-	_quitRequested = false;
 
 	Common::addSpecialDebugLevel(kDebugFuncOp, "FuncOpcodes", "Script FuncOpcodes debug level");
 	Common::addSpecialDebugLevel(kDebugDrawOp, "DrawOpcodes", "Script DrawOpcodes debug level");
@@ -114,13 +112,9 @@
 int GobEngine::go() {
 	_init->initGame(0);
 
-	return 0;
+	return _eventMan->shouldRTL();
 }
 
-void GobEngine::shutdown() {
-	_quitRequested = true;
-}
-
 const char *GobEngine::getLangDesc(int16 language) const {
 	if ((language < 0) || (language > 10))
 		language = 2;

Modified: scummvm/trunk/engines/gob/gob.h
===================================================================
--- scummvm/trunk/engines/gob/gob.h	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/gob.h	2008-09-01 17:50:00 UTC (rev 34245)
@@ -210,7 +210,6 @@
 	char *_startTot0;
 	bool _copyProtection;
 	bool _noMusic;
-	bool _quitRequested;
 
 	Global *_global;
 	Util *_util;
@@ -230,8 +229,6 @@
 	SaveLoad *_saveLoad;
 	VideoPlayer *_vidPlayer;
 
-	void shutdown();
-
 	const char *getLangDesc(int16 language) const;
 	void validateLanguage();
 	void validateVideoMode(int16 videoMode);

Modified: scummvm/trunk/engines/gob/inter.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/inter.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -259,7 +259,7 @@
 		if (executeFuncOpcode(cmd2, cmd, params))
 			return;
 
-		if (_vm->_quitRequested)
+		if (_vm->quit())
 			break;
 
 		if (_break) {
@@ -279,7 +279,7 @@
 void Inter::callSub(int16 retFlag) {
 	byte block;
 
-	while (!_vm->_quitRequested && _vm->_global->_inter_execPtr &&
+	while (!_vm->quit() && _vm->_global->_inter_execPtr &&
 			(_vm->_global->_inter_execPtr != _vm->_game->_totFileData)) {
 
 		block = *_vm->_global->_inter_execPtr;

Modified: scummvm/trunk/engines/gob/inter_bargon.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_bargon.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/inter_bargon.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -750,7 +750,7 @@
 	for (i = 320; i >= 0; i--) {
 		_vm->_util->setScrollOffset(i, 0);
 		if ((_vm->_game->checkKeys(&mouseX, &mouseY, &buttons, 0) == 0x11B) ||
-				_vm->_quitRequested) {
+				_vm->quit()) {
 			_vm->_palAnim->fade(0, -2, 0);
 			_vm->_video->clearSurf(_vm->_draw->_frontSurface);
 			memset((char *) _vm->_draw->_vgaPalette, 0, 768);
@@ -760,7 +760,7 @@
 			break;
 		}
 	}
-	if (!_vm->_quitRequested)
+	if (!_vm->quit())
 		_vm->_util->setScrollOffset(0, 0);
 	surface = 0;
 	if (VAR(57) == ((uint32) -1))
@@ -799,7 +799,7 @@
 			_vm->_util->longDelay(_vm->_util->getRandom(200));
 		}
 		if ((_vm->_game->checkKeys(&mouseX, &mouseY, &buttons, 0) == 0x11B) ||
-				_vm->_quitRequested) {
+				_vm->quit()) {
 			_vm->_sound->blasterStop(10);
 			_vm->_palAnim->fade(0, -2, 0);
 			_vm->_video->clearSurf(_vm->_draw->_frontSurface);

Modified: scummvm/trunk/engines/gob/inter_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v1.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/inter_v1.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -1234,7 +1234,7 @@
 		funcBlock(1);
 		_vm->_global->_inter_execPtr = blockPtr + size + 1;
 		flag = evalBoolResult();
-	} while (!flag && !_break && !_terminate && !_vm->_quitRequested);
+	} while (!flag && !_break && !_terminate && !_vm->quit());
 
 	_nestLevel[0]--;
 
@@ -1269,7 +1269,7 @@
 		} else
 			_vm->_global->_inter_execPtr += size;
 
-		if (_break || _terminate || _vm->_quitRequested) {
+		if (_break || _terminate || _vm->quit()) {
 			_vm->_global->_inter_execPtr = blockPtr;
 			_vm->_global->_inter_execPtr += size;
 			break;

Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/inter_v2.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -24,6 +24,7 @@
  */
 
 #include "common/endian.h"
+
 #include "sound/mixer.h"
 #include "sound/mods/infogrames.h"
 
@@ -1489,7 +1490,7 @@
 
 	curX = startX;
 	curY = startY;
-	while (!_vm->_quitRequested && ((curX != endX) || (curY != endY))) {
+	while (!_vm->quit() && ((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/trunk/engines/gob/mult.cpp
===================================================================
--- scummvm/trunk/engines/gob/mult.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/mult.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -209,7 +209,7 @@
 
 		_frame++;
 		_vm->_util->waitEndFrame();
-	} while (!stop && !stopNoClear && !_vm->_quitRequested);
+	} while (!stop && !stopNoClear && !_vm->quit());
 
 	if (!stopNoClear) {
 		if (_animDataAllocated) {

Modified: scummvm/trunk/engines/gob/palanim.cpp
===================================================================
--- scummvm/trunk/engines/gob/palanim.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/palanim.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -23,6 +23,7 @@
  *
  */
 
+
 #include "gob/gob.h"
 #include "gob/palanim.h"
 #include "gob/global.h"
@@ -131,7 +132,7 @@
 	bool stop;
 	int16 i;
 
-	if (_vm->_quitRequested)
+	if (_vm->quit())
 		return;
 
 	_fadeValue = (fadeV < 0) ? -fadeV : 2;

Modified: scummvm/trunk/engines/gob/sound/sound.cpp
===================================================================
--- scummvm/trunk/engines/gob/sound/sound.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/sound/sound.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -369,7 +369,7 @@
 	if (stopComp)
 		_blaster->endComposition();
 
-	while (_blaster->isPlaying() && !_vm->_quitRequested) {
+	while (_blaster->isPlaying() && !_vm->quit()) {
 		if (interruptible && (_vm->_util->checkKey() == 0x11B)) {
 			WRITE_VAR(57, (uint32) -1);
 			return;

Modified: scummvm/trunk/engines/gob/util.cpp
===================================================================
--- scummvm/trunk/engines/gob/util.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/util.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -23,7 +23,6 @@
  *
  */
 
-#include "common/events.h"
 
 #include "gob/gob.h"
 #include "gob/util.h"
@@ -72,7 +71,7 @@
 		_vm->_video->waitRetrace();
 		processInput();
 		delay(15);
-	} while (!_vm->_quitRequested &&
+	} while (!_vm->quit() &&
 	         ((g_system->getMillis() * _vm->_global->_speedFactor) < time));
 }
 
@@ -118,9 +117,6 @@
 			break;
 		case Common::EVENT_KEYUP:
 			break;
-		case Common::EVENT_QUIT:
-			_vm->_quitRequested = true;
-			break;
 		default:
 			break;
 		}

Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp	2008-09-01 17:47:36 UTC (rev 34244)
+++ scummvm/trunk/engines/gob/videoplayer.cpp	2008-09-01 17:50:00 UTC (rev 34245)
@@ -23,6 +23,7 @@
  *
  */
 
+
 #include "gob/videoplayer.h"
 #include "gob/global.h"
 #include "gob/util.h"
@@ -568,7 +569,7 @@
 
 	_vm->_util->processInput();
 
-	if (_vm->_quitRequested) {
+	if (_vm->quit()) {
 		_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