QUEEN: Disable load/save until game is properly initialised

Co-authored-by: jdgleaver <jdgleaver@users.noreply.github.com>
This commit is contained in:
Cameron Cawley 2019-09-22 21:59:28 +01:00 committed by Eugene Sandulenko
parent 08b711406a
commit de879dd538
2 changed files with 6 additions and 2 deletions
engines/queen

View File

@ -50,7 +50,7 @@
namespace Queen {
QueenEngine::QueenEngine(OSystem *syst)
: Engine(syst), _debugger(0), randomizer("queen") {
: Engine(syst), _gameStarted(false), _debugger(0), randomizer("queen") {
}
QueenEngine::~QueenEngine() {
@ -173,7 +173,7 @@ void QueenEngine::update(bool checkPlayerInput) {
}
bool QueenEngine::canLoadOrSave() const {
return !_input->cutawayRunning() && !(_resource->isDemo() || _resource->isInterview());
return !_input->cutawayRunning() && !(_resource->isDemo() || _resource->isInterview()) && _gameStarted;
}
bool QueenEngine::canLoadGameStateCurrently() {
@ -368,6 +368,9 @@ Common::Error QueenEngine::run() {
_logic->currentRoom(_logic->newRoom());
_logic->changeRoom();
_display->fullscreen(false);
// From this point onwards it is safe to use the load/save
// menu, so consider game to be 'started'
_gameStarted = true;
if (_logic->currentRoom() == _logic->newRoom()) {
_logic->newRoom(0);
}

View File

@ -129,6 +129,7 @@ protected:
bool _subtitles;
uint32 _lastSaveTime;
uint32 _lastUpdateTime;
bool _gameStarted;
BamScene *_bam;
BankManager *_bankMan;