diff options
-rw-r--r-- | bin/Jin.exe | bin | 843776 -> 843776 bytes | |||
-rw-r--r-- | bin/SDL2.dll | bin | 771072 -> 771072 bytes | |||
-rw-r--r-- | build/vc++/jin/jin.vcxproj | 1 | ||||
-rw-r--r-- | src/3rdparty/buildvm/buildvm.exe | bin | 62976 -> 62976 bytes | |||
-rw-r--r-- | src/3rdparty/minilua/minilua.exe | bin | 112640 -> 112640 bytes | |||
-rw-r--r-- | src/libjin/Graphics/je_shapes.cpp | 8 | ||||
-rw-r--r-- | src/lua/embed/embed.h | 12 | ||||
-rw-r--r-- | src/lua/embed/graphics.lua.h | 2 | ||||
-rw-r--r-- | src/lua/jin.cpp | 2 |
9 files changed, 12 insertions, 13 deletions
diff --git a/bin/Jin.exe b/bin/Jin.exe Binary files differindex a1f21ad..6b2ab8b 100644 --- a/bin/Jin.exe +++ b/bin/Jin.exe diff --git a/bin/SDL2.dll b/bin/SDL2.dll Binary files differindex cca85de..beff75a 100644 --- a/bin/SDL2.dll +++ b/bin/SDL2.dll diff --git a/build/vc++/jin/jin.vcxproj b/build/vc++/jin/jin.vcxproj index efc5188..489f35d 100644 --- a/build/vc++/jin/jin.vcxproj +++ b/build/vc++/jin/jin.vcxproj @@ -74,6 +74,7 @@ </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <OutDir>$(SolutionDir)..\..\bin</OutDir> + <TargetName>$(ProjectName)</TargetName> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> diff --git a/src/3rdparty/buildvm/buildvm.exe b/src/3rdparty/buildvm/buildvm.exe Binary files differindex 2fbe5b0..bbd01e7 100644 --- a/src/3rdparty/buildvm/buildvm.exe +++ b/src/3rdparty/buildvm/buildvm.exe diff --git a/src/3rdparty/minilua/minilua.exe b/src/3rdparty/minilua/minilua.exe Binary files differindex c4a2ff5..5c72000 100644 --- a/src/3rdparty/minilua/minilua.exe +++ b/src/3rdparty/minilua/minilua.exe diff --git a/src/libjin/Graphics/je_shapes.cpp b/src/libjin/Graphics/je_shapes.cpp index 9859072..aaab1d9 100644 --- a/src/libjin/Graphics/je_shapes.cpp +++ b/src/libjin/Graphics/je_shapes.cpp @@ -45,8 +45,8 @@ namespace JinEngine void line(int x1, int y1, int x2, int y2) { float verts[] = { - x1, y1, - x2, y2 + x1 + 0.5f, y1 + 0.5f, + x2 + 0.5f, y2 + 0.5f }; Shader* shader = Shader::getCurrentShader(); @@ -85,13 +85,13 @@ namespace JinEngine void rect(RenderMode mode, int x, int y, int w, int h) { - float coords[] = { x, y, x + w, y, x + w, y + h, x, y + h }; + float coords[] = { x + 0.5f, y + 0.5f, x + w + 0.5f, y + 0.5f, x + w + 0.5f, y + h + 0.5f, x + 0.5f, y + h + 0.5f }; polygon(mode, coords, 4); } void triangle(RenderMode mode, int x1, int y1, int x2, int y2, int x3, int y3) { - float coords[] = { x1, y1, x2, y2, x3, y3 }; + float coords[] = { x1 + 0.5f, y1 + 0.5f, x2 + 0.5f, y2 + 0.5f, x3 + 0.5f, y3 + 0.5f }; polygon(mode, coords, 3); } diff --git a/src/lua/embed/embed.h b/src/lua/embed/embed.h index e343dcd..1efbc95 100644 --- a/src/lua/embed/embed.h +++ b/src/lua/embed/embed.h @@ -4,28 +4,26 @@ namespace JinEngine { - namespace embed + namespace Embed { #define embed(L, script, name)\ if(luax_loadbuffer(L, script, strlen(script), name) == 0)\ lua_call(L, 0, 0); - /** - * embed structure. - */ + // Embed structure. struct jin_Embed { const char* file, *source; }; - // embed scripts + // Embed scripts. #include "graphics.lua.h" #include "keyboard.lua.h" #include "mouse.lua.h" #include "boot.lua.h" - // in order + // In order. const jin_Embed scripts[] = { { "graphics.lua", graphics_lua }, { "keyboard.lua", keyboard_lua }, @@ -40,7 +38,7 @@ namespace JinEngine embed(L, scripts[i].source, scripts[i].file); } - } // embed + } // namespace Embed } // namespace JinEngine #endif
\ No newline at end of file diff --git a/src/lua/embed/graphics.lua.h b/src/lua/embed/graphics.lua.h index 671cacd..b2a19b5 100644 --- a/src/lua/embed/graphics.lua.h +++ b/src/lua/embed/graphics.lua.h @@ -17,7 +17,7 @@ Vertex vert(Vertex v) Color frag(Color col, Texture tex, Vertex v) { - return col; + return col * texel(tex, v.uv); } #END_FRAGMENT_SHADER diff --git a/src/lua/jin.cpp b/src/lua/jin.cpp index 10b60b6..26b5f04 100644 --- a/src/lua/jin.cpp +++ b/src/lua/jin.cpp @@ -104,7 +104,7 @@ namespace JinEngine LUA_EXPORT void boot(lua_State* L) { - JinEngine::embed::boot(L); + JinEngine::Embed::boot(L); } } // namespace Lua |