summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/luaengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/luaengine.h')
-rw-r--r--src/frontend/mame/luaengine.h53
1 files changed, 28 insertions, 25 deletions
diff --git a/src/frontend/mame/luaengine.h b/src/frontend/mame/luaengine.h
index e4a7ac2bdf6..14d47fbf89c 100644
--- a/src/frontend/mame/luaengine.h
+++ b/src/frontend/mame/luaengine.h
@@ -122,6 +122,26 @@ public:
private:
template<typename T, size_t SIZE> class enum_parser;
+ struct addr_space;
+
+ struct save_item {
+ void *base;
+ unsigned int size;
+ unsigned int count;
+ unsigned int valcount;
+ unsigned int blockcount;
+ unsigned int stride;
+ };
+
+ struct context
+ {
+ context() { busy = false; yield = false; }
+ std::string result;
+ std::condition_variable sync;
+ bool busy;
+ bool yield;
+ };
+
// internal state
lua_State *m_lua_state;
std::unique_ptr<sol::state_view> m_sol_state;
@@ -130,6 +150,9 @@ private:
std::vector<std::string> m_menu;
+ template <typename R, typename T, typename D>
+ auto make_simple_callback_setter(void (T::*setter)(delegate<R ()> &&), D &&dflt, const char *name, const char *desc);
+
running_machine &machine() const { return *m_machine; }
void on_machine_prestart();
@@ -145,37 +168,17 @@ private:
bool execute_function(const char *id);
sol::object call_plugin(const std::string &name, sol::object in);
- struct addr_space;
-
- struct save_item {
- void *base;
- unsigned int size;
- unsigned int count;
- unsigned int valcount;
- unsigned int blockcount;
- unsigned int stride;
- };
-
void close();
void run(sol::load_result res);
- struct context
- {
- context() { busy = false; yield = false; }
- std::string result;
- std::condition_variable sync;
- bool busy;
- bool yield;
- };
-
- template<typename TFunc, typename... TArgs>
+ template <typename TFunc, typename... TArgs>
sol::protected_function_result invoke(TFunc &&func, TArgs&&... args);
- void initialize_debug();
- void initialize_input();
- void initialize_memory();
- void initialize_render();
+ void initialize_debug(sol::table &emu);
+ void initialize_input(sol::table &emu);
+ void initialize_memory(sol::table &emu);
+ void initialize_render(sol::table &emu);
};
#endif // MAME_FRONTEND_MAME_LUAENGINE_H