mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 18:59:03 -06:00
2020, A2, A3 section time draw fixes
This commit is contained in:
parent
0b6f62d50e
commit
b22f671409
@ -627,6 +627,7 @@ function GameMode:sectionColourFunction(section)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function GameMode:drawSectionTimesWithSecondary(current_section, section_limit)
|
function GameMode:drawSectionTimesWithSecondary(current_section, section_limit)
|
||||||
|
section_limit = section_limit or math.huge
|
||||||
local section_x = 530
|
local section_x = 530
|
||||||
local section_secondary_x = 440
|
local section_secondary_x = 440
|
||||||
|
|
||||||
|
@ -256,8 +256,10 @@ end
|
|||||||
local function getSectionForLevel(level)
|
local function getSectionForLevel(level)
|
||||||
if level < 2001 then
|
if level < 2001 then
|
||||||
return math.floor(level / 100) + 1
|
return math.floor(level / 100) + 1
|
||||||
else
|
elseif level < 2020 then
|
||||||
return 20
|
return 20
|
||||||
|
else
|
||||||
|
return 21
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -442,7 +444,7 @@ function Marathon2020Game:drawScoringInfo()
|
|||||||
love.graphics.printf("GRADE PTS.", text_x, 200, 90, "left")
|
love.graphics.printf("GRADE PTS.", text_x, 200, 90, "left")
|
||||||
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
|
love.graphics.printf("LEVEL", text_x, 320, 40, "left")
|
||||||
|
|
||||||
self:drawSectionTimesWithSecondary(current_section)
|
self:drawSectionTimesWithSecondary(current_section, 20)
|
||||||
|
|
||||||
if (self.cool_timer > 0) then
|
if (self.cool_timer > 0) then
|
||||||
love.graphics.printf("COOL!!", 64, 400, 160, "center")
|
love.graphics.printf("COOL!!", 64, 400, 160, "center")
|
||||||
|
@ -122,14 +122,6 @@ function MarathonA2Game:advanceOneFrame()
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function MarathonA2Game:whilePieceActive()
|
|
||||||
self.grade_point_decay_counter = self.grade_point_decay_counter + 1
|
|
||||||
if self.grade_point_decay_counter >= grade_point_decays[self.grade + 1] then
|
|
||||||
self.grade_point_decay_counter = 0
|
|
||||||
self.grade_points = math.max(0, self.grade_points - 1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function MarathonA2Game:onPieceEnter()
|
function MarathonA2Game:onPieceEnter()
|
||||||
if (self.level % 100 ~= 99 and self.level ~= 998) and not self.clear and self.frames ~= 0 then
|
if (self.level % 100 ~= 99 and self.level ~= 998) and not self.clear and self.frames ~= 0 then
|
||||||
self.level = self.level + 1
|
self.level = self.level + 1
|
||||||
@ -247,6 +239,14 @@ local grade_conversion = {
|
|||||||
17, 18, 19
|
17, 18, 19
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function MarathonA2Game:whilePieceActive()
|
||||||
|
self.grade_point_decay_counter = self.grade_point_decay_counter + 1
|
||||||
|
if self.grade_point_decay_counter >= grade_point_decays[self.grade + 1] then
|
||||||
|
self.grade_point_decay_counter = 0
|
||||||
|
self.grade_points = math.max(0, self.grade_points - 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function MarathonA2Game:updateGrade(cleared_lines)
|
function MarathonA2Game:updateGrade(cleared_lines)
|
||||||
if self.clear or cleared_lines == 0 then return
|
if self.clear or cleared_lines == 0 then return
|
||||||
else
|
else
|
||||||
|
@ -147,14 +147,6 @@ function MarathonA3Game:advanceOneFrame()
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function MarathonA3Game:whilePieceActive()
|
|
||||||
self.grade_point_decay_counter = self.grade_point_decay_counter + 1
|
|
||||||
if self.grade_point_decay_counter >= grade_point_decays[self.grade + 1] then
|
|
||||||
self.grade_point_decay_counter = 0
|
|
||||||
self.grade_points = math.max(0, self.grade_points - 1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function MarathonA3Game:onPieceEnter()
|
function MarathonA3Game:onPieceEnter()
|
||||||
if (self.level % 100 ~= 99) and self.level ~= 998 and self.frames ~= 0 then
|
if (self.level % 100 ~= 99) and self.level ~= 998 and self.frames ~= 0 then
|
||||||
self:updateSectionTimes(self.level, self.level + 1)
|
self:updateSectionTimes(self.level, self.level + 1)
|
||||||
@ -321,6 +313,14 @@ local grade_conversion = {
|
|||||||
17
|
17
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function MarathonA3Game:whilePieceActive()
|
||||||
|
self.grade_point_decay_counter = self.grade_point_decay_counter + 1
|
||||||
|
if self.grade_point_decay_counter >= grade_point_decays[self.grade + 1] then
|
||||||
|
self.grade_point_decay_counter = 0
|
||||||
|
self.grade_points = math.max(0, self.grade_points - 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function MarathonA3Game:updateGrade(cleared_lines)
|
function MarathonA3Game:updateGrade(cleared_lines)
|
||||||
if cleared_lines == 0 then return
|
if cleared_lines == 0 then return
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user