summaryrefslogtreecommitdiff
path: root/src/setup
diff options
context:
space:
mode:
authorNuke.YKT2015-05-29 02:00:45 +0900
committerNuke.YKT2015-05-29 02:00:45 +0900
commit7c377fc88a3fbb7f69b91a15dc414c8965624a89 (patch)
tree5a33e2533b73715a9de9a63ad11b7c14cf6c594b /src/setup
parent5082f14944442344030d66f6fbdf86a75a1c1c70 (diff)
downloadchocolate-doom-7c377fc88a3fbb7f69b91a15dc414c8965624a89.tar.gz
chocolate-doom-7c377fc88a3fbb7f69b91a15dc414c8965624a89.tar.bz2
chocolate-doom-7c377fc88a3fbb7f69b91a15dc414c8965624a89.zip
Added OPL3 mode support.
Diffstat (limited to 'src/setup')
-rw-r--r--src/setup/sound.c53
1 files changed, 36 insertions, 17 deletions
diff --git a/src/setup/sound.c b/src/setup/sound.c
index 280a6bc2..bc2bdf33 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -61,6 +61,12 @@ static char *musicmode_strings[] =
"CD audio"
};
+static char *opltype_strings[] =
+{
+ "OPL2",
+ "OPL3"
+};
+
static char *cfg_extension[] = { "cfg", NULL };
// Config file variables:
@@ -84,6 +90,7 @@ static float libsamplerate_scale = 0.65;
static char *timidity_cfg_path = NULL;
static char *gus_patch_path = NULL;
static int gus_ram_kb = 1024;
+static int opl_type = 0;
// DOS specific variables: these are unused but should be maintained
// so that the config file can be shared between chocolate
@@ -142,26 +149,37 @@ static void UpdateExtraTable(TXT_UNCAST_ARG(widget),
// Rebuild the GUS table. Start by emptying it, then only add the
// GUS control widget if we are in GUS music mode.
- TXT_ClearTable(extra_table);
-
- if (snd_musicmode == MUSICMODE_GUS)
+ if (snd_musicmode == MUSICMODE_OPL)
{
+ TXT_InitTable(extra_table, 2);
+ TXT_SetColumnWidths(extra_table, 19, 4);
TXT_AddWidgets(extra_table,
- TXT_NewLabel("GUS patch path:"),
- TXT_NewFileSelector(&gus_patch_path, 30,
- "Select path to GUS patches",
- TXT_DIRECTORY),
- NULL);
- }
+ TXT_NewLabel("OPL type"),
+ TXT_NewDropdownList(&opl_type, opltype_strings, 2),
+ NULL);
+ }
+ else
+ {
+ TXT_InitTable(extra_table, 1);
+ if (snd_musicmode == MUSICMODE_GUS)
+ {
+ TXT_AddWidgets(extra_table,
+ TXT_NewLabel("GUS patch path:"),
+ TXT_NewFileSelector(&gus_patch_path, 30,
+ "Select path to GUS patches",
+ TXT_DIRECTORY),
+ NULL);
+ }
- if (snd_musicmode == MUSICMODE_NATIVE)
- {
- TXT_AddWidgets(extra_table,
- TXT_NewLabel("Timidity configuration file:"),
- TXT_NewFileSelector(&timidity_cfg_path, 30,
- "Select Timidity config file",
- cfg_extension),
- NULL);
+ if (snd_musicmode == MUSICMODE_NATIVE)
+ {
+ TXT_AddWidgets(extra_table,
+ TXT_NewLabel("Timidity configuration file:"),
+ TXT_NewFileSelector(&timidity_cfg_path, 30,
+ "Select Timidity config file",
+ cfg_extension),
+ NULL);
+ }
}
}
@@ -324,6 +342,7 @@ void BindSoundVariables(void)
M_BindIntVariable("snd_cachesize", &snd_cachesize);
M_BindIntVariable("opl_io_port", &opl_io_port);
+ M_BindIntVariable("opl_type", &opl_type);
if (gamemission == strife)
{