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

Add object_entry_get_type()

This commit is contained in:
Gymnasiast
2018-02-08 20:34:05 +01:00
committed by Michael Steenbeek
parent 504e635933
commit b1ab852fb7
8 changed files with 17 additions and 8 deletions

View File

@@ -498,7 +498,7 @@ private:
}
// Encode data
uint8 objectType = entry->flags & 0x0F;
uint8 objectType = object_entry_get_type(entry);
sawyercoding_chunk_header chunkHeader;
chunkHeader.encoding = object_entry_group_encoding[objectType];
chunkHeader.length = (uint32)dataSize;
@@ -766,7 +766,7 @@ bool object_entry_compare(const rct_object_entry * a, const rct_object_entry * b
// If an official object don't bother checking checksum
if ((a->flags & 0xF0) || (b->flags & 0xF0))
{
if ((a->flags & 0x0F) != (b->flags & 0x0F))
if (object_entry_get_type(a) != object_entry_get_type(b))
{
return false;
}