diff options
-rw-r--r-- | assets/maps.png | bin | 0 -> 9305 bytes | |||
-rw-r--r-- | assets/placeholder-map-icon.png | bin | 8833 -> 0 bytes | |||
-rw-r--r-- | config/menuhost.lua | 2 | ||||
-rw-r--r-- | mapicons.lua | 21 |
4 files changed, 13 insertions, 10 deletions
diff --git a/assets/maps.png b/assets/maps.png Binary files differnew file mode 100644 index 0000000..a6b442c --- /dev/null +++ b/assets/maps.png diff --git a/assets/placeholder-map-icon.png b/assets/placeholder-map-icon.png Binary files differdeleted file mode 100644 index 85b6727..0000000 --- a/assets/placeholder-map-icon.png +++ /dev/null diff --git a/config/menuhost.lua b/config/menuhost.lua index 710839d..64ce0e7 100644 --- a/config/menuhost.lua +++ b/config/menuhost.lua @@ -16,7 +16,7 @@ return { :set("global", true) :set("first", true) :set("list", require "maplist") - :set("icons_i", love.graphics.newImage("assets/placeholder-map-icon.png")) + :set("icons_i", love.graphics.newImage("assets/maps.png")) :set("icons_q", require "mapicons") :set("shape", "panorama") :init() 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 |