summaryrefslogtreecommitdiffhomepage
path: root/mapicons.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-01-15 14:07:20 +0100
committerAki <nthirtyone@gmail.com>2017-01-15 14:07:20 +0100
commit7e3c59eb7d0c7affca6d3bdc2702faba93fe9705 (patch)
tree1a3a55c97bff9a804b384eba26c4971ad8914841 /mapicons.lua
parent7a37f5f6430a6d063e197283ce979394f55e1c68 (diff)
downloadroflnauts-7e3c59eb7d0c7affca6d3bdc2702faba93fe9705.zip
roflnauts-7e3c59eb7d0c7affca6d3bdc2702faba93fe9705.tar.gz
roflnauts-7e3c59eb7d0c7affca6d3bdc2702faba93fe9705.tar.bz2
Map icons list generated rather than static
Diffstat (limited to 'mapicons.lua')
-rw-r--r--mapicons.lua21
1 files changed, 12 insertions, 9 deletions
diff --git a/mapicons.lua b/mapicons.lua
index 3251e2a..6827840 100644
--- a/mapicons.lua
+++ b/mapicons.lua
@@ -1,9 +1,12 @@
-local w, h = 80, 252
-return {
- default = love.graphics.newQuad(2, 3,76,37,w,h),
- rill = love.graphics.newQuad(2, 45,76,37,w,h),
- ribbit = love.graphics.newQuad(2, 87,76,37,w,h),
- starstorm = love.graphics.newQuad(2,129,76,37,w,h),
- aiguillon = love.graphics.newQuad(2,171,76,37,w,h),
- sorona = love.graphics.newQuad(2,213,76,37,w,h),
-}
+-- Maps icons list generation file
+-- REWORK NEEDED, it is so similar to `nautsicons.lua` they could be merged together into one function that returns icon quad sequences.
+local maps = require "maplist"
+local w, h = 456, 37
+local icons = {}
+
+local i = 0
+for _,map in pairs(maps) do
+ icons[map] = love.graphics.newQuad(i*76, 0, 76, 37, w, h)
+ i = i + 1
+end
+return icons