mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Pass ScenerySelection as const &
This commit is contained in:
@@ -197,7 +197,7 @@ static ScenerySelection window_scenery_tab_entries[SCENERY_WINDOW_TABS][SCENERY_
|
|||||||
* Was part of 0x006DFA00
|
* Was part of 0x006DFA00
|
||||||
* The same code repeated five times for every scenery entry type
|
* The same code repeated five times for every scenery entry type
|
||||||
*/
|
*/
|
||||||
static void init_scenery_entry(rct_scenery_entry* sceneryEntry, ScenerySelection index, uint8_t sceneryTabId)
|
static void init_scenery_entry(rct_scenery_entry* sceneryEntry, const ScenerySelection& index, uint8_t sceneryTabId)
|
||||||
{
|
{
|
||||||
Guard::ArgumentInRange<int32_t>(index.EntryIndex, 0, WINDOW_SCENERY_TAB_SELECTION_UNDEFINED);
|
Guard::ArgumentInRange<int32_t>(index.EntryIndex, 0, WINDOW_SCENERY_TAB_SELECTION_UNDEFINED);
|
||||||
if (scenery_is_invented(index) || gCheatsIgnoreResearchStatus)
|
if (scenery_is_invented(index) || gCheatsIgnoreResearchStatus)
|
||||||
@@ -1353,7 +1353,7 @@ void window_scenery_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi, int32_t s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t window_scenery_find_tab_with_scenery(ScenerySelection scenery)
|
static int32_t window_scenery_find_tab_with_scenery(const ScenerySelection& scenery)
|
||||||
{
|
{
|
||||||
for (int32_t i = 0; i < SCENERY_WINDOW_TABS; i++)
|
for (int32_t i = 0; i < SCENERY_WINDOW_TABS; i++)
|
||||||
{
|
{
|
||||||
@@ -1369,7 +1369,7 @@ static int32_t window_scenery_find_tab_with_scenery(ScenerySelection scenery)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool window_scenery_set_selected_item(ScenerySelection scenery)
|
bool window_scenery_set_selected_item(const ScenerySelection& scenery)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
rct_window* w = window_bring_to_front_by_class(WC_SCENERY);
|
rct_window* w = window_bring_to_front_by_class(WC_SCENERY);
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ bool clear_scenery_tool_is_active();
|
|||||||
bool water_tool_is_active();
|
bool water_tool_is_active();
|
||||||
|
|
||||||
rct_window* window_scenery_open();
|
rct_window* window_scenery_open();
|
||||||
bool window_scenery_set_selected_item(ScenerySelection scenery);
|
bool window_scenery_set_selected_item(const ScenerySelection& scenery);
|
||||||
void window_scenery_set_default_placement_configuration();
|
void window_scenery_set_default_placement_configuration();
|
||||||
void window_scenery_init();
|
void window_scenery_init();
|
||||||
void window_scenery_reset_selected_scenery_items();
|
void window_scenery_reset_selected_scenery_items();
|
||||||
|
|||||||
@@ -599,17 +599,17 @@ void ride_entry_set_invented(int32_t rideEntryIndex)
|
|||||||
_researchedRideEntries[rideEntryIndex] = true;
|
_researchedRideEntries[rideEntryIndex] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool scenery_is_invented(ScenerySelection sceneryItem)
|
bool scenery_is_invented(const ScenerySelection& sceneryItem)
|
||||||
{
|
{
|
||||||
return _researchedSceneryItems[sceneryItem.SceneryType][sceneryItem.EntryIndex];
|
return _researchedSceneryItems[sceneryItem.SceneryType][sceneryItem.EntryIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
void scenery_set_invented(ScenerySelection sceneryItem)
|
void scenery_set_invented(const ScenerySelection& sceneryItem)
|
||||||
{
|
{
|
||||||
_researchedSceneryItems[sceneryItem.SceneryType][sceneryItem.EntryIndex] = true;
|
_researchedSceneryItems[sceneryItem.SceneryType][sceneryItem.EntryIndex] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void scenery_set_not_invented(ScenerySelection sceneryItem)
|
void scenery_set_not_invented(const ScenerySelection& sceneryItem)
|
||||||
{
|
{
|
||||||
_researchedSceneryItems[sceneryItem.SceneryType][sceneryItem.EntryIndex] = false;
|
_researchedSceneryItems[sceneryItem.SceneryType][sceneryItem.EntryIndex] = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,15 +129,15 @@ void research_insert_scenery_group_entry(uint8_t entryIndex, bool researched);
|
|||||||
|
|
||||||
void ride_type_set_invented(uint32_t rideType);
|
void ride_type_set_invented(uint32_t rideType);
|
||||||
void ride_entry_set_invented(int32_t rideEntryIndex);
|
void ride_entry_set_invented(int32_t rideEntryIndex);
|
||||||
void scenery_set_invented(ScenerySelection sceneryItem);
|
void scenery_set_invented(const ScenerySelection& sceneryItem);
|
||||||
void scenery_set_not_invented(ScenerySelection sceneryItem);
|
void scenery_set_not_invented(const ScenerySelection& sceneryItem);
|
||||||
bool ride_type_is_invented(uint32_t rideType);
|
bool ride_type_is_invented(uint32_t rideType);
|
||||||
bool ride_entry_is_invented(int32_t rideEntryIndex);
|
bool ride_entry_is_invented(int32_t rideEntryIndex);
|
||||||
uint64_t get_available_track_pieces_for_ride_type(uint8_t rideType);
|
uint64_t get_available_track_pieces_for_ride_type(uint8_t rideType);
|
||||||
bool track_piece_is_available_for_ride_type(uint8_t rideType, int32_t trackType);
|
bool track_piece_is_available_for_ride_type(uint8_t rideType, int32_t trackType);
|
||||||
bool scenery_group_is_invented(int32_t sgIndex);
|
bool scenery_group_is_invented(int32_t sgIndex);
|
||||||
void scenery_group_set_invented(int32_t sgIndex);
|
void scenery_group_set_invented(int32_t sgIndex);
|
||||||
bool scenery_is_invented(ScenerySelection sceneryItem);
|
bool scenery_is_invented(const ScenerySelection& sceneryItem);
|
||||||
void set_all_scenery_items_invented();
|
void set_all_scenery_items_invented();
|
||||||
void set_all_scenery_items_not_invented();
|
void set_all_scenery_items_not_invented();
|
||||||
void set_all_scenery_groups_not_invented();
|
void set_all_scenery_groups_not_invented();
|
||||||
|
|||||||
Reference in New Issue
Block a user