diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index 919cb5ddde..5cbc8249f9 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -857,7 +857,7 @@ namespace OpenRCT2::Ui const auto& widget = w.widgets[widgetIndex]; // Get the image - if (widget.image.GetIndex() == kSpriteIdNull) + if (widget.image.GetIndex() == kImageIndexUndefined) return; auto image = widget.image; diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index 1818b1cb8a..bfccd04fd9 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -917,7 +917,7 @@ namespace OpenRCT2::Ui::Windows for (size_t i = 0; i < std::size(ObjectSelectionPages); i++) { auto& widget = widgets[WIDX_TAB_1 + i]; - if (ObjectSelectionPages[i].Image != kSpriteIdNull) + if (ObjectSelectionPages[i].Image != kImageIndexUndefined) { widget.type = WidgetType::tab; widget.left = x; diff --git a/src/openrct2-ui/windows/EditorParkEntrance.cpp b/src/openrct2-ui/windows/EditorParkEntrance.cpp index 4bc14ab6d7..e08bf361a3 100644 --- a/src/openrct2-ui/windows/EditorParkEntrance.cpp +++ b/src/openrct2-ui/windows/EditorParkEntrance.cpp @@ -48,7 +48,7 @@ namespace OpenRCT2::Ui::Windows { ObjectEntryIndex entryIndex = kObjectEntryIndexNull; StringId stringId = kStringIdNone; - ImageIndex imageId = kSpriteIdNull; + ImageIndex imageId = kImageIndexUndefined; }; enum WindowEditorParkEntranceListWidgetIdx diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index 8d7546ab0f..59d6250278 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -688,8 +688,8 @@ namespace OpenRCT2::Ui::Windows if (gFootpathSelection.LegacyPath == kObjectEntryIndexNull) { // Set footpath and queue type button images - auto pathImage = kSpriteIdNull; - auto queueImage = kSpriteIdNull; + auto pathImage = kImageIndexUndefined; + auto queueImage = kImageIndexUndefined; auto pathEntry = GetPathSurfaceEntry(gFootpathSelection.NormalSurface); if (pathEntry != nullptr) { @@ -706,7 +706,7 @@ namespace OpenRCT2::Ui::Windows WindowFootpathDrawDropdownButton(rt, WIDX_QUEUELINE_TYPE, queueImage); // Set railing - auto railingsImage = kSpriteIdNull; + auto railingsImage = kImageIndexUndefined; auto railingsEntry = GetPathRailingsEntry(gFootpathSelection.Railings); if (railingsEntry != nullptr) { @@ -719,8 +719,8 @@ namespace OpenRCT2::Ui::Windows auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); // Set footpath and queue type button images - auto pathImage = kSpriteIdNull; - auto queueImage = kSpriteIdNull; + auto pathImage = kImageIndexUndefined; + auto queueImage = kImageIndexUndefined; const auto* pathObj = objManager.GetLoadedObject(gFootpathSelection.LegacyPath); if (pathObj != nullptr) { diff --git a/src/openrct2/drawing/ImageId.hpp b/src/openrct2/drawing/ImageId.hpp index 8a0cdaaa45..bc24def9a8 100644 --- a/src/openrct2/drawing/ImageId.hpp +++ b/src/openrct2/drawing/ImageId.hpp @@ -18,8 +18,6 @@ using colour_t = uint8_t; enum class FilterPaletteID : int32_t; -static constexpr ImageIndex kImageIndexUndefined = std::numeric_limits::max(); - enum class ImageCatalogue { UNKNOWN, diff --git a/src/openrct2/drawing/ImageIndexType.h b/src/openrct2/drawing/ImageIndexType.h index c88581561e..1a0cb843be 100644 --- a/src/openrct2/drawing/ImageIndexType.h +++ b/src/openrct2/drawing/ImageIndexType.h @@ -14,4 +14,4 @@ using ImageIndex = uint32_t; -constexpr ImageIndex kSpriteIdNull = std::numeric_limits::max(); +constexpr ImageIndex kImageIndexUndefined = std::numeric_limits::max(); diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index d76afc8bfd..29fdbb061d 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -296,7 +296,7 @@ struct TrackDrawerEntry // or because they are not realistic for the ride type (e.g. LIM boosters in Mini Roller Coasters). RideTrackGroups extraTrackGroups{}; - ImageIndex icon = kSpriteIdNull; + ImageIndex icon = kImageIndexUndefined; StringId tooltip = kStringIdNone; void GetAvailableTrackGroups(RideTrackGroups& res) const; @@ -642,7 +642,7 @@ constexpr RideTypeDescriptor kDummyRTD = .PhotoItem = ShopItem::photo, .BonusValue = 0, .ColourPresets = kDefaultFlatRideColourPreset, - .ColourPreview = { kSpriteIdNull, kSpriteIdNull }, + .ColourPreview = { kImageIndexUndefined, kImageIndexUndefined }, .ColourKey = RideColourKey::Ride, .Name = "invalid", .RatingsData =