1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 04:53:12 +01:00

Refactor title sequence player to new class

This commit is contained in:
Ted John
2016-11-21 00:16:47 +00:00
parent ccd8cff296
commit afdd45f3cc
27 changed files with 1154 additions and 74 deletions

View File

@@ -83,11 +83,11 @@ public:
zip_file_t * zipFile = zip_fopen(_zip, path, 0);
if (zipFile != nullptr)
{
data = malloc(dataSize);
size_t readBytes = zip_fread(zipFile, data, dataSize);
data = Memory::Allocate<void>((size_t)dataSize);
uint64 readBytes = zip_fread(zipFile, data, dataSize);
if (readBytes != dataSize)
{
free(data);
Memory::Free(data);
data = nullptr;
dataSize = 0;
}
@@ -95,7 +95,7 @@ public:
}
}
if (outSize != nullptr) *outSize = dataSize;
if (outSize != nullptr) *outSize = (size_t)dataSize;
return data;
}