DRAGONS: Quit game after playing end credits. #11611

This commit is contained in:
Eric Fry 2020-08-26 23:19:00 +10:00
parent ef8b909fea
commit 70a191ae0a
2 changed files with 5 additions and 2 deletions

View File

@ -79,7 +79,7 @@ void Credits::update() {
_updateCounter = 2;
_yOffset = (_yOffset + 1) % 208;
if (_yOffset % 8 == 0) {
if (_curPosition <= _dataLength) {
if (_curPosition < _dataLength) {
uint32 length = strlen(_curPtr);
debug(3, "Credit line: %s", _curPtr);
convertToWideChar(line, (byte *)_curPtr, 40);

View File

@ -1179,7 +1179,10 @@ void SpecialOpcodes::spcEndCreditsAndRestartGame() {
}
// ReloadGameFlag = 2;
// Exec_FMV_RELOADTT();
//TODO need to return to main menu here.
_vm->waitForFrames(100);
Dragons::DragonsEngine::quitGame();
}
void SpecialOpcodes::spcLoadLadyOfTheLakeActor() {