summaryrefslogtreecommitdiff
path: root/src/settings_table.h
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-07-05 17:46:38 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-07-06 21:32:47 +0200
commit25ca6a75bc83df7224f56fc1ab22c4491f77649e (patch)
tree1c99d6657789d9adecd7a3f1df7e41f7f8b8d633 /src/settings_table.h
parentb4aedc8bee97218febda75889ff2ef50f70a2439 (diff)
downloadopenttd-25ca6a75bc83df7224f56fc1ab22c4491f77649e.tar.xz
Codechange: split off the settings table and all the callbacks from the main settings handling logic
Diffstat (limited to 'src/settings_table.h')
-rw-r--r--src/settings_table.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/settings_table.h b/src/settings_table.h
new file mode 100644
index 000000000..ace0ec7a2
--- /dev/null
+++ b/src/settings_table.h
@@ -0,0 +1,38 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * @file settings_table.h Definition of the configuration tables of the settings.
+ */
+
+#ifndef SETTINGS_TABLE_H
+#define SETTINGS_TABLE_H
+
+#include <array>
+#include "settings_internal.h"
+
+typedef span<const SettingVariant> SettingTable;
+
+extern SettingTable _settings;
+extern SettingTable _network_settings;
+extern SettingTable _network_private_settings;
+extern SettingTable _network_secrets_settings;
+
+extern SettingTable _company_settings;
+extern SettingTable _currency_settings;
+extern SettingTable _gameopt_settings;
+extern SettingTable _misc_settings;
+extern SettingTable _window_settings;
+#if defined(_WIN32) && !defined(DEDICATED)
+extern SettingTable _win32_settings;
+#endif /* _WIN32 */
+
+static const uint GAME_DIFFICULTY_NUM = 18;
+extern const std::array<std::string, GAME_DIFFICULTY_NUM> _old_diff_settings;
+extern uint16 _old_diff_custom[GAME_DIFFICULTY_NUM];
+
+#endif /* SETTINGS_TABLE_H */