Permalink
Browse files

MUTATIONOFJB: Add support for loading save during startup.

  • Loading branch information...
LubomirR committed Sep 1, 2018
1 parent cc09b66 commit bde1556b979af1dbffa02fc1474895d574f5917a
Showing with 6 additions and 2 deletions.
  1. +1 −1 engines/mutationofjb/detection.cpp
  2. +5 −1 engines/mutationofjb/mutationofjb.cpp
@@ -108,7 +108,7 @@ class MutationOfJBMetaEngine : public AdvancedMetaEngine {
}
virtual bool hasFeature(MetaEngineFeature f) const override {
if (f == kSupportsListSaves || f == kSimpleSavesNames) {
if (f == kSupportsListSaves || f == kSimpleSavesNames || f == kSupportsLoadingDuringStartup) {
return true;
}
@@ -294,7 +294,11 @@ Common::Error MutationOfJBEngine::run() {
setupCursor();
_game->changeScene(13, false); // Initial scene.
if (ConfMan.hasKey("save_slot")) {
loadGameState(ConfMan.getInt("save_slot"));

This comment has been minimized.

Show comment
Hide comment
@sev-

sev- Sep 2, 2018

Member

I see that the loadGameState does not do any sanity checking. Since now you can specify a non-existent save number and that will lead to a crash.

@sev-

sev- Sep 2, 2018

Member

I see that the loadGameState does not do any sanity checking. Since now you can specify a non-existent save number and that will lead to a crash.

} else {
_game->changeScene(13, false); // Initial scene.
}
while (!shouldQuit()) {
Common::Event event;

0 comments on commit bde1556

Please sign in to comment.