1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

Add new .park save format

Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com>
Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
This commit is contained in:
IntelOrca
2021-10-27 14:21:14 +02:00
committed by Gymnasiast
parent e9e8dceca7
commit 34128dc262
112 changed files with 7281 additions and 4243 deletions

View File

@@ -199,39 +199,6 @@ void object_create_identifier_name(char* string_buffer, size_t size, const rct_o
snprintf(string_buffer, size, "%.8s/%4X%4X", object->name, object->flags, object->checksum);
}
/**
*
* rct2: 0x006A9DA2
* bl = entry_index
* ecx = entry_type
*/
bool find_object_in_entry_group(const rct_object_entry* entry, ObjectType* entry_type, ObjectEntryIndex* entryIndex)
{
ObjectType objectType = entry->GetType();
if (objectType >= ObjectType::Count)
{
return false;
}
auto& objectMgr = OpenRCT2::GetContext()->GetObjectManager();
auto maxObjects = object_entry_group_counts[EnumValue(objectType)];
for (int32_t i = 0; i < maxObjects; i++)
{
auto loadedObj = objectMgr.GetLoadedObject(objectType, i);
if (loadedObj != nullptr)
{
auto thisEntry = object_entry_get_object(objectType, i)->GetObjectEntry();
if (thisEntry == *entry)
{
*entry_type = objectType;
*entryIndex = i;
return true;
}
}
}
return false;
}
void get_type_entry_index(size_t index, ObjectType* outObjectType, ObjectEntryIndex* outEntryIndex)
{
uint8_t objectType = EnumValue(ObjectType::Ride);