[Scummvm-cvs-logs] SF.net SVN: scummvm: [31231] scummvm/trunk/engines/kyra/sequences_v2.cpp
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Mon Mar 24 15:21:07 CET 2008
Revision: 31231
http://scummvm.svn.sourceforge.net/scummvm/?rev=31231&view=rev
Author: athrxx
Date: 2008-03-24 07:21:06 -0700 (Mon, 24 Mar 2008)
Log Message:
-----------
improved skip flag handling for intro and outro (see tracker item #1922556)
Modified Paths:
--------------
scummvm/trunk/engines/kyra/sequences_v2.cpp
Modified: scummvm/trunk/engines/kyra/sequences_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_v2.cpp 2008-03-24 06:48:09 UTC (rev 31230)
+++ scummvm/trunk/engines/kyra/sequences_v2.cpp 2008-03-24 14:21:06 UTC (rev 31231)
@@ -280,7 +280,6 @@
seq_sequenceCommand(_sequences[seqNum].finalCommand);
seq_resetAllTextEntries();
-
if (_flags.isDemo && !_flags.isTalkie) {
if (seqNum == kSequenceDemoFisher) {
_abortIntroFlag = false;
@@ -293,14 +292,30 @@
_abortIntroFlag = false;
resetSkipFlag();
seqNum = kSequenceWestwood;
+ } else if (seqNum < kSequenceFrash && (_abortIntroFlag || skipFlag())) {
+ _abortIntroFlag = false;
+ resetSkipFlag();
+ seqNum = kSequenceFirates;
}
}
if (_menuChoice) {
+ uint32 e = _system->getMillis() + 1000;
+ // something is still wrong here
+ // clearing the flag shouldn't be difficult like this
+ while (skipFlag() && _system->getMillis() < e) {
+ resetSkipFlag(true);
+ delay(10);
+ }
_abortIntroFlag = false;
- resetSkipFlag();
- if (_menuChoice == 2)
+
+ if (skipFlag())
+ warning("skip flag could not be reset");
+
+ if (_menuChoice == 2) {
+ seqNum = kSequenceTitle;
_menuChoice = 0;
+ }
}
}
@@ -2076,7 +2091,7 @@
void KyraEngine_v2::seq_nestedSequenceFrame(int command, int wsaNum) {
int xa = 0, ya = 0;
command--;
- if (!_activeWSA[wsaNum].movie)
+ if (!_activeWSA[wsaNum].movie || skipFlag() || _quitFlag || _abortIntroFlag)
return;
switch (command) {
@@ -2276,6 +2291,8 @@
void KyraEngine_v2::seq_printCreditsString(uint16 strIndex, int x, int y, const uint8 *colorMap, uint8 textcolor) {
uint8 colormap[16];
+ if (skipFlag() || _quitFlag || _abortIntroFlag || _menuChoice)
+ return;
memset(&_screen->getPalette(0)[0x2fa], 0x3f, 6);
_screen->getPalette(0)[0x2f6] = 0x3f;
@@ -2323,7 +2340,7 @@
if (vocIndex && speechEnabled())
seq_playTalkText(vocIndex);
- while (_system->getMillis() < chatTimeout) {
+ while (_system->getMillis() < chatTimeout && !(_abortIntroFlag || skipFlag())) {
if (lastframe < 0) {
int t = ABS(lastframe);
if (t < curframe)
@@ -2357,6 +2374,9 @@
curframe++;
}
+ if (_abortIntroFlag || skipFlag())
+ _sound->voiceStop();
+
if (lastframe < 0) {
int t = ABS(lastframe);
if (t < curframe)
@@ -2377,10 +2397,6 @@
static const char mark[] = { 5, 13, 0};
- /*uint _creditsNumChars = d->unkC / (_screen->getFontWidth() + _screen->_charWidth);
- uint _creditsMaxNumLines = (d->h - _screen->_charOffset) / (_screen->getFontHeight() + _screen->_charOffset);
- uint _creditsMaxNumChars = (d->w << 3) / (_screen->getFontWidth() + _screen->_charWidth); */
-
_screen->clearPage(tempPage1);
_screen->clearPage(tempPage2);
_screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, 0, tempPage1);
@@ -2523,6 +2539,9 @@
_sound->beginFadeOut();
_screen->fadeToBlack();
+ _abortIntroFlag= false;
+ resetSkipFlag();
+
delete [] tmp;
delete [] tmpStringTable;
}
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