diff --git a/load/graphics.lua b/load/graphics.lua index 4269aa6..a0525b0 100644 --- a/load/graphics.lua +++ b/load/graphics.lua @@ -33,6 +33,8 @@ blocks = { C = love.graphics.newImage("res/img/s2.png"), B = love.graphics.newImage("res/img/s4.png"), M = love.graphics.newImage("res/img/s5.png"), + F = love.graphics.newImage("res/img/s9.png"), + A = love.graphics.newImage("res/img/s8.png"), X = love.graphics.newImage("res/img/s9.png"), }, ["bone"] = { @@ -43,6 +45,8 @@ blocks = { C = love.graphics.newImage("res/img/bone.png"), B = love.graphics.newImage("res/img/bone.png"), M = love.graphics.newImage("res/img/bone.png"), + F = love.graphics.newImage("res/img/bone.png"), + A = love.graphics.newImage("res/img/bone.png"), X = love.graphics.newImage("res/img/bone.png"), } } diff --git a/res/img/s8.png b/res/img/s8.png new file mode 100644 index 0000000..3e063f8 Binary files /dev/null and b/res/img/s8.png differ diff --git a/tetris/components/grid.lua b/tetris/components/grid.lua index 1cfcfcb..a1d10d6 100644 --- a/tetris/components/grid.lua +++ b/tetris/components/grid.lua @@ -4,7 +4,7 @@ local Grid = Object:extend() local empty = { skin = "", colour = "" } local oob = { skin = "", colour = "" } -local block = { skin = "2tie", colour = "X" } +local block = { skin = "2tie", colour = "A" } function Grid:new() self.grid = {} @@ -170,6 +170,7 @@ function Grid:applyFourWide() x[10] = x[10]~=block and block or x[10] end end + function Grid:applyPiece(piece) if piece.big then self:applyBigPiece(piece) @@ -263,7 +264,7 @@ function Grid:draw() for y = 5, 24 do for x = 1, 10 do if self.grid[y][x] ~= empty then - if self.grid_age[y][x] < 1 then + if self.grid_age[y][x] < 2 then love.graphics.setColor(1, 1, 1, 1) love.graphics.draw(blocks[self.grid[y][x].skin]["F"], 48+x*16, y*16) else @@ -297,7 +298,7 @@ function Grid:drawInvisible(opacity_function, garbage_opacity_function) if self.grid[y][x] ~= empty then if self.grid[y][x].colour == "X" then opacity = 1 - elseif garbage_opacity_function and self.grid[y][x].colour == "G" then + elseif garbage_opacity_function and self.grid[y][x].colour == "A" then opacity = garbage_opacity_function(self.grid_age[y][x]) else opacity = opacity_function(self.grid_age[y][x]) diff --git a/tetris/modes/survival_a3.lua b/tetris/modes/survival_a3.lua index 5dc799c..c5c6f4d 100644 --- a/tetris/modes/survival_a3.lua +++ b/tetris/modes/survival_a3.lua @@ -12,8 +12,6 @@ SurvivalA3Game.hash = "SurvivalA3" SurvivalA3Game.tagline = "The blocks turn black and white! Can you make it to level 1300?" - - function SurvivalA3Game:new() SurvivalA3Game.super:new() self.grade = 0 diff --git a/tetris/modes/tgmplus.lua b/tetris/modes/tgmplus.lua index 1b76e65..58840e0 100644 --- a/tetris/modes/tgmplus.lua +++ b/tetris/modes/tgmplus.lua @@ -32,30 +32,31 @@ function TGMPlusGame:new() self.garbage_queue = 0 self.garbage_pos = 0 self.garbage_rows = { - [0] = {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, - {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, - {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, - {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, - {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, - {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, - {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, - {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, - {"e", "e", "b", "b", "b", "b", "b", "b", "b", "b"}, - {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, - {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, - {"b", "b", "b", "b", "b", "b", "b", "b", "e", "e"}, - {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, - {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, - {"b", "b", "e", "b", "b", "b", "b", "b", "b", "b"}, - {"b", "e", "e", "b", "b", "b", "b", "b", "b", "b"}, - {"b", "e", "b", "b", "b", "b", "b", "b", "b", "b"}, - {"b", "b", "b", "b", "b", "b", "b", "e", "b", "b"}, - {"b", "b", "b", "b", "b", "b", "b", "e", "e", "b"}, - {"b", "b", "b", "b", "b", "b", "b", "b", "e", "b"}, - {"b", "b", "b", "b", "e", "e", "b", "b", "b", "b"}, - {"b", "b", "b", "b", "e", "e", "b", "b", "b", "b"}, - {"b", "b", "b", "b", "e", "b", "b", "b", "b", "b"}, - {"b", "b", "b", "e", "e", "e", "b", "b", "b", "b"}, + [0] = + {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, + {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, + {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, + {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, + {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, + {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, + {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, + {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, + {"e", "e", "b", "b", "b", "b", "b", "b", "b", "b"}, + {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, + {"e", "b", "b", "b", "b", "b", "b", "b", "b", "b"}, + {"b", "b", "b", "b", "b", "b", "b", "b", "e", "e"}, + {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, + {"b", "b", "b", "b", "b", "b", "b", "b", "b", "e"}, + {"b", "b", "e", "b", "b", "b", "b", "b", "b", "b"}, + {"b", "e", "e", "b", "b", "b", "b", "b", "b", "b"}, + {"b", "e", "b", "b", "b", "b", "b", "b", "b", "b"}, + {"b", "b", "b", "b", "b", "b", "b", "e", "b", "b"}, + {"b", "b", "b", "b", "b", "b", "b", "e", "e", "b"}, + {"b", "b", "b", "b", "b", "b", "b", "b", "e", "b"}, + {"b", "b", "b", "b", "e", "e", "b", "b", "b", "b"}, + {"b", "b", "b", "b", "e", "e", "b", "b", "b", "b"}, + {"b", "b", "b", "b", "e", "b", "b", "b", "b", "b"}, + {"b", "b", "b", "e", "e", "e", "b", "b", "b", "b"}, } end