mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 12:48:16 +00:00
BURIED: Display a message when trying to load non-apartment saves in the trial
This commit is contained in:
parent
18a7b010be
commit
57920ae92d
@ -135,6 +135,11 @@ Common::Error BuriedEngine::run() {
|
||||
if (ConfMan.hasKey("save_slot")) {
|
||||
uint32 gameToLoad = ConfMan.getInt("save_slot");
|
||||
doIntro = (loadGameState(gameToLoad).getCode() != Common::kNoError);
|
||||
|
||||
// If the trial version tries to load a game without a time
|
||||
// zone that's part of the trial version, force the intro.
|
||||
if (isTrial() && !((FrameWindow *)_mainWindow)->getMainChildWindow())
|
||||
doIntro = true;
|
||||
}
|
||||
|
||||
// Play the intro only if we're starting from scratch
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "common/serializer.h"
|
||||
#include "common/system.h"
|
||||
#include "common/translation.h"
|
||||
#include "gui/message.h"
|
||||
#include "gui/saveload.h"
|
||||
|
||||
#include "buried/buried.h"
|
||||
@ -70,8 +71,22 @@ Common::Error BuriedEngine::loadGameState(int slot) {
|
||||
return Common::kUnknownError;
|
||||
}
|
||||
|
||||
((FrameWindow *)_mainWindow)->loadFromState(location, flags, inventoryItems);
|
||||
// Done with the file
|
||||
delete loadFile;
|
||||
|
||||
if (isTrial() && location.timeZone != 4) {
|
||||
// Display a message preventing the user from loading a non-apartment
|
||||
// saved game in the trial version
|
||||
GUI::MessageDialog dialog("ERROR: The location in this saved game is not included in this version of Buried in Time");
|
||||
dialog.runModal();
|
||||
|
||||
// Don't return an error. It's an "error" that we can't load,
|
||||
// but we're still in a valid state. The message above will
|
||||
// be displayed instead of the usual GUI load error.
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
((FrameWindow *)_mainWindow)->loadFromState(location, flags, inventoryItems);
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user