aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libjin-lua/embed/embed.h2
-rw-r--r--src/libjin-lua/embed/graphics.lua.h52
-rw-r--r--src/libjin-lua/embed/scripts/graphics/graphics.lua28
3 files changed, 41 insertions, 41 deletions
diff --git a/src/libjin-lua/embed/embed.h b/src/libjin-lua/embed/embed.h
index ee8a59f..f46c9ca 100644
--- a/src/libjin-lua/embed/embed.h
+++ b/src/libjin-lua/embed/embed.h
@@ -42,7 +42,7 @@ namespace JinEngine
if (luax_loadbuffer(L, source, strlen(source), file) == 0)
luax_call(L, 0, 0);
}
- file = (const char*)bootscript.source;
+ file = (const char*)bootscript.file;
source = (const char*)bootscript.source;
if (luax_loadbuffer(L, source, strlen(source), file) == 0)
luax_call(L, 0, 0);
diff --git a/src/libjin-lua/embed/graphics.lua.h b/src/libjin-lua/embed/graphics.lua.h
index 8d241de..47c5348 100644
--- a/src/libjin-lua/embed/graphics.lua.h
+++ b/src/libjin-lua/embed/graphics.lua.h
@@ -81,33 +81,33 @@ static unsigned char graphics_lua[] = {
118,41,13,10,9,9,123,13,10,9,9,9,114,101,116,117,114,110,32,99,
111,108,32,42,32,116,101,120,101,108,40,116,101,120,44,32,118,46,117,118,
41,59,13,10,9,9,125,13,10,9,9,35,69,78,68,95,70,82,65,71,
-77,69,78,84,95,83,72,65,68,69,82,13,10,9,93,93,13,10,9,106,
-103,46,83,104,97,100,101,114,115,46,68,101,102,97,117,108,116,32,61,32,
-106,103,46,110,101,119,83,104,97,100,101,114,91,91,13,10,9,9,35,86,
-69,82,84,69,88,95,83,72,65,68,69,82,13,10,9,9,86,101,114,116,
-101,120,32,118,101,114,116,40,86,101,114,116,101,120,32,118,41,13,10,9,
-9,123,13,10,9,9,9,114,101,116,117,114,110,32,118,59,13,10,9,9,
-125,13,10,9,9,35,69,78,68,95,86,69,82,84,69,88,95,83,72,65,
-68,69,82,13,10,9,9,35,70,82,65,71,77,69,78,84,95,83,72,65,
-68,69,82,13,10,9,9,67,111,108,111,114,32,102,114,97,103,40,67,111,
-108,111,114,32,99,111,108,44,32,84,101,120,116,117,114,101,32,116,101,120,
-44,32,86,101,114,116,101,120,32,118,41,13,10,9,9,123,13,10,9,9,
-9,114,101,116,117,114,110,32,99,111,108,32,42,32,116,101,120,101,108,40,
-116,101,120,44,32,118,46,117,118,41,59,13,10,9,9,125,13,10,9,9,
-35,69,78,68,95,70,82,65,71,77,69,78,84,95,83,72,65,68,69,82,
-13,10,9,93,93,13,10,32,32,32,32,106,103,46,83,104,97,100,101,114,
-115,46,83,104,97,112,101,32,61,32,106,103,46,110,101,119,83,104,97,100,
-101,114,91,91,13,10,32,32,32,32,35,86,69,82,84,69,88,95,83,72,
-65,68,69,82,13,10,9,86,101,114,116,101,120,32,118,101,114,116,40,86,
-101,114,116,101,120,32,118,41,13,10,9,123,13,10,9,9,114,101,116,117,
-114,110,32,118,59,13,10,9,125,13,10,9,35,69,78,68,95,86,69,82,
-84,69,88,95,83,72,65,68,69,82,13,10,9,35,70,82,65,71,77,69,
-78,84,95,83,72,65,68,69,82,13,10,9,67,111,108,111,114,32,102,114,
+77,69,78,84,95,83,72,65,68,69,82,13,10,9,93,93,13,10,32,32,
+32,32,106,103,46,83,104,97,100,101,114,115,46,83,104,97,112,101,32,61,
+32,106,103,46,110,101,119,83,104,97,100,101,114,91,91,13,10,32,32,32,
+32,35,86,69,82,84,69,88,95,83,72,65,68,69,82,13,10,9,86,101,
+114,116,101,120,32,118,101,114,116,40,86,101,114,116,101,120,32,118,41,13,
+10,9,123,13,10,9,9,114,101,116,117,114,110,32,118,59,13,10,9,125,
+13,10,9,35,69,78,68,95,86,69,82,84,69,88,95,83,72,65,68,69,
+82,13,10,9,35,70,82,65,71,77,69,78,84,95,83,72,65,68,69,82,
+13,10,9,67,111,108,111,114,32,102,114,97,103,40,67,111,108,111,114,32,
+99,111,108,44,32,84,101,120,116,117,114,101,32,116,101,120,44,32,86,101,
+114,116,101,120,32,118,41,13,10,9,123,13,10,9,9,114,101,116,117,114,
+110,32,99,111,108,59,13,10,9,125,13,10,9,35,69,78,68,95,70,82,
+65,71,77,69,78,84,95,83,72,65,68,69,82,13,10,32,32,32,32,93,
+93,13,10,9,106,103,46,83,104,97,100,101,114,115,46,68,101,102,97,117,
+108,116,32,61,32,106,103,46,110,101,119,83,104,97,100,101,114,91,91,13,
+10,9,9,35,86,69,82,84,69,88,95,83,72,65,68,69,82,13,10,9,
+9,86,101,114,116,101,120,32,118,101,114,116,40,86,101,114,116,101,120,32,
+118,41,13,10,9,9,123,13,10,9,9,9,114,101,116,117,114,110,32,118,
+59,13,10,9,9,125,13,10,9,9,35,69,78,68,95,86,69,82,84,69,
+88,95,83,72,65,68,69,82,13,10,9,9,35,70,82,65,71,77,69,78,
+84,95,83,72,65,68,69,82,13,10,9,9,67,111,108,111,114,32,102,114,
97,103,40,67,111,108,111,114,32,99,111,108,44,32,84,101,120,116,117,114,
-101,32,116,101,120,44,32,86,101,114,116,101,120,32,118,41,13,10,9,123,
-13,10,9,9,114,101,116,117,114,110,32,99,111,108,59,13,10,9,125,13,
-10,9,35,69,78,68,95,70,82,65,71,77,69,78,84,95,83,72,65,68,
-69,82,13,10,32,32,32,32,93,93,13,10,101,110,100,13,10,13,10,108,
+101,32,116,101,120,44,32,86,101,114,116,101,120,32,118,41,13,10,9,9,
+123,13,10,9,9,9,114,101,116,117,114,110,32,99,111,108,32,42,32,116,
+101,120,101,108,40,116,101,120,44,32,118,46,117,118,41,59,13,10,9,9,
+125,13,10,9,9,35,69,78,68,95,70,82,65,71,77,69,78,84,95,83,
+72,65,68,69,82,13,10,9,93,93,13,10,101,110,100,13,10,13,10,108,
111,99,97,108,32,95,105,110,105,116,32,61,32,106,103,46,105,110,105,116,
13,10,108,111,99,97,108,32,105,110,105,116,105,97,108,105,122,101,100,32,
61,32,102,97,108,115,101,13,10,106,103,46,105,110,105,116,32,61,32,102,
diff --git a/src/libjin-lua/embed/scripts/graphics/graphics.lua b/src/libjin-lua/embed/scripts/graphics/graphics.lua
index d625249..859e29b 100644
--- a/src/libjin-lua/embed/scripts/graphics/graphics.lua
+++ b/src/libjin-lua/embed/scripts/graphics/graphics.lua
@@ -89,20 +89,6 @@ local function compileBuiltInShaders()
}
#END_FRAGMENT_SHADER
]]
- jg.Shaders.Default = 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 * texel(tex, v.uv);
- }
- #END_FRAGMENT_SHADER
- ]]
jg.Shaders.Shape = jg.newShader[[
#VERTEX_SHADER
Vertex vert(Vertex v)
@@ -117,6 +103,20 @@ local function compileBuiltInShaders()
}
#END_FRAGMENT_SHADER
]]
+ jg.Shaders.Default = 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 * texel(tex, v.uv);
+ }
+ #END_FRAGMENT_SHADER
+ ]]
end
local _init = jg.init