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

Add method to look up source game

This commit is contained in:
Michael Steenbeek
2017-11-13 14:14:24 +01:00
parent 11f2d60041
commit 2ebac91a2e
5 changed files with 19 additions and 8 deletions

View File

@@ -1803,8 +1803,11 @@ static bool filter_source(const ObjectRepositoryItem * item)
if (_FILTER_ALL)
return true;
uint8 source = (item->ObjectEntry.flags & 0xF0) >> 4;
return (_FILTER_RCT2 && source == 8) || (_FILTER_WW && source == 1) || (_FILTER_TT && source == 2) || (_FILTER_CUSTOM && source != 8 && source != 1 && source != 2);
uint8 source = object_entry_get_source_game(&item->ObjectEntry);
return (_FILTER_RCT2 && source == OBJECT_SOURCE_RCT2) ||
(_FILTER_WW && source == OBJECT_SOURCE_WACKY_WORLDS) ||
(_FILTER_TT && source == OBJECT_SOURCE_TIME_TWISTER) ||
(_FILTER_CUSTOM && source != OBJECT_SOURCE_RCT2 && source != OBJECT_SOURCE_WACKY_WORLDS && source != OBJECT_SOURCE_TIME_TWISTER);
}
static bool filter_chunks(const ObjectRepositoryItem * item)