From 8b2626165b294e206b2285e514b6d2e5dcbd7775 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Tue, 29 Jul 2025 23:13:35 +0200 Subject: [PATCH] Add lua_tofixed() and luaL_optfixed() --- src/lua_script.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lua_script.h b/src/lua_script.h index d0d9dc99a..2b173054d 100644 --- a/src/lua_script.h +++ b/src/lua_script.h @@ -34,7 +34,9 @@ extern "C" { // fixed_t casting // TODO add some distinction between fixed numbers and integer numbers // for at least the purpose of printing and maybe math. +#define lua_tofixed(L, i) lua_tointeger(L, i) #define luaL_checkfixed(L, i) luaL_checkinteger(L, i) +#define luaL_optfixed(L, i, d) luaL_optinteger(L, i, d) #define lua_pushfixed(L, f) lua_pushinteger(L, f) // angle_t casting