From: David Griffith Date: Wed, 19 Jun 2019 08:27:55 +0000 (-0700) Subject: Add code to check for Infocom games that use bleeps, but don't set SOUND_FLAG. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=61c12311a8cd58f6ca81c4888923a8589cd2b322;p=liskon_frotz.git Add code to check for Infocom games that use bleeps, but don't set SOUND_FLAG. This may be useful later on when os_beep() is rewritten to make high and low noises. Right now this code does nothing. --- diff --git a/src/common/fastmem.c b/src/common/fastmem.c index 52378d1..22369d8 100644 --- a/src/common/fastmem.c +++ b/src/common/fastmem.c @@ -314,6 +314,15 @@ void init_memory (void) { LURKING_HORROR, 203, "870506" }, { LURKING_HORROR, 219, "870912" }, { LURKING_HORROR, 221, "870918" }, + { BUREAUCRACY, 86, "870212" }, + { BUREAUCRACY, 116, "870602" }, + { BUREAUCRACY, 160, "880521" }, + { TRINITY, 1, "851202" }, + { TRINITY, 14, "860313" }, + { TRINITY, 1, "860221" }, + { TRINITY, 11, "860509" }, + { TRINITY, 12, "860926" }, + { TRINITY, 15, "870628" }, { UNKNOWN, 0, "------" } }; diff --git a/src/common/frotz.h b/src/common/frotz.h index d78d62d..e09480a 100644 --- a/src/common/frotz.h +++ b/src/common/frotz.h @@ -105,6 +105,8 @@ enum story { ARTHUR, JOURNEY, LURKING_HORROR, + BUREAUCRACY, + TRINITY, UNKNOWN }; diff --git a/src/common/setup.h b/src/common/setup.h index e81e5e8..0c1ab35 100644 --- a/src/common/setup.h +++ b/src/common/setup.h @@ -19,6 +19,7 @@ typedef struct frotz_setup_struct { int script_cols; int sound; int sound_flag; + int bleep; int err_report_mode; char *story_file; diff --git a/src/common/sound.c b/src/common/sound.c index 9c0bc7d..4656a3a 100644 --- a/src/common/sound.c +++ b/src/common/sound.c @@ -48,6 +48,23 @@ static bool playing = FALSE; */ void init_sound (void) { + + /* These games use sound effects numbers 1 and 2, which are defined + * as high and low "bleeps" respectively, yet they do not set SOUND_FLAG + * or OLD_SOUND_FLAG. Note that OLD_SOUND_FLAG uses the same bit as does + * UNDO_FLAG, but the former is only for V3 games and the latter for V5+. + * + * Currently os_beep() just rings the terminal, so f_setup.bleep isn't + * yet being used. + */ + switch (story_id) { + case TRINITY: + case BUREAUCRACY: + case AMFV: f_setup.bleep = TRUE; + break; + default: break; + } + if ((h_flags & SOUND_FLAG) || (h_version == V3 && (h_flags & OLD_SOUND_FLAG))) { f_setup.sound_flag = TRUE; locked = FALSE; diff --git a/src/curses/ux_init.c b/src/curses/ux_init.c index aa4fbb8..a511a89 100644 --- a/src/curses/ux_init.c +++ b/src/curses/ux_init.c @@ -1096,6 +1096,8 @@ void os_init_setup(void) f_setup.expand_abbreviations = 0; f_setup.script_cols = 80; f_setup.sound = 1; + f_setup.sound_flag = 0; + f_setup.bleep = 0; f_setup.err_report_mode = ERR_DEFAULT_REPORT_MODE; f_setup.restore_mode = 0;