mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 14:54:30 +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:
@@ -13,7 +13,6 @@
|
||||
#include "../core/Json.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../drawing/Image.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "../world/Banner.h"
|
||||
|
||||
@@ -25,7 +24,7 @@ void StationObject::Load()
|
||||
auto numImages = GetImageTable().GetCount();
|
||||
if (numImages != 0)
|
||||
{
|
||||
BaseImageId = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount());
|
||||
BaseImageId = LoadImages();
|
||||
|
||||
uint32_t shelterOffset = (Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT) ? 32 : 16;
|
||||
if (numImages > shelterOffset)
|
||||
@@ -38,7 +37,7 @@ void StationObject::Load()
|
||||
void StationObject::Unload()
|
||||
{
|
||||
LanguageFreeObjectString(NameStringId);
|
||||
GfxObjectFreeImages(BaseImageId, GetImageTable().GetCount());
|
||||
UnloadImages();
|
||||
|
||||
NameStringId = 0;
|
||||
BaseImageId = ImageIndexUndefined;
|
||||
|
||||
Reference in New Issue
Block a user