forked from rosebudai/OpenRCT2-Web
Expose obj image offset and num images to plugins (#17567)
Co-authored-by: Duncan <duncans_pumpkin@hotmail.co.uk>
This commit is contained in:
1 parent
d0c7d0f6fb
commit
ef35dfa40a
22 files changed
+106
-52
No files matched your search
@@ -12,7 +12,6 @@
|
||||
#include "../core/IStream.hpp"
|
||||
#include "../core/Json.hpp"
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../drawing/Image.h"
|
||||
#include "../localisation/Language.h"
|
||||
#include "../world/Footpath.h"
|
||||
|
||||
@@ -38,7 +37,7 @@ void FootpathObject::Load()
|
||||
{
|
||||
GetStringTable().Sort();
|
||||
_legacyType.string_idx = LanguageAllocateObjectString(GetName());
|
||||
_legacyType.image = GfxObjectAllocateImages(GetImageTable().GetImages(), GetImageTable().GetCount());
|
||||
_legacyType.image = LoadImages();
|
||||
_legacyType.bridge_image = _legacyType.image + 109;
|
||||
|
||||
_pathSurfaceDescriptor.Name = _legacyType.string_idx;
|
||||
@@ -63,7 +62,7 @@ void FootpathObject::Load()
|
||||
void FootpathObject::Unload()
|
||||
{
|
||||
LanguageFreeObjectString(_legacyType.string_idx);
|
||||
GfxObjectFreeImages(_legacyType.image, GetImageTable().GetCount());
|
||||
UnloadImages();
|
||||
|
||||
_legacyType.string_idx = 0;
|
||||
_legacyType.image = 0;
|
||||
|
||||
Reference in new issue
Block a user