mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
KINGDOM: Fix skipping and quitting demo movie (#5372)
The detection that the demo movie was skipped is done by the external flag _demoMovieSkipped This is not as clean as it would be updating a reference parameter variable from within playMovie() but that would require changing the signature of playMovie and all of its calls
This commit is contained in:
parent
d836ec97ed
commit
c9c03d6995
@ -55,6 +55,7 @@ KingdomGame::KingdomGame(OSystem *syst, const ADGameDescription *gameDesc) : Eng
|
||||
|
||||
_asPtr = nullptr;
|
||||
_quit = false;
|
||||
_demoMovieSkipped = false;
|
||||
_kingartEntries = nullptr;
|
||||
|
||||
_tickCount = 0;
|
||||
@ -527,6 +528,9 @@ void KingdomGame::playMovie(int movieNum) {
|
||||
case Common::EVENT_KEYDOWN:
|
||||
if (event.kbd.keycode == Common::KEYCODE_ESCAPE) {
|
||||
skipMovie = true;
|
||||
if (movieNum == 54) {
|
||||
_demoMovieSkipped = true;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
@ -151,6 +151,7 @@ namespace Kingdom {
|
||||
bool _iconsClosed;
|
||||
bool _oldIconsClosed;
|
||||
int _pMovie;
|
||||
bool _demoMovieSkipped;
|
||||
bool _keyActive;
|
||||
bool _iconRedraw;
|
||||
bool _quit;
|
||||
|
@ -505,10 +505,12 @@ void Logic::gameHelp() {
|
||||
// The demo isn't saving pMovie.
|
||||
// It's obviously a bug and this behavior wasn't kept in ScummVM
|
||||
int oldPMovie = _vm->_pMovie;
|
||||
while(!_vm->_keyActive) {
|
||||
_vm->_demoMovieSkipped = false;
|
||||
while(!_vm->_keyActive && !_vm->shouldQuit() && !_vm->_demoMovieSkipped) {
|
||||
_vm->playMovie(54);
|
||||
_vm->fadeToBlack2();
|
||||
}
|
||||
_vm->_demoMovieSkipped = false;
|
||||
_vm->_pMovie = oldPMovie;
|
||||
_vm->_noIFScreen = false;
|
||||
_vm->showPic(106);
|
||||
|
@ -54,11 +54,13 @@ void Logic::GPL1_11() {
|
||||
_vm->_keyActive = false;
|
||||
_vm->_noIFScreen = true;
|
||||
_vm->playSound(0);
|
||||
while(!_vm->_keyActive) {
|
||||
_vm->_demoMovieSkipped = false;
|
||||
while(!_vm->_keyActive && !_vm->shouldQuit() && !_vm->_demoMovieSkipped) {
|
||||
_vm->fadeToBlack2();
|
||||
_vm->playMovie(54);
|
||||
}
|
||||
GPLogic1_SubSP10();
|
||||
_vm->_demoMovieSkipped = false;
|
||||
GPLogic1_SubSP10(); // return to main menu
|
||||
break;
|
||||
case 0x194:
|
||||
// CHECKME _QuitFlag = 2;
|
||||
@ -75,7 +77,9 @@ void Logic::GPL1_11() {
|
||||
_vm->_cursorDrawn = false;
|
||||
_vm->fadeToBlack2();
|
||||
_vm->playSound(0);
|
||||
_vm->_demoMovieSkipped = false;
|
||||
_vm->playMovie(54);
|
||||
_vm->_demoMovieSkipped = false;
|
||||
GPLogic1_SubSP10();
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user