From fa234f9663b992cf50bcf865a1cde6845b42193c Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 21 May 2018 16:02:00 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9audio=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lua/embed/path.lua.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/lua/embed/path.lua.h (limited to 'src/lua/embed/path.lua.h') diff --git a/src/lua/embed/path.lua.h b/src/lua/embed/path.lua.h new file mode 100644 index 0000000..b398c99 --- /dev/null +++ b/src/lua/embed/path.lua.h @@ -0,0 +1,18 @@ +/* path.lua */ +static const char* path_lua = R"( +--[[ + jin.path extension +]] + +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 -- cgit v1.1-26-g67d0