From e92caa97329016d012b46b9d37e1b2c3b613a8f2 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 10 Nov 2018 20:13:55 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/embed/scripts/path.lua.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/lua/embed/scripts/path.lua.h (limited to 'src/lua/embed/scripts/path.lua.h') diff --git a/src/lua/embed/scripts/path.lua.h b/src/lua/embed/scripts/path.lua.h new file mode 100644 index 0000000..f7e1ec3 --- /dev/null +++ b/src/lua/embed/scripts/path.lua.h @@ -0,0 +1,16 @@ +/* path.lua */ +static const char* path_lua = R"( +jin.path = jin.path or {} + +local jp = jin.path + +-- 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 -- cgit v1.1-26-g67d0