summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-22 18:18:18 +0200
committerAki <nthirtyone@gmail.com>2017-09-22 18:18:18 +0200
commit704fa62d2f75e9fca66d94bb809d14785178abed (patch)
tree920ec590695c5f58af7998fb9ea8c3672b9d584e
parentb29adf54e26d16ec7f78e9dd865bc1ce807d3f14 (diff)
downloadroflnauts-704fa62d2f75e9fca66d94bb809d14785178abed.zip
roflnauts-704fa62d2f75e9fca66d94bb809d14785178abed.tar.gz
roflnauts-704fa62d2f75e9fca66d94bb809d14785178abed.tar.bz2
Removed obsolete icons functions
-rw-r--r--config/menus/host.lua2
-rw-r--r--iconsList.lua37
-rw-r--r--main.lua1
3 files changed, 1 insertions, 39 deletions
diff --git a/config/menus/host.lua b/config/menus/host.lua
index 571fc50..d586388 100644
--- a/config/menus/host.lua
+++ b/config/menus/host.lua
@@ -10,7 +10,7 @@ if background == nil or not background:is(require "not.MenuBackground") then
background = require "not.MenuBackground"(menu)
end
--- TODO: This is temporary solution for generating available maps list and portraits for them to pass to Selector. See also: `iconsList`.
+-- TODO: This is temporary solution for generating available maps list and portraits for them to pass to Selector.
local icons, maps = {}, {}
do
local files = love.filesystem.getDirectoryItems("config/maps")
diff --git a/iconsList.lua b/iconsList.lua
deleted file mode 100644
index 65e4fc9..0000000
--- a/iconsList.lua
+++ /dev/null
@@ -1,37 +0,0 @@
--- TODO: These should be part of non-existent AssetsManager or something similar.
-local function testAvoidList (i, avoidList)
- for key,value in pairs(avoidList) do
- if i == value then
- table.remove(avoidList, key)
- return false
- end
- end
- return true
-end
-
-function createIconsList (sheetWidth, sheetHeight, iconWidth, keysList, avoidList)
- local avoidList = avoidList or {}
- local iconsList, newKeysList = {}, {}
- local iconsNumber = math.floor(sheetWidth / iconWidth)
- local iconHeight = sheetHeight
- for i=1,iconsNumber do
- if testAvoidList(i, avoidList) then
- iconsList[keysList[i]] = love.graphics.newQuad((i-1)*iconWidth, 0, iconWidth, iconHeight, sheetWidth, sheetHeight)
- table.insert(newKeysList, keysList[i])
- end
- end
- return iconsList, newKeysList
-end
-
-function getNautsIconsList (avoidList)
- local avoidList = avoidList
- local keysList = require "config.nauts"
- local iconsList, newKeysList = createIconsList(1176, 27, 28, keysList, avoidList)
- return iconsList, newKeysList
-end
-
-function getMapsIconsList (avoidList)
- local keysList = require "config.maps"
- local iconsList, newKeysList = createIconsList(532, 37, 76, keysList, avoidList)
- return iconsList, newKeysList
-end
diff --git a/main.lua b/main.lua
index a71b9e2..ec56e4c 100644
--- a/main.lua
+++ b/main.lua
@@ -16,7 +16,6 @@ musicPlayer = require "not.MusicPlayer"()
sceneManager = require "not.SceneManager"()
-- Require
-require "iconsList"
require "not.World"
require "not.Camera"
require "not.Menu"