aboutsummaryrefslogtreecommitdiff
path: root/src/lua/embed/path.lua.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-09-10 07:17:50 +0800
committerchai <chaifix@163.com>2018-09-10 07:17:50 +0800
commit8339939b7fce5236b1a933eef46e1dd4284a24aa (patch)
treef62c1cefb54e1e8b14fb91564b13d436accff1da /src/lua/embed/path.lua.h
parent6decddfd8470b44609e8c3aa144380f198b7b54c (diff)
*update
Diffstat (limited to 'src/lua/embed/path.lua.h')
-rw-r--r--src/lua/embed/path.lua.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lua/embed/path.lua.h b/src/lua/embed/path.lua.h
new file mode 100644
index 0000000..648adf8
--- /dev/null
+++ b/src/lua/embed/path.lua.h
@@ -0,0 +1,14 @@
+/* path.lua */
+static const char* path_lua = R"(
+jin.path = jin.path or {}
+
+-- game root directory
+jin._root = nil
+
+-- return full path of a given path
+function jin.path.full(path)
+ local root = jin._dir .. '/' .. jin._argv[2]
+ return root .. '/' .. path
+end
+
+)"; \ No newline at end of file