[Scummvm-cvs-logs] SF.net SVN: scummvm: [32953] scummvm/branches/gsoc2008-rtl
cpage88 at users.sourceforge.net
cpage88 at users.sourceforge.net
Tue Jul 8 01:24:12 CEST 2008
Revision: 32953
http://scummvm.svn.sourceforge.net/scummvm/?rev=32953&view=rev
Author: cpage88
Date: 2008-07-07 16:24:12 -0700 (Mon, 07 Jul 2008)
Log Message:
-----------
Agi works with the new GMM implementation
Modified Paths:
--------------
scummvm/branches/gsoc2008-rtl/engines/agi/agi.cpp
scummvm/branches/gsoc2008-rtl/engines/agi/cycle.cpp
scummvm/branches/gsoc2008-rtl/engines/agi/op_cmd.cpp
scummvm/branches/gsoc2008-rtl/engines/agi/op_test.cpp
scummvm/branches/gsoc2008-rtl/engines/agi/saveload.cpp
scummvm/branches/gsoc2008-rtl/gui/newgui.cpp
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/agi.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/agi.cpp 2008-07-07 22:34:45 UTC (rev 32952)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/agi.cpp 2008-07-07 23:24:12 UTC (rev 32953)
@@ -61,9 +61,6 @@
while (_eventMan->pollEvent(event)) {
switch (event.type) {
- case Common::EVENT_QUIT:
- _quit = true;
- break;
case Common::EVENT_PREDICTIVE_DIALOG:
if (_predictiveDialogRunning)
break;
@@ -810,7 +807,7 @@
runGame();
- return _rtl;
+ return _eventMan->shouldRTL();
}
void AgiEngine::syncSoundSettings() {
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/cycle.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/cycle.cpp 2008-07-07 22:34:45 UTC (rev 32952)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/cycle.cpp 2008-07-07 23:24:12 UTC (rev 32953)
@@ -24,6 +24,7 @@
*/
+#include "common/events.h"
#include "agi/agi.h"
#include "agi/sprite.h"
@@ -116,7 +117,7 @@
oldSound = getflag(fSoundOn);
_game.exitAllLogics = false;
- while (runLogic(0) == 0 && !_quit) {
+ while (runLogic(0) == 0 && !_eventMan->shouldQuit()) {
_game.vars[vWordNotFound] = 0;
_game.vars[vBorderTouchObj] = 0;
_game.vars[vBorderCode] = 0;
@@ -353,10 +354,10 @@
_game.vars[vKey] = 0;
}
- if (_quit == 0xff)
+ if (_eventMan->shouldQuit() == 0xff)
ec = errRestartGame;
- } while (_quit == 0);
+ } while (_eventMan->shouldQuit() == 0);
_sound->stopSound();
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/op_cmd.cpp 2008-07-07 22:34:45 UTC (rev 32952)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/op_cmd.cpp 2008-07-07 23:24:12 UTC (rev 32953)
@@ -26,6 +26,8 @@
#include "base/version.h"
+#include "common/events.h"
+
#include "agi/agi.h"
#include "agi/sprite.h"
#include "agi/graphics.h"
@@ -1213,11 +1215,11 @@
g_sound->stopSound();
if (p0) {
- g_agi->_quit = true;
+ g_system->getEventManager()->pushEvent(Common::EVENT_QUIT);
} else {
if (g_agi->selectionBox
(" Quit the game, or continue? \n\n\n", buttons) == 0) {
- g_agi->_quit = true;
+ g_system->getEventManager()->pushEvent(Common::EVENT_QUIT);
}
}
}
@@ -1231,7 +1233,7 @@
g_agi->selectionBox(" Restart game, or continue? \n\n\n", buttons);
if (sel == 0) {
- g_agi->_quit = 0xff;
+ g_system->getEventManager()->pushEvent(Common::EVENT_QUIT);
g_agi->setflag(fRestartGame, true);
g_agi->_menu->enableAll();
}
@@ -1739,7 +1741,7 @@
curLogic->cIP = curLogic->sIP;
timerHack = 0;
- while (ip < _game.logics[n].size && !g_agi->_quit) {
+ while (ip < _game.logics[n].size && !_eventMan->shouldQuit()) {
if (_debug.enabled) {
if (_debug.steps > 0) {
if (_debug.logic0 || n) {
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/op_test.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/op_test.cpp 2008-07-07 22:34:45 UTC (rev 32952)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/op_test.cpp 2008-07-07 23:24:12 UTC (rev 32953)
@@ -24,6 +24,7 @@
*/
+#include "common/events.h"
#include "agi/agi.h"
#include "agi/keyboard.h"
@@ -232,7 +233,7 @@
uint8 p[16] = { 0 };
bool end_test = false;
- while (retval && !_quit && !end_test) {
+ while (retval && !_eventMan->shouldQuit() && !end_test) {
if (_debug.enabled && (_debug.logic0 || lognum))
debugConsole(lognum, lTEST_MODE, NULL);
Modified: scummvm/branches/gsoc2008-rtl/engines/agi/saveload.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agi/saveload.cpp 2008-07-07 22:34:45 UTC (rev 32952)
+++ scummvm/branches/gsoc2008-rtl/engines/agi/saveload.cpp 2008-07-07 23:24:12 UTC (rev 32953)
@@ -29,6 +29,7 @@
*/
+#include "common/events.h"
#include "common/file.h"
#include "agi/agi.h"
@@ -91,7 +92,7 @@
out->writeSint16BE((int16)_game.lognum);
out->writeSint16BE((int16)_game.playerControl);
- out->writeSint16BE((int16)_quit);
+ out->writeSint16BE((int16)_eventMan->shouldQuit());
out->writeSint16BE((int16)_game.statusLine);
out->writeSint16BE((int16)_game.clockEnabled);
out->writeSint16BE((int16)_game.exitAllLogics);
@@ -281,7 +282,8 @@
_game.lognum = in->readSint16BE();
_game.playerControl = in->readSint16BE();
- _quit = in->readSint16BE();
+ if (in->readSint16BE())
+ _eventMan->pushEvent(Common::EVENT_QUIT);
_game.statusLine = in->readSint16BE();
_game.clockEnabled = in->readSint16BE();
_game.exitAllLogics = in->readSint16BE();
Modified: scummvm/branches/gsoc2008-rtl/gui/newgui.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/gui/newgui.cpp 2008-07-07 22:34:45 UTC (rev 32952)
+++ scummvm/branches/gsoc2008-rtl/gui/newgui.cpp 2008-07-07 23:24:12 UTC (rev 32953)
@@ -25,6 +25,7 @@
#include "common/events.h"
#include "common/system.h"
#include "common/util.h"
+#include "engines/engine.h"
#include "graphics/cursorman.h"
#include "gui/newgui.h"
#include "gui/dialog.h"
@@ -313,7 +314,8 @@
activeDialog->handleMouseWheel(mouse.x, mouse.y, 1);
break;
case Common::EVENT_QUIT:
- _system->quit();
+ if (!g_engine)
+ _system->quit();
return;
case Common::EVENT_SCREEN_CHANGED:
screenChange();
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