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.
|
2015-10-20 20:16:30 +02:00
|
|
|
|
2014-04-08 01:05:05 +02:00
|
|
|
* 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.
|
2015-10-20 20:16:30 +02:00
|
|
|
|
2014-04-08 01:05:05 +02:00
|
|
|
* 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,
|
2015-07-09 14:50:33 +02:00
|
|
|
SHORTCUT_ROTATE_VIEW_CLOCKWISE,
|
|
|
|
SHORTCUT_ROTATE_VIEW_ANTICLOCKWISE,
|
2014-04-26 02:16:32 +02:00
|
|
|
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,
|
2015-06-26 17:26:29 +02:00
|
|
|
SHORTCUT_REMOVE_TOP_BOTTOM_TOOLBAR_TOGGLE,
|
2015-07-24 20:20:24 +02:00
|
|
|
SHORTCUT_SCROLL_MAP_UP,
|
|
|
|
SHORTCUT_SCROLL_MAP_LEFT,
|
|
|
|
SHORTCUT_SCROLL_MAP_DOWN,
|
2015-08-14 23:06:15 +02:00
|
|
|
SHORTCUT_SCROLL_MAP_RIGHT,
|
|
|
|
SHORTCUT_OPEN_CHAT_WINDOW,
|
2015-08-20 12:13:08 +02:00
|
|
|
SHORTCUT_QUICK_SAVE_GAME,
|
2015-11-21 19:59:48 +01:00
|
|
|
SHORTCUT_TOGGLE_RECORDING,
|
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
|
|
|
};
|
|
|
|
|
2015-02-21 12:05:15 +01:00
|
|
|
enum {
|
2015-10-03 14:18:43 +02:00
|
|
|
AUTOSAVE_EVERY_MINUTE,
|
|
|
|
AUTOSAVE_EVERY_5MINUTES,
|
|
|
|
AUTOSAVE_EVERY_15MINUTES,
|
|
|
|
AUTOSAVE_EVERY_30MINUTES,
|
|
|
|
AUTOSAVE_EVERY_HOUR,
|
2015-02-21 12:05:15 +01:00
|
|
|
AUTOSAVE_NEVER
|
|
|
|
};
|
|
|
|
|
2015-05-24 18:38:07 +02:00
|
|
|
enum {
|
|
|
|
DATE_FORMAT_DMY,
|
|
|
|
DATE_FORMAT_MDY
|
|
|
|
};
|
|
|
|
|
2015-06-14 22:01:48 +02:00
|
|
|
enum {
|
|
|
|
TITLE_SEQUENCE_RCT1,
|
|
|
|
TITLE_SEQUENCE_RCT1_AA,
|
|
|
|
TITLE_SEQUENCE_RCT1_AA_LL,
|
|
|
|
TITLE_SEQUENCE_RCT2,
|
|
|
|
TITLE_SEQUENCE_OPENRCT2,
|
|
|
|
TITLE_SEQUENCE_RANDOM
|
|
|
|
};
|
|
|
|
|
2015-06-22 13:49:35 +02:00
|
|
|
enum {
|
|
|
|
SORT_NAME_ASCENDING,
|
|
|
|
SORT_NAME_DESCENDING,
|
|
|
|
SORT_DATE_ASCENDING,
|
|
|
|
SORT_DATE_DESCENDING,
|
|
|
|
};
|
|
|
|
|
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-07-04 21:00:32 +02:00
|
|
|
uint8 uncap_fps;
|
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-06-11 22:34:38 +02:00
|
|
|
uint8 auto_staff_placement;
|
2015-08-17 01:26:42 +02:00
|
|
|
uint8 handymen_mow_default;
|
2015-06-13 14:30:50 +02:00
|
|
|
utf8string last_run_version;
|
2015-06-20 17:52:38 +02:00
|
|
|
uint8 invert_viewport_drag;
|
2015-06-22 13:49:35 +02:00
|
|
|
uint8 load_save_sort;
|
2015-06-25 00:12:53 +02:00
|
|
|
uint8 minimize_fullscreen_focus_loss;
|
2015-07-24 23:58:41 +02:00
|
|
|
uint8 day_night_cycle;
|
2015-07-25 21:38:23 +02:00
|
|
|
uint8 upper_case_banners;
|
2015-08-18 10:04:10 +02:00
|
|
|
uint8 allow_loading_with_incorrect_checksum;
|
2015-10-03 20:46:34 +02:00
|
|
|
uint8 steam_overlay_pause;
|
2015-11-10 23:52:27 +01:00
|
|
|
float window_scale;
|
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-07-22 19:13:35 +02:00
|
|
|
uint8 toolbar_show_news;
|
2015-06-24 12:41:19 +02:00
|
|
|
uint8 select_by_track_type;
|
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-06-24 18:22:12 +02:00
|
|
|
utf8string current_title_sequence_preset;
|
2015-07-24 21:15:13 +02:00
|
|
|
uint32 object_selection_filter_flags;
|
2015-03-07 17:38:17 +01:00
|
|
|
} interface_configuration;
|
|
|
|
|
|
|
|
typedef struct {
|
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-08-11 13:06:00 +02:00
|
|
|
uint8 audio_focus;
|
2015-06-04 22:29:21 +02:00
|
|
|
uint8 master_volume;
|
|
|
|
uint8 music_volume;
|
2015-07-14 23:49:46 +02:00
|
|
|
utf8string device;
|
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-06-10 18:12:21 +02:00
|
|
|
uint8 build_in_pause_mode;
|
2015-08-15 20:42:53 +02:00
|
|
|
uint8 ignore_ride_intensity;
|
2015-08-31 11:12:15 +02:00
|
|
|
uint8 disable_vandalism;
|
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-08-16 12:42:41 +02:00
|
|
|
typedef struct {
|
|
|
|
utf8string player_name;
|
|
|
|
uint32 default_port;
|
2015-09-05 19:46:13 +02:00
|
|
|
uint8 stay_connected;
|
2015-11-02 01:28:53 +01:00
|
|
|
uint8 advertise;
|
2015-11-04 00:31:09 +01:00
|
|
|
uint8 maxplayers;
|
|
|
|
utf8string server_name;
|
2015-11-08 00:47:50 +01:00
|
|
|
utf8string server_description;
|
2015-11-08 00:56:16 +01:00
|
|
|
utf8string master_server_url;
|
2015-11-11 23:39:04 +01:00
|
|
|
utf8string provider_name;
|
|
|
|
utf8string provider_email;
|
|
|
|
utf8string provider_website;
|
2015-08-16 12:42:41 +02:00
|
|
|
} network_configuration;
|
|
|
|
|
2015-06-08 02:31:54 +02:00
|
|
|
typedef struct theme_window {
|
2015-05-29 22:42:57 +02:00
|
|
|
uint8 colours[6];
|
|
|
|
|
2015-06-08 02:31:54 +02:00
|
|
|
// Define any other settings for all windows here
|
|
|
|
|
|
|
|
} theme_window;
|
|
|
|
|
|
|
|
// Define structures for any other settings here
|
2015-05-26 22:59:25 +02:00
|
|
|
typedef struct {
|
2015-06-08 02:31:54 +02:00
|
|
|
uint8 rct1_ride_lights;
|
|
|
|
uint8 rct1_park_lights;
|
|
|
|
uint8 rct1_scenario_font;
|
|
|
|
} theme_features;
|
|
|
|
|
2015-10-30 15:18:29 +01:00
|
|
|
#define THEME_PRESET_NAME_SIZE 256
|
2015-06-08 02:31:54 +02:00
|
|
|
|
|
|
|
typedef struct theme_preset {
|
2015-10-30 15:18:29 +01:00
|
|
|
char name[THEME_PRESET_NAME_SIZE];
|
2015-06-08 02:31:54 +02:00
|
|
|
theme_window *windows;
|
|
|
|
|
|
|
|
// Add structures for any other settings here
|
|
|
|
theme_features features;
|
|
|
|
|
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-06-24 18:22:12 +02:00
|
|
|
#define TITLE_SEQUENCE_MAX_SAVE_LENGTH 51
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint8 command;
|
|
|
|
union {
|
|
|
|
uint8 saveIndex; // LOAD (this index is internal only)
|
|
|
|
uint8 x; // LOCATION
|
|
|
|
uint8 rotations; // ROTATE (counter-clockwise)
|
|
|
|
uint8 zoom; // ZOOM
|
2015-06-25 17:19:23 +02:00
|
|
|
uint8 speed; // SPEED
|
2015-06-24 18:22:12 +02:00
|
|
|
uint8 seconds; // WAIT
|
|
|
|
};
|
|
|
|
uint8 y; // LOCATION
|
|
|
|
} title_command;
|
|
|
|
|
2015-10-30 15:18:29 +01:00
|
|
|
#define TITLE_SEQUENCE_NAME_SIZE 256
|
|
|
|
|
2015-06-24 18:22:12 +02:00
|
|
|
typedef struct {
|
2015-10-30 15:18:29 +01:00
|
|
|
char name[TITLE_SEQUENCE_NAME_SIZE];
|
2015-06-24 18:22:12 +02:00
|
|
|
char path[MAX_PATH]; // Needed for non-modifiable presets
|
|
|
|
char (*saves)[TITLE_SEQUENCE_MAX_SAVE_LENGTH];
|
|
|
|
title_command *commands;
|
|
|
|
uint8 num_saves;
|
|
|
|
uint16 num_commands;
|
|
|
|
|
|
|
|
} title_sequence;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
title_sequence *presets;
|
|
|
|
uint16 num_presets;
|
|
|
|
|
|
|
|
} title_sequences_configuration;
|
|
|
|
|
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-08-16 12:42:41 +02:00
|
|
|
extern network_configuration gConfigNetwork;
|
2015-06-01 17:02:09 +02:00
|
|
|
extern themes_configuration gConfigThemes;
|
2015-06-24 18:22:12 +02:00
|
|
|
extern title_sequences_configuration gConfigTitleSequences;
|
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
|
|
|
|
2015-06-24 18:22:12 +02:00
|
|
|
void title_sequences_set_default();
|
|
|
|
void title_sequences_load_presets();
|
|
|
|
void title_sequence_save_preset_script(int preset);
|
|
|
|
|
2014-04-21 11:27:48 +02:00
|
|
|
#endif
|