From f67e67c50c85f943c032277e245e94b55be9ec1e Mon Sep 17 00:00:00 2001 From: MilkingChicken Date: Sun, 24 Sep 2017 19:42:22 +0200 Subject: Added animated background and clouds to Alpha Abyss --- config/animations/background-alpha.lua | 17 ++++++ config/maps/alpha.lua | 94 ++++++++++++++++++---------------- 2 files changed, 67 insertions(+), 44 deletions(-) create mode 100644 config/animations/background-alpha.lua (limited to 'config') diff --git a/config/animations/background-alpha.lua b/config/animations/background-alpha.lua new file mode 100644 index 0000000..019f661 --- /dev/null +++ b/config/animations/background-alpha.lua @@ -0,0 +1,17 @@ +return +{ + default = { + [1] = love.graphics.newQuad(0, 0, 320, 200, 3200, 200), + [2] = love.graphics.newQuad(320, 0, 320, 200, 3200, 200), + [3] = love.graphics.newQuad(640, 0, 320, 200, 3200, 200), + [4] = love.graphics.newQuad(960, 0, 320, 200, 3200, 200), + [5] = love.graphics.newQuad(1280, 0, 320, 200, 3200, 200), + [6] = love.graphics.newQuad(1600, 0, 320, 200, 3200, 200), + [7] = love.graphics.newQuad(1920, 0, 320, 200, 3200, 200), + [8] = love.graphics.newQuad(2240, 0, 320, 200, 3200, 200), + [9] = love.graphics.newQuad(2560, 0, 320, 200, 3200, 200), + [10] = love.graphics.newQuad(2880, 0, 320, 200, 3200, 200), + frames = 10, + repeated = true + } +} \ No newline at end of file diff --git a/config/maps/alpha.lua b/config/maps/alpha.lua index 43c12ee..b99adf3 100644 --- a/config/maps/alpha.lua +++ b/config/maps/alpha.lua @@ -1,44 +1,50 @@ -return -{ - name = "Alpha Abyss", - theme = "alpha.ogg", - portrait = "assets/maps/alpha.png", - available = true, - center = {x = 0, y = -80}, - width = 360, - height = 240, - respawns = { - {x = -30, y = 0}, - {x = 30, y = 0}, - {x = 0, y = 0}, - {x = -120, y = -50}, - {x = 120, y = -50}, - {x = 0, y = -75} - }, - create = { - { - ratio = 0, - background = "assets/backgrounds/alpha.png", - }, - { - x = -60, - y = 0, - platform = "alpha-big", - }, - { - x = -145, - y = -50, - platform = "alpha-small", - }, - { - x = 85, - y = -50, - platform = "alpha-small", - }, - { - x = -30, - y = -80, - platform = "alpha-small", - } - }, -} +return +{ + name = "Alpha Abyss", + theme = "alpha.ogg", + portrait = "assets/maps/alpha.png", + available = true, + center = {x = 0, y = -80}, + width = 360, + height = 240, + respawns = { + {x = -30, y = 0}, + {x = 30, y = 0}, + {x = 0, y = 0}, + {x = -120, y = -50}, + {x = 120, y = -50}, + {x = 0, y = -75} + }, + create = { + { + clouds = "assets/dust.png", + animations = "clouds-default", + count = 8, + }, + { + ratio = 0, + background = "assets/backgrounds/alpha.png", + animations = "background-alpha" + }, + { + x = -60, + y = 0, + platform = "alpha-big", + }, + { + x = -145, + y = -50, + platform = "alpha-small", + }, + { + x = 85, + y = -50, + platform = "alpha-small", + }, + { + x = -30, + y = -80, + platform = "alpha-small", + } + }, +} -- cgit v1.1 From 517625861535f76f1dcb992fff76d23fe4239f7c Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 7 Apr 2018 18:29:50 +0200 Subject: Replaced deprecated filesystem functions --- config/menus/host.lua | 2 +- config/menus/select.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/menus/host.lua b/config/menus/host.lua index 2b5fac5..102c4c3 100644 --- a/config/menus/host.lua +++ b/config/menus/host.lua @@ -32,7 +32,7 @@ function loadConfigs (dir, process) local items, icons = {}, {} for _,file in pairs(love.filesystem.getDirectoryItems(dir)) do local path = string.format("%s/%s", dir, file) - if love.filesystem.isFile(path) and file ~= "readme.md" then + if love.filesystem.getInfo(path).type == "file" and file ~= "readme.md" then local item = love.filesystem.load(path)() if isAvailable(item) then if process then diff --git a/config/menus/select.lua b/config/menus/select.lua index 9f0ed9b..6534004 100644 --- a/config/menus/select.lua +++ b/config/menus/select.lua @@ -36,7 +36,7 @@ function loadConfigs (dir, process) local items, icons = {}, {} for _,file in pairs(love.filesystem.getDirectoryItems(dir)) do local path = string.format("%s/%s", dir, file) - if love.filesystem.isFile(path) and file ~= "readme.md" then + if love.filesystem.getInfo(path).type == "file" and file ~= "readme.md" then local item = love.filesystem.load(path)() if isAvailable(item) then if process then -- cgit v1.1 From 6cef97b6e9ba6878607b1fff08e42ca19b79914f Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 7 Apr 2018 18:53:31 +0200 Subject: Hopefully all uses of setColor now use values in <0,1> range --- config/menus/main.lua | 2 +- config/menus/pause.lua | 2 +- config/menus/select.lua | 2 +- config/menus/settings.lua | 8 ++++---- config/menus/win.lua | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'config') diff --git a/config/menus/main.lua b/config/menus/main.lua index ae2cef2..87dca94 100644 --- a/config/menus/main.lua +++ b/config/menus/main.lua @@ -58,7 +58,7 @@ return { :setPosition(width/2, 15) :set("draw", function (self, scale) local x,y = self:getPosition() - love.graphics.setColor(255, 255, 255, 255) + love.graphics.setColor(1, 1, 1, 1) love.graphics.setFont(Bold) love.graphics.draw(awesometwo, x*scale, y*scale, 0, scale, scale, 35) end) diff --git a/config/menus/pause.lua b/config/menus/pause.lua index 60aa2fc..d0b5777 100644 --- a/config/menus/pause.lua +++ b/config/menus/pause.lua @@ -9,7 +9,7 @@ local bx = width/2-29 return { Element(menu) :set("draw", function (self, scale) - love.graphics.setColor(0, 0, 0, 110) + love.graphics.setColor(0, 0, 0, .45) local width, height = love.graphics.getWidth(), love.graphics.getHeight() love.graphics.rectangle("fill", 0, 0, width, height) end) diff --git a/config/menus/select.lua b/config/menus/select.lua index 6534004..df14ad7 100644 --- a/config/menus/select.lua +++ b/config/menus/select.lua @@ -128,7 +128,7 @@ return { if self.the_final_countdown ~= 9 then local x,y = self:getPosition() local countdown = math.max(1, math.ceil(self.the_final_countdown)) - love.graphics.setColor(255, 255, 255, 255) + love.graphics.setColor(1, 1, 1, 1) love.graphics.setFont(Font) love.graphics.print("Autostart in:", (x-16)*scale, (y+10)*scale, 0, scale, scale) love.graphics.setFont(Bold) diff --git a/config/menus/settings.lua b/config/menus/settings.lua index 7102bea..94b8e7a 100644 --- a/config/menus/settings.lua +++ b/config/menus/settings.lua @@ -16,13 +16,13 @@ local dimmer = Element(menu) :set("previousControl", "") -- it actually means key that was set as this control PREVIOUSLY :set("draw", function (self, scale) if self.visible then - love.graphics.setColor(0, 0, 0, 210) + love.graphics.setColor(0, 0, 0, .8) love.graphics.rectangle("fill",0,0,width*getRealScale(),height*getRealScale()) - love.graphics.setColor(120, 255, 120, 255) + love.graphics.setColor(.5, 1, .5, 1) love.graphics.printf("Press new key for: \n> " .. self.currentControl .. " <", (width/2-110)*scale, (height/2-4)*scale, 220, "center", 0, scale, scale) - love.graphics.setColor(120, 120, 120, 255) + love.graphics.setColor(.5, .5, .5, 1) love.graphics.printf("Old: " .. self.previousControl .. "", (width/2-110)*scale, (height/2+16)*scale, 220, "center", 0, scale, scale) - love.graphics.setColor(255, 255, 255, 255) + love.graphics.setColor(1, 1, 1, 1) end end) diff --git a/config/menus/win.lua b/config/menus/win.lua index f7163dd..ee56aeb 100644 --- a/config/menus/win.lua +++ b/config/menus/win.lua @@ -10,7 +10,7 @@ return { :setPosition(width/2, 18) :set("draw", function (self, scale) local x,y = self:getPosition() - love.graphics.setColor(255, 255, 255, 255) + love.graphics.setColor(1, 1, 1, 1) love.graphics.printf("ROFL, NOW KILL YOURSELF", x*scale, y*scale, 160, "center", 0, scale, scale, 80, 3) end) :set("focus", function () return true end) -- cgit v1.1