summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-12 02:03:14 +0200
committerAki <nthirtyone@gmail.com>2017-09-12 02:03:14 +0200
commit343ad9fcafc062dc7ddf181992863d6137628ceb (patch)
tree555765451db668945d9223fdd8d916bb8aa2efba
parentae2e4b139f4c1e9e84ad1bca0b1e6044162aec01 (diff)
downloadroflnauts-343ad9fcafc062dc7ddf181992863d6137628ceb.zip
roflnauts-343ad9fcafc062dc7ddf181992863d6137628ceb.tar.gz
roflnauts-343ad9fcafc062dc7ddf181992863d6137628ceb.tar.bz2
Removed obsolete scaled methods from Camera
-rw-r--r--not/Camera.lua27
1 files changed, 0 insertions, 27 deletions
diff --git a/not/Camera.lua b/not/Camera.lua
index c3aaae6..c5449d3 100644
--- a/not/Camera.lua
+++ b/not/Camera.lua
@@ -57,33 +57,12 @@ function Camera:getPosition ()
return self.x, self.y
end
-function Camera:getPositionScaled ()
- local scale = getScale()
- return self.x * scale, self.y * scale
-end
-
-- TODO: Magic numbers present in camera's boundaries.
function Camera:getBoundaries ()
local x, y = self:getPosition()
return x - 160, y - 90, x + 160, y + 90
end
-function Camera:getBoundariesScaled ()
- local x, y = self:getPositionScaled()
- local width, height = love.graphics.getDimensions()
- width = width / 2
- height = height / 2
- return x - width, y - height, x + width, y + height
-end
-
--- TODO: Camera@scalePoints is left because PhysicalBody still uses it as love.graphics.scale is not used yet.
-function Camera:scalePoints (...)
- local a, r, scale = {...}, {}, getScale()
- for _,v in pairs(a) do
- table.insert(r, v * scale)
- end
- return r
-end
function Camera:startShake ()
self.shakeTime = Camera.SHAKE_LENGTH
@@ -124,12 +103,6 @@ function Camera:getShake ()
return radius * math.cos(theta), radius * math.sin(theta)
end
-function Camera:getShakeScaled ()
- local x, y = self:getShake()
- local scale = getScale()
- return x * scale, y * scale
-end
-
function Camera:resetSum ()
self.sumX = 0
self.sumY = 0