CustomDiffiuclty cleanup, now takes CourseType as a parameter

DifficultyList -> StepsDisplayList
Course editor screen cleanup
Change GameManager back to singleton for consistency with other classes
This commit is contained in:
Chris Danford
2009-08-09 02:59:32 +00:00
parent 204f7edac0
commit cd139430f5
72 changed files with 537 additions and 447 deletions
+10 -6
View File
@@ -10,12 +10,16 @@ function PlayerScoreColor( pn )
return color("1,1,1,1")
end
local CustomDifficultyColors = {
-- let driving themes override just this table
local GameCustomDifficultyColors = {
Beginner = color("#ff32f8"),
Easy = color("#2cff00"),
Medium = color("#fee600"),
Hard = color("#ff2f39"),
Challenge = color("#1cd8ff"),
};
local CommonCustomDifficultyColors = {
Edit = color("0.8,0.8,0.8,1"), -- gray
Couple = color("#ff9a00"), -- orange
Routine = color("#ff9a00"), -- orange
@@ -30,7 +34,9 @@ local CourseDifficultyColors = {
};
function CustomDifficultyToColor( sCustomDifficulty )
local c = CustomDifficultyColors[sCustomDifficulty]
local c = GameCustomDifficultyColors[sCustomDifficulty]
if c then return c end
c = CommonCustomDifficultyColors[sCustomDifficulty]
if c then return c end
return color("#000000");
end
@@ -45,10 +51,8 @@ function CustomDifficultyToLightColor( sCustomDifficulty )
return { scale(c[1],0,1,0.5,1), scale(c[2],0,1,0.5,1), scale(c[3],0,1,0.5,1), c[4] };
end
function CourseDifficutlyToColor( cd )
local c = CourseDifficultyColors[cd]
if c then return c end
return color("#000000");
function StepsOrTrailToColor(StepsOrTrail)
CustomDifficultyToColor( StepsOrTrailToCustomDifficulty(stepsOrTrail) );
end