summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-11 21:20:10 +0200
committerAki <nthirtyone@gmail.com>2017-09-11 21:20:10 +0200
commit9544249897d47fa40fa833b8e57fda1c54d8e26d (patch)
tree8c268c686335c3f8e409bc9ba27ec2666ffd3a6a
parent1632826dc0b2ad4e2e1f750e872a39a39d8c98d2 (diff)
downloadroflnauts-9544249897d47fa40fa833b8e57fda1c54d8e26d.zip
roflnauts-9544249897d47fa40fa833b8e57fda1c54d8e26d.tar.gz
roflnauts-9544249897d47fa40fa833b8e57fda1c54d8e26d.tar.bz2
World's draw small clean-up
-rw-r--r--not/World.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/not/World.lua b/not/World.lua
index 2cb6bb8..88b15cc 100644
--- a/not/World.lua
+++ b/not/World.lua
@@ -249,17 +249,14 @@ function World:update (dt)
end
function World:draw ()
- -- TODO: Offests are here to keep compatibility.
- local offset_x, offset_y = 0, 0
local scale = getScale()
- local scaler = getRealScale()
-- TODO: Prototype of layering. See `World@new`.
-- TODO: Camera rewrite in progress.
for _,entity in pairs(self.entities) do
if entity.draw and entity.layer then
self.camera:translate(entity.layer.ratio)
- entity.layer:renderTo(entity.draw, entity, 0, 0, scale, debug)
+ entity.layer:renderTo(entity.draw, entity, 0, 0, scale, debug) -- TODO: Offsets are passed as zeroes in World@draw for compatibility reasons. Remove them.
self.camera:pop()
end
end
@@ -274,7 +271,7 @@ function World:draw ()
-- TODO: Just move heroes' tags to front layer.
self.camera:translate()
for _,naut in pairs(self:getNautsAlive()) do
- naut:drawTag(offset_x, offset_y, scale)
+ naut:drawTag(0, 0, scale) -- TODO: Offsets passed. See `World@draw`.
end
if debug then