2022-02-24 01:42:54 +01:00
|
|
|
/*****************************************************************************
|
|
|
|
* Copyright (c) 2014-2022 OpenRCT2 developers
|
|
|
|
*
|
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
|
|
|
*
|
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifdef ENABLE_SCRIPTING
|
|
|
|
|
2022-02-25 19:49:52 +01:00
|
|
|
# include <openrct2/drawing/Image.h>
|
2022-02-24 01:42:54 +01:00
|
|
|
# include <openrct2/drawing/ImageId.hpp>
|
|
|
|
# include <openrct2/scripting/Duktape.hpp>
|
2022-02-25 19:49:52 +01:00
|
|
|
# include <openrct2/scripting/ScriptEngine.h>
|
2022-02-24 01:42:54 +01:00
|
|
|
|
|
|
|
namespace OpenRCT2::Scripting
|
|
|
|
{
|
2022-02-25 19:49:52 +01:00
|
|
|
void InitialiseCustomImages(ScriptEngine& scriptEngine);
|
|
|
|
std::optional<ImageList> AllocateCustomImages(const std::shared_ptr<Plugin>& plugin, uint32_t count);
|
|
|
|
bool FreeCustomImages(const std::shared_ptr<Plugin>& plugin, ImageList range);
|
|
|
|
bool DoesPluginOwnImage(const std::shared_ptr<Plugin>& plugin, ImageIndex index);
|
2022-02-24 01:42:54 +01:00
|
|
|
DukValue DukGetImageInfo(duk_context* ctx, ImageIndex id);
|
|
|
|
DukValue DukGetImagePixelData(duk_context* ctx, ImageIndex id);
|
|
|
|
void DukSetPixelData(duk_context* ctx, ImageIndex id, const DukValue& dukPixelData);
|
|
|
|
|
|
|
|
} // namespace OpenRCT2::Scripting
|
|
|
|
|
|
|
|
#endif
|