galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
LuaEntt.cpp
Go to the documentation of this file.
1
7
8#include <entt_sol/dispatcher/bond.hpp>
9#include <entt_sol/registry/bond.hpp>
10#include <entt_sol/scheduler/script_process.hpp>
11
13
14#include "../Lua.hpp"
15
16namespace galaxy
17{
18 void Lua::inject_entt() noexcept
19 {
20 auto& lua = entt::locator<sol::state>::value();
21 lua.require("dispatcher", sol::c_call<GALAXY_AUTOARG(&entt_sol::open_dispatcher)>, false);
22 // TODO: lua["dispatcher"] = std::ref(dispatcher); // Make the dispatcher available to Lua
23
24 lua.require("registry", sol::c_call<GALAXY_AUTOARG(&entt_sol::open_registry)>, false);
25 // TODO: lua["registry"] = std::ref(registry); // Make the registry available to Lua
26
27 lua.require("scheduler", sol::c_call<GALAXY_AUTOARG(&entt_sol::open_scheduler)>, false);
28 // TODO: lua["scheduler"] = std::ref(scheduler); // Make the scheduler available to Lua
29 }
30} // namespace galaxy
#define GALAXY_AUTOARG(x)
Convenient decltype macro.
Definition Pragma.hpp:21
static void inject_entt() noexcept
Injects EnTT into Lua.
Definition LuaEntt.cpp:18
Application.hpp galaxy.