summaryrefslogtreecommitdiff
path: root/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-12-03 19:31:00 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-12-03 19:31:00 -0300
commit61207011c466bc9cd7d4f275d6befabee1b75ae7 (patch)
tree72613d0350f831ca1d37d1614ec138636a31dddf /src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua
parentef5bce4721d1307200b1335565303a7832f77535 (diff)
Keep the code more KISS - part 3
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua')
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua35
1 files changed, 10 insertions, 25 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua
index a13244a..060bb14 100644
--- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua
+++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua
@@ -1,28 +1,13 @@
-main.draw = function()
- local currentTime = love.timer.getTime()
- if nextTime <= currentTime then
- nextTime = currentTime
- return
- end
- love.timer.sleep(nextTime - currentTime)
-
- love.graphics.scale(windowProfile.scale.x, windowProfile.scale.y)
+draw = {}
- love.graphics.print('FPS: ' .. love.timer.getFPS(), 0, 0)
+require 'scripts.draw.fps'
+require 'scripts.draw.scale'
+require 'scripts.draw.printFPS'
+require 'scripts.draw.bola'
- draw = {
- bola = love.graphics.draw(
- metaSprites.bola.image,
- quad.bola,
- character.bola.position.x,
- character.bola.position.y,
- character.bola.orientation,
- character.bola.scale.x,
- character.bola.scale.y,
- character.bola.origin.x,
- character.bola.origin.y
- )
- }
--- bolaDraw.motion()
--- game.draw(metaSprites.bola, quad.bola, character.bola)
+main.draw = function()
+ draw.fps()
+ draw.scale()
+ draw.printFPS()
+ draw.bola()
end