mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 21:13:05 +01:00
Replace object_entry_get_type() with method (#10937)
This commit is contained in:
committed by
GitHub
parent
c31ef8e635
commit
18ebe73dfa
@@ -49,7 +49,7 @@ static void setup_track_manager_objects()
|
||||
{
|
||||
uint8_t* selectionFlags = &_objectSelectionFlags[i];
|
||||
const ObjectRepositoryItem* item = &items[i];
|
||||
uint8_t object_type = object_entry_get_type(&item->ObjectEntry);
|
||||
uint8_t object_type = item->ObjectEntry.GetType();
|
||||
if (object_type == OBJECT_TYPE_RIDE)
|
||||
{
|
||||
*selectionFlags |= OBJECT_SELECTION_FLAG_6;
|
||||
@@ -78,7 +78,7 @@ static void setup_track_designer_objects()
|
||||
{
|
||||
uint8_t* selectionFlags = &_objectSelectionFlags[i];
|
||||
const ObjectRepositoryItem* item = &items[i];
|
||||
uint8_t objectType = object_entry_get_type(&item->ObjectEntry);
|
||||
uint8_t objectType = item->ObjectEntry.GetType();
|
||||
if (objectType == OBJECT_TYPE_RIDE)
|
||||
{
|
||||
*selectionFlags |= OBJECT_SELECTION_FLAG_6;
|
||||
@@ -237,7 +237,7 @@ void sub_6AB211()
|
||||
const ObjectRepositoryItem* items = object_repository_get_items();
|
||||
for (int32_t i = 0; i < numObjects; i++)
|
||||
{
|
||||
uint8_t objectType = object_entry_get_type(&items[i].ObjectEntry);
|
||||
uint8_t objectType = items[i].ObjectEntry.GetType();
|
||||
_numAvailableObjectsForType[objectType]++;
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ void reset_selected_object_count_and_size()
|
||||
const ObjectRepositoryItem* items = object_repository_get_items();
|
||||
for (int32_t i = 0; i < numObjects; i++)
|
||||
{
|
||||
uint8_t objectType = object_entry_get_type(&items[i].ObjectEntry);
|
||||
uint8_t objectType = items[i].ObjectEntry.GetType();
|
||||
if (_objectSelectionFlags[i] & OBJECT_SELECTION_FLAG_SELECTED)
|
||||
{
|
||||
_numSelectedObjectsForType[objectType]++;
|
||||
@@ -430,7 +430,7 @@ int32_t window_editor_object_selection_select_object(uint8_t bh, int32_t flags,
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t objectType = object_entry_get_type(&item->ObjectEntry);
|
||||
uint8_t objectType = item->ObjectEntry.GetType();
|
||||
if (objectType == OBJECT_TYPE_SCENERY_GROUP && (flags & (1 << 2)))
|
||||
{
|
||||
for (const auto& sgEntry : item->SceneryGroupInfo.Entries)
|
||||
@@ -457,7 +457,7 @@ int32_t window_editor_object_selection_select_object(uint8_t bh, int32_t flags,
|
||||
return 1;
|
||||
}
|
||||
|
||||
uint8_t objectType = object_entry_get_type(&item->ObjectEntry);
|
||||
uint8_t objectType = item->ObjectEntry.GetType();
|
||||
uint16_t maxObjects = object_entry_group_counts[objectType];
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
{
|
||||
@@ -510,7 +510,7 @@ bool editor_check_object_group_at_least_one_selected(int32_t checkObjectType)
|
||||
|
||||
for (int32_t i = 0; i < numObjects; i++)
|
||||
{
|
||||
uint8_t objectType = object_entry_get_type(&items[i].ObjectEntry);
|
||||
uint8_t objectType = items[i].ObjectEntry.GetType();
|
||||
if (checkObjectType == objectType && (_objectSelectionFlags[i] & OBJECT_SELECTION_FLAG_SELECTED))
|
||||
{
|
||||
return true;
|
||||
@@ -536,7 +536,7 @@ int32_t editor_remove_unused_objects()
|
||||
&& !(_objectSelectionFlags[i] & OBJECT_SELECTION_FLAG_ALWAYS_REQUIRED))
|
||||
{
|
||||
const ObjectRepositoryItem* item = &items[i];
|
||||
uint8_t objectType = object_entry_get_type(&item->ObjectEntry);
|
||||
uint8_t objectType = item->ObjectEntry.GetType();
|
||||
|
||||
if (objectType >= OBJECT_TYPE_SCENERY_GROUP)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user