1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 23:04:36 +01:00

Return image and string table by reference

This commit is contained in:
Ted John
2017-12-11 13:06:59 +00:00
committed by Gymnasiast
parent c3f075d18c
commit ec446ac9d6
16 changed files with 95 additions and 86 deletions

View File

@@ -108,9 +108,9 @@ namespace ObjectJsonHelpers
auto objectsPath = env->GetDirectoryPath(DIRBASE::RCT2, DIRID::OBJECT);
auto objectPath = Path::Combine(objectsPath, name);
auto obj = ObjectFactory::CreateObjectFromLegacyFile(objectPath.c_str());
auto imgTable = static_cast<const Object *>(obj)->GetImageTable();
auto numImages = imgTable->GetCount();
auto images = imgTable->GetImages();
auto &imgTable = static_cast<const Object *>(obj)->GetImageTable();
auto numImages = imgTable.GetCount();
auto images = imgTable.GetImages();
for (uint32 i = start; i < Math::Min(numImages, end); i++)
{
auto g1 = images[i];