From f11b0a4ff53db917dd0d93969540952175923528 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Thu, 7 Sep 2017 00:35:25 -0500 Subject: SCI32: Toggle Phant2 content censoring from game options To enable the optional content censoring mode, Phant2 looks for a RESDUK.PAT file, which is normally placed by the game's installer if the user chose to enable censorship. If the file exists, the game reads an unlock password out of the file and asks the user to enter the password when starting a new game to create an uncensored game, or to click a "less intense" button to start the game with censoring. The censorship state of the game is then persisted in the save game file, and installations with the RESDUK.PAT file need to enter the password again in order to restore any of the uncensored saves. Since we do not have an installer that can enable this feature, add a game option toggle to enable/disable censoring (for the releases that have the optional censorship mode) instead so the censored content feature is available for anyone that wants to use it. This flag is restored from ScummVM whenever a save game is loaded, so it can be toggled on or off at any point without needing a separate save game, unlike in the original interpreter. --- engines/sci/engine/savegame.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'engines/sci/engine/savegame.cpp') diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 4ff27ba6d8..d6fab6229b 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -49,6 +49,7 @@ #include "sci/sound/music.h" #ifdef ENABLE_SCI32 +#include "common/gui_options.h" #include "sci/engine/guest_additions.h" #include "sci/graphics/cursor32.h" #include "sci/graphics/frameout.h" @@ -1282,6 +1283,13 @@ void gamestate_afterRestoreFixUp(EngineState *s, int savegameId) { // It gets disabled in the game's death screen. g_sci->_gfxMenu->kernelSetAttribute(2, 1, SCI_MENU_ATTRIBUTE_ENABLED, TRUE_REG); // Game -> Save Game break; +#ifdef ENABLE_SCI32 + case GID_PHANTASMAGORIA2: + if (Common::checkGameGUIOption(GAMEOPTION_ENABLE_CENSORING, ConfMan.get("guioptions"))) { + s->variables[VAR_GLOBAL][kGlobalVarPhant2CensorshipFlag] = make_reg(0, ConfMan.getBool("enable_censoring")); + } + break; +#endif default: break; } -- cgit v1.2.3