summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-11-21 23:04:29 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-11-21 23:04:29 -0300
commitfb68e71df275a986f4398be6c6b96b602a0e7f9b (patch)
tree09e9b0654bbf20ef45a97bc30df7afc523e02411
parent0f9942fc97d82bb6528514c7da1325c5daa331e7 (diff)
Add scale window/system and nearest filter
-rw-r--r--test0/main.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/test0/main.lua b/test0/main.lua
index 6f77077..cb1fbfd 100644
--- a/test0/main.lua
+++ b/test0/main.lua
@@ -7,11 +7,16 @@ function love.load()
width = 256,
height = 240,
},
+ scale = {
+ x = 2,
+ y = 2,
+ },
title = "GNU & Bola - The libre beat'em up game",
}
love.graphics.setBackgroundColor(0, 232, 216)
- love.window.setMode(windowProfile.mode.width, windowProfile.mode.height)
+ love.graphics.setDefaultFilter('nearest', 'nearest')
+ love.window.setMode(windowProfile.mode.width * windowProfile.scale.x, windowProfile.mode.height * windowProfile.scale.y)
love.window.setTitle(windowProfile.title)
button = {
@@ -223,6 +228,9 @@ function love.draw()
nextTime = currentTime
end
love.timer.sleep(nextTime - currentTime)
+
+ love.graphics.scale(windowProfile.scale.x, windowProfile.scale.y)
+
love.graphics.print('FPS: ' .. love.timer.getFPS(), 0, 0)
love.graphics.draw(
sprites.bola.image,