diff options
Diffstat (limited to 'src/libjin-lua/embed/scripts')
-rw-r--r-- | src/libjin-lua/embed/scripts/app.lua | 3 | ||||
-rw-r--r-- | src/libjin-lua/embed/scripts/graphics/graphics.lua | 28 | ||||
-rw-r--r-- | src/libjin-lua/embed/scripts/path/path.lua | 9 |
3 files changed, 19 insertions, 21 deletions
diff --git a/src/libjin-lua/embed/scripts/app.lua b/src/libjin-lua/embed/scripts/app.lua index 1ba5402..9281584 100644 --- a/src/libjin-lua/embed/scripts/app.lua +++ b/src/libjin-lua/embed/scripts/app.lua @@ -1,6 +1,5 @@ -local cwd = jin.args['cwd'] or '.' jin.filesystem.init() -jin.filesystem.mount(cwd) +jin.filesystem.mount(jin.cwd) ------------------------------------------------------------------------- -- Config game diff --git a/src/libjin-lua/embed/scripts/graphics/graphics.lua b/src/libjin-lua/embed/scripts/graphics/graphics.lua index 859e29b..a0efe03 100644 --- a/src/libjin-lua/embed/scripts/graphics/graphics.lua +++ b/src/libjin-lua/embed/scripts/graphics/graphics.lua @@ -90,18 +90,18 @@ local function compileBuiltInShaders() #END_FRAGMENT_SHADER ]] jg.Shaders.Shape = jg.newShader[[ - #VERTEX_SHADER - Vertex vert(Vertex v) - { - return v; - } - #END_VERTEX_SHADER - #FRAGMENT_SHADER - Color frag(Color col, Texture tex, Vertex v) - { - return col; - } - #END_FRAGMENT_SHADER + #VERTEX_SHADER + Vertex vert(Vertex v) + { + return v; + } + #END_VERTEX_SHADER + #FRAGMENT_SHADER + Color frag(Color col, Texture tex, Vertex v) + { + return col; + } + #END_FRAGMENT_SHADER ]] jg.Shaders.Default = jg.newShader[[ #VERTEX_SHADER @@ -128,13 +128,13 @@ jg.init = function(setting) initialized = _init(setting) if initialized then compileBuiltInShaders() - jg.useShader(jg.Shaders.Default) + jg.useShader(jg.Shaders.Font) end return initialized end jg.unuseShader = function() - jg.useShader(jg.Shaders.Default) + jg.useShader(jg.Shaders.Font) end -- Reset all attributes to default value. diff --git a/src/libjin-lua/embed/scripts/path/path.lua b/src/libjin-lua/embed/scripts/path/path.lua index 5ecc05c..d41c167 100644 --- a/src/libjin-lua/embed/scripts/path/path.lua +++ b/src/libjin-lua/embed/scripts/path/path.lua @@ -2,11 +2,10 @@ jin.path = jin.path or {} local jp = jin.path --- Game root directory -jin._root = nil +-- Game root directory. +jin.cwd = jin.args['cwd'] or '.' --- Get full path of a given path +-- Get full path of a given path. function jin.path.full(path) - local root = jin._dir .. '/' .. jin._argv[2] - return root .. '/' .. path + return jin.cwd .. '/' .. path end |