2014-04-08 01:05:05 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* Copyright (c) 2014 Ted John
|
|
|
|
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
|
|
|
*
|
|
|
|
* This file is part of OpenRCT2.
|
|
|
|
*
|
|
|
|
* OpenRCT2 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, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
|
|
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _CONFIG_H_
|
|
|
|
#define _CONFIG_H_
|
|
|
|
|
2014-10-06 18:36:58 +02:00
|
|
|
#include "common.h"
|
|
|
|
#include "localisation/currency.h"
|
2014-10-09 15:03:54 +02:00
|
|
|
#include "platform/platform.h"
|
2014-04-26 02:16:32 +02:00
|
|
|
|
2014-04-11 03:42:39 +02:00
|
|
|
enum {
|
|
|
|
CONFIG_FLAG_ALWAYS_SHOW_GRIDLINES = (1 << 0),
|
|
|
|
CONFIG_FLAG_SHOW_HEIGHT_AS_UNITS = (1 << 1),
|
2014-05-13 00:13:23 +02:00
|
|
|
CONFIG_FLAG_DISABLE_SMOOTH_LANDSCAPE = (1 << 2),
|
|
|
|
CONFIG_FLAG_SAVE_PLUGIN_DATA = (1 << 3)
|
2014-04-11 03:42:39 +02:00
|
|
|
};
|
|
|
|
|
2014-04-26 02:16:32 +02:00
|
|
|
enum {
|
|
|
|
SHORTCUT_CLOSE_TOP_MOST_WINDOW,
|
|
|
|
SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS,
|
|
|
|
SHORTCUT_CANCEL_CONSTRUCTION_MODE,
|
|
|
|
SHORTCUT_PAUSE_GAME,
|
|
|
|
SHORTCUT_ZOOM_VIEW_OUT,
|
|
|
|
SHORTCUT_ZOOM_VIEW_IN,
|
|
|
|
SHORTCUT_ROTATE_VIEW,
|
|
|
|
SHORTCUT_ROTATE_CONSTRUCTION_OBJECT,
|
|
|
|
SHORTCUT_UNDERGROUND_VIEW_TOGGLE,
|
|
|
|
SHORTCUT_REMOVE_BASE_LAND_TOGGLE,
|
|
|
|
SHORTCUT_REMOVE_VERTICAL_LAND_TOGGLE,
|
|
|
|
SHORTCUT_SEE_THROUGH_RIDES_TOGGLE,
|
|
|
|
SHORTCUT_SEE_THROUGH_SCENERY_TOGGLE,
|
|
|
|
SHORTCUT_INVISIBLE_SUPPORTS_TOGGLE,
|
|
|
|
SHORTCUT_INVISIBLE_PEOPLE_TOGGLE,
|
|
|
|
SHORTCUT_HEIGHT_MARKS_ON_LAND_TOGGLE,
|
|
|
|
SHORTCUT_HEIGHT_MARKS_ON_RIDE_TRACKS_TOGGLE,
|
|
|
|
SHORTCUT_HEIGHT_MARKS_ON_PATHS_TOGGLE,
|
|
|
|
SHORTCUT_ADJUST_LAND,
|
|
|
|
SHORTCUT_ADJUST_WATER,
|
|
|
|
SHORTCUT_BUILD_SCENERY,
|
|
|
|
SHORTCUT_BUILD_PATHS,
|
|
|
|
SHORTCUT_BUILD_NEW_RIDE,
|
|
|
|
SHORTCUT_SHOW_FINANCIAL_INFORMATION,
|
|
|
|
SHORTCUT_SHOW_RESEARCH_INFORMATION,
|
|
|
|
SHORTCUT_SHOW_RIDES_LIST,
|
|
|
|
SHORTCUT_SHOW_PARK_INFORMATION,
|
|
|
|
SHORTCUT_SHOW_GUEST_LIST,
|
|
|
|
SHORTCUT_SHOW_STAFF_LIST,
|
|
|
|
SHORTCUT_SHOW_RECENT_MESSAGES,
|
|
|
|
SHORTCUT_SHOW_MAP,
|
|
|
|
SHORTCUT_SCREENSHOT,
|
2014-05-25 04:02:48 +02:00
|
|
|
|
|
|
|
// New
|
|
|
|
SHORTCUT_REDUCE_GAME_SPEED,
|
|
|
|
SHORTCUT_INCREASE_GAME_SPEED,
|
2014-11-24 17:38:19 +01:00
|
|
|
SHORTCUT_OPEN_CHEAT_WINDOW,
|
2014-05-25 04:02:48 +02:00
|
|
|
|
2014-04-26 02:16:32 +02:00
|
|
|
SHORTCUT_COUNT
|
|
|
|
};
|
|
|
|
|
2014-05-03 22:30:29 +02:00
|
|
|
enum {
|
|
|
|
SCREENSHOT_FORMAT_BMP,
|
|
|
|
SCREENSHOT_FORMAT_PNG
|
|
|
|
};
|
|
|
|
|
2014-05-08 11:05:07 +02:00
|
|
|
enum {
|
|
|
|
TEMPERATURE_FORMAT_C,
|
|
|
|
TEMPERATURE_FORMAT_F
|
|
|
|
};
|
|
|
|
|
2014-05-12 17:31:57 +02:00
|
|
|
enum {
|
2014-05-14 11:54:56 +02:00
|
|
|
MEASUREMENT_FORMAT_IMPERIAL,
|
|
|
|
MEASUREMENT_FORMAT_METRIC
|
2014-05-12 17:31:57 +02:00
|
|
|
};
|
|
|
|
|
2014-05-14 11:54:56 +02:00
|
|
|
enum{
|
|
|
|
SOUND_QUALITY_LOW,
|
|
|
|
SOUND_QUALITY_MEDIUM,
|
|
|
|
SOUND_QUALITY_HIGH
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2015-02-21 12:05:15 +01:00
|
|
|
enum {
|
|
|
|
AUTOSAVE_EVERY_WEEK,
|
|
|
|
AUTOSAVE_EVERY_2_WEEKS,
|
|
|
|
AUTOSAVE_EVERY_MONTH,
|
|
|
|
AUTOSAVE_EVERY_4_MONTHS,
|
|
|
|
AUTOSAVE_EVERY_YEAR,
|
|
|
|
AUTOSAVE_NEVER
|
|
|
|
};
|
|
|
|
|
2015-05-24 18:38:07 +02:00
|
|
|
enum {
|
|
|
|
DATE_FORMAT_DMY,
|
|
|
|
DATE_FORMAT_MDY
|
|
|
|
};
|
|
|
|
|
2015-03-07 17:38:17 +01:00
|
|
|
typedef struct {
|
2014-05-04 20:59:24 +02:00
|
|
|
uint8 play_intro;
|
2014-05-24 21:01:10 +02:00
|
|
|
uint8 confirmation_prompt;
|
2014-05-03 15:04:40 +02:00
|
|
|
uint8 screenshot_format;
|
2015-02-16 23:47:11 +01:00
|
|
|
utf8string game_path;
|
2014-05-12 17:31:57 +02:00
|
|
|
sint8 measurement_format;
|
|
|
|
sint8 temperature_format;
|
|
|
|
sint8 currency_format;
|
2014-05-24 21:01:10 +02:00
|
|
|
sint8 construction_marker_colour;
|
2014-05-12 17:31:57 +02:00
|
|
|
sint8 edge_scrolling;
|
2014-05-28 10:36:55 +02:00
|
|
|
sint8 always_show_gridlines;
|
2014-05-28 10:55:35 +02:00
|
|
|
sint8 landscape_smoothing;
|
2014-05-28 11:12:12 +02:00
|
|
|
sint8 show_height_as_units;
|
2014-05-28 11:19:49 +02:00
|
|
|
sint8 save_plugin_data;
|
2015-05-19 00:15:43 +02:00
|
|
|
uint8 debugging_tools;
|
2014-07-30 14:13:32 +02:00
|
|
|
|
|
|
|
//new
|
|
|
|
uint8 fullscreen_mode;
|
2015-02-16 23:47:11 +01:00
|
|
|
sint32 fullscreen_width;
|
|
|
|
sint32 fullscreen_height;
|
|
|
|
sint32 window_width;
|
|
|
|
sint32 window_height;
|
2014-08-15 00:46:36 +02:00
|
|
|
uint16 language;
|
2014-11-09 18:18:51 +01:00
|
|
|
uint8 window_snap_proximity;
|
2015-02-21 12:05:15 +01:00
|
|
|
uint8 autosave_frequency;
|
2015-05-22 04:17:46 +02:00
|
|
|
uint8 hardware_display;
|
2015-05-22 20:18:48 +02:00
|
|
|
uint8 test_unfinished_tracks;
|
|
|
|
uint8 no_test_crashes;
|
2015-05-24 18:38:07 +02:00
|
|
|
uint8 date_format;
|
2015-02-16 23:47:11 +01:00
|
|
|
} general_configuration;
|
|
|
|
|
2015-03-07 17:38:17 +01:00
|
|
|
typedef struct {
|
|
|
|
uint8 toolbar_show_finances;
|
|
|
|
uint8 toolbar_show_research;
|
2015-05-19 00:15:43 +02:00
|
|
|
uint8 toolbar_show_cheats;
|
2015-03-14 20:29:49 +01:00
|
|
|
uint8 allow_subtype_switching;
|
2015-05-20 03:12:09 +02:00
|
|
|
uint8 console_small_font;
|
2015-06-01 17:02:09 +02:00
|
|
|
utf8string current_theme_preset;
|
2015-03-07 17:38:17 +01:00
|
|
|
} interface_configuration;
|
|
|
|
|
|
|
|
typedef struct {
|
2015-02-16 23:47:11 +01:00
|
|
|
sint8 forced_software_buffering;
|
|
|
|
sint8 sound_quality;
|
2015-02-06 23:35:08 +01:00
|
|
|
uint8 title_music;
|
2015-03-24 21:42:20 +01:00
|
|
|
uint8 sound;
|
|
|
|
uint8 ride_music;
|
2015-06-04 22:29:21 +02:00
|
|
|
uint8 master_volume;
|
|
|
|
uint8 music_volume;
|
2015-02-16 23:47:11 +01:00
|
|
|
} sound_configuration;
|
2014-05-27 21:55:53 +02:00
|
|
|
|
2015-05-16 17:16:09 +02:00
|
|
|
typedef struct {
|
|
|
|
uint8 fast_lift_hill;
|
2015-05-17 14:26:45 +02:00
|
|
|
uint8 disable_brakes_failure;
|
2015-05-17 18:55:57 +02:00
|
|
|
uint8 disable_all_breakdowns;
|
2015-05-22 12:41:22 +02:00
|
|
|
uint8 unlock_all_prices;
|
2015-05-16 17:16:09 +02:00
|
|
|
} cheat_configuration;
|
|
|
|
|
2015-05-25 21:36:40 +02:00
|
|
|
typedef struct {
|
|
|
|
utf8string channel;
|
|
|
|
uint8 enable_follower_peep_names;
|
|
|
|
uint8 enable_follower_peep_tracking;
|
|
|
|
uint8 enable_chat_peep_names;
|
|
|
|
uint8 enable_chat_peep_tracking;
|
|
|
|
uint8 enable_news;
|
|
|
|
} twitch_configuration;
|
2015-05-16 17:16:09 +02:00
|
|
|
|
2015-05-29 22:42:57 +02:00
|
|
|
typedef struct {
|
|
|
|
uint8 colours[6];
|
|
|
|
} window_colours;
|
|
|
|
|
2015-05-26 22:59:25 +02:00
|
|
|
typedef struct {
|
2015-05-29 18:04:53 +02:00
|
|
|
window_colours *colour_schemes;
|
2015-05-29 22:42:57 +02:00
|
|
|
char name[256];
|
2015-06-01 17:02:09 +02:00
|
|
|
} theme_preset;
|
2015-05-29 18:04:53 +02:00
|
|
|
|
|
|
|
typedef struct {
|
2015-06-01 17:02:09 +02:00
|
|
|
theme_preset *presets;
|
2015-05-29 18:04:53 +02:00
|
|
|
uint16 num_presets;
|
2015-06-01 17:02:09 +02:00
|
|
|
} themes_configuration;
|
2015-05-26 22:59:25 +02:00
|
|
|
|
2015-03-07 17:38:17 +01:00
|
|
|
typedef struct {
|
2014-10-05 21:56:26 +02:00
|
|
|
uint8 key;
|
2014-10-07 20:12:19 +02:00
|
|
|
uint8 modifier;
|
2015-02-16 23:47:11 +01:00
|
|
|
} shortcut_entry;
|
|
|
|
|
|
|
|
extern general_configuration gConfigGeneral;
|
2015-03-07 17:38:17 +01:00
|
|
|
extern interface_configuration gConfigInterface;
|
2015-02-16 23:47:11 +01:00
|
|
|
extern sound_configuration gConfigSound;
|
2015-05-16 17:16:09 +02:00
|
|
|
extern cheat_configuration gConfigCheat;
|
2015-05-25 21:36:40 +02:00
|
|
|
extern twitch_configuration gConfigTwitch;
|
2015-06-01 17:02:09 +02:00
|
|
|
extern themes_configuration gConfigThemes;
|
2014-10-05 21:56:26 +02:00
|
|
|
|
2015-02-16 23:47:11 +01:00
|
|
|
extern uint16 gShortcutKeys[SHORTCUT_COUNT];
|
2014-05-04 12:14:18 +02:00
|
|
|
|
2015-02-16 23:47:11 +01:00
|
|
|
void config_set_defaults();
|
|
|
|
bool config_open_default();
|
|
|
|
bool config_save_default();
|
|
|
|
|
2015-02-19 20:40:14 +01:00
|
|
|
uint16 getLanguage();
|
|
|
|
|
2015-02-16 23:47:11 +01:00
|
|
|
void config_reset_shortcut_keys();
|
2015-02-27 18:28:45 +01:00
|
|
|
bool config_shortcut_keys_load();
|
|
|
|
bool config_shortcut_keys_save();
|
|
|
|
|
2015-02-16 23:47:11 +01:00
|
|
|
bool config_find_or_browse_install_directory();
|
2014-05-03 15:04:40 +02:00
|
|
|
|
2015-06-01 17:02:09 +02:00
|
|
|
void themes_set_default();
|
|
|
|
void themes_load_presets();
|
|
|
|
bool themes_save_preset(int preset);
|
2015-05-29 18:04:53 +02:00
|
|
|
|
2014-04-21 11:27:48 +02:00
|
|
|
#endif
|