summaryrefslogtreecommitdiffhomepage
path: root/not
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-03-19 03:29:32 +0100
committerAki <nthirtyone@gmail.com>2017-03-19 03:29:32 +0100
commit2e352657813b37d17c2215b85189f18a50c099f9 (patch)
tree8ecbf2a0be065a14e0f679b10987e8b278afb882 /not
parent19e6728c339cb029ab9a6b7762d60abe790b772a (diff)
downloadroflnauts-2e352657813b37d17c2215b85189f18a50c099f9.zip
roflnauts-2e352657813b37d17c2215b85189f18a50c099f9.tar.gz
roflnauts-2e352657813b37d17c2215b85189f18a50c099f9.tar.bz2
Comments, todos, pretty useless
Diffstat (limited to 'not')
-rw-r--r--not/Cloud.lua1
-rw-r--r--not/Decoration.lua2
-rw-r--r--not/Effect.lua2
-rw-r--r--not/Hero.lua2
-rw-r--r--not/Platform.lua3
-rw-r--r--not/Sprite.lua1
6 files changed, 11 insertions, 0 deletions
diff --git a/not/Cloud.lua b/not/Cloud.lua
index c12e236..c9899d5 100644
--- a/not/Cloud.lua
+++ b/not/Cloud.lua
@@ -5,6 +5,7 @@
-- Metatable of `Cloud`
-- nils initialized in constructor
+-- TODO: inherit from `not.Decoration` or `not.Sprite`, depending on final result of `not.Sprite`.
Cloud = {
x = 0, -- position horizontal
y = 0, -- position vertical
diff --git a/not/Decoration.lua b/not/Decoration.lua
index 7f020e1..5bfc328 100644
--- a/not/Decoration.lua
+++ b/not/Decoration.lua
@@ -1,3 +1,5 @@
+-- TODO: follow new code template
+-- TODO: add comments
require "not.Sprite"
Decoration = {
world = nil,
diff --git a/not/Effect.lua b/not/Effect.lua
index 4e327a1..7010946 100644
--- a/not/Effect.lua
+++ b/not/Effect.lua
@@ -3,6 +3,8 @@
-- Metatable of `Effect`
-- nils initialized in constructor
+-- TODO: inherit from `not.Sprite`.
+-- TODO: clean-up and reformat code, see newer code for reference.
Effect = {
x = 0,
y = 0,
diff --git a/not/Hero.lua b/not/Hero.lua
index bd8c55c..a6facd9 100644
--- a/not/Hero.lua
+++ b/not/Hero.lua
@@ -83,6 +83,7 @@ function Hero:getControlSet ()
end
-- Update callback of `Hero`
+-- TODO: Explode this function (method, kek), move controler-related parts to `not.Player`, physics parts to `not.PhysicalBody`.
function Hero:update (dt)
-- hotfix? for destroyed bodies
if self.body:isDestroyed() then return end
@@ -280,6 +281,7 @@ function Hero:controlreleased (set, action, key)
end
-- Draw of `Hero`
+-- TODO: see `not.PhysicalBody.draw` and `not.Sprite.draw`.
function Hero:draw (offset_x, offset_y, scale, debug)
-- draw only alive
if not self.alive then return end
diff --git a/not/Platform.lua b/not/Platform.lua
index 9b7b03c..ecf0377 100644
--- a/not/Platform.lua
+++ b/not/Platform.lua
@@ -1,6 +1,8 @@
-- `Platform`
-- Static platform physical object with a sprite. `Players` can walk on it.
-- Collision category: [1]
+-- TODO: reformat code to follow new code patterns
+-- TODO: comment uncovered code parts
-- WHOLE CODE HAS FLAG OF "need a cleanup"
require "not.Sprite"
@@ -51,6 +53,7 @@ function Platform:getPosition()
end
-- Draw of `Platform`
+-- TODO: see todos in `not.Sprite.draw`.
function Platform:draw (offset_x, offset_y, scale, debug)
-- locals
local offset_x = offset_x or 0
diff --git a/not/Sprite.lua b/not/Sprite.lua
index e9eb387..f9a9cb4 100644
--- a/not/Sprite.lua
+++ b/not/Sprite.lua
@@ -82,6 +82,7 @@ end
-- Drawing self to LOVE2D buffer.
-- If there is no Quad, it will draw entire image. It won't draw anything if there is no image.
-- TODO: it doesn't follow same pattern as `not.Hero.draw`. It should implement so it can be called from `not.World`.
+-- TODO: change children if above changes are in effect: `not.Platform`, `not.Decoration`.
function Sprite:draw (...)
local i, q = self:getImage(), self:getQuad()
if i then