From d45064be602c3becb046d86913ea8013774b0079 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 16 May 2018 19:19:03 +0800 Subject: v0.1.0 --- bin/config.lua | 13 ++++++------- bin/jin.exe | Bin 723968 -> 723968 bytes bin/main.lua | 9 ++++----- 3 files changed, 10 insertions(+), 12 deletions(-) (limited to 'bin') diff --git a/bin/config.lua b/bin/config.lua index cf4d721..40e4eac 100644 --- a/bin/config.lua +++ b/bin/config.lua @@ -1,7 +1,6 @@ -local config = {} - -config.width = 500 -config.height = 400 -config.fps = 60 - -return config +return +{ + width = 320 * 2, + height = 240 * 2, + fps = 60 +} \ No newline at end of file diff --git a/bin/jin.exe b/bin/jin.exe index 796cc78..554fc42 100644 Binary files a/bin/jin.exe and b/bin/jin.exe differ diff --git a/bin/main.lua b/bin/main.lua index 190c644..3231705 100644 --- a/bin/main.lua +++ b/bin/main.lua @@ -39,7 +39,7 @@ local jg = jin.graphics local effect = jg.Shader(shader) local diffuse = jg.Image("treestump_diffuse.png") local img = jg.Image("treestump.png") - +local ww, wh = jg.size() jin.core.onEvent = function(e) if e.type == "quit" then jin.core.quit() @@ -48,15 +48,14 @@ end jin.core.onUpdate = function() local mx, my = jin.mouse.position() - my = 400 - my + my = wh - my effect:send("number", "mx", mx) effect:send("number", "my", my) end jin.core.onDraw = function() - effect:send("Image", "diffuse", diffuse); jg.use(effect) + effect:send("Image", "diffuse", diffuse); img:setAnchor(16, 16) - jg.draw(img, 250, 200, 5, 5) - + jg.draw(img, 250, 200, 2, 2) end -- cgit v1.1-26-g67d0