Skip to content

Commit

Permalink
SCI: Add engine option for LSL7's "brutally difficult" mode
Browse files Browse the repository at this point in the history
This was originally triggered by adding a file named GET_HARD to the
installation directory. But that's not very discoverable.
  • Loading branch information
Torbjörn Andersson committed Jul 12, 2024
1 parent 7ab5760 commit 2beeb97
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
1 change: 1 addition & 0 deletions engines/sci/detection.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ namespace Sci {
#define GAMEOPTION_PALETTE_MODS GUIO_GAMEOPTIONS15
#define GAMEOPTION_SQ1_BEARDED_MUSICIANS GUIO_GAMEOPTIONS16
#define GAMEOPTION_TTS GUIO_GAMEOPTIONS17
#define GAMEOPTION_HARD_MODE GUIO_GAMEOPTIONS18

enum SciGameId {
GID_ALL,
Expand Down
12 changes: 12 additions & 0 deletions engines/sci/detection_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,18 @@ const ADExtraGuiOptionsMap optionsList[] = {
},
#endif

{
GAMEOPTION_HARD_MODE,
{
_s("Enable hard mode"),
_s("Make the game \"brutally difficult\". This was originally triggered by the presence of a file named GET_HARD."),
"hard_mode",
false,
0,
0
}
},

AD_EXTRA_GUI_OPTIONS_TERMINATOR
};

Expand Down
5 changes: 3 additions & 2 deletions engines/sci/detection_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -3666,12 +3666,13 @@ static const struct ADGameDescription SciGameDescriptions[] = {
GUIO_NOMIDI, \
GUIO_NOLAUNCHLOAD, \
GAMEOPTION_LARRYSCALE)
#define GUIO_LSL7 GUIO6(GUIO_NOASPECT, \
#define GUIO_LSL7 GUIO7(GUIO_NOASPECT, \
GUIO_NOMIDI, \
GAMEOPTION_ENABLE_BLACK_LINED_VIDEO, \
GAMEOPTION_ORIGINAL_SAVELOAD, \
GAMEOPTION_HQ_VIDEO, \
GAMEOPTION_LARRYSCALE)
GAMEOPTION_LARRYSCALE, \
GAMEOPTION_HARD_MODE)

// Larry 7 - English DOS Demo (provided by richiefs in bug report #4214)
// SCI interpreter version 2.100.002
Expand Down
17 changes: 13 additions & 4 deletions engines/sci/engine/kfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,10 +835,19 @@ reg_t kFileIOExists(EngineState *s, int argc, reg_t *argv) {
}

int findSaveNo = -1;
if (g_sci->getGameId() == GID_LSL7 && name == "autosvsg.000") {
// LSL7 checks to see if the autosave save exists when deciding whether
// to go to the main menu or not on startup
findSaveNo = kAutoSaveId;
if (g_sci->getGameId() == GID_LSL7) {
if (name == "autosvsg.000") {
// LSL7 checks to see if the autosave save exists when deciding
// whether to go to the main menu or not on startup
findSaveNo = kAutoSaveId;
} else if (name == "get_hard") {
// As mentioned in the Spring 1997 issue of Interaction
// Magazine, page 58, placing a file named GET_HARD in your
// game directory will make the game "brutally difficult" in
// ways never really explained. But that's not really
// discoverable, so we make it an option instead.
return ConfMan.getBool("hard_mode") ? TRUE_REG : NULL_REG;
}
} else if (g_sci->getGameId() == GID_RAMA) {
// RAMA checks to see if save game files exist before showing them in
// the native save/load dialogue
Expand Down

0 comments on commit 2beeb97

Please sign in to comment.