[Scummvm-cvs-logs] SF.net SVN: scummvm:[33694] scummvm/branches/branch-0-12-0/engines/agos
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Fri Aug 8 04:19:36 CEST 2008
Revision: 33694
http://scummvm.svn.sourceforge.net/scummvm/?rev=33694&view=rev
Author: Kirben
Date: 2008-08-08 02:19:35 +0000 (Fri, 08 Aug 2008)
Log Message:
-----------
Hopefully allow quiting at any stage AGOS engines games again.
Modified Paths:
--------------
scummvm/branches/branch-0-12-0/engines/agos/animation.cpp
scummvm/branches/branch-0-12-0/engines/agos/input.cpp
scummvm/branches/branch-0-12-0/engines/agos/oracle.cpp
scummvm/branches/branch-0-12-0/engines/agos/saveload.cpp
scummvm/branches/branch-0-12-0/engines/agos/script.cpp
scummvm/branches/branch-0-12-0/engines/agos/script_e1.cpp
scummvm/branches/branch-0-12-0/engines/agos/script_e2.cpp
scummvm/branches/branch-0-12-0/engines/agos/script_s1.cpp
scummvm/branches/branch-0-12-0/engines/agos/script_ww.cpp
scummvm/branches/branch-0-12-0/engines/agos/subroutine.cpp
scummvm/branches/branch-0-12-0/engines/agos/verb.cpp
scummvm/branches/branch-0-12-0/engines/agos/window.cpp
Modified: scummvm/branches/branch-0-12-0/engines/agos/animation.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/animation.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/animation.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -151,7 +151,7 @@
startSound();
- while (_frameNum < _framesCount)
+ while (_frameNum < _framesCount && !_vm->_quit)
handleNextFrame();
closeFile();
@@ -167,7 +167,7 @@
_vm->_system->setPalette(palette, 0, 256);
}
- _vm->fillBackGroundFromBack();
+ _vm->fillBackGroundFromBack();
_vm->_fastFadeOutFlag = true;
}
Modified: scummvm/branches/branch-0-12-0/engines/agos/input.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/input.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/input.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -123,7 +123,7 @@
clearName();
_lastNameOn = last;
- for (;;) {
+ while (!_quit) {
_lastHitArea = NULL;
_lastHitArea3 = 0;
_leftButtonDown = 0;
@@ -145,7 +145,7 @@
}
delay(100);
- } while (_lastHitArea3 == (HitArea *) -1 || _lastHitArea3 == 0);
+ } while ((_lastHitArea3 == (HitArea *) -1 || _lastHitArea3 == 0) && !_quit);
if (_lastHitArea == NULL) {
} else if (_lastHitArea->id == 0x7FFB) {
Modified: scummvm/branches/branch-0-12-0/engines/agos/oracle.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/oracle.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/oracle.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -459,7 +459,7 @@
}
windowPutChar(window, 0x7f);
- for (;;) {
+ while (!_quit) {
_keyPressed.reset();
delay(1);
Modified: scummvm/branches/branch-0-12-0/engines/agos/saveload.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/saveload.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/saveload.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -279,11 +279,11 @@
name = buf;
_saveGameNameLen = 0;
- for (;;) {
+ while (!_quit) {
windowPutChar(window, 128);
_keyPressed.reset();
- for (;;) {
+ while (!_quit) {
delay(10);
if (_keyPressed.ascii && _keyPressed.ascii < 128) {
i = _keyPressed.ascii;
@@ -443,7 +443,7 @@
name = buf + 192;
- for (;;) {
+ while (!_quit) {
windowPutChar(window, 128);
_saveLoadEdit = true;
@@ -516,7 +516,7 @@
_keyPressed.reset();
- for (;;) {
+ while (!_quit) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
@@ -526,7 +526,7 @@
return _keyPressed.ascii;
}
delay(10);
- } while (_lastHitArea3 == 0);
+ } while (_lastHitArea3 == 0 && !_quit);
ha = _lastHitArea;
if (ha == NULL || ha->id < 200) {
@@ -543,6 +543,8 @@
return ha->id - 200;
}
}
+
+ return 225;
}
void AGOSEngine_Simon1::listSaveGames(char *dst) {
@@ -706,7 +708,7 @@
_saveGameNameLen++;
}
- for (;;) {
+ while (!_quit) {
windowPutChar(window, 127);
_saveLoadEdit = true;
@@ -785,7 +787,7 @@
_keyPressed.reset();
- for (;;) {
+ while (!_quit) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
@@ -795,7 +797,7 @@
return _keyPressed.ascii;
}
delay(10);
- } while (_lastHitArea3 == 0);
+ } while (_lastHitArea3 == 0 && !_quit);
ha = _lastHitArea;
if (ha == NULL || ha->id < 205) {
@@ -824,6 +826,8 @@
return ha->id - 208;
}
}
+
+ return 205;
}
void AGOSEngine::disableFileBoxes() {
Modified: scummvm/branches/branch-0-12-0/engines/agos/script.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/script.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/script.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -1012,7 +1012,7 @@
executeOpcode(_opcode);
} while (getScriptCondition() != flag && !getScriptReturn() && !_quit);
- return getScriptReturn();
+ return (_quit) ? 1 : getScriptReturn();
}
Child *nextSub(Child *sub, int16 key) {
Modified: scummvm/branches/branch-0-12-0/engines/agos/script_e1.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/script_e1.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/script_e1.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -1053,11 +1053,11 @@
ha->priority = 999;
ha->window = 0;
- for (;;) {
+ while (!_quit) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
- for (;;) {
+ while (!_quit) {
if (_lastHitArea3 != 0)
break;
delay(1);
@@ -1102,11 +1102,11 @@
ha->priority = 999;
ha->window = 0;
- for (;;) {
+ while (!_quit) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
- for (;;) {
+ while (!_quit) {
if (_lastHitArea3 != 0)
break;
delay(1);
Modified: scummvm/branches/branch-0-12-0/engines/agos/script_e2.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/script_e2.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/script_e2.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -370,11 +370,11 @@
uint32 pauseTime = getTime();
haltAnimation();
- for (;;) {
+ while (!_quit) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
- for (;;) {
+ while (!_quit) {
if (processSpecialKeys() != 0 || _lastHitArea3 != 0)
break;
delay(1);
Modified: scummvm/branches/branch-0-12-0/engines/agos/script_s1.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/script_s1.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/script_s1.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -339,7 +339,7 @@
break;
}
- for (;;) {
+ while (!_quit) {
delay(1);
if (_keyPressed.keycode == keyYes)
_quit = true;
Modified: scummvm/branches/branch-0-12-0/engines/agos/script_ww.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/script_ww.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/script_ww.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -368,11 +368,11 @@
uint32 pauseTime = getTime();
haltAnimation();
- for (;;) {
+ while (!_quit) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
- for (;;) {
+ while (!_quit) {
if (_lastHitArea3 != 0)
break;
delay(1);
Modified: scummvm/branches/branch-0-12-0/engines/agos/subroutine.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/subroutine.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/subroutine.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -518,6 +518,8 @@
}
int AGOSEngine::startSubroutine(Subroutine *sub) {
+ printf("startSubroutine\n");
+
int result = -1;
SubroutineLine *sl = (SubroutineLine *)((byte *)sub + sub->first);
Modified: scummvm/branches/branch-0-12-0/engines/agos/verb.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/verb.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/verb.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -343,6 +343,9 @@
Subroutine *sub;
int result;
+ if (_quit)
+ return;
+
_objectItem = _hitAreaObjectItem;
if (_objectItem == _dummyItem2) {
_objectItem = me();
Modified: scummvm/branches/branch-0-12-0/engines/agos/window.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/agos/window.cpp 2008-08-08 02:18:17 UTC (rev 33693)
+++ scummvm/branches/branch-0-12-0/engines/agos/window.cpp 2008-08-08 02:19:35 UTC (rev 33694)
@@ -298,7 +298,7 @@
ha->id = 0x7FFF;
ha->priority = 999;
- for (;;) {
+ while (!_quit) {
_lastHitArea = NULL;
_lastHitArea3 = NULL;
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