[Scummvm-cvs-logs] SF.net SVN: scummvm: [32996] scummvm/branches/gsoc2008-rtl/engines
cpage88 at users.sourceforge.net
cpage88 at users.sourceforge.net
Fri Jul 11 00:34:48 CEST 2008
Revision: 32996
http://scummvm.svn.sourceforge.net/scummvm/?rev=32996&view=rev
Author: cpage88
Date: 2008-07-10 15:34:48 -0700 (Thu, 10 Jul 2008)
Log Message:
-----------
Lure works with the new GMM implementation
Modified Paths:
--------------
scummvm/branches/gsoc2008-rtl/engines/agos/agos.h
scummvm/branches/gsoc2008-rtl/engines/agos/subroutine.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/events.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/fights.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/game.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/intro.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/lure.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/menu.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/scripts.cpp
scummvm/branches/gsoc2008-rtl/engines/lure/surface.cpp
Modified: scummvm/branches/gsoc2008-rtl/engines/agos/agos.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agos/agos.h 2008-07-10 20:36:02 UTC (rev 32995)
+++ scummvm/branches/gsoc2008-rtl/engines/agos/agos.h 2008-07-10 22:34:48 UTC (rev 32996)
@@ -269,7 +269,6 @@
uint16 _marks;
- // bool _quit;
bool _scriptVar2;
bool _runScriptReturn1;
bool _runScriptCondition[40];
Modified: scummvm/branches/gsoc2008-rtl/engines/agos/subroutine.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/agos/subroutine.cpp 2008-07-10 20:36:02 UTC (rev 32995)
+++ scummvm/branches/gsoc2008-rtl/engines/agos/subroutine.cpp 2008-07-10 22:34:48 UTC (rev 32996)
@@ -555,7 +555,7 @@
_currentTable = sub;
restart:
- if (_quit)
+ if (quit())
return result;
while ((byte *)sl != (byte *)sub) {
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/events.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/events.cpp 2008-07-10 20:36:02 UTC (rev 32995)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/events.cpp 2008-07-10 22:34:48 UTC (rev 32996)
@@ -141,9 +141,9 @@
LureEngine &engine = LureEngine::getReference();
do {
- while (e.pollEvent() && !engine._quit) ;
+ while (e.pollEvent() && !engine.quit()) ;
g_system->delayMillis(20);
- } while (!engine._quit && (lButton() || rButton() || mButton()));
+ } while (!engine.quit() && (lButton() || rButton() || mButton()));
}
/*--------------------------------------------------------------------------*/
@@ -166,10 +166,6 @@
// Handle keypress
switch (_event.type) {
- case Common::EVENT_QUIT:
- engine._quit = true;
- break;
-
case Common::EVENT_LBUTTONDOWN:
case Common::EVENT_LBUTTONUP:
case Common::EVENT_RBUTTONDOWN:
@@ -217,7 +213,7 @@
uint32 delayCtr = g_system->getMillis() + milliseconds;
while (g_system->getMillis() < delayCtr) {
- if (engine._quit) return true;
+ if (engine.quit()) return true;
if (events.pollEvent()) {
if (((events.type() == Common::EVENT_KEYDOWN) && (events.event().kbd.ascii != 0)) ||
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/fights.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/fights.cpp 2008-07-10 20:36:02 UTC (rev 32995)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/fights.cpp 2008-07-10 22:34:48 UTC (rev 32996)
@@ -117,7 +117,7 @@
uint32 timerVal = g_system->getMillis();
// Loop for the duration of the battle
- while (!engine._quit && (playerFight.fwhits != GENERAL_MAGIC_ID)) {
+ while (!engine.quit() && (playerFight.fwhits != GENERAL_MAGIC_ID)) {
checkEvents();
if (g_system->getMillis() > timerVal + GAME_FRAME_DELAY) {
@@ -198,7 +198,7 @@
if (events.type() == Common::EVENT_KEYDOWN) {
switch (events.event().kbd.keycode) {
case Common::KEYCODE_ESCAPE:
- engine._quit = true;
+ engine.quitGame();
return;
case Common::KEYCODE_d:
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/game.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/game.cpp 2008-07-10 20:36:02 UTC (rev 32995)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/game.cpp 2008-07-10 22:34:48 UTC (rev 32996)
@@ -143,7 +143,7 @@
setState(GS_RESTART);
bool initialRestart = true;
- while (!engine._quit) {
+ while (!engine.quit()) {
if ((_state & GS_RESTART) != 0) {
res.reset();
@@ -163,7 +163,7 @@
mouse.cursorOn();
// Main game loop
- while (!engine._quit && ((_state & GS_RESTART) == 0)) {
+ while (!engine.quit() && ((_state & GS_RESTART) == 0)) {
// If time for next frame, allow everything to update
if (system.getMillis() > timerVal + GAME_FRAME_DELAY) {
timerVal = system.getMillis();
@@ -292,10 +292,7 @@
if (restartFlag)
setState(GS_RESTART);
-
- } else if ((_state & GS_RESTART) == 0)
- // Exiting game
- engine._quit = true;
+ }
}
}
@@ -893,7 +890,7 @@
void Game::doQuit() {
Sound.pause();
if (getYN())
- LureEngine::getReference()._quit = true;
+ LureEngine::getReference().quitGame();
Sound.resume();
}
@@ -1020,7 +1017,7 @@
}
g_system->delayMillis(10);
- } while (!engine._quit && !breakFlag);
+ } while (!engine.quit() && !breakFlag);
screen.update();
if (!vKbdFlag)
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/intro.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/intro.cpp 2008-07-10 20:36:02 UTC (rev 32995)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/intro.cpp 2008-07-10 22:34:48 UTC (rev 32996)
@@ -64,7 +64,7 @@
else screen.paletteFadeIn(&p);
bool result = interruptableDelay(delaySize);
- if (LureEngine::getReference()._quit) return true;
+ if (LureEngine::getReference().quit()) return true;
if (!isEGA)
screen.paletteFadeOut();
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/lure.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/lure.cpp 2008-07-10 20:36:02 UTC (rev 32995)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/lure.cpp 2008-07-10 22:34:48 UTC (rev 32996)
@@ -126,8 +126,8 @@
CopyProtectionDialog *dialog = new CopyProtectionDialog();
bool result = dialog->show();
delete dialog;
- if (_quit)
- return _rtl;
+ if (quit())
+ return _eventMan->shouldRTL();
if (!result)
error("Sorry - copy protection failed");
@@ -145,14 +145,14 @@
}
// Play the game
- if (!_quit) {
+ if (!quit()) {
// Play the game
Sound.loadSection(Sound.isRoland() ? ROLAND_MAIN_SOUND_RESOURCE_ID : ADLIB_MAIN_SOUND_RESOURCE_ID);
gameInstance->execute();
}
delete gameInstance;
- return _rtl;
+ return _eventMan->shouldRTL();
}
void LureEngine::pauseEngineIntern(bool pause) {
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/menu.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/menu.cpp 2008-07-10 20:36:02 UTC (rev 32995)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/menu.cpp 2008-07-10 22:34:48 UTC (rev 32996)
@@ -131,7 +131,7 @@
while (mouse.lButton() || mouse.rButton()) {
while (events.pollEvent()) {
- if (engine._quit) return MENUITEM_NONE;
+ if (engine.quit()) return MENUITEM_NONE;
if (mouse.y() < MENUBAR_Y_SIZE) {
MenuRecord *p = getMenuAt(mouse.x());
@@ -547,7 +547,7 @@
}
while (e.pollEvent()) {
- if (engine._quit) {
+ if (engine.quit()) {
selectedIndex = 0xffff;
goto bail_out;
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/scripts.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/scripts.cpp 2008-07-10 20:36:02 UTC (rev 32995)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/scripts.cpp 2008-07-10 22:34:48 UTC (rev 32996)
@@ -221,7 +221,7 @@
anim->show();
if (!events.interruptableDelay(30000)) {
// No key yet pressed, so keep waiting
- while (Sound.musicInterface_CheckPlaying(6) && !engine._quit) {
+ while (Sound.musicInterface_CheckPlaying(6) && !engine.quit()) {
if (events.interruptableDelay(20))
break;
}
@@ -229,7 +229,7 @@
delete anim;
screen.paletteFadeOut();
- engine._quit = true;
+ engine.quitGame();
}
// Setup the pig fight in the cave
Modified: scummvm/branches/gsoc2008-rtl/engines/lure/surface.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/lure/surface.cpp 2008-07-10 20:36:02 UTC (rev 32995)
+++ scummvm/branches/gsoc2008-rtl/engines/lure/surface.cpp 2008-07-10 22:34:48 UTC (rev 32996)
@@ -534,7 +534,7 @@
// Loop until the input string changes
refreshFlag = false;
while (!refreshFlag && !abortFlag) {
- abortFlag = engine._quit;
+ abortFlag = engine.quit();
if (abortFlag) break;
while (events.pollEvent()) {
@@ -976,7 +976,7 @@
// Provide highlighting of lines to select a save slot
while (!abortFlag && !(mouse.lButton() && (selectedLine != -1))
&& !mouse.rButton() && !mouse.mButton()) {
- abortFlag = engine._quit;
+ abortFlag = engine.quit();
if (abortFlag) break;
while (events.pollEvent()) {
@@ -1179,7 +1179,7 @@
// Event loop for making selection
bool buttonPressed = false;
- while (!engine._quit) {
+ while (!engine.quit()) {
// Handle events
while (events.pollEvent()) {
if ((events.type() == Common::EVENT_LBUTTONDOWN) && (highlightedButton != -1)) {
@@ -1231,7 +1231,7 @@
Sound.killSounds();
- if (!restartFlag && !engine._quit) {
+ if (!restartFlag && !engine.quit()) {
// Need to show Restore game dialog
if (!SaveRestoreDialog::show(false))
// User cancelled, so fall back on Restart
@@ -1351,7 +1351,7 @@
// Clear any prior try
_charIndex = 0;
- while (!engine._quit) {
+ while (!engine.quit()) {
while (events.pollEvent() && (_charIndex < 4)) {
if (events.type() == Common::EVENT_KEYDOWN) {
if ((events.event().kbd.keycode == Common::KEYCODE_BACKSPACE) && (_charIndex > 0)) {
@@ -1385,7 +1385,7 @@
break;
}
- if (engine._quit)
+ if (engine.quit())
return false;
// At this point, two page numbers have been entered - validate them
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