scripting: Added stub for scripting language
authorLukas Krickl <lukas@krickl.dev>
Sat, 7 Mar 2026 15:40:01 +0000 (16:40 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sat, 7 Mar 2026 15:40:01 +0000 (16:40 +0100)
STYLE.md
src/l_lsl.c [new file with mode: 0644]
src/l_lsl.h [new file with mode: 0644]
src/lrts_impl.h
src/test.c
src/tests/t_lsl.c [new file with mode: 0644]

index 1dbe7c81c2074fced8a4a106cbfeab2d0285c784..bafcd95e63c86d4b6186dd316339bd2987b88563 100644 (file)
--- 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 (file)
index 0000000..637cc2b
--- /dev/null
@@ -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 (file)
index 0000000..71fb798
--- /dev/null
@@ -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
index f73c08fcad7ff242a8a440d3117f9f78dbdcaf29..e387655a7b0b0a3c5d1aa12a663b6bf4565b517d 100644 (file)
@@ -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
index 9482ffe3dbafffc9b086fe3b43a3b28d7bd53315..9f34f1fc139e1b65a8a08572bd2aabb93b8d83f1 100644 (file)
@@ -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 (file)
index 0000000..68d0494
--- /dev/null
@@ -0,0 +1,5 @@
+
+int t_test_lsl() {
+       T_ASSERT(1, (""));
+       return 0;
+}