mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-28 01:04:50 +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:
@@ -14,7 +14,6 @@
|
||||
#include "../core/Json.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../drawing/Image.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "ObjectManager.h"
|
||||
|
||||
@@ -22,7 +21,7 @@ void TerrainEdgeObject::Load()
|
||||
{
|
||||
GetStringTable().Sort();
|
||||
NameStringId = LanguageAllocateObjectString(GetName());
|
||||
IconImageId = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount());
|
||||
IconImageId = LoadImages();
|
||||
|
||||
// First image is icon followed by edge images
|
||||
BaseImageId = IconImageId + 1;
|
||||
@@ -31,7 +30,7 @@ void TerrainEdgeObject::Load()
|
||||
void TerrainEdgeObject::Unload()
|
||||
{
|
||||
LanguageFreeObjectString(NameStringId);
|
||||
GfxObjectFreeImages(IconImageId, GetImageTable().GetCount());
|
||||
UnloadImages();
|
||||
|
||||
NameStringId = 0;
|
||||
IconImageId = 0;
|
||||
|
||||
Reference in New Issue
Block a user