1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00

Add draw to image API

This commit is contained in:
Ted John
2022-02-25 20:05:10 +00:00
parent e3a1733cdd
commit 818dcacb31
5 changed files with 83 additions and 5 deletions

View File

@@ -89,17 +89,18 @@ void Plugin::Start()
throw std::runtime_error("No main function specified.");
}
_hasStarted = true;
mainFunc.push();
auto result = duk_pcall(_context, 0);
if (result != DUK_ERR_NONE)
{
auto val = std::string(duk_safe_to_string(_context, -1));
duk_pop(_context);
_hasStarted = false;
throw std::runtime_error("[" + _metadata.Name + "] " + val);
}
duk_pop(_context);
_hasStarted = true;
}
void Plugin::StopBegin()