Rename path surface and railings descriptors

This commit is contained in:
Gymnasiast 2021-09-05 16:58:54 +02:00
parent a40cfae0ff
commit 2282f24404
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
12 changed files with 103 additions and 103 deletions

View File

@ -187,8 +187,8 @@ static bool footpath_select_default();
rct_window* window_footpath_open()
{
// If a restricted path was selected when the game is no longer in Sandbox mode, reset it
PathSurfaceEntry* pathEntry = get_path_surface_entry(gFootpathSelectedId);
if (pathEntry != nullptr && (pathEntry->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) && !gCheatsSandboxMode)
PathSurfaceDescriptor* pathEntry = get_path_surface_entry(gFootpathSelectedId);
if (pathEntry != nullptr && (pathEntry->Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) && !gCheatsSandboxMode)
{
pathEntry = nullptr;
}
@ -369,12 +369,12 @@ static void window_footpath_dropdown(rct_window* w, rct_widgetindex widgetIndex,
int32_t i = 0, j = 0;
for (; i < MAX_PATH_OBJECTS; i++)
{
PathSurfaceEntry* pathType = get_path_surface_entry(i);
PathSurfaceDescriptor* pathType = get_path_surface_entry(i);
if (pathType == nullptr)
{
continue;
}
if ((pathType->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) && !showEditorPaths)
if ((pathType->Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) && !showEditorPaths)
{
continue;
}
@ -577,9 +577,9 @@ static void window_footpath_invalidate(rct_window* w)
auto pathEntry = get_path_surface_entry(gFootpathSelectedId);
if (pathEntry != nullptr)
{
pathImage = pathEntry->preview;
pathImage = pathEntry->PreviewImage;
// Editor-only paths might lack a queue image
queueImage = (pathEntry->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) ? pathImage : pathImage + 1;
queueImage = (pathEntry->Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) ? pathImage : pathImage + 1;
}
window_footpath_widgets[WIDX_FOOTPATH_TYPE].image = pathImage;
window_footpath_widgets[WIDX_QUEUELINE_TYPE].image = queueImage;
@ -610,8 +610,8 @@ static void window_footpath_paint(rct_window* w, rct_drawpixelinfo* dpi)
int32_t image = ConstructionPreviewImages[slope][direction];
int32_t selectedPath = gFootpathSelectedId + (MAX_PATH_OBJECTS * _footpathSelectedType);
PathSurfaceEntry* pathType = get_path_surface_entry(selectedPath);
image += pathType->image;
PathSurfaceDescriptor* pathType = get_path_surface_entry(selectedPath);
image += pathType->Image;
// Draw construction image
screenCoords = w->windowPos
@ -647,7 +647,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, bool showQueues)
{
int32_t i, image;
PathSurfaceEntry* pathType;
PathSurfaceDescriptor* pathType;
uint32_t numPathTypes = 0;
// If the game is in sandbox mode, also show paths that are normally restricted to the scenario editor
@ -660,14 +660,14 @@ static void window_footpath_show_footpath_types_dialog(rct_window* w, rct_widget
{
continue;
}
if ((pathType->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) && !showEditorPaths)
if ((pathType->Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR) && !showEditorPaths)
{
continue;
}
image = pathType->preview;
image = pathType->PreviewImage;
// Editor-only paths usually lack queue images. In this case, use the main path image
if (showQueues && !(pathType->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR))
if (showQueues && !(pathType->Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR))
{
image++;
}
@ -1227,13 +1227,13 @@ static bool footpath_select_default()
int32_t footpathId = -1;
for (int32_t i = 0; i < object_entry_group_counts[EnumValue(ObjectType::Paths)]; i++)
{
PathSurfaceEntry* pathEntry = get_path_surface_entry(i);
PathSurfaceDescriptor* pathEntry = get_path_surface_entry(i);
if (pathEntry != nullptr)
{
footpathId = i;
// Prioritise non-restricted path
if (!(pathEntry->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR))
if (!(pathEntry->Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR))
{
break;
}

View File

@ -1886,7 +1886,7 @@ static void window_tile_inspector_paint(rct_window* w, rct_drawpixelinfo* dpi)
// Details
// Path name
auto ft = Formatter();
ft.Add<rct_string_id>(tileElement->AsPath()->GetSurfaceEntry()->string_idx);
ft.Add<rct_string_id>(tileElement->AsPath()->GetSurfaceEntry()->Name);
DrawTextBasic(dpi, screenCoords, STR_TILE_INSPECTOR_PATH_NAME, ft, { COLOUR_WHITE });
// Path addition

View File

@ -40,23 +40,23 @@ void FootpathObject::Load()
_legacyType.image = gfx_object_allocate_images(GetImageTable().GetImages(), GetImageTable().GetCount());
_legacyType.bridge_image = _legacyType.image + 109;
_pathSurfaceEntry.string_idx = _legacyType.string_idx;
_pathSurfaceEntry.image = _legacyType.image;
_pathSurfaceEntry.preview = _legacyType.GetPreviewImage();
_pathSurfaceEntry.flags = _legacyType.flags;
_pathSurfaceEntry.Name = _legacyType.string_idx;
_pathSurfaceEntry.Image = _legacyType.image;
_pathSurfaceEntry.PreviewImage = _legacyType.GetPreviewImage();
_pathSurfaceEntry.Flags = _legacyType.flags;
_queueEntry.string_idx = _legacyType.string_idx;
_queueEntry.image = _legacyType.GetQueueImage();
_queueEntry.preview = _legacyType.GetQueuePreviewImage();
_queueEntry.flags = _legacyType.flags | FOOTPATH_ENTRY_FLAG_IS_QUEUE;
_queueEntry.Name = _legacyType.string_idx;
_queueEntry.Image = _legacyType.GetQueueImage();
_queueEntry.PreviewImage = _legacyType.GetQueuePreviewImage();
_queueEntry.Flags = _legacyType.flags | FOOTPATH_ENTRY_FLAG_IS_QUEUE;
_pathRailingsEntry.string_idx = _legacyType.string_idx;
_pathRailingsEntry.bridge_image = _legacyType.bridge_image;
_pathRailingsEntry.preview = _legacyType.GetPreviewImage();
_pathRailingsEntry.flags = _legacyType.flags;
_pathRailingsEntry.scrolling_mode = _legacyType.scrolling_mode;
_pathRailingsEntry.support_type = _legacyType.support_type;
_pathRailingsEntry.railings_image = _legacyType.GetRailingsImage();
_pathRailingsEntry.Name = _legacyType.string_idx;
_pathRailingsEntry.BridgeImage = _legacyType.bridge_image;
_pathRailingsEntry.PreviewImage = _legacyType.GetPreviewImage();
_pathRailingsEntry.Flags = _legacyType.flags;
_pathRailingsEntry.ScrollingMode = _legacyType.scrolling_mode;
_pathRailingsEntry.SupportType = _legacyType.support_type;
_pathRailingsEntry.RailingsImage = _legacyType.GetRailingsImage();
}
void FootpathObject::Unload()
@ -71,8 +71,8 @@ void FootpathObject::Unload()
void FootpathObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const
{
auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 };
gfx_draw_sprite(dpi, _pathSurfaceEntry.preview, screenCoords - ScreenCoordsXY{ 49, 17 }, 0);
gfx_draw_sprite(dpi, _queueEntry.preview, screenCoords + ScreenCoordsXY{ 4, -17 }, 0);
gfx_draw_sprite(dpi, _pathSurfaceEntry.PreviewImage, screenCoords - ScreenCoordsXY{ 49, 17 }, 0);
gfx_draw_sprite(dpi, _queueEntry.PreviewImage, screenCoords + ScreenCoordsXY{ 4, -17 }, 0);
}
static RailingEntrySupportType ParseSupportType(const std::string& s)

View File

@ -16,9 +16,9 @@ class FootpathObject final : public Object
{
private:
rct_footpath_entry _legacyType = {};
PathSurfaceEntry _pathSurfaceEntry = {};
PathSurfaceEntry _queueEntry = {};
PathRailingsEntry _pathRailingsEntry = {};
PathSurfaceDescriptor _pathSurfaceEntry = {};
PathSurfaceDescriptor _queueEntry = {};
PathRailingsDescriptor _pathRailingsEntry = {};
public:
explicit FootpathObject(const rct_object_entry& entry)
@ -31,17 +31,17 @@ public:
return &_legacyType;
}
PathSurfaceEntry* GetPathSurfaceEntry()
PathSurfaceDescriptor* GetPathSurfaceEntry()
{
return &_pathSurfaceEntry;
}
PathSurfaceEntry* GetQueueEntry()
PathSurfaceDescriptor* GetQueueEntry()
{
return &_queueEntry;
}
PathRailingsEntry* GetPathRailingsEntry()
PathRailingsDescriptor* GetPathRailingsEntry()
{
return &_pathRailingsEntry;
}

View File

@ -1168,7 +1168,7 @@ bool metal_b_supports_paint_setup(
*/
bool path_a_supports_paint_setup(
paint_session* session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags,
PathRailingsEntry* railingEntry, bool* underground)
PathRailingsDescriptor* railingEntry, bool* underground)
{
if (underground != nullptr)
{
@ -1202,7 +1202,7 @@ bool path_a_supports_paint_setup(
{
// save dx2
PaintAddImageAsParent(
session, (railingEntry->bridge_image + 48) | imageColourFlags, { 0, 0, baseHeight - 2 }, { 32, 32, 0 });
session, (railingEntry->BridgeImage + 48) | imageColourFlags, { 0, 0, baseHeight - 2 }, { 32, 32, 0 });
hasSupports = true;
}
else if (session->Support.slope & 0x10)
@ -1216,7 +1216,7 @@ bool path_a_supports_paint_setup(
}
uint32_t imageId = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]
+ railingEntry->bridge_image;
+ railingEntry->BridgeImage;
PaintAddImageAsParent(
session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, 11 }, { 0, 0, baseHeight + 2 });
@ -1239,7 +1239,7 @@ bool path_a_supports_paint_setup(
}
uint32_t ebx = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]
+ railingEntry->bridge_image;
+ railingEntry->BridgeImage;
PaintAddImageAsParent(session, ebx | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, 11 }, { 0, 0, baseHeight + 2 });
@ -1251,7 +1251,7 @@ bool path_a_supports_paint_setup(
{
if (baseHeight & 0x10 || heightSteps == 1 || baseHeight + 16 == session->WaterHeight)
{
uint32_t imageId = (supportType * 24) + railingEntry->bridge_image + 23;
uint32_t imageId = (supportType * 24) + railingEntry->BridgeImage + 23;
PaintAddImageAsParent(
session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, ((heightSteps == 1) ? 7 : 12) });
@ -1261,7 +1261,7 @@ bool path_a_supports_paint_setup(
}
else
{
uint32_t imageId = (supportType * 24) + railingEntry->bridge_image + 22;
uint32_t imageId = (supportType * 24) + railingEntry->BridgeImage + 22;
PaintAddImageAsParent(
session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, ((heightSteps == 2) ? 23 : 28) });
@ -1275,7 +1275,7 @@ bool path_a_supports_paint_setup(
{
uint16_t specialIndex = (special - 1) & 0xFFFF;
uint32_t imageId = railingEntry->bridge_image + 55 + specialIndex;
uint32_t imageId = railingEntry->BridgeImage + 55 + specialIndex;
const unk_supports_desc& supportsDesc = byte_98D8D4[specialIndex];
const unk_supports_desc_bound_box& boundBox = supportsDesc.bounding_box;
@ -1320,7 +1320,7 @@ bool path_a_supports_paint_setup(
*/
bool path_b_supports_paint_setup(
paint_session* session, int32_t segment, int32_t special, int32_t height, uint32_t imageColourFlags,
PathRailingsEntry* railingEntry)
PathRailingsDescriptor* railingEntry)
{
support_height* supportSegments = session->SupportSegments;
@ -1342,7 +1342,7 @@ bool path_b_supports_paint_setup(
uint16_t baseHeight;
if ((supportSegments[segment].slope & 0x20) || (height - supportSegments[segment].height < 6)
|| !(railingEntry->flags & RAILING_ENTRY_FLAG_HAS_SUPPORT_BASE_SPRITE))
|| !(railingEntry->Flags & RAILING_ENTRY_FLAG_HAS_SUPPORT_BASE_SPRITE))
{
baseHeight = supportSegments[segment].height;
}
@ -1352,7 +1352,7 @@ bool path_b_supports_paint_setup(
baseHeight = supportSegments[segment].height;
PaintAddImageAsParent(
session, (railingEntry->bridge_image + 37 + imageOffset) | imageColourFlags,
session, (railingEntry->BridgeImage + 37 + imageOffset) | imageColourFlags,
{ SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, baseHeight }, { 0, 0, 5 });
baseHeight += 6;
}
@ -1371,7 +1371,7 @@ bool path_b_supports_paint_setup(
if (heightDiff > 0)
{
PaintAddImageAsParent(
session, (railingEntry->bridge_image + 20 + (heightDiff - 1)) | imageColourFlags,
session, (railingEntry->BridgeImage + 20 + (heightDiff - 1)) | imageColourFlags,
{ SupportBoundBoxes[segment], baseHeight }, { 0, 0, heightDiff - 1 });
}
@ -1404,7 +1404,7 @@ bool path_b_supports_paint_setup(
}
PaintAddImageAsParent(
session, (railingEntry->bridge_image + 20 + (z - 1)) | imageColourFlags,
session, (railingEntry->BridgeImage + 20 + (z - 1)) | imageColourFlags,
{ SupportBoundBoxes[segment], baseHeight }, { 0, 0, (z - 1) });
baseHeight += z;
@ -1415,7 +1415,7 @@ bool path_b_supports_paint_setup(
break;
}
uint32_t imageId = railingEntry->bridge_image + 20 + (z - 1);
uint32_t imageId = railingEntry->BridgeImage + 20 + (z - 1);
if (z == 16)
{
imageId += 1;
@ -1449,7 +1449,7 @@ bool path_b_supports_paint_setup(
break;
}
uint32_t imageId = railingEntry->bridge_image + 20 + (z - 1);
uint32_t imageId = railingEntry->BridgeImage + 20 + (z - 1);
PaintAddImageAsParent(
session, imageId | imageColourFlags, { SupportBoundBoxes[segment], baseHeight }, { 0, 0, 0 },
{ SupportBoundBoxes[segment], baseHeight });

View File

@ -24,10 +24,10 @@ bool metal_b_supports_paint_setup(
paint_session* session, uint8_t supportType, uint8_t segment, int32_t special, int32_t height, uint32_t imageColourFlags);
bool path_a_supports_paint_setup(
paint_session* session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags,
PathRailingsEntry* railingEntry, bool* underground);
PathRailingsDescriptor* railingEntry, bool* underground);
bool path_b_supports_paint_setup(
paint_session* session, int32_t supportType, int32_t special, int32_t height, uint32_t imageColourFlags,
PathRailingsEntry* railingEntry);
PathRailingsDescriptor* railingEntry);
// There are 13 types of metal supports. A graphic showing all of them is available here:
// https://cloud.githubusercontent.com/assets/737603/19420485/7eaba28e-93ec-11e6-83cb-03190accc094.png

View File

@ -245,7 +245,7 @@ static void park_entrance_paint(paint_session* session, uint8_t direction, int32
// Index to which part of the entrance
// Middle, left, right
uint8_t part_index = tile_element.GetSequenceIndex();
PathSurfaceEntry* path_entry = nullptr;
PathSurfaceDescriptor* path_entry = nullptr;
// The left and right of the park entrance often have this set to 127.
// So only attempt to get the footpath type if we're dealing with the middle bit of the entrance.
@ -260,7 +260,7 @@ static void park_entrance_paint(paint_session* session, uint8_t direction, int32
case 0:
if (path_entry != nullptr)
{
image_id = (path_entry->image + 5 * (1 + (direction & 1))) | ghost_id;
image_id = (path_entry->Image + 5 * (1 + (direction & 1))) | ghost_id;
PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 0x1C, 0 }, { 0, 2, height });
}

View File

@ -86,11 +86,11 @@ static constexpr const uint8_t byte_98D8A4[] = {
// clang-format on
void path_paint_box_support(
paint_session* session, const PathElement& pathElement, int32_t height, PathSurfaceEntry* footpathEntry,
PathRailingsEntry* railingEntry, bool hasSupports, uint32_t imageFlags, uint32_t sceneryImageFlags);
paint_session* session, const PathElement& pathElement, int32_t height, PathSurfaceDescriptor* footpathEntry,
PathRailingsDescriptor* railingEntry, bool hasSupports, uint32_t imageFlags, uint32_t sceneryImageFlags);
void path_paint_pole_support(
paint_session* session, const PathElement& pathElement, int16_t height, PathSurfaceEntry* footpathEntry,
PathRailingsEntry* railingEntry, bool hasSupports, uint32_t imageFlags, uint32_t sceneryImageFlags);
paint_session* session, const PathElement& pathElement, int16_t height, PathSurfaceDescriptor* footpathEntry,
PathRailingsDescriptor* railingEntry, bool hasSupports, uint32_t imageFlags, uint32_t sceneryImageFlags);
/* rct2: 0x006A5AE5 */
static void path_bit_lights_paint(
@ -326,9 +326,9 @@ static void path_bit_jumping_fountains_paint(
*/
static void sub_6A4101(
paint_session* session, const PathElement& pathElement, uint16_t height, uint32_t connectedEdges, bool word_F3F038,
PathRailingsEntry* railingEntry, uint32_t imageFlags)
PathRailingsDescriptor* railingEntry, uint32_t imageFlags)
{
uint32_t base_image_id = railingEntry->railings_image | imageFlags;
uint32_t base_image_id = railingEntry->RailingsImage | imageFlags;
if (pathElement.IsQueue())
{
@ -447,7 +447,7 @@ static void sub_6A4101(
auto ride = get_ride(pathElement.GetRideIndex());
if (direction < 2 && ride != nullptr && imageFlags == 0)
{
uint16_t scrollingMode = railingEntry->scrolling_mode;
uint16_t scrollingMode = railingEntry->ScrollingMode;
scrollingMode += direction;
auto ft = Formatter();
@ -669,7 +669,7 @@ static void sub_6A4101(
*/
static void sub_6A3F61(
paint_session* session, const PathElement& pathElement, uint16_t connectedEdges, uint16_t height,
PathRailingsEntry* railingEntry, uint32_t imageFlags, uint32_t sceneryImageFlags, bool word_F3F038)
PathRailingsDescriptor* railingEntry, uint32_t imageFlags, uint32_t sceneryImageFlags, bool word_F3F038)
{
// eax --
// ebx --
@ -943,12 +943,12 @@ void PaintPath(paint_session* session, uint16_t height, const PathElement& tileE
PaintAddImageAsParent(session, imageId, { 16, 16, heightMarkerBaseZ }, { 1, 1, 0 });
}
PathSurfaceEntry* footpathEntry = tileElement.GetSurfaceEntry();
PathRailingsEntry* railingEntry = tileElement.GetRailingEntry();
PathSurfaceDescriptor* footpathEntry = tileElement.GetSurfaceEntry();
PathRailingsDescriptor* railingEntry = tileElement.GetRailingEntry();
if (footpathEntry != nullptr && railingEntry != nullptr)
{
if (railingEntry->support_type == RailingEntrySupportType::Pole)
if (railingEntry->SupportType == RailingEntrySupportType::Pole)
{
path_paint_pole_support(
session, tileElement, height, footpathEntry, railingEntry, hasSupports, imageFlags, sceneryImageFlags);
@ -993,8 +993,8 @@ void PaintPath(paint_session* session, uint16_t height, const PathElement& tileE
}
void path_paint_box_support(
paint_session* session, const PathElement& pathElement, int32_t height, PathSurfaceEntry* footpathEntry,
PathRailingsEntry* railingEntry, bool hasSupports, uint32_t imageFlags, uint32_t sceneryImageFlags)
paint_session* session, const PathElement& pathElement, int32_t height, PathSurfaceDescriptor* footpathEntry,
PathRailingsDescriptor* railingEntry, bool hasSupports, uint32_t imageFlags, uint32_t sceneryImageFlags)
{
// Rol edges around rotation
uint8_t edges = ((pathElement.GetEdges() << session->CurrentRotation) & 0xF)
@ -1019,7 +1019,7 @@ void path_paint_box_support(
imageId = byte_98D6E0[edi];
}
imageId += footpathEntry->image;
imageId += footpathEntry->Image;
if (!session->DidPassSurface)
{
@ -1054,11 +1054,11 @@ void path_paint_box_support(
if (pathElement.IsSloped())
{
image_id = ((pathElement.GetSlopeDirection() + session->CurrentRotation) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
+ railingEntry->bridge_image + 51;
+ railingEntry->BridgeImage + 51;
}
else
{
image_id = byte_98D8A4[edges] + railingEntry->bridge_image + 49;
image_id = byte_98D8A4[edges] + railingEntry->BridgeImage + 49;
}
PaintAddImageAsParent(
@ -1139,8 +1139,8 @@ void path_paint_box_support(
}
void path_paint_pole_support(
paint_session* session, const PathElement& pathElement, int16_t height, PathSurfaceEntry* footpathEntry,
PathRailingsEntry* railingEntry, bool hasSupports, uint32_t imageFlags, uint32_t sceneryImageFlags)
paint_session* session, const PathElement& pathElement, int16_t height, PathSurfaceDescriptor* footpathEntry,
PathRailingsDescriptor* railingEntry, bool hasSupports, uint32_t imageFlags, uint32_t sceneryImageFlags)
{
// Rol edges around rotation
uint8_t edges = ((pathElement.GetEdges() << session->CurrentRotation) & 0xF)
@ -1165,7 +1165,7 @@ void path_paint_pole_support(
imageId = byte_98D6E0[edi];
}
imageId += footpathEntry->image;
imageId += footpathEntry->Image;
// Below Surface
if (!session->DidPassSurface)
@ -1202,11 +1202,11 @@ void path_paint_pole_support(
{
bridgeImage = ((pathElement.GetSlopeDirection() + session->CurrentRotation)
& FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
+ railingEntry->bridge_image + 16;
+ railingEntry->BridgeImage + 16;
}
else
{
bridgeImage = edges + railingEntry->bridge_image;
bridgeImage = edges + railingEntry->BridgeImage;
bridgeImage |= imageFlags;
}

View File

@ -874,7 +874,7 @@ static bool TrackDesignPlaceSceneryElementGetEntry(
}
entry_index = 0;
for (PathSurfaceEntry* path = get_path_surface_entry(0);
for (PathSurfaceDescriptor* path = get_path_surface_entry(0);
entry_index < object_entry_group_counts[EnumValue(ObjectType::Paths)];
path = get_path_surface_entry(entry_index), entry_index++)
{
@ -882,7 +882,7 @@ static bool TrackDesignPlaceSceneryElementGetEntry(
{
return true;
}
if (path->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR)
if (path->Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR)
{
return true;
}

View File

@ -1652,7 +1652,7 @@ PathRailingsIndex PathElement::GetRailingEntryIndex() const
return GetSurfaceEntryIndex();
}
PathSurfaceEntry* PathElement::GetSurfaceEntry() const
PathSurfaceDescriptor* PathElement::GetSurfaceEntry() const
{
if (!IsQueue())
return get_path_surface_entry(GetSurfaceEntryIndex());
@ -1660,7 +1660,7 @@ PathSurfaceEntry* PathElement::GetSurfaceEntry() const
return get_path_surface_entry(GetSurfaceEntryIndex() + MAX_PATH_OBJECTS);
}
PathRailingsEntry* PathElement::GetRailingEntry() const
PathRailingsDescriptor* PathElement::GetRailingEntry() const
{
return get_path_railings_entry(GetRailingEntryIndex());
}
@ -1688,7 +1688,7 @@ void PathElement::SetQueueBannerDirection(uint8_t direction)
bool PathElement::ShouldDrawPathOverSupports() const
{
return (GetRailingEntry()->flags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS);
return (GetRailingEntry()->Flags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS);
}
void PathElement::SetShouldDrawPathOverSupports(bool on)
@ -2247,9 +2247,9 @@ void footpath_remove_edges_at(const CoordsXY& footpathPos, TileElement* tileElem
tileElement->AsPath()->SetEdgesAndCorners(0);
}
PathSurfaceEntry* get_path_surface_entry(PathSurfaceIndex entryIndex)
PathSurfaceDescriptor* get_path_surface_entry(PathSurfaceIndex entryIndex)
{
PathSurfaceEntry* result = nullptr;
PathSurfaceDescriptor* result = nullptr;
auto& objMgr = OpenRCT2::GetContext()->GetObjectManager();
// TODO: Change when moving to the new save format.
auto obj = objMgr.GetLoadedObject(ObjectType::Paths, entryIndex % MAX_PATH_OBJECTS);
@ -2263,9 +2263,9 @@ PathSurfaceEntry* get_path_surface_entry(PathSurfaceIndex entryIndex)
return result;
}
PathRailingsEntry* get_path_railings_entry(PathRailingsIndex entryIndex)
PathRailingsDescriptor* get_path_railings_entry(PathRailingsIndex entryIndex)
{
PathRailingsEntry* result = nullptr;
PathRailingsDescriptor* result = nullptr;
auto& objMgr = OpenRCT2::GetContext()->GetObjectManager();
auto obj = objMgr.GetLoadedObject(ObjectType::Paths, entryIndex);
if (obj != nullptr)

View File

@ -70,23 +70,23 @@ struct rct_footpath_entry
assert_struct_size(rct_footpath_entry, 13);
#pragma pack(pop)
struct PathSurfaceEntry
struct PathSurfaceDescriptor
{
rct_string_id string_idx;
uint32_t image;
uint32_t preview;
uint8_t flags;
rct_string_id Name;
uint32_t Image;
uint32_t PreviewImage;
uint8_t Flags;
};
struct PathRailingsEntry
struct PathRailingsDescriptor
{
rct_string_id string_idx;
uint32_t preview;
uint32_t bridge_image;
uint32_t railings_image;
RailingEntrySupportType support_type;
uint8_t flags;
uint8_t scrolling_mode;
rct_string_id Name;
uint32_t PreviewImage;
uint32_t BridgeImage;
uint32_t RailingsImage;
RailingEntrySupportType SupportType;
uint8_t Flags;
uint8_t ScrollingMode;
};
struct ProvisionalFootpath
@ -215,8 +215,8 @@ bool footpath_is_blocked_by_vehicle(const TileCoordsXYZ& position);
int32_t footpath_is_connected_to_map_edge(const CoordsXYZ& footpathPos, int32_t direction, int32_t flags);
void footpath_remove_edges_at(const CoordsXY& footpathPos, TileElement* tileElement);
PathSurfaceEntry* get_path_surface_entry(PathSurfaceIndex entryIndex);
PathRailingsEntry* get_path_railings_entry(PathRailingsIndex entryIndex);
PathSurfaceDescriptor* get_path_surface_entry(PathSurfaceIndex entryIndex);
PathRailingsDescriptor* get_path_railings_entry(PathRailingsIndex entryIndex);
void footpath_queue_chain_reset();
void footpath_queue_chain_push(ride_id_t rideIndex);

View File

@ -282,11 +282,11 @@ private:
public:
PathSurfaceIndex GetSurfaceEntryIndex() const;
PathSurfaceEntry* GetSurfaceEntry() const;
PathSurfaceDescriptor* GetSurfaceEntry() const;
void SetSurfaceEntryIndex(PathSurfaceIndex newIndex);
PathRailingsIndex GetRailingEntryIndex() const;
PathRailingsEntry* GetRailingEntry() const;
PathRailingsDescriptor* GetRailingEntry() const;
void SetRailingEntryIndex(PathRailingsIndex newIndex);
uint8_t GetQueueBannerDirection() const;