Please, add "cartidge reset" api call #473
This commit is contained in:
11
src/luaapi.c
11
src/luaapi.c
@@ -774,6 +774,15 @@ static s32 lua_sync(lua_State* lua)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static s32 lua_reset(lua_State* lua)
|
||||
{
|
||||
tic_machine* machine = getLuaMachine(lua);
|
||||
|
||||
machine->state.initialized = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static s32 lua_memcpy(lua_State* lua)
|
||||
{
|
||||
s32 top = lua_gettop(lua);
|
||||
@@ -1075,7 +1084,7 @@ static const lua_CFunction ApiFunc[] =
|
||||
lua_rectb, lua_spr, lua_btn, lua_btnp, lua_sfx, lua_map, lua_mget,
|
||||
lua_mset, lua_peek, lua_poke, lua_peek4, lua_poke4, lua_memcpy,
|
||||
lua_memset, lua_trace, lua_pmem, lua_time, lua_exit, lua_font, lua_mouse,
|
||||
lua_circ, lua_circb, lua_tri, lua_textri, lua_clip, lua_music, lua_sync
|
||||
lua_circ, lua_circb, lua_tri, lua_textri, lua_clip, lua_music, lua_sync, lua_reset
|
||||
};
|
||||
|
||||
STATIC_ASSERT(api_func, COUNT_OF(ApiKeywords) == COUNT_OF(ApiFunc));
|
||||
|
||||
Reference in New Issue
Block a user