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 committed 2018-01-07 15:33:44 +01:00
1 parent 59439b778b
commit 7d5de63484
12 files changed
+203 -180

No files matched your search

+11 -3
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);
}
}