Added secret grade detection for Marathon A1-A3 and Survival A1-A3

This commit is contained in:
Oshisaure
2020-10-09 02:00:42 +01:00
parent 6178b2cee9
commit 2bde9d1378
7 changed files with 113 additions and 1 deletions

View File

@@ -30,6 +30,13 @@ function MarathonA3Game:new()
self.section_70_times = { [0] = 0 }
self.section_times = { [0] = 0 }
self.SGnames = {
"9", "8", "7", "6", "5", "4", "3", "2", "1",
"S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9",
"GM"
}
self.randomizer = History6RollsRandomizer()
self.lock_drop = true
@@ -378,6 +385,10 @@ function MarathonA3Game:drawScoringInfo()
love.graphics.printf("GRADE", 240, 120, 40, "left")
love.graphics.printf("SCORE", 240, 200, 40, "left")
love.graphics.printf("LEVEL", 240, 320, 40, "left")
local sg = self.grid:checkSecretGrade()
if sg >= 5 then
love.graphics.printf("SECRET GRADE", 240, 430, 180, "left")
end
-- draw section time data
current_section = math.floor(self.level / 100) + 1
@@ -411,6 +422,9 @@ function MarathonA3Game:drawScoringInfo()
love.graphics.printf(self:getLetterGrade(), 240, 140, 90, "left")
love.graphics.printf(self.level, 240, 340, 40, "right")
love.graphics.printf(self:getSectionEndLevel(), 240, 370, 40, "right")
if sg >= 5 then
love.graphics.printf(self.SGnames[sg], 240, 450, 180, "left")
end
love.graphics.setFont(font_8x11)
love.graphics.printf(formatTime(self.frames), 64, 420, 160, "center")