1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

rename rct_path_type to rct_footpath_entry

This commit is contained in:
Ted John
2016-05-15 16:11:34 +01:00
parent 3d47f9869f
commit 6f7db1f9b6
7 changed files with 24 additions and 24 deletions

View File

@@ -1211,7 +1211,7 @@ static const object_type_vtable object_type_banner_vtable[] = {
static bool object_type_path_load(void *objectEntry, uint32 entryIndex)
{
rct_path_type *pathEntry = (rct_path_type*)objectEntry;
rct_footpath_entry *pathEntry = (rct_footpath_entry*)objectEntry;
uint8 *extendedEntryData = (uint8*)((size_t)objectEntry + (size_t)0x0E);
pathEntry->string_idx = object_get_localised_text(&extendedEntryData, OBJECT_TYPE_PATHS, entryIndex, 0);
@@ -1227,8 +1227,8 @@ static bool object_type_path_load(void *objectEntry, uint32 entryIndex)
gFootpathSelectedId = 0;
// Set the default path for when opening footpath window
for (int i = 0; i < object_entry_group_counts[OBJECT_TYPE_PATHS]; i++) {
rct_path_type *pathEntry2 = (rct_path_type*)object_entry_groups[OBJECT_TYPE_PATHS].chunks[i];
if (pathEntry2 == (rct_path_type*)-1) {
rct_footpath_entry *pathEntry2 = (rct_footpath_entry*)object_entry_groups[OBJECT_TYPE_PATHS].chunks[i];
if (pathEntry2 == (rct_footpath_entry*)-1) {
continue;
}
if (!(pathEntry2->flags & 4)) {
@@ -1243,7 +1243,7 @@ static bool object_type_path_load(void *objectEntry, uint32 entryIndex)
static void object_type_path_unload(void *objectEntry)
{
rct_path_type *pathEntry = (rct_path_type*)objectEntry;
rct_footpath_entry *pathEntry = (rct_footpath_entry*)objectEntry;
pathEntry->string_idx = 0;
pathEntry->image = 0;
pathEntry->bridge_image = 0;
@@ -1251,14 +1251,14 @@ static void object_type_path_unload(void *objectEntry)
static bool object_type_path_test(void *objectEntry)
{
rct_path_type *pathEntry = (rct_path_type*)objectEntry;
rct_footpath_entry *pathEntry = (rct_footpath_entry*)objectEntry;
if (pathEntry->var_0A >= 2) return false;
return true;
}
static void object_type_path_paint(void *objectEntry, rct_drawpixelinfo *dpi, sint32 x, sint32 y)
{
rct_path_type *pathEntry = (rct_path_type*)objectEntry;
rct_footpath_entry *pathEntry = (rct_footpath_entry*)objectEntry;
gfx_draw_sprite(dpi, pathEntry->image + 71, x - 49, y - 17, 0);
gfx_draw_sprite(dpi, pathEntry->image + 72, x + 4, y - 17, 0);
}

View File

@@ -726,7 +726,7 @@ rct_string_id object_get_name_string_id(rct_object_entry *entry, const void *chu
case OBJECT_TYPE_PATH_BITS:
return ((rct_scenery_entry*)chunk)->name;
case OBJECT_TYPE_PATHS:
return ((rct_path_type*)chunk)->string_idx;
return ((rct_footpath_entry*)chunk)->string_idx;
case OBJECT_TYPE_SCENERY_SETS:
return ((rct_scenery_set_entry*)chunk)->name;
case OBJECT_TYPE_PARK_ENTRANCE:

View File

@@ -186,7 +186,7 @@ void park_entrance_paint(uint8 direction, int height, rct_map_element* map_eleme
RCT2_GLOBAL(0x009E32BC, uint32) = ghost_id;
}
rct_path_type* path_entry = get_footpath_entry(map_element->properties.entrance.path_type);
rct_footpath_entry* path_entry = get_footpath_entry(map_element->properties.entrance.path_type);
// Index to which part of the entrance
// Middle, left, right

View File

@@ -605,11 +605,11 @@ int track_design_place_scenery(rct_td6_scenery_element *scenery_start, uint8 rid
}
entry_index = 0;
for (rct_path_type *path = get_footpath_entry(0);
for (rct_footpath_entry *path = get_footpath_entry(0);
entry_index < object_entry_group_counts[OBJECT_TYPE_PATHS];
path = get_footpath_entry(entry_index), entry_index++
) {
if (path == (rct_path_type*)-1) {
if (path == (rct_footpath_entry*)-1) {
continue;
}
if (path->flags & (1 << 2)) {
@@ -710,11 +710,11 @@ int track_design_place_scenery(rct_td6_scenery_element *scenery_start, uint8 rid
}
entry_index = 0;
for (rct_path_type* path = get_footpath_entry(0);
for (rct_footpath_entry* path = get_footpath_entry(0);
entry_index < object_entry_group_counts[OBJECT_TYPE_PATHS];
path = get_footpath_entry(entry_index), entry_index++){
if (path == (rct_path_type*)-1)
if (path == (rct_footpath_entry*)-1)
continue;
if (path->flags & (1 << 2))
continue;

View File

@@ -167,7 +167,7 @@ void window_footpath_open()
{
rct_window* window;
sint16 pathId;
rct_path_type *pathType;
rct_footpath_entry *pathType;
// Check if window is already open
window = window_bring_to_front_by_class(WC_FOOTPATH);
@@ -326,7 +326,7 @@ static void window_footpath_mousedown(int widgetIndex, rct_window*w, rct_widget*
static void window_footpath_dropdown(rct_window *w, int widgetIndex, int dropdownIndex)
{
int i, j, pathId;
rct_path_type *pathType;
rct_footpath_entry *pathType;
if (widgetIndex == WIDX_FOOTPATH_TYPE)
gFootpathSelectedType = SELECTED_PATH_TYPE_NORMAL;
@@ -347,7 +347,7 @@ static void window_footpath_dropdown(rct_window *w, int widgetIndex, int dropdow
j = 0;
for (i = 0; i < 16; i++) {
pathType = get_footpath_entry(i);
if (pathType == (rct_path_type*)-1)
if (pathType == (rct_footpath_entry*)-1)
continue;
if (pathType->flags & flags)
continue;
@@ -498,7 +498,7 @@ static void window_footpath_update(rct_window *w)
static void window_footpath_invalidate(rct_window *w)
{
int selectedPath;
rct_path_type *pathType;
rct_footpath_entry *pathType;
colour_scheme_update(w);
@@ -541,7 +541,7 @@ static void window_footpath_invalidate(rct_window *w)
static void window_footpath_paint(rct_window *w, rct_drawpixelinfo *dpi)
{
int x, y, image, selectedPath;
rct_path_type *pathType;
rct_footpath_entry *pathType;
window_draw_widgets(w, dpi);
@@ -586,7 +586,7 @@ static void window_footpath_paint(rct_window *w, rct_drawpixelinfo *dpi)
static void window_footpath_show_footpath_types_dialog(rct_window *w, rct_widget *widget, int showQueues)
{
int i, flags, numPathTypes, image;
rct_path_type *pathType;
rct_footpath_entry *pathType;
numPathTypes = 0;
flags = 4;
@@ -596,7 +596,7 @@ static void window_footpath_show_footpath_types_dialog(rct_window *w, rct_widget
for (i = 0; i < 16; i++) {
pathType = get_footpath_entry(i);
if (pathType == (rct_path_type*)-1)
if (pathType == (rct_footpath_entry*)-1)
continue;
if (pathType->flags & flags)
continue;

View File

@@ -2023,7 +2023,7 @@ void footpath_remove_edges_at(int x, int y, rct_map_element *mapElement)
mapElement->properties.path.edges = 0;
}
rct_path_type *get_footpath_entry(int entryIndex)
rct_footpath_entry *get_footpath_entry(int entryIndex)
{
return gFootpathEntries[entryIndex];
}

View File

@@ -27,13 +27,13 @@ enum {
PROVISIONAL_PATH_FLAG_2 = (1 << 2),
};
typedef struct rct_path_type {
typedef struct rct_footpath_entry {
rct_string_id string_idx; // 0x00
uint32 image; // 0x02
uint32 bridge_image; // 0x06
uint8 var_0A;
uint8 flags; // 0x0B
} rct_path_type;
} rct_footpath_entry;
enum {
FOOTPATH_SEARCH_SUCCESS,
@@ -42,7 +42,7 @@ enum {
FOOTPATH_SEARCH_TOO_COMPLEX
};
#define gFootpathEntries ((rct_path_type**)object_entry_groups[OBJECT_TYPE_PATHS].chunks)
#define gFootpathEntries ((rct_footpath_entry**)object_entry_groups[OBJECT_TYPE_PATHS].chunks)
extern uint8 gFootpathProvisionalFlags;
extern rct_xyz16 gFootpathProvisionalPosition;
@@ -90,6 +90,6 @@ bool footpath_element_path_scenery_is_ghost(rct_map_element *mapElement);
void footpath_scenery_set_is_ghost(rct_map_element *mapElement, bool isGhost);
void footpath_remove_edges_at(int x, int y, rct_map_element *mapElement);
rct_path_type *get_footpath_entry(int entryIndex);
rct_footpath_entry *get_footpath_entry(int entryIndex);
#endif