[FEAT] crlf
This commit is contained in:
6
lua.cpp
6
lua.cpp
@@ -54,6 +54,11 @@ extern "C" {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cpp_crlf(lua_State *L) {
|
||||
crlf();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cpp_btn(lua_State *L) {
|
||||
uint8_t i = luaL_checkinteger(L, 1);
|
||||
lua_pushboolean(L, btn(i));
|
||||
@@ -326,6 +331,7 @@ void lua_init(const char* filename, const bool start_playing) {
|
||||
|
||||
lua_pushcfunction(L,cpp_locate); lua_setglobal(L, "locate");
|
||||
lua_pushcfunction(L,cpp_print); lua_setglobal(L, "print");
|
||||
lua_pushcfunction(L,cpp_crlf); lua_setglobal(L, "crlf");
|
||||
|
||||
lua_pushcfunction(L,cpp_btn); lua_setglobal(L, "btn");
|
||||
lua_pushcfunction(L,cpp_btnp); lua_setglobal(L, "btnp");
|
||||
|
||||
Reference in New Issue
Block a user