From 2f0b6a9652afba20498a8e513df5314451c809f3 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 20 Jan 2019 12:07:29 +0100 Subject: [PATCH] Rename FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE --- src/openrct2/object/FootpathObject.cpp | 2 +- src/openrct2/paint/tile_element/Paint.Path.cpp | 6 +++--- src/openrct2/world/Footpath.h | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/openrct2/object/FootpathObject.cpp b/src/openrct2/object/FootpathObject.cpp index 4c8b302d4c..1915c4a4f2 100644 --- a/src/openrct2/object/FootpathObject.cpp +++ b/src/openrct2/object/FootpathObject.cpp @@ -77,7 +77,7 @@ void FootpathObject::ReadJson(IReadObjectContext* context, const json_t* root) properties, { { "hasSupportImages", FOOTPATH_ENTRY_FLAG_HAS_SUPPORT_BASE_SPRITE }, - { "hasElevatedPathImages", FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE }, + { "hasElevatedPathImages", RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS }, { "editorOnly", FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR }, }); diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index 3d28614af4..da76759281 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -486,7 +486,7 @@ static void sub_6A4101( // save ecx, ebp, esi uint32_t dword_F3EF80 = ebp; - if (!(railingEntry->flags & FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE)) + if (!(railingEntry->flags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS)) { dword_F3EF80 &= 0x0F; } @@ -1061,7 +1061,7 @@ void path_paint_box_support( height + boundingBoxZOffset); // TODO: Revert this when path import works correctly. - if (!pathElement->IsQueue() && !(railingEntry->flags & FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE)) + if (!pathElement->IsQueue() && !(railingEntry->flags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS)) { // don't draw } @@ -1216,7 +1216,7 @@ void path_paint_pole_support( boundBoxOffset.y, height + boundingBoxZOffset); // TODO: Revert this when path import works correctly. - if (pathElement->IsQueue() || (railingEntry->flags & FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE)) + if (pathElement->IsQueue() || (railingEntry->flags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS)) { sub_98199C( session, imageId | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x, diff --git a/src/openrct2/world/Footpath.h b/src/openrct2/world/Footpath.h index 3e98402270..ebb557b8a2 100644 --- a/src/openrct2/world/Footpath.h +++ b/src/openrct2/world/Footpath.h @@ -79,10 +79,14 @@ enum enum { FOOTPATH_ENTRY_FLAG_HAS_SUPPORT_BASE_SPRITE = (1 << 0), - FOOTPATH_ENTRY_FLAG_HAS_PATH_BASE_SPRITE = (1 << 1), // When elevated FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR = (1 << 2), }; +enum +{ + RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS = (1 << 1), // When elevated +}; + enum { FOOTPATH_SEARCH_SUCCESS,