From: Lukas Krickl Date: Sat, 7 Mar 2026 15:40:01 +0000 (+0100) Subject: scripting: Added stub for scripting language X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=0191b617d3fba83acc446056f53a775e97937183;p=lrts%2F.git scripting: Added stub for scripting language --- diff --git a/STYLE.md b/STYLE.md index 1dbe7c8..bafcd95 100644 --- a/STYLE.md +++ b/STYLE.md @@ -9,7 +9,7 @@ Files and all functions therein are prefixed with one of the following: - `t_`: thinker related - `r_`: rendering - `n_`: network -- `m_`: macro command language +- `l_`: scripting command language - `c_`: client-side code - `s_`: server side code - `u_`: system utility code diff --git a/src/l_lsl.c b/src/l_lsl.c new file mode 100644 index 0000000..637cc2b --- /dev/null +++ b/src/l_lsl.c @@ -0,0 +1,12 @@ +#include "u_lsl.h" +#include "m_mem.h" + +struct l_lsl_vm l_lsl_vm_init() { + struct l_lsl_vm v; + u_memset(&v, 0, sizeof(v)); + + return v; +} + +void l_lsl_vm_free(struct l_lsl_vm *vm) { +} diff --git a/src/l_lsl.h b/src/l_lsl.h new file mode 100644 index 0000000..71fb798 --- /dev/null +++ b/src/l_lsl.h @@ -0,0 +1,22 @@ +#ifndef L_LSL_H__ +#define L_LSL_H__ + + +/** + * lrts scripting language + * in-game scripting interpreter + */ + +enum l_lsl_flags { + L_LSL_F_NONE = 0 +}; + +struct l_lsl_vm { + enum l_lsl_flags flags; +}; + +struct l_lsl_vm l_lsl_vm_init(); + +void l_lsl_vm_free(struct l_lsl_vm *vm); + +#endif diff --git a/src/lrts_impl.h b/src/lrts_impl.h index f73c08f..e387655 100644 --- a/src/lrts_impl.h +++ b/src/lrts_impl.h @@ -52,6 +52,7 @@ #include "i_input.c" #include "u_time.c" #include "t_update.c" +#include "l_lsl.h" #include "u_debug.c" #endif diff --git a/src/test.c b/src/test.c index 9482ffe..9f34f1f 100644 --- a/src/test.c +++ b/src/test.c @@ -13,6 +13,7 @@ #include "tests/t_arena.c" #include "tests/t_math.c" #include "tests/t_command.c" +#include "tests/t_lsl.c" #endif @@ -38,6 +39,8 @@ int main(int argc, char **argv) { T_TESTCASE("command-push", test_t_command_push); + T_TESTCASE("lsl", t_test_lsl); + T_TESTEND("lrts test"); p_io_finish(); diff --git a/src/tests/t_lsl.c b/src/tests/t_lsl.c new file mode 100644 index 0000000..68d0494 --- /dev/null +++ b/src/tests/t_lsl.c @@ -0,0 +1,5 @@ + +int t_test_lsl() { + T_ASSERT(1, ("")); + return 0; +}