aboutsummaryrefslogtreecommitdiff
path: root/src/lua/embed/path.lua.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-05-17 18:04:41 +0800
committerchai <chaifix@163.com>2018-05-17 18:04:41 +0800
commit34947d066b994c2ef9121a83497da344982d28e2 (patch)
tree41a65f6973a9082dafcc081a8a46de99b556370b /src/lua/embed/path.lua.h
parentd45064be602c3becb046d86913ea8013774b0079 (diff)
v0.1.0
Diffstat (limited to 'src/lua/embed/path.lua.h')
-rw-r--r--src/lua/embed/path.lua.h36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/lua/embed/path.lua.h b/src/lua/embed/path.lua.h
index 8a2968a..3ebeab1 100644
--- a/src/lua/embed/path.lua.h
+++ b/src/lua/embed/path.lua.h
@@ -1,21 +1,19 @@
/* path.lua */
-static const char path_lua[] =
-{45,45,91,91,32,13,10,32,32,32,32,106,105,110,46,112,97,116,104,32,101,120,116,
-101,110,115,105,111,110,13,10,93,93,32,13,10,13,10,106,105,110,46,112,97,116,
-104,32,61,32,106,105,110,46,112,97,116,104,32,111,114,32,123,125,32,13,10,13,
-10,45,45,32,103,97,109,101,32,114,111,111,116,32,100,105,114,101,99,116,111,
-114,121,32,13,10,106,105,110,46,95,114,111,111,116,32,61,32,110,105,108,32,13,
-10,13,10,108,111,99,97,108,32,102,117,110,99,116,105,111,110,32,105,115,102,
-117,108,108,40,112,97,116,104,41,32,13,10,32,32,32,32,13,10,101,110,100,32,13,
-10,13,10,45,45,32,109,101,114,103,101,32,115,117,98,32,112,97,116,104,32,105,
-110,116,111,32,111,110,101,32,13,10,108,111,99,97,108,32,102,117,110,99,116,
-105,111,110,32,109,101,114,103,101,40,46,46,46,41,32,13,10,32,32,32,32,13,10,
-101,110,100,32,13,10,13,10,45,45,32,114,101,116,117,114,110,32,102,117,108,
-108,32,112,97,116,104,32,111,102,32,97,32,103,105,118,101,110,32,112,97,116,
-104,32,13,10,102,117,110,99,116,105,111,110,32,106,105,110,46,112,97,116,104,
-46,102,117,108,108,40,112,97,116,104,41,13,10,32,32,32,32,108,111,99,97,108,
-32,114,111,111,116,32,61,32,106,105,110,46,95,100,105,114,32,46,46,32,39,47,
-39,32,46,46,32,106,105,110,46,95,97,114,103,118,91,50,93,13,10,32,32,32,32,
-114,101,116,117,114,110,32,114,111,111,116,32,46,46,32,39,47,39,32,46,46,32,
-112,97,116,104,32,13,10,101,110,100,13,10,13,10};
+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
+
+
+)";