From 1098246f2be705de82dd3077dd25323380c32dd1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 24 Apr 2014 09:12:09 -0400 Subject: MADS: Added methods for can save/load currently --- engines/mads/mads.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'engines/mads/mads.cpp') diff --git a/engines/mads/mads.cpp b/engines/mads/mads.cpp index c40d4bfa1b..6f57b1df60 100644 --- a/engines/mads/mads.cpp +++ b/engines/mads/mads.cpp @@ -26,6 +26,7 @@ #include "common/events.h" #include "engines/util.h" #include "mads/mads.h" +#include "mads/game.h" #include "mads/screen.h" #include "mads/msurface.h" #include "mads/resources.h" @@ -119,4 +120,14 @@ int MADSEngine::hypotenuse(int xv, int yv) { return (int)sqrt((double)(xv * xv + yv * yv)); } +bool MADSEngine::canLoadGameStateCurrently() { + return !_game->_winStatus && !_game->globals()[5] + && _dialogs->_pendingDialog == DIALOG_NONE; +} + +bool MADSEngine::canSaveGameStateCurrently() { + return !_game->_winStatus && !_game->globals()[5] + && _dialogs->_pendingDialog == DIALOG_NONE; +} + } // End of namespace MADS -- cgit v1.2.3