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

Use music objects instead of IDs

This commit is contained in:
Ted John
2021-09-01 10:16:44 +02:00
committed by Gymnasiast
parent b2d0b54d13
commit 3c451a4af4
95 changed files with 223 additions and 116 deletions

View File

@@ -91,6 +91,26 @@ public:
return loadedObject;
}
ObjectEntryIndex GetLoadedObjectEntryIndex(std::string_view identifier) override
{
const auto* obj = GetLoadedObject(ObjectEntryDescriptor(identifier));
if (obj != nullptr)
{
return GetLoadedObjectEntryIndex(obj);
}
return OBJECT_ENTRY_INDEX_NULL;
}
ObjectEntryIndex GetLoadedObjectEntryIndex(const ObjectEntryDescriptor& descriptor) override
{
auto obj = GetLoadedObject(descriptor);
if (obj != nullptr)
{
return GetLoadedObjectEntryIndex(obj);
}
return OBJECT_ENTRY_INDEX_NULL;
}
ObjectEntryIndex GetLoadedObjectEntryIndex(const Object* object) override
{
ObjectEntryIndex result = OBJECT_ENTRY_INDEX_NULL;