aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/Jin.exebin2465280 -> 2247680 bytes
-rw-r--r--bin/SDL2.dllbin1242112 -> 1242112 bytes
-rw-r--r--bin/game/main.lua10
3 files changed, 7 insertions, 3 deletions
diff --git a/bin/Jin.exe b/bin/Jin.exe
index f265893..d44756c 100644
--- a/bin/Jin.exe
+++ b/bin/Jin.exe
Binary files differ
diff --git a/bin/SDL2.dll b/bin/SDL2.dll
index 69aa14a..3aaf046 100644
--- a/bin/SDL2.dll
+++ b/bin/SDL2.dll
Binary files differ
diff --git a/bin/game/main.lua b/bin/game/main.lua
index 35c1695..7c94445 100644
--- a/bin/game/main.lua
+++ b/bin/game/main.lua
@@ -25,7 +25,7 @@ Vertex vert(Vertex v)
Color frag(Color col, Texture tex, Vertex v)
{
Color c = texel(tex, v.uv);
- return c * col;
+ return c;
}
#END_FRAGMENT_SHADER
]]
@@ -37,11 +37,15 @@ local timer = nil
local tb = {x = 1, y = 2}
local t = 0
local spr = nil
+local bitmap = nil
function jin.core.onLoad()
- jin.graphics.setClearColor(100, 100, 100, 255)
+ bitmap = jin.graphics.newBitmap(128, 128, function(w, h, x, y)
+ return {255*math.sin(x/w),255 - 255*math.cos(y/w),0,255}
+ end)
shader_program = jin.graphics.newShader(shader)
shader_program2 = jin.graphics.newShader(shader2)
- tex = jin.graphics.newTexture("1.png")
+ --tex = jin.graphics.newTexture("1.png")
+ tex = jin.graphics.newTexture(bitmap)
local ssheet = jin.graphics.newSpriteSheet(tex)
spr = ssheet:newSprite(50, 50, 50, 50)
spr:setPosition(0, 50)