[Scummvm-cvs-logs] SF.net SVN: scummvm: [21775] scummvm/trunk/engines/simon/simon.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Mon Apr 10 17:39:01 CEST 2006
Revision: 21775
Author: kirben
Date: 2006-04-10 17:37:54 -0700 (Mon, 10 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21775&view=rev
Log Message:
-----------
Update waitForSync() for FF and minor cleanup
Modified Paths:
--------------
scummvm/trunk/engines/simon/simon.cpp
Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp 2006-04-10 23:48:22 UTC (rev 21774)
+++ scummvm/trunk/engines/simon/simon.cpp 2006-04-11 00:37:54 UTC (rev 21775)
@@ -2150,20 +2150,20 @@
blockEnd = block + size;
- if (blockEnd >= _vgaBufEnd) {
- _vgaBufFreeStart = _vgaBufStart;
- } else {
- _rejectBlock = false;
- checkNoOverWrite(blockEnd);
- if (_rejectBlock)
- continue;
- checkRunningAnims(blockEnd);
- if (_rejectBlock)
- continue;
- checkZonePtrs(blockEnd);
+ //if (blockEnd >= _vgaBufEnd) {
+ // _vgaBufFreeStart = _vgaBufStart;
+ //} else {
+ // _rejectBlock = false;
+ // checkNoOverWrite(blockEnd);
+ // if (_rejectBlock)
+ // continue;
+ // checkRunningAnims(blockEnd);
+ // if (_rejectBlock)
+ // continue;
+ // checkZonePtrs(blockEnd);
_vgaBufFreeStart = blockEnd;
return block;
- }
+ //}
}
}
@@ -2510,37 +2510,33 @@
}
void SimonEngine::waitForSync(uint a) {
+ const uint maxCount = (getGameType() == GType_SIMON1) ? 500 : 1000;
+
_vgaWaitFor = a;
_syncCount = 0;
_exitCutscene = false;
_rightButtonDown = false;
while (_vgaWaitFor != 0) {
if (_rightButtonDown && (getGameType() == GType_SIMON2 || getGameType() == GType_FF)) {
- if (_vgaWaitFor == 200 && !getBitFlag(14)) {
+ if (_vgaWaitFor == 200 && (getGameType() == GType_FF || !getBitFlag(14))) {
skipSpeech();
break;
}
- } else if (_exitCutscene) {
+ }
+ if (_exitCutscene) {
if (getBitFlag(9)) {
endCutscene();
break;
}
- } else {
- processSpecialKeys();
}
+ processSpecialKeys();
- delay(10);
-
- if (getGameType() == GType_SIMON2) {
- if (_syncCount >= 1000) {
- warning("wait timed out");
- break;
- }
- } else if (_syncCount >= 500) {
- warning("wait timed out");
+ if (_syncCount >= maxCount) {
+ warning("waitForSync: wait timed out");
break;
}
+ delay(1);
}
}
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