mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 16:59:03 -06:00
Fixed the garbage pausing problem in Phantom Mania 2.
This commit is contained in:
commit
a105086ca6
@ -33,6 +33,8 @@ blocks = {
|
|||||||
C = love.graphics.newImage("res/img/s2.png"),
|
C = love.graphics.newImage("res/img/s2.png"),
|
||||||
B = love.graphics.newImage("res/img/s4.png"),
|
B = love.graphics.newImage("res/img/s4.png"),
|
||||||
M = love.graphics.newImage("res/img/s5.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"),
|
X = love.graphics.newImage("res/img/s9.png"),
|
||||||
},
|
},
|
||||||
["bone"] = {
|
["bone"] = {
|
||||||
@ -43,6 +45,8 @@ blocks = {
|
|||||||
C = love.graphics.newImage("res/img/bone.png"),
|
C = love.graphics.newImage("res/img/bone.png"),
|
||||||
B = love.graphics.newImage("res/img/bone.png"),
|
B = love.graphics.newImage("res/img/bone.png"),
|
||||||
M = 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"),
|
X = love.graphics.newImage("res/img/bone.png"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
res/img/s8.png
Normal file
BIN
res/img/s8.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 233 B |
@ -4,7 +4,7 @@ local Grid = Object:extend()
|
|||||||
|
|
||||||
local empty = { skin = "", colour = "" }
|
local empty = { skin = "", colour = "" }
|
||||||
local oob = { skin = "", colour = "" }
|
local oob = { skin = "", colour = "" }
|
||||||
local block = { skin = "2tie", colour = "X" }
|
local block = { skin = "2tie", colour = "A" }
|
||||||
|
|
||||||
function Grid:new()
|
function Grid:new()
|
||||||
self.grid = {}
|
self.grid = {}
|
||||||
@ -170,6 +170,7 @@ function Grid:applyFourWide()
|
|||||||
x[10] = x[10]~=block and block or x[10]
|
x[10] = x[10]~=block and block or x[10]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Grid:applyPiece(piece)
|
function Grid:applyPiece(piece)
|
||||||
if piece.big then
|
if piece.big then
|
||||||
self:applyBigPiece(piece)
|
self:applyBigPiece(piece)
|
||||||
@ -263,7 +264,7 @@ function Grid:draw()
|
|||||||
for y = 5, 24 do
|
for y = 5, 24 do
|
||||||
for x = 1, 10 do
|
for x = 1, 10 do
|
||||||
if self.grid[y][x] ~= empty then
|
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.setColor(1, 1, 1, 1)
|
||||||
love.graphics.draw(blocks[self.grid[y][x].skin]["F"], 48+x*16, y*16)
|
love.graphics.draw(blocks[self.grid[y][x].skin]["F"], 48+x*16, y*16)
|
||||||
else
|
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] ~= empty then
|
||||||
if self.grid[y][x].colour == "X" then
|
if self.grid[y][x].colour == "X" then
|
||||||
opacity = 1
|
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])
|
opacity = garbage_opacity_function(self.grid_age[y][x])
|
||||||
else
|
else
|
||||||
opacity = opacity_function(self.grid_age[y][x])
|
opacity = opacity_function(self.grid_age[y][x])
|
||||||
|
@ -12,8 +12,6 @@ SurvivalA3Game.hash = "SurvivalA3"
|
|||||||
SurvivalA3Game.tagline = "The blocks turn black and white! Can you make it to level 1300?"
|
SurvivalA3Game.tagline = "The blocks turn black and white! Can you make it to level 1300?"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function SurvivalA3Game:new()
|
function SurvivalA3Game:new()
|
||||||
SurvivalA3Game.super:new()
|
SurvivalA3Game.super:new()
|
||||||
self.grade = 0
|
self.grade = 0
|
||||||
|
@ -32,7 +32,8 @@ function TGMPlusGame:new()
|
|||||||
self.garbage_queue = 0
|
self.garbage_queue = 0
|
||||||
self.garbage_pos = 0
|
self.garbage_pos = 0
|
||||||
self.garbage_rows = {
|
self.garbage_rows = {
|
||||||
[0] = {"e", "b", "b", "b", "b", "b", "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"},
|
{"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"},
|
||||||
|
Loading…
Reference in New Issue
Block a user