Merge pull request #15167 from ZehMatt/ride-id-fixes

Convert ride_id_t to a strong type
This commit is contained in:
Michael Steenbeek
2021-09-10 19:01:33 +02:00
committed by GitHub
55 changed files with 353 additions and 341 deletions

View File

@@ -50,9 +50,9 @@ set(OBJECTS_VERSION "1.0.21")
set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v${OBJECTS_VERSION}/objects.zip")
set(OBJECTS_SHA1 "c38af45d51a6e440386180feacf76c64720b6ac5")
set(REPLAYS_VERSION "0.0.50")
set(REPLAYS_VERSION "0.0.51")
set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v${REPLAYS_VERSION}/replays.zip")
set(REPLAYS_SHA1 "C569C73147F1C1554807B6FBE74C39A4F0E20EAF")
set(REPLAYS_SHA1 "01086A05A3291B296906AE215855BC7CDB045A6A")
option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.")
option(WITH_TESTS "Build tests")

View File

@@ -48,8 +48,8 @@
<TitleSequencesSha1>304d13a126c15bf2c86ff13b81a2f2cc1856ac8d</TitleSequencesSha1>
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.0.21/objects.zip</ObjectsUrl>
<ObjectsSha1>c38af45d51a6e440386180feacf76c64720b6ac5</ObjectsSha1>
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.50/replays.zip</ReplaysUrl>
<ReplaysSha1>C569C73147F1C1554807B6FBE74C39A4F0E20EAF</ReplaysSha1>
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.51/replays.zip</ReplaysUrl>
<ReplaysSha1>01086A05A3291B296906AE215855BC7CDB045A6A</ReplaysSha1>
</PropertyGroup>
<ItemGroup>

View File

@@ -184,9 +184,9 @@ public:
case WD_BANNER:
return window_banner_open(id);
case WD_DEMOLISH_RIDE:
return window_ride_demolish_prompt_open(get_ride(id));
return window_ride_demolish_prompt_open(get_ride(static_cast<ride_id_t>(id)));
case WD_REFURBISH_RIDE:
return window_ride_refurbish_prompt_open(get_ride(id));
return window_ride_refurbish_prompt_open(get_ride(static_cast<ride_id_t>(id)));
case WD_NEW_CAMPAIGN:
return window_new_campaign_open(id);
case WD_SIGN:
@@ -264,7 +264,8 @@ public:
}
case WC_RIDE:
{
auto ride = get_ride(intent->GetSIntExtra(INTENT_EXTRA_RIDE_ID));
const auto rideId = static_cast<ride_id_t>(intent->GetSIntExtra(INTENT_EXTRA_RIDE_ID));
auto ride = get_ride(rideId);
return ride == nullptr ? nullptr : window_ride_main_open(ride);
}
case WC_TRACK_DESIGN_PLACE:
@@ -343,13 +344,13 @@ public:
if (w == nullptr || w->number != rideIndex)
{
window_close_construction_windows();
_currentRideIndex = rideIndex;
_currentRideIndex = static_cast<ride_id_t>(rideIndex);
w = OpenWindow(WC_RIDE_CONSTRUCTION);
}
else
{
ride_construction_invalidate_current_track();
_currentRideIndex = rideIndex;
_currentRideIndex = static_cast<ride_id_t>(rideIndex);
}
break;
}
@@ -395,7 +396,7 @@ public:
case INTENT_ACTION_INVALIDATE_VEHICLE_WINDOW:
{
auto vehicle = static_cast<Vehicle*>(intent.GetPointerExtra(INTENT_EXTRA_VEHICLE));
auto w = window_find_by_number(WC_RIDE, vehicle->ride);
auto w = window_find_by_number(WC_RIDE, EnumValue(vehicle->ride));
if (w == nullptr)
return;

View File

@@ -84,7 +84,7 @@ rct_window* window_ride_demolish_prompt_open(Ride* ride)
w->widgets = window_ride_demolish_widgets;
w->enabled_widgets = (1ULL << WIDX_CLOSE) | (1ULL << WIDX_CANCEL) | (1ULL << WIDX_DEMOLISH);
WindowInitScrollWidgets(w);
w->number = ride->id;
w->rideId = ride->id;
_demolishRideCost = -ride_get_refund_price(ride);
return w;
@@ -109,7 +109,7 @@ rct_window* window_ride_refurbish_prompt_open(Ride* ride)
w->widgets = window_ride_refurbish_widgets;
w->enabled_widgets = (1ULL << WIDX_CLOSE) | (1ULL << WIDX_CANCEL) | (1ULL << WIDX_REFURBISH);
WindowInitScrollWidgets(w);
w->number = ride->id;
w->rideId = ride->id;
_demolishRideCost = -ride_get_refund_price(ride);
return w;
@@ -125,7 +125,7 @@ static void window_ride_demolish_mouseup(rct_window* w, rct_widgetindex widgetIn
{
case WIDX_DEMOLISH:
{
auto ride = get_ride(w->number);
auto ride = get_ride(w->rideId);
ride_action_modify(ride, RIDE_MODIFY_DEMOLISH, GAME_COMMAND_FLAG_APPLY);
break;
}
@@ -142,7 +142,7 @@ static void window_ride_refurbish_mouseup(rct_window* w, rct_widgetindex widgetI
{
case WIDX_REFURBISH:
{
auto ride = get_ride(w->number);
auto ride = get_ride(w->rideId);
ride_action_modify(ride, RIDE_MODIFY_RENEW, GAME_COMMAND_FLAG_APPLY);
break;
}
@@ -161,7 +161,7 @@ static void window_ride_demolish_paint(rct_window* w, rct_drawpixelinfo* dpi)
{
WindowDrawWidgets(w, dpi);
auto ride = get_ride(w->number);
auto ride = get_ride(w->rideId);
if (ride != nullptr)
{
auto stringId = (gParkFlags & PARK_FLAGS_NO_MONEY) ? STR_DEMOLISH_RIDE_ID : STR_DEMOLISH_RIDE_ID_MONEY;
@@ -178,7 +178,7 @@ static void window_ride_refurbish_paint(rct_window* w, rct_drawpixelinfo* dpi)
{
WindowDrawWidgets(w, dpi);
auto ride = get_ride(w->number);
auto ride = get_ride(w->rideId);
if (ride != nullptr)
{
auto stringId = (gParkFlags & PARK_FLAGS_NO_MONEY) ? STR_REFURBISH_RIDE_ID_NO_MONEY : STR_REFURBISH_RIDE_ID_MONEY;

View File

@@ -972,7 +972,7 @@ static void window_editor_objective_options_rides_update(rct_window* w)
{
if (ride.IsRide())
{
w->list_item_positions[numItems] = ride.id;
w->list_item_positions[numItems] = EnumValue(ride.id);
numItems++;
}
}
@@ -1005,7 +1005,8 @@ static void window_editor_objective_options_rides_scrollmousedown(
if (i < 0 || i >= w->no_list_items)
return;
auto ride = get_ride(w->list_item_positions[i]);
const auto rideId = static_cast<ride_id_t>(w->list_item_positions[i]);
auto ride = get_ride(rideId);
if (ride != nullptr)
{
ride->lifecycle_flags ^= RIDE_LIFECYCLE_INDESTRUCTIBLE;
@@ -1098,7 +1099,8 @@ static void window_editor_objective_options_rides_scrollpaint(rct_window* w, rct
}
// Checkbox mark
auto ride = get_ride(w->list_item_positions[i]);
const auto rideId = static_cast<ride_id_t>(w->list_item_positions[i]);
auto ride = get_ride(rideId);
if (ride != nullptr)
{
if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE)

View File

@@ -1456,7 +1456,7 @@ void window_guest_rides_update(rct_window* w)
{
if (ride.IsRide() && guest->HasRidden(&ride))
{
w->list_item_positions[curr_list_position] = ride.id;
w->list_item_positions[curr_list_position] = EnumValue(ride.id);
curr_list_position++;
}
}
@@ -1607,7 +1607,8 @@ void window_guest_rides_scroll_paint(rct_window* w, rct_drawpixelinfo* dpi, int3
stringId = STR_WINDOW_COLOUR_2_STRINGID;
}
auto ride = get_ride(w->list_item_positions[list_index]);
const auto rideId = static_cast<ride_id_t>(w->list_item_positions[list_index]);
auto ride = get_ride(rideId);
if (ride != nullptr)
{
auto ft = Formatter();

View File

@@ -182,7 +182,7 @@ public:
{
case GuestListFilterType::GuestsOnRide:
{
auto guestRide = get_ride(index);
auto guestRide = get_ride(static_cast<ride_id_t>(index));
if (guestRide != nullptr)
{
ft.Add<rct_string_id>(
@@ -198,7 +198,7 @@ public:
}
case GuestListFilterType::GuestsInQueue:
{
auto guestRide = get_ride(index);
auto guestRide = get_ride(static_cast<ride_id_t>(index));
if (guestRide != nullptr)
{
ft.Add<rct_string_id>(STR_QUEUING_FOR);
@@ -213,7 +213,7 @@ public:
}
case GuestListFilterType::GuestsThinkingAboutRide:
{
auto guestRide = get_ride(index);
auto guestRide = get_ride(static_cast<ride_id_t>(index));
if (guestRide != nullptr)
{
ft.Add<rct_string_id>(STR_NONE);

View File

@@ -130,7 +130,7 @@ rct_window* window_maze_construction_open()
WindowInitScrollWidgets(w);
w->number = _currentRideIndex;
w->rideId = _currentRideIndex;
window_push_others_right(w);
show_gridlines();
@@ -169,7 +169,7 @@ static void window_maze_construction_close(rct_window* w)
else
{
auto intent = Intent(WC_RIDE);
intent.putExtra(INTENT_EXTRA_RIDE_ID, ride->id);
intent.putExtra(INTENT_EXTRA_RIDE_ID, EnumValue(ride->id));
context_open_intent(&intent);
}
}
@@ -181,7 +181,7 @@ static void window_maze_construction_entrance_mouseup(rct_window* w, rct_widgeti
return;
gRideEntranceExitPlaceType = widgetIndex == WIDX_MAZE_ENTRANCE ? ENTRANCE_TYPE_RIDE_ENTRANCE : ENTRANCE_TYPE_RIDE_EXIT;
gRideEntranceExitPlaceRideIndex = static_cast<uint8_t>(w->number);
gRideEntranceExitPlaceRideIndex = w->rideId;
gRideEntranceExitPlaceStationIndex = 0;
input_set_flag(INPUT_FLAG_6, true);

View File

@@ -22,7 +22,9 @@
static constexpr const rct_string_id WINDOW_TITLE = STR_NONE;
static constexpr const int32_t WH = 109;
static constexpr const int32_t WW = 350;
constexpr uint16_t SELECTED_RIDE_UNDEFINED = 0xFFFF;
constexpr auto SELECTED_RIDE_UNDEFINED = RIDE_ID_NULL;
constexpr uint16_t SELECTED_ITEM_UNDEFINED = 0xFFFF;
// clang-format off
enum WINDOW_NEW_CAMPAIGN_WIDGET_IDX {
@@ -205,9 +207,9 @@ public:
else
{
int32_t numItems = 0;
for (auto rideId : RideList)
for (auto rideIndex : RideList)
{
auto curRide = get_ride(rideId);
auto curRide = get_ride(rideIndex);
if (curRide != nullptr)
{
// HACK until dropdown items have longer argument buffers
@@ -252,7 +254,8 @@ public:
break;
case WIDX_START_BUTTON:
{
auto gameAction = ParkMarketingAction(campaign.campaign_type, campaign.RideId, campaign.no_weeks);
auto gameAction = ParkMarketingAction(
campaign.campaign_type, static_cast<int32_t>(campaign.RideId), campaign.no_weeks);
gameAction.SetCallback([](const GameAction* ga, const GameActions::Result* result) {
if (result->Error == GameActions::Status::Ok)
{
@@ -322,7 +325,7 @@ public:
widgets[WIDX_RIDE_DROPDOWN].type = WindowWidgetType::DropdownMenu;
widgets[WIDX_RIDE_DROPDOWN_BUTTON].type = WindowWidgetType::Button;
widgets[WIDX_RIDE_LABEL].text = STR_MARKETING_ITEM;
if (campaign.ShopItemId != SELECTED_RIDE_UNDEFINED)
if (campaign.ShopItemId != SELECTED_ITEM_UNDEFINED)
{
widgets[WIDX_RIDE_DROPDOWN].text = GetShopItemDescriptor(ShopItem(campaign.ShopItemId)).Naming.Plural;
}

File diff suppressed because it is too large Load Diff

View File

@@ -495,9 +495,9 @@ static int32_t ride_get_alternative_type(Ride* ride)
}
/* move to ride.c */
static void close_ride_window_for_construction(rct_windownumber number)
static void close_ride_window_for_construction(ride_id_t rideId)
{
rct_window* w = window_find_by_number(WC_RIDE, number);
rct_window* w = window_find_by_number(WC_RIDE, EnumValue(rideId));
if (w != nullptr && w->page == 1)
window_close(w);
}
@@ -543,7 +543,7 @@ rct_window* window_ride_construction_open()
w->colours[1] = COLOUR_DARK_BROWN;
w->colours[2] = COLOUR_DARK_BROWN;
w->number = rideIndex;
w->rideId = rideIndex;
window_push_others_right(w);
show_gridlines();
@@ -620,7 +620,7 @@ static void window_ride_construction_close(rct_window* w)
ride->SetToDefaultInspectionInterval();
auto intent = Intent(WC_RIDE);
intent.putExtra(INTENT_EXTRA_RIDE_ID, ride->id);
intent.putExtra(INTENT_EXTRA_RIDE_ID, EnumValue(ride->id));
context_open_intent(&intent);
}
else
@@ -1937,7 +1937,7 @@ static void window_ride_construction_mouseup_demolish(rct_window* w)
_currentTrackPieceType, 0,
{ _currentTrackBegin.x, _currentTrackBegin.y, _currentTrackBegin.z, _currentTrackPieceDirection });
const auto rideId = w->number;
const auto rideId = w->rideId;
trackRemoveAction.SetCallback([=](const GameAction* ga, const GameActions::Result* result) {
if (result->Error != GameActions::Status::Ok)
{
@@ -1987,7 +1987,7 @@ static void window_ride_construction_entrance_click(rct_window* w)
else
{
gRideEntranceExitPlaceType = ENTRANCE_TYPE_RIDE_ENTRANCE;
gRideEntranceExitPlaceRideIndex = static_cast<ride_id_t>(w->number);
gRideEntranceExitPlaceRideIndex = w->rideId;
gRideEntranceExitPlaceStationIndex = 0;
input_set_flag(INPUT_FLAG_6, true);
ride_construction_invalidate_current_track();
@@ -2017,7 +2017,7 @@ static void window_ride_construction_exit_click(rct_window* w)
else
{
gRideEntranceExitPlaceType = ENTRANCE_TYPE_RIDE_EXIT;
gRideEntranceExitPlaceRideIndex = w->number & 0xFF;
gRideEntranceExitPlaceRideIndex = w->rideId;
gRideEntranceExitPlaceStationIndex = 0;
input_set_flag(INPUT_FLAG_6, true);
ride_construction_invalidate_current_track();

View File

@@ -443,7 +443,7 @@ static void window_ride_list_scrollmousedown(rct_window* w, int32_t scrollIndex,
else
{
auto intent = Intent(WC_RIDE);
intent.putExtra(INTENT_EXTRA_RIDE_ID, rideIndex);
intent.putExtra(INTENT_EXTRA_RIDE_ID, EnumValue(rideIndex));
context_open_intent(&intent);
}
}

View File

@@ -1931,7 +1931,7 @@ static void window_tile_inspector_paint(rct_window* w, rct_drawpixelinfo* dpi)
// Details
// Ride
auto trackElement = tileElement->AsTrack();
int16_t rideId = trackElement->GetRideIndex();
ride_id_t rideId = trackElement->GetRideIndex();
auto ride = get_ride(rideId);
if (ride != nullptr)
{

View File

@@ -268,7 +268,8 @@ static void window_track_place_toolupdate(rct_window* w, rct_widgetindex widgetI
// Check if tool map position has changed since last update
if (mapCoords == _windowTrackPlaceLast)
{
place_virtual_track(_trackDesign.get(), PTD_OPERATION_DRAW_OUTLINES, true, GetOrAllocateRide(0), { mapCoords, 0 });
place_virtual_track(
_trackDesign.get(), PTD_OPERATION_DRAW_OUTLINES, true, GetOrAllocateRide(PreviewRideId), { mapCoords, 0 });
return;
}
@@ -308,7 +309,7 @@ static void window_track_place_toolupdate(rct_window* w, rct_widgetindex widgetI
widget_invalidate(w, WIDX_PRICE);
}
place_virtual_track(_trackDesign.get(), PTD_OPERATION_DRAW_OUTLINES, true, GetOrAllocateRide(0), trackLoc);
place_virtual_track(_trackDesign.get(), PTD_OPERATION_DRAW_OUTLINES, true, GetOrAllocateRide(PreviewRideId), trackLoc);
}
/**
@@ -348,7 +349,7 @@ static void window_track_place_tooldown(rct_window* w, rct_widgetindex widgetInd
if (track_design_are_entrance_and_exit_placed())
{
auto intent = Intent(WC_RIDE);
intent.putExtra(INTENT_EXTRA_RIDE_ID, result->rideIndex);
intent.putExtra(INTENT_EXTRA_RIDE_ID, static_cast<int32_t>(result->rideIndex));
context_open_intent(&intent);
auto wnd = window_find_by_class(WC_TRACK_DESIGN_PLACE);
window_close(wnd);
@@ -469,7 +470,9 @@ static int32_t window_track_place_get_base_z(const CoordsXY& loc)
if (surfaceElement->GetWaterHeight() > 0)
z = std::max(z, surfaceElement->GetWaterHeight());
return z + place_virtual_track(_trackDesign.get(), PTD_OPERATION_GET_PLACE_Z, true, GetOrAllocateRide(0), { loc, z });
return z
+ place_virtual_track(
_trackDesign.get(), PTD_OPERATION_GET_PLACE_Z, true, GetOrAllocateRide(PreviewRideId), { loc, z });
}
/**

View File

@@ -192,14 +192,10 @@ void setup_in_use_selection_flags()
}
} while (tile_element_iterator_next(&iter));
for (ride_id_t ride_index = 0; ride_index < MAX_RIDES; ride_index++)
for (auto& ride : GetRideManager())
{
auto ride = get_ride(ride_index);
if (ride != nullptr)
{
ObjectEntryIndex type = ride->subtype;
Editor::SetSelectedObject(ObjectType::Ride, type, OBJECT_SELECTION_FLAG_SELECTED);
}
ObjectEntryIndex type = ride.subtype;
Editor::SetSelectedObject(ObjectType::Ride, type, OBJECT_SELECTION_FLAG_SELECTED);
}
// Apply selected object status for hacked vehicles that may not have an associated ride

View File

@@ -70,7 +70,7 @@ GameActions::Result::Ptr ParkMarketingAction::Execute() const
campaign.Flags = MarketingCampaignFlags::FIRST_WEEK;
if (campaign.Type == ADVERTISING_CAMPAIGN_RIDE_FREE || campaign.Type == ADVERTISING_CAMPAIGN_RIDE)
{
campaign.RideId = _item;
campaign.RideId = static_cast<ride_id_t>(_item);
}
else if (campaign.Type == ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE)
{

View File

@@ -131,14 +131,16 @@ GameActions::Result::Ptr RideDemolishAction::DemolishRide(Ride* ride) const
ride->ValidateStations();
ride_clear_leftover_entrances(ride);
News::DisableNewsItems(News::ItemType::Ride, _rideIndex);
UnlinkAllBannersForRide(_rideIndex);
const auto rideId = ride->id;
News::DisableNewsItems(News::ItemType::Ride, EnumValue(rideId));
RideUse::GetHistory().RemoveValue(_rideIndex);
UnlinkAllBannersForRide(ride->id);
RideUse::GetHistory().RemoveValue(ride->id);
for (auto peep : EntityList<Guest>())
{
peep->RemoveRideFromMemory(_rideIndex);
peep->RemoveRideFromMemory(ride->id);
}
MarketingCancelCampaignsForRide(_rideIndex);
@@ -157,9 +159,9 @@ GameActions::Result::Ptr RideDemolishAction::DemolishRide(Ride* ride) const
gParkValue = GetContext()->GetGameState()->GetPark().CalculateParkValue();
// Close windows related to the demolished ride
window_close_by_number(WC_RIDE_CONSTRUCTION, _rideIndex);
window_close_by_number(WC_RIDE, _rideIndex);
window_close_by_number(WC_DEMOLISH_RIDE_PROMPT, _rideIndex);
window_close_by_number(WC_RIDE_CONSTRUCTION, EnumValue(rideId));
window_close_by_number(WC_RIDE, EnumValue(rideId));
window_close_by_number(WC_DEMOLISH_RIDE_PROMPT, EnumValue(rideId));
window_close_by_class(WC_NEW_CAMPAIGN);
// Refresh windows that display the ride name
@@ -272,7 +274,7 @@ GameActions::Result::Ptr RideDemolishAction::RefurbishRide(Ride* ride) const
res->Position = { location, tile_element_height(location) };
}
window_close_by_number(WC_DEMOLISH_RIDE_PROMPT, _rideIndex);
window_close_by_number(WC_DEMOLISH_RIDE_PROMPT, EnumValue(_rideIndex));
return res;
}

View File

@@ -54,7 +54,7 @@ GameActions::Result::Ptr RideEntranceExitPlaceAction::Query() const
auto ride = get_ride(_rideIndex);
if (ride == nullptr)
{
log_warning("Invalid game command for ride %d", static_cast<int32_t>(_rideIndex));
log_warning("Invalid game command for ride %d", EnumValue(_rideIndex));
return MakeResult(GameActions::Status::InvalidParameters, errorTitle);
}
@@ -132,7 +132,7 @@ GameActions::Result::Ptr RideEntranceExitPlaceAction::Execute() const
auto ride = get_ride(_rideIndex);
if (ride == nullptr)
{
log_warning("Invalid game command for ride %d", static_cast<int32_t>(_rideIndex));
log_warning("Invalid game command for ride %d", EnumValue(_rideIndex));
return MakeResult(GameActions::Status::InvalidParameters, errorTitle);
}

View File

@@ -74,7 +74,7 @@ GameActions::Result::Ptr RideEntranceExitRemoveAction::Query() const
auto ride = get_ride(_rideIndex);
if (ride == nullptr)
{
log_warning("Invalid ride id %d for entrance/exit removal", static_cast<int32_t>(_rideIndex));
log_warning("Invalid ride id %d for entrance/exit removal", EnumValue(_rideIndex));
return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE);
}
@@ -99,8 +99,8 @@ GameActions::Result::Ptr RideEntranceExitRemoveAction::Query() const
if (entranceElement == nullptr)
{
log_warning(
"Track Element not found. x = %d, y = %d, ride = %d, station = %d", _loc.x, _loc.y,
static_cast<int32_t>(_rideIndex), _stationNum);
"Track Element not found. x = %d, y = %d, ride = %d, station = %d", _loc.x, _loc.y, EnumValue(_rideIndex),
_stationNum);
return MakeResult(GameActions::Status::InvalidParameters, STR_NONE);
}
@@ -112,7 +112,7 @@ GameActions::Result::Ptr RideEntranceExitRemoveAction::Execute() const
auto ride = get_ride(_rideIndex);
if (ride == nullptr)
{
log_warning("Invalid ride id %d for entrance/exit removal", static_cast<int32_t>(_rideIndex));
log_warning("Invalid ride id %d for entrance/exit removal", EnumValue(_rideIndex));
return std::make_unique<GameActions::Result>(GameActions::Status::InvalidParameters, STR_NONE);
}
@@ -130,8 +130,8 @@ GameActions::Result::Ptr RideEntranceExitRemoveAction::Execute() const
if (entranceElement == nullptr)
{
log_warning(
"Track Element not found. x = %d, y = %d, ride = %d, station = %d", _loc.x, _loc.y,
static_cast<int32_t>(_rideIndex), _stationNum);
"Track Element not found. x = %d, y = %d, ride = %d, station = %d", _loc.x, _loc.y, EnumValue(_rideIndex),
_stationNum);
return MakeResult(GameActions::Status::InvalidParameters, STR_NONE);
}

View File

@@ -139,7 +139,7 @@ GameActions::Result::Ptr RideSetAppearanceAction::Execute() const
gfx_invalidate_screen();
break;
}
window_invalidate_by_number(WC_RIDE, _rideIndex);
window_invalidate_by_number(WC_RIDE, EnumValue(_rideIndex));
auto res = std::make_unique<GameActions::Result>();
if (!ride->overall_view.IsNull())

Some files were not shown because too many files have changed in this diff Show More