1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

Refactor rct_research_item, refactor access to rct_research_item

This takes away a lot of the bitshift and bit mask trickery previously used.
This commit is contained in:
Michael Steenbeek
2018-01-04 16:43:55 +01:00
parent 59439b778b
commit 7d5de63484
12 changed files with 203 additions and 180 deletions

View File

@@ -280,11 +280,19 @@ static void remove_selected_objects_from_research(const rct_object_entry* instal
for (auto rideType : rideEntry->ride_type)
{
research_remove(entry_index | rideType << 8 | 0x10000);
rct_research_item tmp = {};
tmp.type = RESEARCH_ENTRY_TYPE_RIDE;
tmp.entryIndex = entry_index;
tmp.baseRideType = rideType;
research_remove(&tmp);
}
}
else if (entry_type == OBJECT_TYPE_SCENERY_GROUP){
research_remove(entry_index);
else if (entry_type == OBJECT_TYPE_SCENERY_GROUP)
{
rct_research_item tmp = {};
tmp.type = RESEARCH_ENTRY_TYPE_SCENERY;
tmp.entryIndex = entry_index;
research_remove(&tmp);
}
}