diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/config.lua | 13 | ||||
-rw-r--r-- | bin/jin.exe | bin | 723968 -> 723968 bytes | |||
-rw-r--r-- | bin/main.lua | 9 |
3 files changed, 10 insertions, 12 deletions
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 Binary files differindex 796cc78..554fc42 100644 --- a/bin/jin.exe +++ b/bin/jin.exe 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 |