From 658e877955ec4790466a429f13e1178f1640754d Mon Sep 17 00:00:00 2001 From: janisozaur Date: Thu, 12 May 2016 23:57:40 +0200 Subject: [PATCH] Name all the typdef-ed structs (#3581) --- src/addresses.h | 2 +- src/cmdline_sprite.c | 8 ++++--- src/config.c | 6 ++--- src/config.h | 24 +++++++++---------- src/core/stopwatch.h | 2 +- src/core/textinputbuffer.h | 2 +- src/drawing/drawing.h | 16 ++++++------- src/drawing/font.h | 4 ++-- src/drawing/scrolling_text.c | 2 +- src/drawing/string.c | 6 ++--- src/image_io.c | 4 ++-- src/input.c | 2 +- src/input.h | 2 +- src/interface/colour.h | 4 ++-- src/interface/console.c | 2 +- src/interface/viewport.h | 2 +- src/interface/window.h | 32 ++++++++++++------------- src/localisation/convert.c | 2 +- src/localisation/currency.h | 2 +- src/localisation/language.h | 2 +- src/localisation/localisation.c | 2 +- src/management/award.h | 2 +- src/management/news_item.h | 2 +- src/management/research.h | 2 +- src/network/http.cpp | 4 ++-- src/network/http.h | 4 ++-- src/object.c | 2 +- src/object.h | 10 ++++---- src/object_list.c | 2 +- src/paint/map_element/surface.c | 3 +-- src/paint/supports.c | 6 ++--- src/peep/peep.c | 2 +- src/peep/peep.h | 4 ++-- src/platform/platform.h | 12 +++++----- src/platform/posix.c | 2 +- src/rct1.h | 16 ++++++------- src/rct2.h | 2 +- src/ride/gentle/crooked_house.c | 2 +- src/ride/ride.h | 20 ++++++++-------- src/ride/ride_data.h | 14 +++++------ src/ride/track.h | 10 ++++---- src/ride/track_data.h | 4 ++-- src/ride/track_design.c | 2 +- src/ride/track_design.h | 14 +++++------ src/ride/track_design_index.c | 2 +- src/ride/track_design_save.c | 2 +- src/ride/vehicle.c | 2 +- src/ride/vehicle.h | 10 ++++---- src/ride/vehicle_paint.h | 2 +- src/scenario.h | 20 ++++++++-------- src/scenario_sources.c | 4 ++-- src/util/sawyercoding.h | 2 +- src/windows/editor_object_selection.c | 2 +- src/windows/loadsave.c | 2 +- src/windows/news_options.c | 2 +- src/windows/ride.c | 2 +- src/windows/scenery.c | 2 +- src/windows/server_list.c | 2 +- src/windows/title_command_editor.c | 2 +- src/windows/title_scenarioselect.c | 2 +- src/world/banner.h | 2 +- src/world/climate.c | 2 +- src/world/climate.h | 2 +- src/world/entrance.h | 2 +- src/world/footpath.c | 4 ++-- src/world/footpath.h | 2 +- src/world/map.h | 34 +++++++++++++-------------- src/world/map_animation.h | 2 +- src/world/mapgen.h | 2 +- src/world/scenery.h | 16 ++++++------- src/world/sprite.h | 24 +++++++++---------- src/world/water.h | 2 +- 72 files changed, 212 insertions(+), 211 deletions(-) diff --git a/src/addresses.h b/src/addresses.h index 88f64844a9..114bea065f 100644 --- a/src/addresses.h +++ b/src/addresses.h @@ -660,7 +660,7 @@ static int RCT2_CALLPROC_EBPSAFE(int address) */ int RCT2_CALLFUNC_X(int address, int *_eax, int *_ebx, int *_ecx, int *_edx, int *_esi, int *_edi, int *_ebp); -typedef struct { +typedef struct registers { union { int eax; short ax; diff --git a/src/cmdline_sprite.c b/src/cmdline_sprite.c index 2657601f13..620e2617f7 100644 --- a/src/cmdline_sprite.c +++ b/src/cmdline_sprite.c @@ -26,12 +26,14 @@ extern int gSpriteMode; -typedef struct { +typedef struct rct_sprite_file_header { uint32 num_entries; uint32 total_size; } rct_sprite_file_header; -typedef struct { uint8 b, g, r, a; } rct_sprite_file_palette_entry; +typedef struct rct_sprite_file_palette_entry { + uint8 b, g, r, a; +} rct_sprite_file_palette_entry; rct_sprite_file_palette_entry spriteFilePalette[256]; static rct_sprite_file_palette_entry _standardPalette[256]; @@ -229,7 +231,7 @@ int get_palette_index(sint16 *colour) return -1; } -typedef struct { +typedef struct rle_code { uint8 num_pixels; uint8 offset_x; } rle_code; diff --git a/src/config.c b/src/config.c index 7fd8d1d67d..9df1397b70 100644 --- a/src/config.c +++ b/src/config.c @@ -69,14 +69,14 @@ typedef union { utf8string value_string; } value_union; -typedef struct { +typedef struct config_enum_definition { const_utf8string key; value_union value; } config_enum_definition; #define END_OF_ENUM { NULL, 0 } -typedef struct { +typedef struct config_property_definition { size_t offset; const_utf8string property_name; uint8 type; @@ -84,7 +84,7 @@ typedef struct { config_enum_definition *enum_definitions; } config_property_definition; -typedef struct { +typedef struct config_section_definition { void *base_address; const_utf8string section_name; config_property_definition *property_definitions; diff --git a/src/config.h b/src/config.h index 8ec627e882..cad4428874 100644 --- a/src/config.h +++ b/src/config.h @@ -135,7 +135,7 @@ enum { SCENARIO_SELECT_MODE_ORIGIN, }; -typedef struct { +typedef struct general_configuration { uint8 play_intro; uint8 confirmation_prompt; uint8 screenshot_format; @@ -188,7 +188,7 @@ typedef struct { uint8 scenario_hide_mega_park; } general_configuration; -typedef struct { +typedef struct interface_configuration { uint8 toolbar_show_finances; uint8 toolbar_show_research; uint8 toolbar_show_cheats; @@ -200,7 +200,7 @@ typedef struct { uint32 object_selection_filter_flags; } interface_configuration; -typedef struct { +typedef struct sound_configuration { uint8 master_volume; uint8 title_music; uint8 sound_enabled; @@ -211,7 +211,7 @@ typedef struct { utf8string device; } sound_configuration; -typedef struct { +typedef struct twitch_configuration { utf8string channel; uint8 enable_follower_peep_names; uint8 enable_follower_peep_tracking; @@ -220,7 +220,7 @@ typedef struct { uint8 enable_news; } twitch_configuration; -typedef struct { +typedef struct network_configuration { utf8string player_name; uint32 default_port; utf8string default_password; @@ -235,7 +235,7 @@ typedef struct { utf8string provider_website; } network_configuration; -typedef struct { +typedef struct notification_configuration { bool park_award; bool park_marketing_campaign_finished; bool park_warnings; @@ -255,7 +255,7 @@ typedef struct { bool guest_died; } notification_configuration; -typedef struct { +typedef struct font_configuration { utf8string file_name; utf8string font_name; sint8 x_offset; @@ -263,7 +263,7 @@ typedef struct { } font_configuration; // Define structures for any other settings here -typedef struct { +typedef struct theme_features { uint8 rct1_ride_lights; uint8 rct1_park_lights; uint8 rct1_scenario_font; @@ -271,7 +271,7 @@ typedef struct { #define TITLE_SEQUENCE_MAX_SAVE_LENGTH 51 -typedef struct { +typedef struct title_command { uint8 command; union { uint8 saveIndex; // LOAD (this index is internal only) @@ -286,7 +286,7 @@ typedef struct { #define TITLE_SEQUENCE_NAME_SIZE 256 -typedef struct { +typedef struct title_sequence { char name[TITLE_SEQUENCE_NAME_SIZE]; char path[MAX_PATH]; // Needed for non-modifiable presets char (*saves)[TITLE_SEQUENCE_MAX_SAVE_LENGTH]; @@ -296,13 +296,13 @@ typedef struct { } title_sequence; -typedef struct { +typedef struct title_sequences_configuration { title_sequence *presets; uint16 num_presets; } title_sequences_configuration; -typedef struct { +typedef struct shortcut_entry { uint8 key; uint8 modifier; } shortcut_entry; diff --git a/src/core/stopwatch.h b/src/core/stopwatch.h index fe4968214f..56aa1a3c52 100644 --- a/src/core/stopwatch.h +++ b/src/core/stopwatch.h @@ -23,7 +23,7 @@ // C wrapper for Stopwatch // ///////////////////////////// -typedef struct { +typedef struct stopwatch { void *context; } stopwatch; diff --git a/src/core/textinputbuffer.h b/src/core/textinputbuffer.h index eff4f25276..787473609f 100644 --- a/src/core/textinputbuffer.h +++ b/src/core/textinputbuffer.h @@ -19,7 +19,7 @@ #include "../common.h" -typedef struct { +typedef struct textinputbuffer { utf8 * buffer; size_t max_size; // Maximum number of bytes (excluding null terminator) size_t current_size; // Number of bytes (excluding null terminator) diff --git a/src/drawing/drawing.h b/src/drawing/drawing.h index 1dc410ada5..beb7d94b16 100644 --- a/src/drawing/drawing.h +++ b/src/drawing/drawing.h @@ -21,7 +21,7 @@ #include "font.h" // Size: 0x10 -typedef struct { +typedef struct rct_drawpixelinfo { uint8* bits; // 0x00 short x; // 0x04 short y; // 0x06 @@ -32,7 +32,7 @@ typedef struct { } rct_drawpixelinfo; // Size: 0x10 -typedef struct { +typedef struct rct_g1_element { uint8* offset; // 0x00 sint16 width; // 0x04 sint16 height; // 0x06 @@ -42,37 +42,37 @@ typedef struct { uint16 zoomed_offset; // 0x0E } rct_g1_element; -enum{ +enum { G1_FLAG_BMP = (1 << 0), //No invisible sections G1_FLAG_RLE_COMPRESSION = (1<<2), }; -enum{ +enum { IMAGE_TYPE_NO_BACKGROUND = 0, IMAGE_TYPE_USE_PALETTE= (1 << 1), IMAGE_TYPE_MIX_BACKGROUND = (1<<2), IMAGE_TYPE_UNKNOWN = (1<<3) }; -typedef struct { +typedef struct rct_g1_header { uint32 num_entries; uint32 total_size; } rct_g1_header; -typedef struct { +typedef struct rct_gx { rct_g1_header header; rct_g1_element *elements; void *data; } rct_gx; -typedef struct { +typedef struct rct_palette_entry { uint8 blue; uint8 green; uint8 red; uint8 alpha; } rct_palette_entry; -typedef struct { +typedef struct rct_palette { rct_palette_entry entries[256]; } rct_palette; diff --git a/src/drawing/font.h b/src/drawing/font.h index 86f9af5a79..01321e6648 100644 --- a/src/drawing/font.h +++ b/src/drawing/font.h @@ -37,7 +37,7 @@ enum { FONT_SPRITE_BASE_BIG = 672 }; -typedef struct { +typedef struct TTFFontDescriptor { const utf8 *filename; const utf8 *font_name; int ptSize; @@ -47,7 +47,7 @@ typedef struct { TTF_Font *font; } TTFFontDescriptor; -typedef struct { +typedef struct TTFFontSetDescriptor { TTFFontDescriptor size[FONT_SIZE_COUNT]; } TTFFontSetDescriptor; diff --git a/src/drawing/scrolling_text.c b/src/drawing/scrolling_text.c index 3c12fdee86..7bee4f98af 100644 --- a/src/drawing/scrolling_text.c +++ b/src/drawing/scrolling_text.c @@ -21,7 +21,7 @@ #include "drawing.h" /* size: 0xA12 */ -typedef struct { +typedef struct rct_draw_scroll_text { rct_string_id string_id; // 0x00 uint32 string_args_0; // 0x02 uint32 string_args_1; // 0x06 diff --git a/src/drawing/string.c b/src/drawing/string.c index ef1a0f52ad..97807eb9d8 100644 --- a/src/drawing/string.c +++ b/src/drawing/string.c @@ -31,7 +31,7 @@ static bool _ttfInitialised = false; #define TTF_SURFACE_CACHE_SIZE 256 #define TTF_GETWIDTH_CACHE_SIZE 1024 -typedef struct { +typedef struct ttf_cache_entry { SDL_Surface *surface; TTF_Font *font; utf8 *text; @@ -43,7 +43,7 @@ static int _ttfSurfaceCacheCount = 0; static int _ttfSurfaceCacheHitCount = 0; static int _ttfSurfaceCacheMissCount = 0; -typedef struct { +typedef struct ttf_getwidth_cache_entry { uint32 width; TTF_Font *font; utf8 *text; @@ -910,7 +910,7 @@ enum { TEXT_DRAW_FLAG_NO_DRAW = 1 << 31 }; -typedef struct { +typedef struct text_draw_info { int startX; int startY; int x; diff --git a/src/image_io.c b/src/image_io.c index fb1b01a3fe..7647df167f 100644 --- a/src/image_io.c +++ b/src/image_io.c @@ -189,7 +189,7 @@ static void my_png_flush(png_structp png_ptr) } // Bitmap header structs, for cross platform purposes -typedef struct { +typedef struct BitmapFileHeader { uint16 bfType; uint32 bfSize; uint16 bfReserved1; @@ -197,7 +197,7 @@ typedef struct { uint32 bfOffBits; } BitmapFileHeader; -typedef struct { +typedef struct BitmapInfoHeader { uint32 biSize; sint32 biWidth; sint32 biHeight; diff --git a/src/input.c b/src/input.c index 4f658b4db3..2a12ad685a 100644 --- a/src/input.c +++ b/src/input.c @@ -47,7 +47,7 @@ enum { MOUSE_STATE_RIGHT_RELEASE }; -typedef struct { +typedef struct rct_mouse_data { uint32 x; uint32 y; uint32 state; diff --git a/src/input.h b/src/input.h index 2fd6ab15f3..808a77276f 100644 --- a/src/input.h +++ b/src/input.h @@ -62,7 +62,7 @@ enum { PLACE_OBJECT_MODIFIER_COPY_Z = (1 << 1), }; -typedef struct { +typedef struct widget_ref { rct_windowclass window_classification; rct_windownumber window_number; rct_widgetindex widget_index; diff --git a/src/interface/colour.h b/src/interface/colour.h index ef7cb0b775..c9144af39d 100644 --- a/src/interface/colour.h +++ b/src/interface/colour.h @@ -70,7 +70,7 @@ enum { #define NUM_COLOURS 32 -typedef struct { +typedef struct rct_colour_map_a { uint8 darkest; uint8 darker; uint8 dark; @@ -81,7 +81,7 @@ typedef struct { uint8 lightest; } rct_colour_map_a; -typedef struct { +typedef struct rct_colour_map_b { uint8 a; uint8 b; uint8 c; diff --git a/src/interface/console.c b/src/interface/console.c index e10856f63d..b2fa78e783 100644 --- a/src/interface/console.c +++ b/src/interface/console.c @@ -945,7 +945,7 @@ static int cc_open(const utf8 **argv, int argc) { typedef int (*console_command_func)(const utf8 **argv, int argc); -typedef struct { +typedef struct console_command { utf8 *command; console_command_func func; utf8 *help; diff --git a/src/interface/viewport.h b/src/interface/viewport.h index 69344a4b8d..d62b8caad4 100644 --- a/src/interface/viewport.h +++ b/src/interface/viewport.h @@ -72,7 +72,7 @@ enum { VIEWPORT_INTERACTION_MASK_BANNER = ~(1 << (VIEWPORT_INTERACTION_ITEM_BANNER - 2)), // Note the -2 for BANNER }; -typedef struct { +typedef struct viewport_interaction_info { int type; int x; int y; diff --git a/src/interface/window.h b/src/interface/window.h index a5e07822c5..093c9f23e0 100644 --- a/src/interface/window.h +++ b/src/interface/window.h @@ -42,12 +42,12 @@ typedef uint8 rct_windowclass; typedef uint16 rct_windownumber; typedef sint16 rct_widgetindex; -typedef struct { +typedef struct window_identifier { rct_windowclass classification; rct_windownumber number; } window_identifier; -typedef struct { +typedef struct widget_identifier { window_identifier window; int widget_index; } widget_identifier; @@ -58,7 +58,7 @@ extern widget_identifier gCurrentTextBox; * Widget structure * size: 0x10 */ -typedef struct { +typedef struct rct_widget { uint8 type; // 0x00 uint8 colour; // 0x01 sint16 left; // 0x02 @@ -73,7 +73,7 @@ typedef struct { * Viewport structure * size: 0x14 */ -typedef struct { +typedef struct rct_viewport { sint16 width; // 0x00 sint16 height; // 0x02 sint16 x; // 0x04 @@ -91,7 +91,7 @@ typedef struct { * Scroll structure * size: 0x12 */ -typedef struct { +typedef struct rct_scroll { uint16 flags; // 0x00 uint16 h_left; // 0x02 uint16 h_right; // 0x04 @@ -108,7 +108,7 @@ typedef struct { * size: 0xA * Use sprite.type to work out type. */ -typedef struct{ +typedef struct coordinate_focus { sint16 var_480; sint16 x; //0x482 sint16 y; //0x484 & VIEWPORT_FOCUS_Y_MASK @@ -118,7 +118,7 @@ typedef struct{ } coordinate_focus; // Type is viewport_target_sprite_id & 0x80000000 != 0 -typedef struct{ +typedef struct sprite_focus { sint16 var_480; uint16 sprite_id; //0x482 uint8 pad_484; @@ -135,7 +135,7 @@ enum{ }; #define VIEWPORT_FOCUS_Y_MASK 0x3FFF -typedef struct { +typedef struct rct_window_event_list { void (*close)(struct rct_window*); void (*mouse_up)(struct rct_window*, int); void (*resize)(struct rct_window*); @@ -166,14 +166,14 @@ typedef struct { void (*scroll_paint)(struct rct_window*, rct_drawpixelinfo*, int); } rct_window_event_list; -typedef struct{ +typedef struct campaign_variables { sint16 campaign_type; sint16 no_weeks; //0x482 uint16 ride_id; //0x484 uint32 pad_486; } campaign_variables; -typedef struct{ +typedef struct new_ride_variables { sint16 selected_ride_id; //0x480 sint16 highlighted_ride_id; //0x482 uint16 pad_484; @@ -181,7 +181,7 @@ typedef struct{ uint16 selected_ride_countdown; //488 } new_ride_variables; -typedef struct{ +typedef struct news_variables { sint16 var_480; sint16 var_482; uint16 var_484; @@ -189,7 +189,7 @@ typedef struct{ uint16 var_488; } news_variables; -typedef struct{ +typedef struct map_variables { sint16 rotation; sint16 var_482; uint16 var_484; @@ -197,24 +197,24 @@ typedef struct{ uint16 var_488; } map_variables; -typedef struct { +typedef struct ride_variables { sint16 view; sint32 var_482; sint32 var_486; } ride_variables; -typedef struct { +typedef struct scenery_variables { sint16 selected_scenery_id; sint16 hover_counter; } scenery_variables; -typedef struct { +typedef struct track_list_variables { uint16 var_480; uint16 var_484; bool reload_track_designs; } track_list_variables; -typedef struct { +typedef struct error_variables { uint16 var_480; } error_variables; diff --git a/src/localisation/convert.c b/src/localisation/convert.c index 2598a8b36f..9daca90bec 100644 --- a/src/localisation/convert.c +++ b/src/localisation/convert.c @@ -16,7 +16,7 @@ #include "localisation.h" -typedef struct { +typedef struct encoding_convert_entry { uint16 code; uint16 unicode; } encoding_convert_entry; diff --git a/src/localisation/currency.h b/src/localisation/currency.h index 8b01a63382..7c96eb8ab1 100644 --- a/src/localisation/currency.h +++ b/src/localisation/currency.h @@ -49,7 +49,7 @@ typedef enum { #define CURRENCY_SYMBOL_MAX_SIZE 8 // Currency format specification - inspired by OpenTTD -typedef struct { +typedef struct currency_descriptor { char isoCode[4]; // Rate is relative to 0.10 GBP int rate; diff --git a/src/localisation/language.h b/src/localisation/language.h index f766916531..4c4bf56037 100644 --- a/src/localisation/language.h +++ b/src/localisation/language.h @@ -45,7 +45,7 @@ enum { #define FONT_OPENRCT2_SPRITE NULL -typedef struct { +typedef struct language_descriptor { const char *locale; const utf8 *english_name; const utf8 *native_name; diff --git a/src/localisation/localisation.c b/src/localisation/localisation.c index 6acd2f10e1..83c56dc35e 100644 --- a/src/localisation/localisation.c +++ b/src/localisation/localisation.c @@ -32,7 +32,7 @@ #pragma region Format codes -typedef struct { +typedef struct format_code_token { uint32 code; const char *token; } format_code_token; diff --git a/src/management/award.h b/src/management/award.h index d6625ebcf7..0edb722fe0 100644 --- a/src/management/award.h +++ b/src/management/award.h @@ -19,7 +19,7 @@ #include "../common.h" -typedef struct { +typedef struct rct_award { uint16 time; uint16 type; } rct_award; diff --git a/src/management/news_item.h b/src/management/news_item.h index cf4e348231..e270595cdd 100644 --- a/src/management/news_item.h +++ b/src/management/news_item.h @@ -36,7 +36,7 @@ enum { * News item structure. * size: 0x10C */ -typedef struct { +typedef struct rct_news_item { uint8 type; // 0x00 uint8 flags; // 0x01 uint32 assoc; // 0x02 diff --git a/src/management/research.h b/src/management/research.h index f2d88a675b..cb3dae2f58 100644 --- a/src/management/research.h +++ b/src/management/research.h @@ -19,7 +19,7 @@ #include "../common.h" -typedef struct { +typedef struct rct_research_item { // Bit 16 (0: scenery entry, 1: ride entry) sint32 entryIndex; uint8 category; diff --git a/src/network/http.cpp b/src/network/http.cpp index 02645fc1ef..0ebcbea449 100644 --- a/src/network/http.cpp +++ b/src/network/http.cpp @@ -39,13 +39,13 @@ void http_dispose() { } #define MIME_TYPE_APPLICATION_JSON "application/json" #define DEFAULT_CA_BUNDLE_PATH "curl-ca-bundle.crt" -typedef struct { +typedef struct read_buffer { char *ptr; int length; int position; } read_buffer; -typedef struct { +typedef struct write_buffer { char *ptr; int length; int capacity; diff --git a/src/network/http.h b/src/network/http.h index 6a5b25ce59..c6c8a87284 100644 --- a/src/network/http.h +++ b/src/network/http.h @@ -21,13 +21,13 @@ #include #include "../common.h" -typedef struct { +typedef struct http_json_request { const char *method; const char *url; const json_t *body; } http_json_request; -typedef struct { +typedef struct http_json_response { int status_code; json_t *root; } http_json_response; diff --git a/src/object.c b/src/object.c index 8671e84740..6ac3db84e8 100644 --- a/src/object.c +++ b/src/object.c @@ -489,7 +489,7 @@ typedef rct_string_id (*object_desc_func)(void *objectEntry); /** * Represents addresses for virtual object functions. */ -typedef struct { +typedef struct object_type_vtable { object_load_func load; object_unload_func unload; object_test_func test; diff --git a/src/object.h b/src/object.h index d01c7df67f..f19c70f7df 100644 --- a/src/object.h +++ b/src/object.h @@ -54,7 +54,7 @@ typedef enum{ * Object entry structure. * size: 0x10 */ -typedef struct { +typedef struct rct_object_entry { uint32 flags; char name[8]; uint32 checksum; @@ -64,7 +64,7 @@ typedef struct { * Object entry structure extended. * size: 0x14 */ -typedef struct { +typedef struct rct_object_entry_extended { uint32 flags; char name[8]; uint32 checksum; @@ -74,17 +74,17 @@ typedef struct { extern int object_entry_group_counts[]; extern int object_entry_group_encoding[]; -typedef struct { +typedef struct rct_object_entry_group { uint8 **chunks; rct_object_entry_extended *entries; } rct_object_entry_group; -typedef struct { +typedef struct rct_ride_filters { uint8 category[2]; uint8 ride_type; } rct_ride_filters; -typedef struct { +typedef struct rct_object_filters { union { rct_ride_filters ride; }; diff --git a/src/object_list.c b/src/object_list.c index 3281dbc6f8..4ef1ac52a2 100644 --- a/src/object_list.c +++ b/src/object_list.c @@ -31,7 +31,7 @@ #define FILTER_VERSION 1 -typedef struct { +typedef struct rct_plugin_header { uint32 total_files; uint32 total_file_size; uint32 date_modified_checksum; diff --git a/src/paint/map_element/surface.c b/src/paint/map_element/surface.c index 61a34f93f6..25d940ec0d 100644 --- a/src/paint/map_element/surface.c +++ b/src/paint/map_element/surface.c @@ -363,8 +363,7 @@ enum edge }; -typedef struct -{ +typedef struct viewport_surface_paint_struct_0 { uint32 var_00; uint32 var_04; uint32 var_08; diff --git a/src/paint/supports.c b/src/paint/supports.c index 3459fd771b..89967f8481 100644 --- a/src/paint/supports.c +++ b/src/paint/supports.c @@ -19,7 +19,7 @@ #include "../paint/paint.h" #include "supports.h" -typedef struct { +typedef struct supports_id_desc { uint16 full; uint16 half; uint16 flat; @@ -58,7 +58,7 @@ const uint16 WoodenCurveSupportImageIds[] = { 0, }; -typedef struct { +typedef struct unk_supports_desc_bound_box { struct { uint8 x, y, z; } offset; @@ -67,7 +67,7 @@ typedef struct { } length; } unk_supports_desc_bound_box; -typedef struct { +typedef struct unk_supports_desc { unk_supports_desc_bound_box bounding_box; uint8 var_6; uint8 var_7; diff --git a/src/peep/peep.c b/src/peep/peep.c index 2ad20bb6bb..7c395f552a 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -1111,7 +1111,7 @@ void set_sprite_type(rct_peep* peep, uint8 type){ } } -typedef struct{ +typedef struct item_pref { uint8 type; // 0 for standard, 1 for extra uint32 item; // And this with the relevant flags uint8 sprite_type; diff --git a/src/peep/peep.h b/src/peep/peep.h index eef49192dc..2342fb03b7 100644 --- a/src/peep/peep.h +++ b/src/peep/peep.h @@ -370,14 +370,14 @@ enum PEEP_RIDE_DECISION { PEEP_RIDE_DECISION_THINKING = 1 << 2 }; -typedef struct { +typedef struct rct_peep_thought { uint8 type; //0 uint8 item; //1 uint8 var_2; //2 uint8 var_3; //3 } rct_peep_thought; -typedef struct { +typedef struct rct_peep { uint8 sprite_identifier; // 0x00 uint8 var_01; uint16 next_in_quadrant; // 0x02 diff --git a/src/platform/platform.h b/src/platform/platform.h index 9f13b0429d..ad73ee361d 100644 --- a/src/platform/platform.h +++ b/src/platform/platform.h @@ -42,30 +42,30 @@ #define TOUCH_DOUBLE_TIMEOUT 300 -typedef struct { +typedef struct resolution { int width, height; } resolution; -typedef struct { +typedef struct file_info { const char *path; uint64 size; uint64 last_modified; } file_info; -typedef struct { +typedef struct rct2_date { sint16 day; sint16 month; sint16 year; sint16 day_of_week; } rct2_date; -typedef struct { +typedef struct rct2_time { sint16 hour; sint16 minute; sint16 second; } rct2_time; -typedef struct { +typedef struct openrct2_cursor { int x, y; unsigned char left, middle, right, any; int wheel; @@ -84,7 +84,7 @@ enum { typedef enum {FD_OPEN, FD_SAVE} filedialog_type; -typedef struct { +typedef struct file_dialog_desc { uint8 type; const utf8 *title; const utf8 *initial_directory; diff --git a/src/platform/posix.c b/src/platform/posix.c index 310c873185..8b1e15f87c 100644 --- a/src/platform/posix.c +++ b/src/platform/posix.c @@ -251,7 +251,7 @@ bool platform_lock_single_instance() return true; } -typedef struct { +typedef struct enumerate_file_info { char active; char pattern[MAX_PATH]; struct dirent **fileListTemp; diff --git a/src/rct1.h b/src/rct1.h index 2855e22783..eb17a534c3 100644 --- a/src/rct1.h +++ b/src/rct1.h @@ -26,7 +26,7 @@ #include "world/map.h" #include "world/sprite.h" -typedef struct { +typedef struct rct1_entrance { uint16 x; uint16 y; uint16 z; @@ -37,7 +37,7 @@ typedef struct { * RCT1 ride structure * size: 0x260 */ -typedef struct { +typedef struct rct1_ride { uint8 type; uint8 vehicle_type; uint16 lifecycle_flags; @@ -161,7 +161,7 @@ typedef struct { uint8 unk_17A[230]; } rct1_ride; -typedef struct { +typedef struct rct1_research_item { uint8 item; uint8 related_ride; uint8 category; @@ -173,7 +173,7 @@ typedef struct { * RCT1,AA,LL scenario / saved game structure. * size: 0x1F850C */ -typedef struct { +typedef struct rct1_s4 { uint16 month; uint16 day; uint32 ticks; @@ -522,11 +522,11 @@ enum { RCT1_VEHICLE_TYPE_ENTERPRISE_WHEEL }; -enum{ +enum { RCT1_TRACK_ELEM_BOOSTER = 100 }; -enum{ +enum { RCT1_RIDE_MODE_REVERSE_INCLINE_LAUNCHED_SHUTTLE = 2, RCT1_RIDE_MODE_POWERED_LAUNCH = 3, }; @@ -645,7 +645,7 @@ enum { RCT1_RESEARCH_SPECIAL_REVERSING_SECTIONS = 0x23, }; -typedef struct{ +typedef struct rct_track_td4 { uint8 type; // 0x00 uint8 vehicle_type; // 0x01 uint32 special_track_flags; // 0x02 @@ -688,7 +688,7 @@ typedef struct{ }; uint8 pad_41[0x83]; uint16 start_track_data_AA_CF; // 0xC4 -}rct_track_td4; // Information based off RCTTechDepot +} rct_track_td4; // Information based off RCTTechDepot enum { RCT1_SCENARIO_FLAG_0 = 1 << 0, diff --git a/src/rct2.h b/src/rct2.h index 487655a59d..6b47f4f2ae 100644 --- a/src/rct2.h +++ b/src/rct2.h @@ -181,7 +181,7 @@ typedef fixed32_1dp money32; typedef void (EMPTY_ARGS_VOID_POINTER)(); typedef unsigned short rct_string_id; -typedef struct { +typedef struct rct2_install_info { uint32 installLevel; char title[260]; char path[260]; diff --git a/src/ride/gentle/crooked_house.c b/src/ride/gentle/crooked_house.c index 10d3fca37e..8b9c7b97b3 100644 --- a/src/ride/gentle/crooked_house.c +++ b/src/ride/gentle/crooked_house.c @@ -122,7 +122,7 @@ static void crooked_house_fence_bottom_left(rct_ride *ride, int height, rct_map_ sub_98199C(image_id, 0, 0, 1, 32, 7, height, 30, 0, height + 2, get_current_rotation()); } -typedef struct { +typedef struct rct_crooked_house_bound_box { sint16 offset_x; sint16 offset_y; sint16 length_x; diff --git a/src/ride/ride.h b/src/ride/ride.h index 8b96ab7eba..cd0b07a7fb 100644 --- a/src/ride/ride.h +++ b/src/ride/ride.h @@ -31,7 +31,7 @@ typedef fixed16_2dp ride_rating; // Used for return values, for functions that modify all three. -typedef struct { +typedef struct rating_tuple { ride_rating excitement; ride_rating intensity; ride_rating nausea; @@ -40,7 +40,7 @@ typedef struct { /** * Couples a ride type and subtype together. */ -typedef struct { +typedef struct ride_list_item { union { struct { uint8 type; @@ -50,24 +50,24 @@ typedef struct { }; } ride_list_item; -typedef struct { +typedef struct track_colour { uint8 main; uint8 additional; uint8 supports; } track_colour; -typedef struct { +typedef struct vehicle_colour { uint8 main; uint8 additional_1; uint8 additional_2; } vehicle_colour; -typedef struct { +typedef struct track_colour_preset_list { uint8 count; track_colour list[256]; } track_colour_preset_list; -typedef struct { +typedef struct vehicle_colour_preset_list { uint8 count; vehicle_colour list[256]; } vehicle_colour_preset_list; @@ -76,7 +76,7 @@ typedef struct { * Ride type structure. * size: unknown */ -typedef struct { +typedef struct rct_ride_entry { rct_string_id name; // 0x000 rct_string_id description; // 0x002 uint32 images_offset; // 0x004 @@ -120,7 +120,7 @@ typedef struct { * Ride structure. * size: 0x0260 */ -typedef struct { +typedef struct rct_ride { uint8 type; // 0x000 // pointer to static info. for example, wild mouse type is 0x36, subtype is // 0x4c. @@ -328,7 +328,7 @@ typedef struct { * Ride measurement structure. * size: 0x04B0C */ -typedef struct { +typedef struct rct_ride_measurement { uint8 ride_index; // 0x0000 uint8 flags; // 0x0001 uint32 last_use_tick; // 0x0002 @@ -342,7 +342,7 @@ typedef struct { uint8 altitude[RIDE_MEASUREMENT_MAX_ITEMS]; // 0x384C } rct_ride_measurement; -typedef struct { +typedef struct track_begin_end { int begin_x; int begin_y; int begin_z; diff --git a/src/ride/ride_data.h b/src/ride/ride_data.h index a0a527d98f..0ab94c6fde 100644 --- a/src/ride/ride_data.h +++ b/src/ride/ride_data.h @@ -20,14 +20,14 @@ #include "../common.h" #include "ride.h" -typedef struct { +typedef struct rct_ride_name_convention { rct_string_id vehicle_name; rct_string_id structure_name; rct_string_id station_name; rct_string_id unk_name; } rct_ride_name_convention; -typedef struct { +typedef struct rct_ride_entrance_definition { uint32 sprite_index; uint16 height; uint16 scrolling_mode; @@ -36,14 +36,14 @@ typedef struct { uint16 colour_use_flags; } rct_ride_entrance_definition; -typedef struct { +typedef struct rct_shop_item_string_types { rct_string_id singular; // Balloon rct_string_id plural; // Balloons rct_string_id indefinite; // a Balloon rct_string_id display; // "Diamond Heights" Balloon } rct_shop_item_string_types; -typedef struct { +typedef struct rct_ride_data_4 { uint8 price; uint8 price_secondary; uint16 flags; @@ -52,12 +52,12 @@ typedef struct { uint8 pad[2]; } rct_ride_data_4; -typedef struct { +typedef struct ride_cost { uint16 track_price; uint16 support_price; } ride_cost; -typedef struct { +typedef struct rct_ride_data_5 { uint8 max_height; uint8 clearance_height; sint8 z_offset; @@ -68,7 +68,7 @@ typedef struct { uint8 pad; } rct_ride_data_5; -typedef struct { +typedef struct rct_ride_lift_data { uint8 sound_id; uint8 minimum_speed; uint8 maximum_speed; diff --git a/src/ride/track.h b/src/ride/track.h index 2f48fe9811..6aa1fa638e 100644 --- a/src/ride/track.h +++ b/src/ride/track.h @@ -21,7 +21,7 @@ #include "../object.h" #include "ride.h" -typedef struct { +typedef struct rct_trackdefinition { uint8 type; uint8 vangle_end; uint8 vangle_start; @@ -34,7 +34,7 @@ typedef struct { /** * Size: 0x0A */ -typedef struct { +typedef struct rct_preview_track { uint8 index; // 0x00 sint16 x; // 0x01 sint16 y; // 0x03 @@ -45,7 +45,7 @@ typedef struct { } rct_preview_track; /* size 0x0A */ -typedef struct { +typedef struct rct_track_coordinates { sint8 rotation_begin; // 0x00 sint8 rotation_end; // 0x01 sint16 z_begin; // 0x02 @@ -54,7 +54,7 @@ typedef struct { sint16 y; // 0x08 } rct_track_coordinates; -enum{ +enum { TRACK_ELEMENT_FLAG_TERMINAL_STATION = 1 << 3, TRACK_ELEMENT_FLAG_INVERTED = 1 << 6, TRACK_ELEMENT_FLAG_CHAIN_LIFT = 1 << 7, @@ -448,7 +448,7 @@ enum { TRACK_ELEMENT_LOCATION_IS_UNDERGROUND = 2, }; -typedef struct { +typedef struct track_circuit_iterator { rct_xy_element last; rct_xy_element current; int currentZ; diff --git a/src/ride/track_data.h b/src/ride/track_data.h index 2488bf8149..c55eca47b4 100644 --- a/src/ride/track_data.h +++ b/src/ride/track_data.h @@ -29,7 +29,7 @@ extern const rct_preview_track *FlatRideTrackBlocks[255]; extern const uint8 TrackPieceLengths[256]; -typedef struct { +typedef struct track_curve_chain { uint16 next; uint16 previous; } track_curve_chain; @@ -40,7 +40,7 @@ extern const track_curve_chain gFlatRideTrackCurveChain[256]; extern const TRACK_PAINT_FUNCTION_GETTER RideTypeTrackPaintFunctions[91]; extern const uint32 RideTypeTrackPaintFunctionsOld[91]; -typedef struct { +typedef struct track_descriptor { bool starts_diagonal; uint8 slope_start; uint8 bank_start; diff --git a/src/ride/track_design.c b/src/ride/track_design.c index ff762b32eb..b817544b45 100644 --- a/src/ride/track_design.c +++ b/src/ride/track_design.c @@ -34,7 +34,7 @@ #include "track_design.h" #include "track.h" -typedef struct { +typedef struct map_backup { rct_map_element map_elements[MAX_MAP_ELEMENTS]; rct_map_element *tile_pointers[256 * 256]; rct_map_element *next_free_map_element; diff --git a/src/ride/track_design.h b/src/ride/track_design.h index 9c6952c844..e35b751266 100644 --- a/src/ride/track_design.h +++ b/src/ride/track_design.h @@ -25,7 +25,7 @@ #define TRACK_PREVIEW_IMAGE_SIZE (370 * 217) /* Maze Element entry size: 0x04 */ -typedef struct { +typedef struct rct_td6_maze_element { union { uint32 all; struct { @@ -43,13 +43,13 @@ typedef struct { } rct_td6_maze_element; /* Track Element entry size: 0x02 */ -typedef struct { +typedef struct rct_td6_track_element { uint8 type; // 0x00 uint8 flags; // 0x01 } rct_td6_track_element; /* Track Entrance entry size: 0x06 */ -typedef struct { +typedef struct rct_td6_entrance_element { sint8 z; // 0x00 uint8 direction; // 0x01 sint16 x; // 0x02 @@ -57,7 +57,7 @@ typedef struct { } rct_td6_entrance_element; /* Track Scenery entry size: 0x16 */ -typedef struct { +typedef struct rct_td6_scenery_element { rct_object_entry scenery_object; // 0x00 sint8 x; // 0x10 sint8 y; // 0x11 @@ -71,7 +71,7 @@ typedef struct { * Track design structure. * size: 0x4E72B */ -typedef struct { +typedef struct rct_track_td6 { uint8 type; // 0x00 uint8 vehicle_type; union{ @@ -142,12 +142,12 @@ typedef struct { utf8 *name; } rct_track_td6; -typedef struct{ +typedef struct rct_track_design { rct_track_td6 track_td6; uint8 preview[4][TRACK_PREVIEW_IMAGE_SIZE]; // 0xA3 } rct_track_design; -typedef struct { +typedef struct track_design_file_ref { utf8 *name; utf8 *path; } track_design_file_ref; diff --git a/src/ride/track_design_index.c b/src/ride/track_design_index.c index 96ee96fb9a..ea0f98e708 100644 --- a/src/ride/track_design_index.c +++ b/src/ride/track_design_index.c @@ -23,7 +23,7 @@ #include "track.h" #include "track_design.h" -typedef struct { +typedef struct td_index_item { uint8 ride_type; char ride_entry[9]; utf8 path[MAX_PATH]; diff --git a/src/ride/track_design_save.c b/src/ride/track_design_save.c index 562fe1fd3b..280d94255b 100644 --- a/src/ride/track_design_save.c +++ b/src/ride/track_design_save.c @@ -1243,7 +1243,7 @@ static size_t track_design_get_scenery_elements_count(rct_track_td6 *td6) return count; } -typedef struct { +typedef struct auto_buffer { void *ptr; size_t length; size_t capacity; diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index 3d5136be92..ce13aa34d6 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -1836,7 +1836,7 @@ static void vehicle_update_waiting_to_depart(rct_vehicle* vehicle) { } } -typedef struct { +typedef struct rct_synchrnoised_vehicle { uint8 ride_id; uint8 station_id; uint16 vehicle_id; diff --git a/src/ride/vehicle.h b/src/ride/vehicle.h index 3ff22315aa..e2676d05de 100644 --- a/src/ride/vehicle.h +++ b/src/ride/vehicle.h @@ -20,7 +20,7 @@ #include "../common.h" /* size: 0x2 */ -typedef struct{ +typedef struct rct_vehicle_colour { uint8 body_colour; uint8 trim_colour; } rct_vehicle_colour; @@ -29,7 +29,7 @@ typedef struct{ * Ride type vehicle structure. * size: 0x65 */ -typedef struct { +typedef struct rct_ride_entry_vehicle { uint16 rotation_frame_mask; // 0x00 , 0x1A uint8 var_02; // 0x02 , 0x1C uint8 var_03; // 0x03 , 0x1D @@ -76,7 +76,7 @@ typedef struct { sint8* peep_loading_positions; // 0x61 , 0x7B } rct_ride_entry_vehicle; -typedef struct { +typedef struct rct_vehicle { uint8 sprite_identifier; // 0x00 uint8 is_child; // 0x01 uint16 next_in_quadrant; // 0x02 @@ -194,13 +194,13 @@ typedef struct { uint8 target_seat_rotation; // 0xD9 } rct_vehicle; -typedef struct { +typedef struct train_ref { rct_vehicle *head; rct_vehicle *tail; } train_ref; // Size: 0x09 -typedef struct { +typedef struct rct_vehicle_info { uint16 x; // 0x00 uint16 y; // 0x02 uint16 z; // 0x04 diff --git a/src/ride/vehicle_paint.h b/src/ride/vehicle_paint.h index 01ce7088ea..2e46a93223 100644 --- a/src/ride/vehicle_paint.h +++ b/src/ride/vehicle_paint.h @@ -19,7 +19,7 @@ #include "vehicle.h" -typedef struct { +typedef struct vehicle_boundbox { sint8 offset_x; sint8 offset_y; sint8 offset_z; diff --git a/src/scenario.h b/src/scenario.h index c07e33fd13..53bd3ca7a0 100644 --- a/src/scenario.h +++ b/src/scenario.h @@ -34,7 +34,7 @@ * SV6/SC6 header chunk * size: 0x20 */ -typedef struct { +typedef struct rct_s6_header { uint16 type; // 0x00 uint16 num_packed_objects; // 0x02 uint32 version; // 0x04 @@ -46,7 +46,7 @@ typedef struct { * SC6 information chunk * size: 0x198 */ -typedef struct { +typedef struct rct_s6_info { uint8 editor_step; uint8 category; // 0x01 uint8 objective_type; // 0x02 @@ -63,14 +63,14 @@ typedef struct { * Scenario scores file header. * size: 0x10 */ -typedef struct { +typedef struct rct_scenario_scores_header { uint32 var_0; uint32 var_4; uint32 var_8; uint32 scenario_count; // 0x0C } rct_scenario_scores_header; -typedef enum { +typedef enum scenario_source { SCENARIO_SOURCE_RCT1, SCENARIO_SOURCE_RCT1_AA, SCENARIO_SOURCE_RCT1_LL, @@ -85,7 +85,7 @@ typedef enum { * Scenario basic structure, mainly for scenario select * size: 0x02B0 */ -typedef struct { +typedef struct rct_scenario_basic { char path[256]; // 0x0000 uint8 category; // 0x0100 uint8 pad_0101[0x1F]; @@ -102,7 +102,7 @@ typedef struct { // sint16 source_index; // new in OpenRCT2 } rct_scenario_basic; -typedef struct { +typedef struct rct_stex_entry { rct_string_id scenario_name; // 0x00 rct_string_id park_name; // 0x02 rct_string_id details; // 0x04 @@ -112,7 +112,7 @@ typedef struct { #define g_stexEntries ((rct_stex_entry**)object_entry_groups[OBJECT_TYPE_SCENARIO_TEXT].chunks) // This will be useful for backwards compatibility -typedef struct { +typedef struct rct_s6_data { // SC6[0] rct_s6_header header; @@ -381,14 +381,14 @@ enum { OBJECTIVE_MONTHLY_FOOD_INCOME }; -typedef struct { +typedef struct scenario_highscore_entry { utf8 *fileName; utf8 *name; money32 company_value; datetime64 timestamp; } scenario_highscore_entry; -typedef struct { +typedef struct scenario_index_entry { utf8 path[MAX_PATH]; uint64 timestamp; @@ -409,7 +409,7 @@ typedef struct { utf8 details[256]; } scenario_index_entry; -typedef struct { +typedef struct source_desc { const utf8 *title; uint8 id; uint8 source; diff --git a/src/scenario_sources.c b/src/scenario_sources.c index 808e381cdc..77113d38f1 100644 --- a/src/scenario_sources.c +++ b/src/scenario_sources.c @@ -17,7 +17,7 @@ #include "scenario.h" #include "util/util.h" -typedef struct { +typedef struct scenario_alias { const utf8 *original; const utf8 *alternative; } scenario_alias; @@ -37,7 +37,7 @@ const scenario_alias ScenarioAliases[] = { { "Geoffrey Gardens", "Geoffery Gardens" }, }; -typedef struct { +typedef struct scenario_title_desc { const uint8 id; const utf8 *title; const uint8 category; diff --git a/src/util/sawyercoding.h b/src/util/sawyercoding.h index 91abd8296b..1c25c0cc49 100644 --- a/src/util/sawyercoding.h +++ b/src/util/sawyercoding.h @@ -20,7 +20,7 @@ #include #include "../common.h" -typedef struct { +typedef struct sawyercoding_chunk_header { uint8 encoding; uint32 length; } sawyercoding_chunk_header; diff --git a/src/windows/editor_object_selection.c b/src/windows/editor_object_selection.c index 5940341249..f507ad7d1e 100644 --- a/src/windows/editor_object_selection.c +++ b/src/windows/editor_object_selection.c @@ -274,7 +274,7 @@ enum { RIDE_SORT_RIDE }; -typedef struct { +typedef struct list_item { rct_object_entry *entry; rct_object_filters *filter; uint8 *flags; diff --git a/src/windows/loadsave.c b/src/windows/loadsave.c index 934cd9f277..319d4b437c 100644 --- a/src/windows/loadsave.c +++ b/src/windows/loadsave.c @@ -114,7 +114,7 @@ enum { TYPE_FILE, }; -typedef struct { +typedef struct loadsave_list_item { char name[256]; char path[MAX_PATH]; time_t date_modified; diff --git a/src/windows/news_options.c b/src/windows/news_options.c index 5fa21468cc..6ed9c9d2a5 100644 --- a/src/windows/news_options.c +++ b/src/windows/news_options.c @@ -26,7 +26,7 @@ enum { NOTIFICATION_CATEGORY_GUEST }; -typedef struct { +typedef struct notification_def { uint8 category; rct_string_id caption; size_t config_offset; diff --git a/src/windows/ride.c b/src/windows/ride.c index b3c1c30ffe..bbad39dee0 100644 --- a/src/windows/ride.c +++ b/src/windows/ride.c @@ -2636,7 +2636,7 @@ static void window_ride_vehicle_paint(rct_window *w, rct_drawpixelinfo *dpi) } } -typedef struct { +typedef struct rct_vehichle_paintinfo { short x; short y; int sprite_index; diff --git a/src/windows/scenery.c b/src/windows/scenery.c index 2435b13999..1c5cf3c3cb 100644 --- a/src/windows/scenery.c +++ b/src/windows/scenery.c @@ -517,7 +517,7 @@ static int count_rows(int items){ return rows; } -typedef struct { +typedef struct scenery_item { int allRows; int selected_item; sint16 sceneryId; diff --git a/src/windows/server_list.c b/src/windows/server_list.c index 6d912c06b7..239c7dbdcd 100644 --- a/src/windows/server_list.c +++ b/src/windows/server_list.c @@ -34,7 +34,7 @@ #define WHEIGHT_MAX 800 #define ITEM_HEIGHT (3 + 9 + 3) -typedef struct { +typedef struct server_entry { char *address; utf8 *name; bool requiresPassword; diff --git a/src/windows/title_command_editor.c b/src/windows/title_command_editor.c index 6ad43e1229..4a5aa5e451 100644 --- a/src/windows/title_command_editor.c +++ b/src/windows/title_command_editor.c @@ -28,7 +28,7 @@ #include "../title.h" #include "dropdown.h" -typedef struct { +typedef struct TITLE_COMMAND_ORDER { uint8 command; rct_string_id nameStringId; rct_string_id descStringId; diff --git a/src/windows/title_scenarioselect.c b/src/windows/title_scenarioselect.c index ed94b70848..d7ffcfd977 100644 --- a/src/windows/title_scenarioselect.c +++ b/src/windows/title_scenarioselect.c @@ -35,7 +35,7 @@ enum { LIST_ITEM_TYPE_END, }; -typedef struct { +typedef struct sc_list_item { uint8 type; union { struct { diff --git a/src/world/banner.h b/src/world/banner.h index 117b9c591d..52e5257ab3 100644 --- a/src/world/banner.h +++ b/src/world/banner.h @@ -23,7 +23,7 @@ #define BANNER_NULL 255 #define MAX_BANNERS 250 -typedef struct { +typedef struct rct_banner { uint8 type; uint8 flags; //0x01 bit 0 is no entry rct_string_id string_idx; //0x02 diff --git a/src/world/climate.c b/src/world/climate.c index 0ba2793a81..27168633b7 100644 --- a/src/world/climate.c +++ b/src/world/climate.c @@ -33,7 +33,7 @@ enum { MAX_THUNDER_INSTANCES = 2 }; -typedef struct { +typedef struct rct_weather_transition { sint8 base_temperature; sint8 distribution_size; sint8 distribution[24]; diff --git a/src/world/climate.h b/src/world/climate.h index 3eacab08c1..d8be5341ca 100644 --- a/src/world/climate.h +++ b/src/world/climate.h @@ -35,7 +35,7 @@ enum{ WEATHER_THUNDER }; -typedef struct { +typedef struct rct_weather { sint8 temp_delta; sint8 effect_level; sint8 gloom_level; diff --git a/src/world/entrance.h b/src/world/entrance.h index 09db6e07a6..26ac7441a3 100644 --- a/src/world/entrance.h +++ b/src/world/entrance.h @@ -19,7 +19,7 @@ #include "../common.h" -typedef struct { +typedef struct rct_entrance_type { rct_string_id string_idx; // 0x00 uint32 image_id; // 0x02 uint8 scrolling_mode; // 0x06 diff --git a/src/world/footpath.c b/src/world/footpath.c index 891a09a099..e987db5982 100644 --- a/src/world/footpath.c +++ b/src/world/footpath.c @@ -946,14 +946,14 @@ static void footpath_connect_corners(int initialX, int initialY, rct_map_element } } -typedef struct { +typedef struct rct_neighbour { uint8 order; uint8 direction; uint8 ride_index; uint8 entrance_index; } rct_neighbour; -typedef struct { +typedef struct rct_neighbour_list { rct_neighbour items[8]; int count; } rct_neighbour_list; diff --git a/src/world/footpath.h b/src/world/footpath.h index 55f839626d..40274050fb 100644 --- a/src/world/footpath.h +++ b/src/world/footpath.h @@ -27,7 +27,7 @@ enum { PROVISIONAL_PATH_FLAG_2 = (1 << 2), }; -typedef struct { +typedef struct rct_path_type { rct_string_id string_idx; // 0x00 uint32 image; // 0x02 uint32 bridge_image; // 0x06 diff --git a/src/world/map.h b/src/world/map.h index a0a373d6f1..c30ed59fe0 100644 --- a/src/world/map.h +++ b/src/world/map.h @@ -19,14 +19,14 @@ #include "../common.h" -typedef struct { +typedef struct rct_map_element_surface_properties { uint8 slope; //4 0xE0 Edge Style, 0x1F Slope uint8 terrain; //5 0xE0 Terrain Style, 0x1F Water height uint8 grass_length; //6 uint8 ownership; //7 } rct_map_element_surface_properties; -typedef struct { +typedef struct rct_map_element_path_properties { uint8 type; //4 0xF0 Path type, 0x08 Unknown/Unused, 0x04 Set when path is diagonal, 0x03 Rotation uint8 additions; //5 uint8 edges; //6 @@ -36,7 +36,7 @@ typedef struct { }; } rct_map_element_path_properties; -typedef struct { +typedef struct rct_map_element_track_properties { uint8 type; //4 union{ struct{ @@ -48,31 +48,31 @@ typedef struct { uint8 ride_index; //7 } rct_map_element_track_properties; -typedef struct { +typedef struct rct_map_element_scenery_properties { uint8 type; //4 uint8 age; //5 uint8 colour_1; //6 uint8 colour_2; //7 } rct_map_element_scenery_properties; -typedef struct { +typedef struct rct_map_element_entrance_properties { uint8 type; //4 uint8 index; //5 uint8 path_type; //6 uint8 ride_index; //7 } rct_map_element_entrance_properties; -typedef struct { +typedef struct rct_map_element_fence_properties { uint8 type; //4 uint8 item[3]; //5 } rct_map_element_fence_properties; -typedef struct { +typedef struct rct_map_element_scenerymultiple_properties { uint16 type; //4 uint8 colour[2]; //6 } rct_map_element_scenerymultiple_properties; -typedef struct { +typedef struct rct_map_element_banner_properties { uint8 index; //4 uint8 position; //5 uint8 flags; //6 @@ -94,7 +94,7 @@ typedef union { * Map element structure * size: 0x08 */ -typedef struct { +typedef struct rct_map_element { uint8 type; //0 uint8 flags; //1 uint8 base_height; //2 @@ -228,7 +228,7 @@ enum { #define TILE_UNDEFINED_MAP_ELEMENT (rct_map_element*)-1 -typedef struct { +typedef struct rct_xy8 { union { struct { uint8 x, y; @@ -237,28 +237,28 @@ typedef struct { }; } rct_xy8; -typedef struct { +typedef struct rct_xyz8 { uint8 x, y, z; } rct_xyz8; -typedef struct{ +typedef struct rct_xyzd8 { uint8 x, y, z, direction; } rct_xyzd8; -typedef struct rct_xy16{ +typedef struct rct_xy16 { sint16 x, y; } rct_xy16; -typedef struct { +typedef struct rct_xyz16 { sint16 x, y, z; } rct_xyz16; -typedef struct { +typedef struct rct_xy_element { int x, y; rct_map_element *element; } rct_xy_element; -typedef struct { +typedef struct rct2_peep_spawn { uint16 x; uint16 y; uint8 z; @@ -382,7 +382,7 @@ void game_command_set_sign_style(int* eax, int* ebx, int* ecx, int* edx, int* es #define GET_MAP_ELEMENT(x) (&(RCT2_ADDRESS(RCT2_ADDRESS_MAP_ELEMENTS, rct_map_element)[x])) #define TILE_MAP_ELEMENT_POINTER(x) (RCT2_ADDRESS(RCT2_ADDRESS_TILE_MAP_ELEMENT_POINTERS, rct_map_element*)[x]) -typedef struct { +typedef struct map_element_iterator { int x; int y; rct_map_element *element; diff --git a/src/world/map_animation.h b/src/world/map_animation.h index e52241be83..de4ae8fbbd 100644 --- a/src/world/map_animation.h +++ b/src/world/map_animation.h @@ -23,7 +23,7 @@ * Animated object * size: 0x06 */ -typedef struct { +typedef struct rct_map_animation { uint8 baseZ; uint8 type; uint16 x; diff --git a/src/world/mapgen.h b/src/world/mapgen.h index e6397a30dd..89a7726715 100644 --- a/src/world/mapgen.h +++ b/src/world/mapgen.h @@ -17,7 +17,7 @@ #ifndef _MAPGEN_H_ #define _MAPGEN_H_ -typedef struct { +typedef struct mapgen_settings { // Base int mapSize; int height; diff --git a/src/world/scenery.h b/src/world/scenery.h index ad70ce05aa..94b6163694 100644 --- a/src/world/scenery.h +++ b/src/world/scenery.h @@ -21,7 +21,7 @@ #include "../object.h" #include "../world/map.h" -typedef struct { +typedef struct rct_small_scenery_entry { uint32 flags; // 0x06 uint8 height; // 0x0A uint8 tool_id; // 0x0B @@ -61,7 +61,7 @@ typedef enum { SMALL_SCENERY_FLAG25 = (1 << 25), // 0x2000000 } SMALL_SCENERY_FLAGS; -typedef struct { +typedef struct rct_large_scenery_tile { sint16 x_offset; sint16 y_offset; sint16 z_offset; @@ -69,7 +69,7 @@ typedef struct { uint16 var_7; } rct_large_scenery_tile; -typedef struct { +typedef struct rct_large_scenery_entry { uint8 tool_id; // 0x06 uint8 flags; // 0x07 sint16 price; // 0x08 @@ -82,7 +82,7 @@ typedef struct { } rct_large_scenery_entry; -typedef struct { +typedef struct rct_wall_scenery_entry { uint8 tool_id; // 0x06 uint8 flags; // 0x07 uint8 height; // 0x08 @@ -103,7 +103,7 @@ typedef enum { WALL_SCENERY_HAS_TERNARY_COLOUR = (1 << 7), // 0x80 } WALL_SCENERY_FLAGS; -typedef struct { +typedef struct rct_path_bit_scenery_entry { uint16 var_06; uint8 pad_08; uint8 tool_id; // 0x09 @@ -111,14 +111,14 @@ typedef struct { uint8 scenery_tab_id; // 0x0C } rct_path_bit_scenery_entry; -typedef struct { +typedef struct rct_banner_scenery_entry { uint8 scrolling_mode; // 0x06 uint8 flags; // 0x07 sint16 price; // 0x08 uint8 scenery_tab_id; // 0x0A } rct_banner_scenery_entry; -typedef struct { +typedef struct rct_scenery_entry { rct_string_id name; // 0x00 uint32 image; // 0x02 union { @@ -130,7 +130,7 @@ typedef struct { }; } rct_scenery_entry; -typedef struct { +typedef struct rct_scenery_set_entry { rct_string_id name; // 0x00 uint32 image; // 0x02 uint16 scenery_entries[0x80]; // 0x06 diff --git a/src/world/sprite.h b/src/world/sprite.h index aaaf23b188..3e5543ca6b 100644 --- a/src/world/sprite.h +++ b/src/world/sprite.h @@ -43,7 +43,7 @@ enum SPRITE_LIST { SPRITE_LIST_UNKNOWN, }; -typedef struct { +typedef struct rct_unk_sprite { uint8 sprite_identifier; // 0x00 uint8 misc_identifier; // 0x01 uint16 next_in_quadrant; // 0x02 @@ -76,7 +76,7 @@ typedef struct { uint8 var_71; } rct_unk_sprite; -typedef struct { +typedef struct rct_litter { uint8 sprite_identifier; // 0x00 uint8 type; // 0x01 uint16 next_in_quadrant; // 0x02 @@ -97,7 +97,7 @@ typedef struct { uint32 creationTick; // 0x24 } rct_litter; -typedef struct { +typedef struct rct_balloon { uint8 sprite_identifier; // 0x00 uint8 misc_identifier; // 0x01 uint16 next_in_quadrant; // 0x02 @@ -126,7 +126,7 @@ typedef struct { uint8 var_2D; } rct_balloon; -typedef struct { +typedef struct rct_duck { uint8 sprite_identifier; // 0x00 uint8 misc_identifier; // 0x01 uint16 next_in_quadrant; // 0x02 @@ -152,7 +152,7 @@ typedef struct { uint8 state; // 0x48 } rct_duck; -typedef struct { +typedef struct rct_jumping_fountain { uint8 sprite_identifier; // 0x00 uint8 misc_identifier; // 0x01 uint16 next_in_quadrant; // 0x02 @@ -186,7 +186,7 @@ typedef struct { uint16 iteration; // 0x46 } rct_jumping_fountain; -typedef struct { +typedef struct rct_money_effect { uint8 sprite_identifier; // 0x00 uint8 misc_identifier; // 0x01 uint16 var_02; // 0x02 @@ -210,7 +210,7 @@ typedef struct { uint16 wiggle; // 0x46 } rct_money_effect; -typedef struct { +typedef struct rct_crashed_vehicle_particle { uint8 sprite_identifier; // 0x00 uint8 misc_identifier; // 0x01 uint16 next_in_quadrant; // 0x02 @@ -252,7 +252,7 @@ typedef struct { uint8 var_71; } rct_crashed_vehicle_particle; -typedef struct { +typedef struct rct_crash_splash { uint8 sprite_identifier; // 0x00 uint8 misc_identifier; // 0x01 uint16 next_in_quadrant; // 0x02 @@ -281,7 +281,7 @@ typedef struct { uint16 frame; // 0x26 } rct_crash_splash; -typedef struct { +typedef struct rct_steam_particle { uint8 sprite_identifier; // 0x00 uint8 misc_identifier; // 0x01 uint16 next_in_quadrant; // 0x02 @@ -329,19 +329,19 @@ typedef union { rct_steam_particle steam_particle; } rct_sprite; -typedef struct { +typedef struct rct_sprite_bounds { uint8 sprite_width; // 0x00 uint8 sprite_height_negative; // 0x01 uint8 sprite_height_positive; // 0x02 uint8 unused; // 0x03 } rct_sprite_bounds; -typedef struct { +typedef struct rct_sprite_image { uint32 base_image; // 0x00 uint8* unkn_04; // 0x04 } rct_sprite_image; -typedef struct { +typedef struct rct_sprite_entry { rct_sprite_image *sprite_image; // 0x00 rct_sprite_bounds *sprite_bounds; // 0x04 } rct_sprite_entry; diff --git a/src/world/water.h b/src/world/water.h index 5c86d558f1..b805979057 100644 --- a/src/world/water.h +++ b/src/world/water.h @@ -19,7 +19,7 @@ #include "../common.h" -typedef struct { +typedef struct rct_water_type { rct_string_id string_idx; // 0x00 uint32 image_id; // 0x02 uint32 var_06;