KYRA: Fix Common::List::erase usage.
Thanks to Tron for pointing that out.
This commit is contained in:
parent
5cc76e8d71
commit
57ca48d547
2 changed files with 5 additions and 3 deletions
|
@ -1322,7 +1322,7 @@ void KyraEngine_LoK::seq_playCredits() {
|
||||||
_screen->copyRegion(0, 32, 0, 32, 320, 128, 4, 2, Screen::CR_NO_P_CHECK);
|
_screen->copyRegion(0, 32, 0, 32, 320, 128, 4, 2, Screen::CR_NO_P_CHECK);
|
||||||
bottom = 0;
|
bottom = 0;
|
||||||
|
|
||||||
for (CreditsLineList::iterator it = lines.begin(); it != lines.end(); ++it) {
|
for (CreditsLineList::iterator it = lines.begin(); it != lines.end();) {
|
||||||
if (it->y < 0) {
|
if (it->y < 0) {
|
||||||
it = lines.erase(it);
|
it = lines.erase(it);
|
||||||
continue;
|
continue;
|
||||||
|
@ -1338,6 +1338,8 @@ void KyraEngine_LoK::seq_playCredits() {
|
||||||
it->y--;
|
it->y--;
|
||||||
if (it->y > bottom)
|
if (it->y > bottom)
|
||||||
bottom = it->y;
|
bottom = it->y;
|
||||||
|
|
||||||
|
++it;
|
||||||
}
|
}
|
||||||
|
|
||||||
_screen->copyRegion(0, 32, 0, 32, 320, 128, 2, 0, Screen::CR_NO_P_CHECK);
|
_screen->copyRegion(0, 32, 0, 32, 320, 128, 2, 0, Screen::CR_NO_P_CHECK);
|
||||||
|
|
|
@ -98,12 +98,12 @@ bool LoLEngine::snd_playCharacterSpeech(int id, int8 speaker, int) {
|
||||||
_speechList = newSpeechList;
|
_speechList = newSpeechList;
|
||||||
|
|
||||||
_activeVoiceFileTotalTime = 0;
|
_activeVoiceFileTotalTime = 0;
|
||||||
for (SpeechList::iterator i = _speechList.begin(); i != _speechList.end(); ++i) {
|
for (SpeechList::iterator i = _speechList.begin(); i != _speechList.end();) {
|
||||||
// Just in case any file loading failed: Remove the bad streams here.
|
// Just in case any file loading failed: Remove the bad streams here.
|
||||||
if (!*i)
|
if (!*i)
|
||||||
i = _speechList.erase(i);
|
i = _speechList.erase(i);
|
||||||
else
|
else
|
||||||
_activeVoiceFileTotalTime += (*i)->getLength().msecs();
|
_activeVoiceFileTotalTime += (*i++)->getLength().msecs();
|
||||||
}
|
}
|
||||||
|
|
||||||
_sound->playVoiceStream(*_speechList.begin(), &_speechHandle);
|
_sound->playVoiceStream(*_speechList.begin(), &_speechHandle);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue