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

Expose obj image offset and num images to plugins (#17567)

Co-authored-by: Duncan <duncans_pumpkin@hotmail.co.uk>
This commit is contained in:
Nikolas Parshook
2023-04-13 15:09:15 -04:00
committed by GitHub
parent d0c7d0f6fb
commit ef35dfa40a
22 changed files with 106 additions and 52 deletions

View File

@@ -23,7 +23,7 @@ void FootpathSurfaceObject::Load()
auto numImages = GetImageTable().GetCount();
if (numImages != 0)
{
PreviewImageId = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount());
PreviewImageId = LoadImages();
BaseImageId = PreviewImageId + 1;
}
@@ -36,7 +36,7 @@ void FootpathSurfaceObject::Load()
void FootpathSurfaceObject::Unload()
{
LanguageFreeObjectString(NameStringId);
GfxObjectFreeImages(PreviewImageId, GetImageTable().GetCount());
UnloadImages();
NameStringId = 0;
PreviewImageId = 0;