Name all the typdef-ed structs (#3581)

This commit is contained in:
janisozaur 2016-05-12 23:57:40 +02:00 committed by Ted John
parent 9fac7f38a5
commit 658e877955
72 changed files with 212 additions and 211 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -23,7 +23,7 @@
// C wrapper for Stopwatch //
/////////////////////////////
typedef struct {
typedef struct stopwatch {
void *context;
} stopwatch;

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -47,7 +47,7 @@ enum {
MOUSE_STATE_RIGHT_RELEASE
};
typedef struct {
typedef struct rct_mouse_data {
uint32 x;
uint32 y;
uint32 state;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -16,7 +16,7 @@
#include "localisation.h"
typedef struct {
typedef struct encoding_convert_entry {
uint16 code;
uint16 unicode;
} encoding_convert_entry;

View File

@ -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;

View File

@ -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;

View File

@ -32,7 +32,7 @@
#pragma region Format codes
typedef struct {
typedef struct format_code_token {
uint32 code;
const char *token;
} format_code_token;

View File

@ -19,7 +19,7 @@
#include "../common.h"
typedef struct {
typedef struct rct_award {
uint16 time;
uint16 type;
} rct_award;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -21,13 +21,13 @@
#include <jansson.h>
#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;

View File

@ -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;

View File

@ -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;
};

View File

@ -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;

View File

@ -363,8 +363,7 @@ enum edge
};
typedef struct
{
typedef struct viewport_surface_paint_struct_0 {
uint32 var_00;
uint32 var_04;
uint32 var_08;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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];

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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];

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -19,7 +19,7 @@
#include "vehicle.h"
typedef struct {
typedef struct vehicle_boundbox {
sint8 offset_x;
sint8 offset_y;
sint8 offset_z;

View File

@ -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;

View File

@ -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;

View File

@ -20,7 +20,7 @@
#include <SDL.h>
#include "../common.h"
typedef struct {
typedef struct sawyercoding_chunk_header {
uint8 encoding;
uint32 length;
} sawyercoding_chunk_header;

View File

@ -274,7 +274,7 @@ enum {
RIDE_SORT_RIDE
};
typedef struct {
typedef struct list_item {
rct_object_entry *entry;
rct_object_filters *filter;
uint8 *flags;

View File

@ -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;

View File

@ -26,7 +26,7 @@ enum {
NOTIFICATION_CATEGORY_GUEST
};
typedef struct {
typedef struct notification_def {
uint8 category;
rct_string_id caption;
size_t config_offset;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -35,7 +35,7 @@ enum {
LIST_ITEM_TYPE_END,
};
typedef struct {
typedef struct sc_list_item {
uint8 type;
union {
struct {

View File

@ -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

View File

@ -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];

View File

@ -35,7 +35,7 @@ enum{
WEATHER_THUNDER
};
typedef struct {
typedef struct rct_weather {
sint8 temp_delta;
sint8 effect_level;
sint8 gloom_level;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -23,7 +23,7 @@
* Animated object
* size: 0x06
*/
typedef struct {
typedef struct rct_map_animation {
uint8 baseZ;
uint8 type;
uint16 x;

View File

@ -17,7 +17,7 @@
#ifndef _MAPGEN_H_
#define _MAPGEN_H_
typedef struct {
typedef struct mapgen_settings {
// Base
int mapSize;
int height;

View File

@ -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

View File

@ -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;

View File

@ -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;