Start moving config definitions over to C++

This commit is contained in:
Ted John 2017-02-18 10:54:13 +00:00
parent bd6d31fed6
commit 6a2b7b1200
4 changed files with 309 additions and 289 deletions

View File

@ -85,232 +85,11 @@ enum {
SHORTCUT_COUNT
};
enum {
TEMPERATURE_FORMAT_C,
TEMPERATURE_FORMAT_F
};
enum {
MEASUREMENT_FORMAT_IMPERIAL,
MEASUREMENT_FORMAT_METRIC,
MEASUREMENT_FORMAT_SI
};
enum {
AUTOSAVE_EVERY_MINUTE,
AUTOSAVE_EVERY_5MINUTES,
AUTOSAVE_EVERY_15MINUTES,
AUTOSAVE_EVERY_30MINUTES,
AUTOSAVE_EVERY_HOUR,
AUTOSAVE_NEVER
};
enum {
DATE_FORMAT_DMY,
DATE_FORMAT_MDY,
DATE_FORMAT_YMD,
DATE_FORMAT_YDM
};
enum {
TITLE_SEQUENCE_RCT1,
TITLE_SEQUENCE_RCT1_AA,
TITLE_SEQUENCE_RCT1_AA_LL,
TITLE_SEQUENCE_RCT2,
TITLE_SEQUENCE_OPENRCT2,
TITLE_SEQUENCE_RANDOM
};
enum {
SORT_NAME_ASCENDING,
SORT_NAME_DESCENDING,
SORT_DATE_ASCENDING,
SORT_DATE_DESCENDING,
};
enum {
SCENARIO_SELECT_MODE_DIFFICULTY,
SCENARIO_SELECT_MODE_ORIGIN,
};
enum {
DRAWING_ENGINE_NONE = -1,
DRAWING_ENGINE_SOFTWARE,
DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY,
DRAWING_ENGINE_OPENGL,
};
typedef struct general_configuration {
uint8 play_intro;
uint8 confirmation_prompt;
uint8 screenshot_format;
utf8string rct1_path;
utf8string rct2_path;
sint8 measurement_format;
sint8 temperature_format;
sint8 currency_format;
sint32 custom_currency_rate;
sint8 custom_currency_affix;
utf8string custom_currency_symbol;
sint8 construction_marker_colour;
sint8 edge_scrolling;
sint8 always_show_gridlines;
sint8 landscape_smoothing;
sint8 show_height_as_units;
sint8 save_plugin_data;
uint8 debugging_tools;
//new
uint8 fullscreen_mode;
sint32 fullscreen_width;
sint32 fullscreen_height;
sint32 window_width;
sint32 window_height;
uint16 language;
uint8 window_snap_proximity;
uint8 autosave_frequency;
uint8 drawing_engine;
uint8 uncap_fps;
uint8 test_unfinished_tracks;
uint8 no_test_crashes;
uint8 date_format;
uint8 auto_staff_placement;
uint8 handymen_mow_default;
uint8 default_inspection_interval;
utf8string last_run_version;
uint8 invert_viewport_drag;
uint8 load_save_sort;
uint8 minimize_fullscreen_focus_loss;
uint8 day_night_cycle;
uint8 enable_light_fx;
uint8 upper_case_banners;
uint8 disable_lightning_effect;
uint8 allow_loading_with_incorrect_checksum;
uint8 steam_overlay_pause;
float window_scale;
uint8 scale_quality;
uint8 use_nn_at_integer_scales;
uint8 show_fps;
uint8 trap_cursor;
uint8 auto_open_shops;
uint8 scenario_select_mode;
uint8 scenario_unlocking_enabled;
uint8 scenario_hide_mega_park;
utf8string last_save_game_directory;
utf8string last_save_landscape_directory;
utf8string last_save_scenario_directory;
utf8string last_save_track_directory;
uint8 window_limit;
uint8 zoom_to_cursor;
uint8 render_weather_effects;
uint8 render_weather_gloom;
} general_configuration;
typedef struct interface_configuration {
uint8 toolbar_show_finances;
uint8 toolbar_show_research;
uint8 toolbar_show_cheats;
uint8 toolbar_show_news;
uint8 select_by_track_type;
uint8 console_small_font;
utf8string current_theme_preset;
utf8string current_title_sequence_preset;
uint32 object_selection_filter_flags;
} interface_configuration;
typedef struct sound_configuration {
uint8 master_volume;
uint8 title_music;
uint8 sound_enabled;
uint8 sound_volume;
uint8 ride_music_enabled;
uint8 ride_music_volume;
uint8 audio_focus;
utf8string device;
} sound_configuration;
typedef struct twitch_configuration {
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;
typedef struct network_configuration {
utf8string player_name;
uint32 default_port;
utf8string default_password;
uint8 stay_connected;
uint8 advertise;
uint8 maxplayers;
utf8string server_name;
utf8string server_description;
utf8string server_greeting;
utf8string master_server_url;
utf8string provider_name;
utf8string provider_email;
utf8string provider_website;
uint8 known_keys_only;
uint8 log_chat;
} network_configuration;
typedef struct notification_configuration {
bool park_award;
bool park_marketing_campaign_finished;
bool park_warnings;
bool park_rating_warnings;
bool ride_broken_down;
bool ride_crashed;
bool ride_warnings;
bool ride_researched;
bool guest_warnings;
bool guest_lost;
bool guest_left_park;
bool guest_queuing_for_ride;
bool guest_on_ride;
bool guest_left_ride;
bool guest_bought_item;
bool guest_used_facility;
bool guest_died;
} notification_configuration;
typedef struct font_configuration {
utf8string file_name;
utf8string font_name;
sint8 x_offset;
sint8 y_offset;
uint8 size_tiny;
uint8 size_small;
uint8 size_medium;
uint8 size_big;
uint8 height_tiny;
uint8 height_small;
uint8 height_medium;
uint8 height_big;
} font_configuration;
// Define structures for any other settings here
typedef struct theme_features {
uint8 rct1_ride_lights;
uint8 rct1_park_lights;
uint8 rct1_scenario_font;
} theme_features;
typedef struct shortcut_entry {
uint8 key;
uint8 modifier;
} shortcut_entry;
extern general_configuration gConfigGeneral;
extern interface_configuration gConfigInterface;
extern sound_configuration gConfigSound;
extern twitch_configuration gConfigTwitch;
extern network_configuration gConfigNetwork;
extern notification_configuration gConfigNotifications;
extern font_configuration gConfigFonts;
extern uint16 gShortcutKeys[SHORTCUT_COUNT];
void config_get_default_path(utf8 *outPath, size_t size);

View File

@ -17,6 +17,7 @@
#include <memory>
#include "../core/Console.hpp"
#include "../core/Exception.hpp"
#include "../drawing/IDrawingEngine.h"
#include "../interface/window.h"
#include "../network/network.h"
#include "Config.h"
@ -25,7 +26,7 @@
extern "C"
{
#include "../config.h"
#include "../localisation/currency.h"
#include "../localisation/language.h"
}
@ -196,66 +197,66 @@ namespace Config
{
auto model = &gConfigGeneral;
writer->WriteSection("general");
writer->WriteBoolean("always_show_gridlines", model->always_show_gridlines != 0);
writer->WriteBoolean("always_show_gridlines", model->always_show_gridlines);
writer->WriteSint32("autosave", model->autosave_frequency);
writer->WriteBoolean("confirmation_prompt", model->confirmation_prompt != 0);
writer->WriteBoolean("construction_marker_colour", model->construction_marker_colour != 0);
writer->WriteBoolean("confirmation_prompt", model->confirmation_prompt);
writer->WriteBoolean("construction_marker_colour", model->construction_marker_colour);
writer->WriteEnum<sint32>("currency_format", model->currency_format, Enum_Currency);
writer->WriteSint32("custom_currency_rate", model->custom_currency_rate != 0);
writer->WriteSint32("custom_currency_rate", model->custom_currency_rate);
writer->WriteEnum<sint32>("custom_currency_affix", model->custom_currency_affix, Enum_CurrencySymbolAffix);
writer->WriteString("custom_currency_symbol", model->custom_currency_symbol);
writer->WriteBoolean("edge_scrolling", model->edge_scrolling != 0);
writer->WriteBoolean("edge_scrolling", model->edge_scrolling);
writer->WriteSint32("fullscreen_mode", model->fullscreen_mode);
writer->WriteSint32("fullscreen_height", model->fullscreen_height);
writer->WriteSint32("fullscreen_width", model->fullscreen_width);
writer->WriteString("rct1_path", model->rct1_path);
writer->WriteString("game_path", model->rct2_path);
writer->WriteBoolean("landscape_smoothing", model->landscape_smoothing != 0);
writer->WriteBoolean("landscape_smoothing", model->landscape_smoothing);
writer->WriteEnum<sint32>("language", model->language, Enum_LanguageEnum);
writer->WriteEnum<sint32>("measurement_format", model->measurement_format, Enum_MeasurementFormat);
writer->WriteBoolean("play_intro", model->play_intro != 0);
writer->WriteBoolean("save_plugin_data", model->save_plugin_data != 0);
writer->WriteBoolean("debugging_tools", model->debugging_tools != 0);
writer->WriteBoolean("show_height_as_units", model->show_height_as_units != 0);
writer->WriteBoolean("play_intro", model->play_intro);
writer->WriteBoolean("save_plugin_data", model->save_plugin_data);
writer->WriteBoolean("debugging_tools", model->debugging_tools);
writer->WriteBoolean("show_height_as_units", model->show_height_as_units);
writer->WriteEnum<sint32>("temperature_format", model->temperature_format, Enum_Temperature);
writer->WriteSint32("window_height", model->window_height);
writer->WriteSint32("window_snap_proximity", model->window_snap_proximity);
writer->WriteSint32("window_width", model->window_width);
writer->WriteEnum<sint32>("drawing_engine", model->drawing_engine, Enum_DrawingEngine);
writer->WriteBoolean("uncap_fps", model->uncap_fps != 0);
writer->WriteBoolean("test_unfinished_tracks", model->test_unfinished_tracks != 0);
writer->WriteBoolean("no_test_crashes", model->no_test_crashes != 0);
writer->WriteBoolean("uncap_fps", model->uncap_fps);
writer->WriteBoolean("test_unfinished_tracks", model->test_unfinished_tracks);
writer->WriteBoolean("no_test_crashes", model->no_test_crashes);
writer->WriteEnum<sint32>("date_format", model->date_format, Enum_DateFormat);
writer->WriteBoolean("auto_staff", model->auto_staff_placement != 0);
writer->WriteBoolean("handymen_mow_default", model->handymen_mow_default != 0);
writer->WriteBoolean("auto_staff", model->auto_staff_placement);
writer->WriteBoolean("handymen_mow_default", model->handymen_mow_default);
writer->WriteSint32("default_inspection_interval", model->default_inspection_interval);
writer->WriteString("last_run_version", model->last_run_version);
writer->WriteBoolean("invert_viewport_drag", model->invert_viewport_drag != 0);
writer->WriteBoolean("invert_viewport_drag", model->invert_viewport_drag);
writer->WriteSint32("load_save_sort", model->load_save_sort);
writer->WriteBoolean("minimize_fullscreen_focus_loss", model->minimize_fullscreen_focus_loss != 0);
writer->WriteBoolean("day_night_cycle", model->day_night_cycle != 0);
writer->WriteBoolean("enable_light_fx", model->enable_light_fx != 0);
writer->WriteBoolean("upper_case_banners", model->upper_case_banners != 0);
writer->WriteBoolean("disable_lightning_effect", model->disable_lightning_effect != 0);
writer->WriteBoolean("allow_loading_with_incorrect_checksum", model->allow_loading_with_incorrect_checksum != 0);
writer->WriteBoolean("steam_overlay_pause", model->steam_overlay_pause != 0);
writer->WriteBoolean("minimize_fullscreen_focus_loss", model->minimize_fullscreen_focus_loss);
writer->WriteBoolean("day_night_cycle", model->day_night_cycle);
writer->WriteBoolean("enable_light_fx", model->enable_light_fx);
writer->WriteBoolean("upper_case_banners", model->upper_case_banners);
writer->WriteBoolean("disable_lightning_effect", model->disable_lightning_effect);
writer->WriteBoolean("allow_loading_with_incorrect_checksum", model->allow_loading_with_incorrect_checksum);
writer->WriteBoolean("steam_overlay_pause", model->steam_overlay_pause);
writer->WriteFloat("window_scale", model->window_scale);
writer->WriteSint32("scale_quality", model->scale_quality);
writer->WriteBoolean("use_nn_at_integer_scales", model->use_nn_at_integer_scales != 0);
writer->WriteBoolean("show_fps", model->show_fps != 0);
writer->WriteBoolean("trap_cursor", model->trap_cursor != 0);
writer->WriteBoolean("auto_open_shops", model->auto_open_shops != 0);
writer->WriteBoolean("use_nn_at_integer_scales", model->use_nn_at_integer_scales);
writer->WriteBoolean("show_fps", model->show_fps);
writer->WriteBoolean("trap_cursor", model->trap_cursor);
writer->WriteBoolean("auto_open_shops", model->auto_open_shops);
writer->WriteSint32("scenario_select_mode", model->scenario_select_mode);
writer->WriteBoolean("scenario_unlocking_enabled", model->scenario_unlocking_enabled != 0);
writer->WriteBoolean("scenario_hide_mega_park", model->scenario_hide_mega_park != 0);
writer->WriteBoolean("scenario_unlocking_enabled", model->scenario_unlocking_enabled);
writer->WriteBoolean("scenario_hide_mega_park", model->scenario_hide_mega_park);
writer->WriteString("last_game_directory", model->last_save_game_directory);
writer->WriteString("last_landscape_directory", model->last_save_landscape_directory);
writer->WriteString("last_scenario_directory", model->last_save_scenario_directory);
writer->WriteString("last_track_directory", model->last_save_track_directory);
writer->WriteSint32("window_limit", model->window_limit);
writer->WriteBoolean("zoom_to_cursor", model->zoom_to_cursor != 0);
writer->WriteBoolean("render_weather_effects", model->render_weather_effects != 0);
writer->WriteBoolean("render_weather_gloom", model->render_weather_gloom != 0);
writer->WriteBoolean("zoom_to_cursor", model->zoom_to_cursor);
writer->WriteBoolean("render_weather_effects", model->render_weather_effects);
writer->WriteBoolean("render_weather_gloom", model->render_weather_gloom);
}
static void ReadInterface(IIniReader * reader)
@ -279,12 +280,12 @@ namespace Config
{
auto model = &gConfigInterface;
writer->WriteSection("interface");
writer->WriteBoolean("toolbar_show_finances", model->toolbar_show_finances != 0);
writer->WriteBoolean("toolbar_show_research", model->toolbar_show_research != 0);
writer->WriteBoolean("toolbar_show_cheats", model->toolbar_show_cheats != 0);
writer->WriteBoolean("toolbar_show_news", model->toolbar_show_news != 0);
writer->WriteBoolean("select_by_track_type", model->select_by_track_type != 0);
writer->WriteBoolean("console_small_font", model->console_small_font != 0);
writer->WriteBoolean("toolbar_show_finances", model->toolbar_show_finances);
writer->WriteBoolean("toolbar_show_research", model->toolbar_show_research);
writer->WriteBoolean("toolbar_show_cheats", model->toolbar_show_cheats);
writer->WriteBoolean("toolbar_show_news", model->toolbar_show_news);
writer->WriteBoolean("select_by_track_type", model->select_by_track_type);
writer->WriteBoolean("console_small_font", model->console_small_font);
writer->WriteString("current_theme", model->current_theme_preset);
writer->WriteString("current_title_sequence", model->current_title_sequence_preset);
writer->WriteSint32("object_selection_filter_flags", model->object_selection_filter_flags);
@ -312,11 +313,11 @@ namespace Config
writer->WriteSection("sound");
writer->WriteSint32("master_volume", model->master_volume);
writer->WriteSint32("title_music", model->title_music);
writer->WriteBoolean("sound", model->sound_enabled != 0);
writer->WriteBoolean("sound", model->sound_enabled);
writer->WriteSint32("sound_volume", model->sound_volume);
writer->WriteBoolean("ride_music", model->ride_music_enabled != 0);
writer->WriteBoolean("ride_music", model->ride_music_enabled);
writer->WriteSint32("ride_music_volume", model->ride_music_volume);
writer->WriteBoolean("audio_focus", model->audio_focus != 0);
writer->WriteBoolean("audio_focus", model->audio_focus);
writer->WriteString("audio_device", model->device);
}
@ -350,8 +351,8 @@ namespace Config
writer->WriteString("player_name", model->player_name);
writer->WriteSint32("default_port", model->default_port);
writer->WriteString("default_password", model->default_password);
writer->WriteBoolean("stay_connected", model->stay_connected != 0);
writer->WriteBoolean("advertise", model->advertise != 0);
writer->WriteBoolean("stay_connected", model->stay_connected);
writer->WriteBoolean("advertise", model->advertise);
writer->WriteSint32("maxplayers", model->maxplayers);
writer->WriteString("server_name", model->server_name);
writer->WriteString("server_description", model->server_description);
@ -360,8 +361,8 @@ namespace Config
writer->WriteString("provider_name", model->provider_name);
writer->WriteString("provider_email", model->provider_email);
writer->WriteString("provider_website", model->provider_website);
writer->WriteBoolean("known_keys_only", model->known_keys_only != 0);
writer->WriteBoolean("log_chat", model->log_chat != 0);
writer->WriteBoolean("known_keys_only", model->known_keys_only);
writer->WriteBoolean("log_chat", model->log_chat);
}
static void ReadNotifications(IIniReader * reader)
@ -393,23 +394,23 @@ namespace Config
{
auto model = &gConfigNotifications;
writer->WriteSection("notifications");
writer->WriteBoolean("park_award", model->park_award != 0);
writer->WriteBoolean("park_marketing_campaign_finished", model->park_marketing_campaign_finished != 0);
writer->WriteBoolean("park_warnings", model->park_warnings != 0);
writer->WriteBoolean("park_rating_warnings", model->park_rating_warnings != 0);
writer->WriteBoolean("ride_broken_down", model->ride_broken_down != 0);
writer->WriteBoolean("ride_crashed", model->ride_crashed != 0);
writer->WriteBoolean("ride_warnings", model->ride_warnings != 0);
writer->WriteBoolean("ride_researched", model->ride_researched != 0);
writer->WriteBoolean("guest_warnings", model->guest_warnings != 0);
writer->WriteBoolean("guest_lost", model->guest_lost != 0);
writer->WriteBoolean("guest_left_park", model->guest_left_park != 0);
writer->WriteBoolean("guest_queuing_for_ride", model->guest_queuing_for_ride != 0);
writer->WriteBoolean("guest_on_ride", model->guest_on_ride != 0);
writer->WriteBoolean("guest_left_ride", model->guest_left_ride != 0);
writer->WriteBoolean("guest_bought_item", model->guest_bought_item != 0);
writer->WriteBoolean("guest_used_facility", model->guest_used_facility != 0);
writer->WriteBoolean("guest_died", model->guest_died != 0);
writer->WriteBoolean("park_award", model->park_award);
writer->WriteBoolean("park_marketing_campaign_finished", model->park_marketing_campaign_finished);
writer->WriteBoolean("park_warnings", model->park_warnings);
writer->WriteBoolean("park_rating_warnings", model->park_rating_warnings);
writer->WriteBoolean("ride_broken_down", model->ride_broken_down);
writer->WriteBoolean("ride_crashed", model->ride_crashed);
writer->WriteBoolean("ride_warnings", model->ride_warnings);
writer->WriteBoolean("ride_researched", model->ride_researched);
writer->WriteBoolean("guest_warnings", model->guest_warnings);
writer->WriteBoolean("guest_lost", model->guest_lost);
writer->WriteBoolean("guest_left_park", model->guest_left_park);
writer->WriteBoolean("guest_queuing_for_ride", model->guest_queuing_for_ride);
writer->WriteBoolean("guest_on_ride", model->guest_on_ride);
writer->WriteBoolean("guest_left_ride", model->guest_left_ride);
writer->WriteBoolean("guest_bought_item", model->guest_bought_item);
writer->WriteBoolean("guest_used_facility", model->guest_used_facility);
writer->WriteBoolean("guest_died", model->guest_died);
}
static void ReadTwitch(IIniReader * reader)
@ -431,11 +432,11 @@ namespace Config
auto model = &gConfigTwitch;
writer->WriteSection("twitch");
writer->WriteString("channel", model->channel);
writer->WriteBoolean("follower_peep_names", model->enable_follower_peep_names != 0);
writer->WriteBoolean("follower_peep_tracking", model->enable_follower_peep_tracking != 0);
writer->WriteBoolean("chat_peep_names", model->enable_chat_peep_names != 0);
writer->WriteBoolean("chat_peep_tracking", model->enable_chat_peep_tracking != 0);
writer->WriteBoolean("news", model->enable_news != 0);
writer->WriteBoolean("follower_peep_names", model->enable_follower_peep_names);
writer->WriteBoolean("follower_peep_tracking", model->enable_follower_peep_tracking);
writer->WriteBoolean("chat_peep_names", model->enable_chat_peep_names);
writer->WriteBoolean("chat_peep_tracking", model->enable_chat_peep_tracking);
writer->WriteBoolean("news", model->enable_news);
}
static void ReadFont(IIniReader * reader)

View File

@ -18,6 +18,238 @@
#include "../common.h"
typedef struct GeneralConfiguration
{
// Paths
utf8 * rct1_path;
utf8 * rct2_path;
// Display
sint32 window_width;
sint32 window_height;
sint32 fullscreen_mode;
sint32 fullscreen_width;
sint32 fullscreen_height;
float window_scale;
sint32 drawing_engine;
sint32 scale_quality;
bool use_nn_at_integer_scales;
bool uncap_fps;
bool show_fps;
bool minimize_fullscreen_focus_loss;
// Map rendering
bool landscape_smoothing;
bool always_show_gridlines;
bool construction_marker_colour;
bool day_night_cycle;
bool enable_light_fx;
bool upper_case_banners;
bool render_weather_effects;
bool render_weather_gloom;
bool disable_lightning_effect;
// Localisation
sint32 language;
sint32 measurement_format;
sint32 temperature_format;
bool show_height_as_units;
sint32 date_format;
sint32 currency_format;
sint32 custom_currency_rate;
sint32 custom_currency_affix;
utf8 * custom_currency_symbol;
// Controls
bool edge_scrolling;
bool trap_cursor;
bool invert_viewport_drag;
bool zoom_to_cursor;
// Miscellaneous
bool play_intro;
sint32 window_snap_proximity;
bool allow_loading_with_incorrect_checksum;
bool save_plugin_data;
bool test_unfinished_tracks;
bool no_test_crashes;
bool debugging_tools;
sint32 autosave_frequency;
bool auto_staff_placement;
bool handymen_mow_default;
bool auto_open_shops;
sint32 default_inspection_interval;
sint32 window_limit;
sint32 scenario_select_mode;
bool scenario_unlocking_enabled;
bool scenario_hide_mega_park;
bool steam_overlay_pause;
bool confirmation_prompt;
sint32 load_save_sort;
utf8 * last_save_game_directory;
utf8 * last_save_landscape_directory;
utf8 * last_save_scenario_directory;
utf8 * last_save_track_directory;
utf8 * last_run_version;
sint32 screenshot_format;
} GeneralConfiguration;
typedef struct InterfaceConfiguration
{
bool toolbar_show_finances;
bool toolbar_show_research;
bool toolbar_show_cheats;
bool toolbar_show_news;
bool select_by_track_type;
bool console_small_font;
utf8 * current_theme_preset;
utf8 * current_title_sequence_preset;
sint32 object_selection_filter_flags;
} InterfaceConfiguration;
typedef struct SoundConfiguration
{
utf8 * device;
uint8 master_volume;
uint8 title_music;
bool sound_enabled;
uint8 sound_volume;
bool ride_music_enabled;
uint8 ride_music_volume;
bool audio_focus;
} SoundConfiguration;
typedef struct TwitchConfiguration
{
utf8 * channel;
bool enable_follower_peep_names;
bool enable_follower_peep_tracking;
bool enable_chat_peep_names;
bool enable_chat_peep_tracking;
bool enable_news;
} TwitchConfiguration;
typedef struct NetworkConfiguration
{
utf8 * player_name;
sint32 default_port;
utf8 * default_password;
bool stay_connected;
bool advertise;
sint32 maxplayers;
utf8 * server_name;
utf8 * server_description;
utf8 * server_greeting;
utf8 * master_server_url;
utf8 * provider_name;
utf8 * provider_email;
utf8 * provider_website;
bool known_keys_only;
bool log_chat;
} NetworkConfiguration;
typedef struct NotificationConfiguration
{
bool park_award;
bool park_marketing_campaign_finished;
bool park_warnings;
bool park_rating_warnings;
bool ride_broken_down;
bool ride_crashed;
bool ride_warnings;
bool ride_researched;
bool guest_warnings;
bool guest_lost;
bool guest_left_park;
bool guest_queuing_for_ride;
bool guest_on_ride;
bool guest_left_ride;
bool guest_bought_item;
bool guest_used_facility;
bool guest_died;
} NotificationConfiguration;
typedef struct FontConfiguration
{
utf8 * file_name;
utf8 * font_name;
sint32 x_offset;
sint32 y_offset;
sint32 size_tiny;
sint32 size_small;
sint32 size_medium;
sint32 size_big;
sint32 height_tiny;
sint32 height_small;
sint32 height_medium;
sint32 height_big;
} FontConfiguration;
extern GeneralConfiguration gConfigGeneral;
extern InterfaceConfiguration gConfigInterface;
extern SoundConfiguration gConfigSound;
extern TwitchConfiguration gConfigTwitch;
extern NetworkConfiguration gConfigNetwork;
extern NotificationConfiguration gConfigNotifications;
extern FontConfiguration gConfigFonts;
enum AUTOSAVE
{
AUTOSAVE_EVERY_MINUTE,
AUTOSAVE_EVERY_5MINUTES,
AUTOSAVE_EVERY_15MINUTES,
AUTOSAVE_EVERY_30MINUTES,
AUTOSAVE_EVERY_HOUR,
AUTOSAVE_NEVER
};
enum SORT
{
SORT_NAME_ASCENDING,
SORT_NAME_DESCENDING,
SORT_DATE_ASCENDING,
SORT_DATE_DESCENDING,
};
enum SCENARIO_SELECT_MODE
{
SCENARIO_SELECT_MODE_DIFFICULTY,
SCENARIO_SELECT_MODE_ORIGIN,
};
enum TEMPERATURE_FORMAT
{
TEMPERATURE_FORMAT_C,
TEMPERATURE_FORMAT_F
};
enum MEASUREMENT_FORMAT
{
MEASUREMENT_FORMAT_IMPERIAL,
MEASUREMENT_FORMAT_METRIC,
MEASUREMENT_FORMAT_SI
};
enum DATE_FORMAT
{
DATE_FORMAT_DMY,
DATE_FORMAT_MDY,
DATE_FORMAT_YMD,
DATE_FORMAT_YDM
};
enum TITLE_SEQUENCE
{
TITLE_SEQUENCE_RCT1,
TITLE_SEQUENCE_RCT1_AA,
TITLE_SEQUENCE_RCT1_AA_LL,
TITLE_SEQUENCE_RCT2,
TITLE_SEQUENCE_OPENRCT2,
TITLE_SEQUENCE_RANDOM
};
extern "C"
{
bool config_open(const utf8 * path);

View File

@ -23,6 +23,14 @@
struct rct_drawpixelinfo;
interface IDrawingContext;
enum DRAWING_ENGINE
{
DRAWING_ENGINE_NONE = -1,
DRAWING_ENGINE_SOFTWARE,
DRAWING_ENGINE_SOFTWARE_WITH_HARDWARE_DISPLAY,
DRAWING_ENGINE_OPENGL,
};
enum DRAWING_ENGINE_FLAGS
{
DEF_NONE = 0,