; This file is part of OpenTTD.
; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
; See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
;

; Multimedia (sound / music) settings as stored in the main configuration file ("openttd.cfg").

[pre-amble]

static const SettingVariant _multimedia_settings_table[] = {
[post-amble]
};
[templates]
SDTC_BOOL  =  SDTC_BOOL(              $var,        SettingFlags({$flags}), $def,                              $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to,        $cat, $extra, $startup),
SDTC_LIST  =  SDTC_LIST(              $var, $type, SettingFlags({$flags}), $def,                                                                          $from, $to,        $cat, $extra, $startup),
SDTC_VAR   =   SDTC_VAR(              $var, $type, SettingFlags({$flags}), $def,       $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $range_cb, $from, $to,        $cat, $extra, $startup),

[validation]
SDTC_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");

[defaults]
flags    =
interval = 0
str      = STR_NULL
strhelp  = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
strval   = STR_NULL
pre_cb   = nullptr
post_cb  = nullptr
str_cb   = nullptr
help_cb  = nullptr
val_cb   = nullptr
def_cb   = nullptr
range_cb = nullptr
load     = nullptr
from     = SL_MIN_VERSION
to       = SL_MAX_VERSION
cat      = SC_ADVANCED
extra    = 0
startup  = false


[SDTC_BOOL]
var      = sound.news_ticker
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = true
str      = STR_CONFIG_SETTING_SOUND_TICKER
strhelp  = STR_CONFIG_SETTING_SOUND_TICKER_HELPTEXT

[SDTC_BOOL]
var      = sound.news_full
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = true
str      = STR_CONFIG_SETTING_SOUND_NEWS
strhelp  = STR_CONFIG_SETTING_SOUND_NEWS_HELPTEXT

[SDTC_BOOL]
var      = sound.new_year
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = true
str      = STR_CONFIG_SETTING_SOUND_NEW_YEAR
str_cb   = SettingTitleWallclock
strhelp  = STR_CONFIG_SETTING_SOUND_NEW_YEAR_HELPTEXT
help_cb  = SettingHelpWallclock

[SDTC_BOOL]
var      = sound.confirm
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = true
str      = STR_CONFIG_SETTING_SOUND_CONFIRM
strhelp  = STR_CONFIG_SETTING_SOUND_CONFIRM_HELPTEXT

[SDTC_BOOL]
var      = sound.click_beep
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = true
str      = STR_CONFIG_SETTING_SOUND_CLICK
strhelp  = STR_CONFIG_SETTING_SOUND_CLICK_HELPTEXT

[SDTC_BOOL]
var      = sound.disaster
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = true
str      = STR_CONFIG_SETTING_SOUND_DISASTER
strhelp  = STR_CONFIG_SETTING_SOUND_DISASTER_HELPTEXT

[SDTC_BOOL]
var      = sound.vehicle
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = true
str      = STR_CONFIG_SETTING_SOUND_VEHICLE
strhelp  = STR_CONFIG_SETTING_SOUND_VEHICLE_HELPTEXT

[SDTC_BOOL]
var      = sound.ambient
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = true
str      = STR_CONFIG_SETTING_SOUND_AMBIENT
strhelp  = STR_CONFIG_SETTING_SOUND_AMBIENT_HELPTEXT

[SDTC_VAR]
var      = music.playlist
type     = SLE_UINT8
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = 0
min      = 0
max      = 5
interval = 1
cat      = SC_BASIC

[SDTC_VAR]
var      = music.music_vol
type     = SLE_UINT8
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = 50
min      = 0
max      = 127
interval = 1
cat      = SC_BASIC

[SDTC_VAR]
var      = music.effect_vol
type     = SLE_UINT8
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = 100
min      = 0
max      = 127
interval = 1
cat      = SC_BASIC

[SDTC_LIST]
var      = music.custom_1
type     = SLE_UINT8
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = """"
cat      = SC_BASIC

[SDTC_LIST]
var      = music.custom_2
type     = SLE_UINT8
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = """"
cat      = SC_BASIC

[SDTC_BOOL]
var      = music.playing
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = true
cat      = SC_BASIC

[SDTC_BOOL]
var      = music.shuffle
flags    = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def      = false
cat      = SC_BASIC
