mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Change SCROLLING_MODE_NONE to kScrollingModeNone
This commit is contained in:
@@ -409,7 +409,7 @@ namespace OpenRCT2::Ui
|
||||
case ViewportInteractionItem::Wall:
|
||||
{
|
||||
auto* wallEntry = tileElement->AsWall()->GetEntry();
|
||||
if (wallEntry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (wallEntry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
auto banner = tileElement->AsWall()->GetBanner();
|
||||
if (banner != nullptr)
|
||||
@@ -428,7 +428,7 @@ namespace OpenRCT2::Ui
|
||||
case ViewportInteractionItem::LargeScenery:
|
||||
{
|
||||
auto* sceneryEntry = tileElement->AsLargeScenery()->GetEntry();
|
||||
if (sceneryEntry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (sceneryEntry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
auto banner = tileElement->AsLargeScenery()->GetBanner();
|
||||
if (banner != nullptr)
|
||||
@@ -693,7 +693,7 @@ namespace OpenRCT2::Ui
|
||||
static void ViewportInteractionRemoveParkWall(const WallElement& wallElement, const CoordsXY& mapCoords)
|
||||
{
|
||||
auto* wallEntry = wallElement.GetEntry();
|
||||
if (wallEntry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (wallEntry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
ContextOpenDetailWindow(WD_SIGN_SMALL, wallElement.GetBannerIndex().ToUnderlying());
|
||||
}
|
||||
@@ -713,7 +713,7 @@ namespace OpenRCT2::Ui
|
||||
{
|
||||
auto* sceneryEntry = largeSceneryElement.GetEntry();
|
||||
|
||||
if (sceneryEntry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (sceneryEntry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
auto bannerIndex = largeSceneryElement.GetBannerIndex();
|
||||
ContextOpenDetailWindow(WD_SIGN, bannerIndex.ToUnderlying());
|
||||
|
||||
@@ -1515,7 +1515,7 @@ static uint64_t PageDisabledWidgets[] = {
|
||||
|
||||
// Banner info
|
||||
auto* largeSceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry<LargeSceneryEntry>(largeSceneryType);
|
||||
if (largeSceneryEntry != nullptr && largeSceneryEntry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (largeSceneryEntry != nullptr && largeSceneryEntry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
auto banner = sceneryElement->GetBanner();
|
||||
if (banner != nullptr)
|
||||
|
||||
@@ -118,7 +118,7 @@ GameActions::Result LargeSceneryPlaceAction::Query() const
|
||||
|
||||
res.Position.z = maxHeight;
|
||||
|
||||
if (sceneryEntry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (sceneryEntry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
if (HasReachedBannerLimit())
|
||||
{
|
||||
@@ -238,7 +238,7 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const
|
||||
|
||||
// Allocate banner
|
||||
Banner* banner = nullptr;
|
||||
if (sceneryEntry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (sceneryEntry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
banner = CreateBanner();
|
||||
if (banner == nullptr)
|
||||
|
||||
@@ -238,7 +238,7 @@ GameActions::Result WallPlaceAction::Query() const
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE);
|
||||
}
|
||||
|
||||
if (wallEntry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (wallEntry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
if (HasReachedBannerLimit())
|
||||
{
|
||||
@@ -349,7 +349,7 @@ GameActions::Result WallPlaceAction::Execute() const
|
||||
}
|
||||
|
||||
Banner* banner = nullptr;
|
||||
if (wallEntry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (wallEntry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
banner = CreateBanner();
|
||||
if (banner == nullptr)
|
||||
|
||||
@@ -208,7 +208,7 @@ void LargeSceneryObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
_legacyType.price = Json::GetNumber<int16_t>(properties["price"]) * 10;
|
||||
_legacyType.removal_price = Json::GetNumber<int16_t>(properties["removalPrice"]) * 10;
|
||||
|
||||
_legacyType.scrolling_mode = Json::GetNumber<uint8_t>(properties["scrollingMode"], SCROLLING_MODE_NONE);
|
||||
_legacyType.scrolling_mode = Json::GetNumber<uint8_t>(properties["scrollingMode"], kScrollingModeNone);
|
||||
|
||||
_legacyType.flags = Json::GetFlags<uint8_t>(
|
||||
properties,
|
||||
|
||||
@@ -87,7 +87,7 @@ void StationObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
if (properties.is_object())
|
||||
{
|
||||
Height = Json::GetNumber<int32_t>(properties["height"]);
|
||||
ScrollingMode = Json::GetNumber<uint8_t>(properties["scrollingMode"], SCROLLING_MODE_NONE);
|
||||
ScrollingMode = Json::GetNumber<uint8_t>(properties["scrollingMode"], kScrollingModeNone);
|
||||
Flags = Json::GetFlags<uint32_t>(
|
||||
properties,
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ void WallObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
_legacyType.height = Json::GetNumber<uint8_t>(properties["height"]);
|
||||
_legacyType.price = Json::GetNumber<money64>(properties["price"]);
|
||||
|
||||
_legacyType.scrolling_mode = Json::GetNumber<uint8_t>(properties["scrollingMode"], SCROLLING_MODE_NONE);
|
||||
_legacyType.scrolling_mode = Json::GetNumber<uint8_t>(properties["scrollingMode"], kScrollingModeNone);
|
||||
|
||||
SetPrimarySceneryGroup(ObjectEntryDescriptor(Json::GetString(properties["sceneryGroup"])));
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ static void PaintRideEntranceExitScrollingText(
|
||||
{
|
||||
PROFILED_FUNCTION();
|
||||
|
||||
if (stationObj.ScrollingMode == SCROLLING_MODE_NONE)
|
||||
if (stationObj.ScrollingMode == kScrollingModeNone)
|
||||
return;
|
||||
|
||||
if (entranceEl.GetEntranceType() == ENTRANCE_TYPE_RIDE_EXIT)
|
||||
@@ -229,7 +229,7 @@ static void PaintParkEntranceScrollingText(
|
||||
return;
|
||||
|
||||
auto scrollingMode = entrance.GetScrollingMode();
|
||||
if (scrollingMode == SCROLLING_MODE_NONE)
|
||||
if (scrollingMode == kScrollingModeNone)
|
||||
return;
|
||||
|
||||
auto ft = Formatter();
|
||||
|
||||
@@ -405,7 +405,7 @@ void PaintLargeScenery(PaintSession& session, uint8_t direction, uint16_t height
|
||||
auto imageIndex = sceneryEntry->image + 4 + (sequenceNum << 2) + direction;
|
||||
PaintAddImageAsParent(session, imageTemplate.WithIndex(imageIndex), { 0, 0, height }, { bbOffset, bbLength });
|
||||
|
||||
if (sceneryEntry->scrolling_mode != SCROLLING_MODE_NONE && direction != 1 && direction != 2)
|
||||
if (sceneryEntry->scrolling_mode != kScrollingModeNone && direction != 1 && direction != 2)
|
||||
{
|
||||
if (sceneryEntry->flags & LARGE_SCENERY_FLAG_3D_TEXT)
|
||||
{
|
||||
|
||||
@@ -159,7 +159,7 @@ static void PaintWallScrollingText(
|
||||
return;
|
||||
|
||||
auto scrollingMode = wallEntry.scrolling_mode;
|
||||
if (scrollingMode == SCROLLING_MODE_NONE)
|
||||
if (scrollingMode == kScrollingModeNone)
|
||||
return;
|
||||
|
||||
scrollingMode = wallEntry.scrolling_mode + ((direction + 1) & 3);
|
||||
|
||||
@@ -1488,7 +1488,7 @@ namespace OpenRCT2::RCT2
|
||||
// Import banner information
|
||||
dst2->SetBannerIndex(BannerIndex::GetNull());
|
||||
auto entry = dst2->GetEntry();
|
||||
if (entry != nullptr && entry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (entry != nullptr && entry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
auto bannerIndex = src2->GetBannerIndex();
|
||||
if (bannerIndex < std::size(_s6.Banners))
|
||||
@@ -1521,7 +1521,7 @@ namespace OpenRCT2::RCT2
|
||||
// Import banner information
|
||||
dst2->SetBannerIndex(BannerIndex::GetNull());
|
||||
auto entry = dst2->GetEntry();
|
||||
if (entry != nullptr && entry->scrolling_mode != SCROLLING_MODE_NONE)
|
||||
if (entry != nullptr && entry->scrolling_mode != kScrollingModeNone)
|
||||
{
|
||||
auto bannerIndex = src2->GetBannerIndex();
|
||||
if (bannerIndex < std::size(_s6.Banners))
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace OpenRCT2::Scripting
|
||||
{
|
||||
auto element = &first[index];
|
||||
if (element->GetType() != TileElementType::LargeScenery
|
||||
|| element->AsLargeScenery()->GetEntry()->scrolling_mode == SCROLLING_MODE_NONE
|
||||
|| element->AsLargeScenery()->GetEntry()->scrolling_mode == kScrollingModeNone
|
||||
|| ScTileElement::GetOtherLargeSceneryElement(_coords, element->AsLargeScenery()) == nullptr)
|
||||
{
|
||||
element->RemoveBannerEntry();
|
||||
|
||||
@@ -2205,7 +2205,7 @@ namespace OpenRCT2::Scripting
|
||||
{
|
||||
// check if other element still uses the banner entry
|
||||
if (_element->GetType() == TileElementType::LargeScenery
|
||||
&& _element->AsLargeScenery()->GetEntry()->scrolling_mode != SCROLLING_MODE_NONE
|
||||
&& _element->AsLargeScenery()->GetEntry()->scrolling_mode != kScrollingModeNone
|
||||
&& GetOtherLargeSceneryElement(_coords, _element->AsLargeScenery()) != nullptr)
|
||||
return;
|
||||
// remove banner entry (if one exists)
|
||||
@@ -2222,7 +2222,7 @@ namespace OpenRCT2::Scripting
|
||||
case TileElementType::Wall:
|
||||
{
|
||||
auto wallEntry = _element->AsWall()->GetEntry();
|
||||
if (wallEntry == nullptr || wallEntry->scrolling_mode == SCROLLING_MODE_NONE)
|
||||
if (wallEntry == nullptr || wallEntry->scrolling_mode == kScrollingModeNone)
|
||||
return;
|
||||
break;
|
||||
}
|
||||
@@ -2230,7 +2230,7 @@ namespace OpenRCT2::Scripting
|
||||
{
|
||||
auto largeScenery = _element->AsLargeScenery();
|
||||
auto largeSceneryEntry = largeScenery->GetEntry();
|
||||
if (largeSceneryEntry == nullptr || largeSceneryEntry->scrolling_mode == SCROLLING_MODE_NONE)
|
||||
if (largeSceneryEntry == nullptr || largeSceneryEntry->scrolling_mode == kScrollingModeNone)
|
||||
return;
|
||||
|
||||
auto otherElement = GetOtherLargeSceneryElement(_coords, largeScenery);
|
||||
|
||||
@@ -187,7 +187,7 @@ WallElement* BannerGetScrollingWallTileElement(BannerIndex bannerIndex)
|
||||
continue;
|
||||
|
||||
auto* wallEntry = wallElement->GetEntry();
|
||||
if (wallEntry->scrolling_mode == SCROLLING_MODE_NONE)
|
||||
if (wallEntry->scrolling_mode == kScrollingModeNone)
|
||||
continue;
|
||||
if (wallElement->GetBannerIndex() != bannerIndex)
|
||||
continue;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace OpenRCT2
|
||||
constexpr ObjectEntryIndex BANNER_NULL = kObjectEntryIndexNull;
|
||||
constexpr size_t kMaxBanners = 8192;
|
||||
|
||||
constexpr uint8_t SCROLLING_MODE_NONE = 255;
|
||||
constexpr uint8_t kScrollingModeNone = 255;
|
||||
|
||||
struct Banner
|
||||
{
|
||||
|
||||
@@ -567,7 +567,7 @@ static bool MapAnimationInvalidateWall(const CoordsXYZ& loc)
|
||||
auto* wallEntry = tileElement->AsWall()->GetEntry();
|
||||
|
||||
if (wallEntry == nullptr
|
||||
|| (!(wallEntry->flags2 & WALL_SCENERY_2_ANIMATED) && wallEntry->scrolling_mode == SCROLLING_MODE_NONE))
|
||||
|| (!(wallEntry->flags2 & WALL_SCENERY_2_ANIMATED) && wallEntry->scrolling_mode == kScrollingModeNone))
|
||||
continue;
|
||||
|
||||
MapInvalidateTileZoom1({ loc, loc.z, loc.z + 16 });
|
||||
@@ -639,7 +639,7 @@ void MapAnimationAutoCreateAtTileElement(TileCoordsXY coords, TileElement* el)
|
||||
{
|
||||
auto wallEl = el->AsWall();
|
||||
auto* entry = wallEl->GetEntry();
|
||||
if (entry != nullptr && ((entry->flags2 & WALL_SCENERY_2_ANIMATED) || entry->scrolling_mode != SCROLLING_MODE_NONE))
|
||||
if (entry != nullptr && ((entry->flags2 & WALL_SCENERY_2_ANIMATED) || entry->scrolling_mode != kScrollingModeNone))
|
||||
{
|
||||
MapAnimationCreate(MAP_ANIMATION_TYPE_WALL, loc);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ BannerIndex TileElement::GetBannerIndex() const
|
||||
case TileElementType::LargeScenery:
|
||||
{
|
||||
auto* sceneryEntry = AsLargeScenery()->GetEntry();
|
||||
if (sceneryEntry == nullptr || sceneryEntry->scrolling_mode == SCROLLING_MODE_NONE)
|
||||
if (sceneryEntry == nullptr || sceneryEntry->scrolling_mode == kScrollingModeNone)
|
||||
return BannerIndex::GetNull();
|
||||
|
||||
return AsLargeScenery()->GetBannerIndex();
|
||||
@@ -38,7 +38,7 @@ BannerIndex TileElement::GetBannerIndex() const
|
||||
case TileElementType::Wall:
|
||||
{
|
||||
auto* wallEntry = AsWall()->GetEntry();
|
||||
if (wallEntry == nullptr || wallEntry->scrolling_mode == SCROLLING_MODE_NONE)
|
||||
if (wallEntry == nullptr || wallEntry->scrolling_mode == kScrollingModeNone)
|
||||
return BannerIndex::GetNull();
|
||||
|
||||
return AsWall()->GetBannerIndex();
|
||||
|
||||
Reference in New Issue
Block a user