CustomDiffiuclty cleanup, now takes CourseType as a parameter
DifficultyList -> StepsDisplayList Course editor screen cleanup Change GameManager back to singleton for consistency with other classes
@@ -847,9 +847,9 @@
|
||||
Blanks the DifficultyIcon.
|
||||
</Function>
|
||||
</Class>
|
||||
<Class name='DifficultyList'>
|
||||
<Class name='StepsDisplayList'>
|
||||
<Function name='setfromgamestate' return='void' arguments=''>
|
||||
Sets the DifficultyList from the GameState.
|
||||
Sets the StepsDisplayList from the GameState.
|
||||
</Function>
|
||||
</Class>
|
||||
<Class name='Game'>
|
||||
|
||||
@@ -16,9 +16,10 @@ for i=1,NumColumns do
|
||||
|
||||
local st = THEME:GetMetric(Var "LoadingScreen","ColumnStepsType" .. i);
|
||||
local dc = THEME:GetMetric(Var "LoadingScreen","ColumnDifficulty" .. i);
|
||||
local s = GetCustomDifficulty( st, dc );
|
||||
local ct = nil;
|
||||
local s = GetCustomDifficulty( st, dc, ct );
|
||||
t[#t+1] = LoadFont("_venacti Bold 13px") .. {
|
||||
InitCommand=cmd(uppercase,true;settext,GetLocalizedCustomDifficulty(s);diffuse,CustomDifficultyToColor(s);x,SCREEN_CENTER_X-60 + 80 * (i-1);y,SCREEN_CENTER_Y-158;shadowlength,0;);
|
||||
InitCommand=cmd(uppercase,true;settext,CustomDifficultyToLocalizedString(s);diffuse,CustomDifficultyToColor(s);x,SCREEN_CENTER_X-60 + 80 * (i-1);y,SCREEN_CENTER_Y-158;shadowlength,0;);
|
||||
};
|
||||
end
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
return LoadActor("DifficultyList cursor p1") .. {
|
||||
InitCommand=cmd(zoomx,-1;);
|
||||
};
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,3 @@
|
||||
return LoadActor("StepsDisplayList cursor p1") .. {
|
||||
InitCommand=cmd(zoomx,-1;);
|
||||
};
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
|
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 403 B |
|
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 275 B |
|
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 274 B |
@@ -315,7 +315,7 @@ t[#t+1] = Def.CourseContentsList {
|
||||
DifficultyChangedCommand=function(self, params)
|
||||
if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end
|
||||
self:settext( params.Meter );
|
||||
self:diffuse( CourseDifficutlyToColor(params.Difficulty) );
|
||||
self:diffuse( StepsOrTrailToColor(params.Trail) );
|
||||
end;
|
||||
};
|
||||
|
||||
@@ -328,7 +328,7 @@ t[#t+1] = Def.CourseContentsList {
|
||||
OnCommand=cmd(x,SCREEN_CENTER_X-254;y,1;shadowlength,0;settext,"1");
|
||||
DifficultyChangedCommand=function(self, params)
|
||||
if params.PlayerNumber ~= GAMESTATE:GetMasterPlayerNumber() then return end
|
||||
self:diffuse( CourseDifficutlyToColor(params.Difficulty) );
|
||||
self:diffuse( StepsOrTrailToColor(params.Trail) );
|
||||
end;
|
||||
};
|
||||
};
|
||||
@@ -392,8 +392,8 @@ t[#t+1] = Def.ActorFrame{
|
||||
};
|
||||
|
||||
if not GAMESTATE:IsCourseMode() then
|
||||
t[#t+1] = Def.DifficultyList {
|
||||
Name="DifficultyList";
|
||||
t[#t+1] = Def.StepsDisplayList {
|
||||
Name="StepsDisplayList";
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+166;y,SCREEN_CENTER_Y+20);
|
||||
CursorP1 = Def.ActorFrame {
|
||||
BeginCommand=cmd(visible,true);
|
||||
@@ -402,7 +402,7 @@ if not GAMESTATE:IsCourseMode() then
|
||||
self:visible(false);
|
||||
end;
|
||||
children={
|
||||
LoadActor( "DifficultyList highlight" ) .. {
|
||||
LoadActor( "StepsDisplayList highlight" ) .. {
|
||||
InitCommand=cmd(addx,-10;diffusealpha,0.3);
|
||||
BeginCommand=cmd(player,"PlayerNumber_P1");
|
||||
OnCommand=cmd(playcommand,"UpdateAlpha");
|
||||
@@ -428,7 +428,7 @@ if not GAMESTATE:IsCourseMode() then
|
||||
Def.ActorFrame {
|
||||
InitCommand=cmd(x,-150;bounce;effectmagnitude,-12,0,0;effectperiod,1.0;effectoffset,0.0;effectclock,"bgm");
|
||||
children={
|
||||
LoadActor( "DifficultyList cursor p1" ) .. {
|
||||
LoadActor( "StepsDisplayList cursor p1" ) .. {
|
||||
BeginCommand=cmd(player,"PlayerNumber_P1";);
|
||||
PlayerJoinedMessageCommand=function(self,param )
|
||||
if param.Player ~= "PlayerNumber_P1" then return end;
|
||||
@@ -454,7 +454,7 @@ if not GAMESTATE:IsCourseMode() then
|
||||
self:visible(false);
|
||||
end;
|
||||
children={
|
||||
LoadActor( "DifficultyList highlight" ) .. {
|
||||
LoadActor( "StepsDisplayList highlight" ) .. {
|
||||
InitCommand=cmd(addx,-10;zoomx,-1;diffusealpha,0.3);
|
||||
BeginCommand=cmd(player,"PlayerNumber_P2");
|
||||
OnCommand=cmd(playcommand,"UpdateAlpha");
|
||||
@@ -480,7 +480,7 @@ if not GAMESTATE:IsCourseMode() then
|
||||
Def.ActorFrame {
|
||||
InitCommand=cmd(x,130;bounce;effectmagnitude,12,0,0;effectperiod,1.0;effectoffset,0.0;effectclock,"bgm");
|
||||
children={
|
||||
LoadActor( "DifficultyList cursor p2" ) .. {
|
||||
LoadActor( "StepsDisplayList cursor p2" ) .. {
|
||||
BeginCommand=cmd(player,"PlayerNumber_P2";);
|
||||
PlayerJoinedMessageCommand=function(self,param )
|
||||
if param.Player ~= "PlayerNumber_P2" then return end;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
_blank
|
||||
@@ -387,6 +387,7 @@ ScoreDisplay=ScoreDisplay
|
||||
Scoreboard=Enables scoreboard
|
||||
ScoringType=Defines which scoring method to use.
|
||||
Scroll=Scroll
|
||||
Select Course=Choose this course.
|
||||
Select Profile=Choose a profile
|
||||
Server=Start Local Server
|
||||
Servers=Servers
|
||||
@@ -426,6 +427,17 @@ WideScreen16_9=Enable widescreen display.
|
||||
WideScreen16_10=Enable widescreen display.
|
||||
Windowed=Choose whether you would like to run full screen, or to display in a window on your desktop.
|
||||
|
||||
#ScreenOptionsEditCourse
|
||||
Max Minutes=Choose the maximum number of minutes that the course can run.
|
||||
Choose Song=Choose a song for this slot.
|
||||
Choose Steps=Choose a steps for this slot.
|
||||
|
||||
#ScreenOptionsCourseOverview
|
||||
Play=Play this course.
|
||||
Edit Course=Edit the songs and steps in this course.
|
||||
Shuffle=Shuffle the song order of this course.
|
||||
Save=Save changes to this course.
|
||||
|
||||
[OptionNames]
|
||||
0=0
|
||||
0.25x=0.25x
|
||||
@@ -751,6 +763,7 @@ DisplayColorDepth=Display Color
|
||||
DisplayResolution=Display Resolution
|
||||
Duration seconds=Duration seconds
|
||||
EasterEggs=Easter Eggs
|
||||
Edit=Edit
|
||||
Edit Songs/Steps=Edit Songs/Steps
|
||||
Edit Courses=Edit Courses
|
||||
Edit BPM change=Edit BPM change
|
||||
@@ -935,6 +948,14 @@ WideScreen16_9=Widescreen
|
||||
WideScreen16_10=Widescreen
|
||||
Windowed=Display Mode
|
||||
|
||||
#ScreenOptionsEditCourse
|
||||
Max Minutes=Max Minutes
|
||||
|
||||
#ScreenOptionsCourseOverview
|
||||
Play=Play
|
||||
Edit Course=Edit Course
|
||||
Shuffle=Shuffle
|
||||
|
||||
[PaneDisplay]
|
||||
Steps=Steps
|
||||
Holds=Holds
|
||||
@@ -1225,6 +1246,8 @@ HeaderSubText=Configure networked gameplay
|
||||
[ScreenOptionsEditCourse]
|
||||
The maximum number of entries per course is %d. This course already has %d entries.=The maximum number of entries per course is %d. This course already has %d entries.
|
||||
You cannot delete the last entry in a course.=You can not delete the last entry in a course.
|
||||
HeaderText=Edit Course
|
||||
%d songs, %.1f minutes=%d songs, %.1f minutes
|
||||
|
||||
[ScreenOptionsManageCourses]
|
||||
Error renaming file.=Error renameing file.
|
||||
@@ -1234,6 +1257,8 @@ This course will be lost permanently.=This course will be lost permanently.
|
||||
You have %d, the maximum number allowed.=You have %d, the maximum number allowed.
|
||||
You must delete an existing before creating a new.=You must delete an existing before creating a new.
|
||||
Error deleting the file '%s'.=Error deleting the file "%s".
|
||||
HeaderText=Manage Courses
|
||||
HeaderSubText=Edit your courses here
|
||||
|
||||
[ScreenOptionsManageEditSteps]
|
||||
Continue with delete?=Continue with delete?
|
||||
@@ -1243,9 +1268,11 @@ You have %d step edits, the maximum number allowed.=You have %d step edits, the
|
||||
You must delete an existing steps edit before creating a new steps edit.=You must delete an existing steps edit before creating a new steps edit.
|
||||
|
||||
[ScreenOptionsCourseOverview]
|
||||
Error saving workout.=Error saving workout.
|
||||
Workout saved successfully.=Workout saved successfully.
|
||||
Enter a name for the workout.=Enter a name for the workout.
|
||||
HeaderText=Course Overview
|
||||
HeaderSubText=Here's your course. Now what?
|
||||
Error saving course.=Error saving course.
|
||||
Course saved successfully.=Course saved successfully.
|
||||
Enter a name for the course.=Enter a name for the course.
|
||||
|
||||
[NotesWriterSM]
|
||||
Error renaming file. Destination file '%s' already exists.=Error renaming file. Destination file '%s' already exists.
|
||||
@@ -1541,10 +1568,10 @@ W5=Boo
|
||||
[ThemeManager]
|
||||
Reloaded metrics=Reloaded metrics
|
||||
|
||||
[WorkoutManager]
|
||||
You must supply a name for your workout.=You must supply a name for your workout.
|
||||
The name you chose conflicts with another workout. Please use a different name.=The name you chose conflicts with another workout. Please use a different name.
|
||||
The workout name cannot contain any of the following characters: %s=The workout name cannot contain any of the following characters: %s
|
||||
[CourseUtil]
|
||||
You must supply a name for your course.=You must supply a name for your course.
|
||||
The name you chose conflicts with another course. Please use a different name.=The name you chose conflicts with another course. Please use a different name.
|
||||
The course name cannot contain any of the following characters: %s=The course name cannot contain any of the following characters: %s
|
||||
%d/%d songs enabled=%d/%d songs enabled
|
||||
|
||||
[Dialog-Add A Comment]
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -3949,6 +3949,18 @@ ColorNotSelected=color("1,1,1,1")
|
||||
ColorDisabled=color("0.5,0.5,0.5,1")
|
||||
TweenSeconds=0
|
||||
|
||||
[ScreenMiniMenuContext]
|
||||
Fallback="ScreenMiniMenu"
|
||||
NumRowsShown=10
|
||||
RowPositionTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) self:y(24*(offsetFromCenter-(numItems-1)/2)) end
|
||||
LineHighlightX=0
|
||||
ShowHelp=false
|
||||
OptionRowNormalMetricsGroup="OptionRowMiniMenuContext"
|
||||
|
||||
[OptionRowMiniMenuContext]
|
||||
Fallback="OptionRowMiniMenu"
|
||||
TitleX=-54
|
||||
|
||||
[ScreenMiniMenuEditHelp]
|
||||
Fallback="ScreenMiniMenu"
|
||||
ColorDisabled=color("1,1,1,1")
|
||||
@@ -4059,22 +4071,6 @@ CategoryRecordFeats=true
|
||||
MinDifficultyForExtra="Difficulty_Hard"
|
||||
LockExtraStageSelection=true
|
||||
|
||||
[ScreenMiniMenuContext]
|
||||
Fallback="ScreenMiniMenu"
|
||||
NumRowsShown=10
|
||||
RowPositionTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) self:y(24*(offsetFromCenter-(numItems-1)/2)) end
|
||||
ItemsLongRowSharedX=0
|
||||
TitleX=0
|
||||
TitleX=-54
|
||||
TitleOnCommand=zoom,0.7;horizalign,left;shadowlength,2
|
||||
TitleGainFocusCommand=diffuseshift;effectcolor1,0.3,0.3,0.3,1;effectcolor2,1.3,1.3,1.3,1
|
||||
TitleLoseFocusCommand=stopeffect
|
||||
ItemsStartX=0
|
||||
LineHighlightX=0
|
||||
ColorSelected=color("1,1,1,1")
|
||||
ColorNotSelected=color("0.7,0.7,0.7,1")
|
||||
ShowHelp=false
|
||||
|
||||
[ScreenOptionsManage]
|
||||
Fallback="ScreenOptionsSimple"
|
||||
TimerSeconds=-1
|
||||
@@ -4091,37 +4087,31 @@ PrepareScreens="ScreenMiniMenuContext"
|
||||
GroupedScreens="ScreenMiniMenuContext"
|
||||
PersistScreens="ScreenMiniMenuContext"
|
||||
|
||||
[ScreenOptionsEditCoursesSimple]
|
||||
Fallback="ScreenOptions"
|
||||
EditMode="EditMode_Full"
|
||||
PrepareScreens="ScreenMiniMenuContext"
|
||||
GroupedScreens="ScreenMiniMenuContext"
|
||||
PersistScreens="ScreenMiniMenuContext"
|
||||
TimerSeconds=-1
|
||||
ShowExplanations=false
|
||||
AllowRepeatingChangeValueInput=true
|
||||
WrapValueInRow=false
|
||||
NavigationMode="menu"
|
||||
ForceAllPlayers=true
|
||||
InputMode="together"
|
||||
ShowHelp=false
|
||||
|
||||
[ScreenOptionsManageCourses]
|
||||
Class="ScreenOptionsManageCourses"
|
||||
Fallback="ScreenOptionsEditCoursesSimple"
|
||||
Fallback="ScreenOptionsManage"
|
||||
PrevScreen=ScreenTitleBranch()
|
||||
NextScreen="ScreenOptionsEditCourse"
|
||||
TitleX=SCREEN_LEFT+32
|
||||
GroupedScreens="ScreenOptionsManageCourses,ScreenOptionsEditCourse,ScreenTextEntry,ScreenPrompt,ScreenOptionsEditCourseMods"
|
||||
PersistScreens="ScreenOptionsManageCourses,ScreenOptionsEditCourse,ScreenTextEntry,ScreenPrompt"
|
||||
PrepareScreens="ScreenOptionsEditCourse,ScreenTextEntry,ScreenPrompt"
|
||||
CreateNewScreen=""
|
||||
GroupedScreens="ScreenOptionsManageCourses,ScreenTextEntry,ScreenPrompt,ScreenOptionsEditCourseMods"
|
||||
PersistScreens="ScreenOptionsManageCourses,ScreenTextEntry,ScreenPrompt"
|
||||
PrepareScreens="ScreenTextEntry,ScreenPrompt"
|
||||
CreateNewScreen="ScreenOptionsEditCourse"
|
||||
EditMode=Full
|
||||
|
||||
[ScreenOptionsEditCourse]
|
||||
Class="ScreenOptionsEditCourse"
|
||||
Fallback="ScreenOptionsEditCoursesSimple"
|
||||
Fallback="ScreenOptionsSimple"
|
||||
PrevScreen="ScreenOptionsCourseOverview"
|
||||
NextScreen="ScreenOptionsCourseOverview"
|
||||
|
||||
[ScreenOptionsCourseOverview]
|
||||
Class="ScreenOptionsCourseOverview"
|
||||
Fallback="ScreenOptionsSimple"
|
||||
PrevScreen="ScreenOptionsManageCourses"
|
||||
NextScreen="ScreenOptionsManageCourses"
|
||||
PlayScreen="ScreenJoinMultiplayer"
|
||||
EditScreen="ScreenOptionsEditCourse"
|
||||
|
||||
[ScreenEditCourseMods]
|
||||
Class="ScreenEdit"
|
||||
@@ -4347,7 +4337,7 @@ PropertyMin=7/8
|
||||
PropertyCenter=1.0
|
||||
PropertyMax=9/8
|
||||
|
||||
[DifficultyList]
|
||||
[StepsDisplayList]
|
||||
ItemsSpacingY=20
|
||||
NumShownItems=7
|
||||
CapitalizeDifficultyNames=1
|
||||
@@ -4451,16 +4441,8 @@ PointsHoldHeld=+1000
|
||||
PointsHoldLetGo=-500
|
||||
|
||||
[CustomDifficulty]
|
||||
Names="1,2,3"
|
||||
1StepsType="StepsType_dance_single"
|
||||
1Difficulty="Difficulty_Easy"
|
||||
1String="Easy"
|
||||
2StepsType="StepsType_pump_single"
|
||||
2Difficulty="Difficulty_Hard"
|
||||
2String="Crazy"
|
||||
3StepsType="StepsType_pump_halfdouble"
|
||||
3Difficulty="Difficulty_Invalid"
|
||||
3String="HalfDouble"
|
||||
#See pump theme for an example
|
||||
Names=""
|
||||
|
||||
[ScreenOptionsEdit]
|
||||
Class="ScreenOptionsMaster"
|
||||
|
||||
@@ -1,38 +1,14 @@
|
||||
|
||||
local CustomDifficultyColors = {
|
||||
Novice = color("#ff32f8"),
|
||||
Normal = color("#2cff00"),
|
||||
Hard = color("#fee600"),
|
||||
Crazy = color("#ff2f39"),
|
||||
HalfDouble = color("#33ff33"), -- greenish
|
||||
Freestyle = color("#A020A0"), -- purplish
|
||||
Nightmare = color("#1cd8ff"),
|
||||
Edit = color("0.8,0.8,0.8,1"), -- gray
|
||||
local GameCustomDifficultyColors = {
|
||||
Easy = color("#04fe04"),
|
||||
Normal = color("#fefb04"),
|
||||
Hard = color("#fe7704"),
|
||||
Crazy = color("#fe0a04"),
|
||||
HalfDouble = color("#04feba"),
|
||||
Freestyle = color("#fe04f5"),
|
||||
Nightmare = color("#04c6fe"),
|
||||
};
|
||||
|
||||
function CustomDifficultyToColor( sCustomDifficulty )
|
||||
local c = CustomDifficultyColors[sCustomDifficulty]
|
||||
if c then return c end
|
||||
return color("#000000");
|
||||
end
|
||||
|
||||
function CustomDifficultyToDarkColor( sCustomDifficulty )
|
||||
local c = CustomDifficultyToColor(sCustomDifficulty);
|
||||
return { c[1]/2, c[2]/2, c[3]/2, c[4] };
|
||||
end
|
||||
|
||||
function CustomDifficultyToLightColor( sCustomDifficulty )
|
||||
local c = CustomDifficultyToColor(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");
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
-- (c) 2009 Chris Danford, Jason Felds
|
||||
|
||||
@@ -1,108 +1,119 @@
|
||||
[Global]
|
||||
IsBaseTheme=0
|
||||
|
||||
[Gameplay]
|
||||
ComboIsPerRow=true
|
||||
MinScoreToContinueCombo="TapNoteScore_W3"
|
||||
MinScoreToMaintainCombo="TapNoteScore_W4"
|
||||
|
||||
[HoldJudgment]
|
||||
HoldJudgmentLetGoCommand=
|
||||
HoldJudgmentHeldCommand=
|
||||
|
||||
[Combo]
|
||||
ShowComboAt=4
|
||||
ShowMissesAt=4
|
||||
|
||||
[Player]
|
||||
JudgeHoldNotesOnSameRowTogether=true
|
||||
HoldCheckpoints=true
|
||||
RequireStepOnHoldHeads=false
|
||||
CheckpointsUseTimeSignatures=true
|
||||
ImmediateHoldLetGo=false
|
||||
RollBodyIncrementsCombo=false
|
||||
InitialHoldLife=0.05
|
||||
CheckpointsTapsSeparateJudgment=false
|
||||
|
||||
[ScreenSelectMusic]
|
||||
WrapChangeSteps=true
|
||||
|
||||
[ScreenGameplay]
|
||||
FailOnMissCombo=51
|
||||
LyricDisplaySetNoReverseCommand=x,SCREEN_CENTER_X+SCREEN_RIGHT;y,SCREEN_CENTER_X+SCREEN_BOTTOM
|
||||
LyricDisplaySetReverseCommand=x,SCREEN_CENTER_X+SCREEN_RIGHT;y,SCREEN_CENTER_X+SCREEN_BOTTOM
|
||||
LyricDisplaySetOneReverseCommand=x,SCREEN_CENTER_X+SCREEN_RIGHT;y,SCREEN_CENTER_X+SCREEN_BOTTOM
|
||||
LyricDisplayDefaultColor=
|
||||
ShowModIconRows=false
|
||||
LeftFrameX=-9999
|
||||
LeftFrameY=SCREEN_CENTER_Y
|
||||
RightFrameX=-9999
|
||||
RightFrameY=SCREEN_CENTER_Y
|
||||
StepsDisplayP1X=-9999
|
||||
StepsDisplayP2X=-9999
|
||||
ScoreFrameX=-9999
|
||||
ScoreFrameY=-9999
|
||||
ScoreP1X=-9999
|
||||
ScoreP1Y=-9999
|
||||
ScoreP2X=-9999
|
||||
ScoreP2Y=-9999
|
||||
SecondaryScoreP1X=-9999
|
||||
SecondaryScoreP1Y=-9999
|
||||
SecondaryScoreP2X=-9999
|
||||
SecondaryScoreP2Y=-9999
|
||||
PlayerOptionsP1X=-9999
|
||||
PlayerOptionsP1Y=-9999
|
||||
PlayerOptionsP2X=-9999
|
||||
PlayerOptionsP2Y=-9999
|
||||
ScoreboardC1P1X=-9999
|
||||
ScoreboardC1P1Y=-9999
|
||||
ScoreboardC2P1X=-9999
|
||||
ScoreboardC2P1Y=-9999
|
||||
ScoreboardC3P1X=-9999
|
||||
ScoreboardC3P1Y=-9999
|
||||
ScoreboardC1P2X=-9999
|
||||
ScoreboardC1P2Y=-9999
|
||||
ScoreboardC2P2X=-9999
|
||||
ScoreboardC2P2Y=-9999
|
||||
ScoreboardC3P2X=-9999
|
||||
ScoreboardC3P2Y=-9999
|
||||
|
||||
[ScreenEvaluation]
|
||||
CheckpointsWithJudgments=true
|
||||
|
||||
[CustomDifficulty]
|
||||
Names="1,2,3,4,5,6,7"
|
||||
1StepsType="StepsType_pump_single"
|
||||
1Difficulty="Difficulty_Beginner"
|
||||
1String="Novice"
|
||||
2StepsType="StepsType_pump_single"
|
||||
2Difficulty="Difficulty_Easy"
|
||||
2String="Normal"
|
||||
3StepsType="StepsType_pump_single"
|
||||
3Difficulty="Difficulty_Medium"
|
||||
3String="Hard"
|
||||
4StepsType="StepsType_pump_single"
|
||||
4Difficulty="Difficulty_Hard"
|
||||
4String="Crazy"
|
||||
5StepsType="StepsType_pump_halfdouble"
|
||||
5Difficulty="Difficulty_Invalid"
|
||||
5String="HalfDouble"
|
||||
6StepsType="StepsType_pump_double"
|
||||
6Difficulty="Difficulty_Medium"
|
||||
6String="Freestyle"
|
||||
7StepsType="StepsType_pump_double"
|
||||
7Difficulty="Difficulty_Hard"
|
||||
7String="Nightmare"
|
||||
|
||||
[ScreenSelectMusic]
|
||||
TwoPartSelection=true
|
||||
|
||||
[CodeDetector]
|
||||
Mirror="DownRight,DownLeft,UpRight,UpLeft,DownRight,DownLeft,UpRight,UpLeft,Center"
|
||||
SuperShuffle="UpLeft,UpRight,UpLeft,UpRight,DownLeft,DownRight,DownLeft,DownRight,Center"
|
||||
NextTransform=""
|
||||
NextScrollSpeed="UpLeft,UpRight,UpLeft,UpRight,Center"
|
||||
PreviousScrollSpeed="UpRight,UpLeft,UpRight,UpLeft,Center"
|
||||
NextAppearance="UpLeft,UpRight,DownLeft,DownRight,Center"
|
||||
CancelAll="DownLeft,DownRight,DownLeft,DownRight,DownLeft,DownRight"
|
||||
SaveScreenshot1="MenuLeft-MenuRight"
|
||||
[Global]
|
||||
IsBaseTheme=0
|
||||
|
||||
[Gameplay]
|
||||
ComboIsPerRow=true
|
||||
MinScoreToContinueCombo="TapNoteScore_W3"
|
||||
MinScoreToMaintainCombo="TapNoteScore_W4"
|
||||
|
||||
[HoldJudgment]
|
||||
HoldJudgmentLetGoCommand=
|
||||
HoldJudgmentHeldCommand=
|
||||
|
||||
[Combo]
|
||||
ShowComboAt=4
|
||||
ShowMissesAt=4
|
||||
|
||||
[Player]
|
||||
JudgeHoldNotesOnSameRowTogether=true
|
||||
HoldCheckpoints=true
|
||||
RequireStepOnHoldHeads=false
|
||||
CheckpointsUseTimeSignatures=true
|
||||
ImmediateHoldLetGo=false
|
||||
RollBodyIncrementsCombo=false
|
||||
InitialHoldLife=0.05
|
||||
CheckpointsTapsSeparateJudgment=false
|
||||
|
||||
[ScreenSelectMusic]
|
||||
WrapChangeSteps=true
|
||||
|
||||
[ScreenGameplay]
|
||||
FailOnMissCombo=51
|
||||
LyricDisplaySetNoReverseCommand=x,SCREEN_CENTER_X+SCREEN_RIGHT;y,SCREEN_CENTER_X+SCREEN_BOTTOM
|
||||
LyricDisplaySetReverseCommand=x,SCREEN_CENTER_X+SCREEN_RIGHT;y,SCREEN_CENTER_X+SCREEN_BOTTOM
|
||||
LyricDisplaySetOneReverseCommand=x,SCREEN_CENTER_X+SCREEN_RIGHT;y,SCREEN_CENTER_X+SCREEN_BOTTOM
|
||||
LyricDisplayDefaultColor=
|
||||
ShowModIconRows=false
|
||||
LeftFrameX=-9999
|
||||
LeftFrameY=SCREEN_CENTER_Y
|
||||
RightFrameX=-9999
|
||||
RightFrameY=SCREEN_CENTER_Y
|
||||
StepsDisplayP1X=-9999
|
||||
StepsDisplayP2X=-9999
|
||||
ScoreFrameX=-9999
|
||||
ScoreFrameY=-9999
|
||||
ScoreP1X=-9999
|
||||
ScoreP1Y=-9999
|
||||
ScoreP2X=-9999
|
||||
ScoreP2Y=-9999
|
||||
SecondaryScoreP1X=-9999
|
||||
SecondaryScoreP1Y=-9999
|
||||
SecondaryScoreP2X=-9999
|
||||
SecondaryScoreP2Y=-9999
|
||||
PlayerOptionsP1X=-9999
|
||||
PlayerOptionsP1Y=-9999
|
||||
PlayerOptionsP2X=-9999
|
||||
PlayerOptionsP2Y=-9999
|
||||
ScoreboardC1P1X=-9999
|
||||
ScoreboardC1P1Y=-9999
|
||||
ScoreboardC2P1X=-9999
|
||||
ScoreboardC2P1Y=-9999
|
||||
ScoreboardC3P1X=-9999
|
||||
ScoreboardC3P1Y=-9999
|
||||
ScoreboardC1P2X=-9999
|
||||
ScoreboardC1P2Y=-9999
|
||||
ScoreboardC2P2X=-9999
|
||||
ScoreboardC2P2Y=-9999
|
||||
ScoreboardC3P2X=-9999
|
||||
ScoreboardC3P2Y=-9999
|
||||
|
||||
[ScreenEvaluation]
|
||||
CheckpointsWithJudgments=true
|
||||
|
||||
[CustomDifficulty]
|
||||
Names="1,2,3,4,5,6,7,8"
|
||||
1StepsType="StepsType_pump_single"
|
||||
1Difficulty="Difficulty_Beginner"
|
||||
1CourseType=nil
|
||||
1String="Easy"
|
||||
2StepsType="StepsType_pump_single"
|
||||
2Difficulty="Difficulty_Easy"
|
||||
2CourseType=nil
|
||||
2String="Normal"
|
||||
3StepsType="StepsType_pump_single"
|
||||
3Difficulty="Difficulty_Medium"
|
||||
3CourseType=nil
|
||||
3String="Hard"
|
||||
4StepsType="StepsType_pump_single"
|
||||
4Difficulty="Difficulty_Hard"
|
||||
4CourseType=nil
|
||||
4String="Crazy"
|
||||
5StepsType="StepsType_pump_halfdouble"
|
||||
5Difficulty="Difficulty_Medium"
|
||||
5CourseType=nil
|
||||
5String="HalfDouble"
|
||||
6StepsType="StepsType_pump_double"
|
||||
6Difficulty="Difficulty_Medium"
|
||||
6CourseType=nil
|
||||
6String="Freestyle"
|
||||
7StepsType="StepsType_pump_double"
|
||||
7Difficulty="Difficulty_Hard"
|
||||
7CourseType=nil
|
||||
7String="Nightmare"
|
||||
8StepsType=nil
|
||||
8Difficulty=nil
|
||||
8CourseType="CourseType_Nonstop"
|
||||
8String="Progressive"
|
||||
|
||||
[ScreenSelectMusic]
|
||||
TwoPartSelection=true
|
||||
|
||||
[CodeDetector]
|
||||
Mirror="DownRight,DownLeft,UpRight,UpLeft,DownRight,DownLeft,UpRight,UpLeft,Center"
|
||||
SuperShuffle="UpLeft,UpRight,UpLeft,UpRight,DownLeft,DownRight,DownLeft,DownRight,Center"
|
||||
NextTransform=""
|
||||
NextScrollSpeed="UpLeft,UpRight,UpLeft,UpRight,Center"
|
||||
PreviousScrollSpeed="UpRight,UpLeft,UpRight,UpLeft,Center"
|
||||
NextAppearance="UpLeft,UpRight,DownLeft,DownRight,Center"
|
||||
CancelAll="DownLeft,DownRight,DownLeft,DownRight,DownLeft,DownRight"
|
||||
SaveScreenshot1="MenuLeft-MenuRight"
|
||||
|
||||
@@ -1176,7 +1176,7 @@ void Actor::AddCommand( const RString &sCmdName, apActorCommands apac )
|
||||
if( GetMessageNameFromCommandName(sCmdName, sMessage) )
|
||||
{
|
||||
SubscribeToMessage( sMessage );
|
||||
m_mapNameToCommands[sMessage] = apac; // sCmdName w/o "Message" at the end
|
||||
m_mapNameToCommands[sMessage] = apac; // sCmdName w/o "Message" at the end
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
FOREACH_CONST( StepsType, vStepsTypesToShow, st )
|
||||
{
|
||||
XNode* p3 = p2->AppendChild( "StepsType" );
|
||||
p3->AppendAttr( "StepsType", GameManager::GetStepsTypeInfo(*st).szName );
|
||||
p3->AppendAttr( "StepsType", GAMEMAN->GetStepsTypeInfo(*st).szName );
|
||||
|
||||
int iNumStepsInGroupAndStepsType[NUM_Difficulty];
|
||||
ZERO( iNumStepsInGroupAndStepsType );
|
||||
@@ -280,8 +280,8 @@ void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
FOREACH_CONST( Difficulty, vDifficultiesToShow, iter )
|
||||
{
|
||||
XNode* pNode3 = pNode2->AppendChild( "Difficulty", DifficultyToString(*iter) );
|
||||
StepsType st = GameManager::GetHowToPlayStyleForGame( GAMESTATE->m_pCurGame )->m_StepsType; // TODO: Is this the best thing we can do here?
|
||||
pNode3->AppendAttr( "DisplayAs", GetLocalizedCustomDifficulty( st, *iter ) ); // TODO: Fix use of Single
|
||||
StepsType st = GAMEMAN->GetHowToPlayStyleForGame( GAMESTATE->m_pCurGame )->m_StepsType; // TODO: Is this the best thing we can do here?
|
||||
pNode3->AppendAttr( "DisplayAs", CustomDifficultyToLocalizedString( GetCustomDifficulty( st, *iter, CourseType_Invalid) ) ); // TODO: Fix use of Single, Fix use of CourseType_Invalid
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,8 +298,8 @@ void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
XNode* pNode2 = pNode->AppendChild( "StepsType" );
|
||||
FOREACH_CONST( StepsType, vStepsTypesToShow, iter )
|
||||
{
|
||||
XNode* pNode3 = pNode2->AppendChild( "StepsType", GameManager::GetStepsTypeInfo(*iter).szName );
|
||||
pNode3->AppendAttr( "DisplayAs", GameManager::GetStepsTypeInfo(*iter).GetLocalizedString() );
|
||||
XNode* pNode3 = pNode2->AppendChild( "StepsType", GAMEMAN->GetStepsTypeInfo(*iter).szName );
|
||||
pNode3->AppendAttr( "DisplayAs", GAMEMAN->GetStepsTypeInfo(*iter).GetLocalizedString() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
{
|
||||
XNode* pNode2 = pNode->AppendChild( "Style" );
|
||||
vector<const Style*> vpStyle;
|
||||
GameManager::GetStylesForGame( GAMESTATE->m_pCurGame, vpStyle );
|
||||
GAMEMAN->GetStylesForGame( GAMESTATE->m_pCurGame, vpStyle );
|
||||
FOREACH( const Style*, vpStyle, pStyle )
|
||||
{
|
||||
if( !SHOW_STYLE(*pStyle) )
|
||||
@@ -325,7 +325,7 @@ void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
StyleID sID;
|
||||
sID.FromStyle( (*pStyle) );
|
||||
XNode* pNode3 = pNode2->AppendChild( sID.CreateNode() );
|
||||
pNode3->AppendAttr( "DisplayAs", GameManager::StyleToLocalizedString(*pStyle) );
|
||||
pNode3->AppendAttr( "DisplayAs", GAMEMAN->StyleToLocalizedString(*pStyle) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ static void RemoveStepsTypes( vector<StepsType>& inout, RString sStepsTypesToRem
|
||||
// subtract StepsTypes
|
||||
FOREACH_CONST( RString, v, i )
|
||||
{
|
||||
StepsType st = GameManager::StringToStepsType(*i);
|
||||
StepsType st = GAMEMAN->StringToStepsType(*i);
|
||||
if( st == StepsType_Invalid )
|
||||
{
|
||||
LOG->Warn( "Invalid StepsType value '%s' in '%s'", i->c_str(), sStepsTypesToRemove.c_str() );
|
||||
@@ -119,7 +119,7 @@ void ThemeMetricStepsTypesToShow::Read()
|
||||
ThemeMetric<RString>::Read();
|
||||
|
||||
m_v.clear();
|
||||
GameManager::GetStepsTypesForGame( GAMESTATE->m_pCurGame, m_v );
|
||||
GAMEMAN->GetStepsTypesForGame( GAMESTATE->m_pCurGame, m_v );
|
||||
|
||||
RemoveStepsTypes( m_v, ThemeMetric<RString>::GetValue() );
|
||||
}
|
||||
|
||||
@@ -21,18 +21,6 @@
|
||||
|
||||
static Preference<int> MAX_SONGS_IN_EDIT_COURSE( "MaxSongsInEditCourse", -1 );
|
||||
|
||||
static const char *CourseTypeNames[] = {
|
||||
"Nonstop",
|
||||
"Oni",
|
||||
"Endless",
|
||||
"Survival",
|
||||
};
|
||||
XToString( CourseType );
|
||||
XToLocalizedString( CourseType );
|
||||
LuaXType( CourseType );
|
||||
LuaFunction( CourseTypeToLocalizedString, CourseTypeToLocalizedString( Enum::Check<CourseType>( L, 1 ) ) );
|
||||
|
||||
|
||||
static const char *SongSortNames[] = {
|
||||
"Randomize",
|
||||
"MostPlays",
|
||||
@@ -486,6 +474,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
|
||||
vector<Song*> AllSongsShuffled;
|
||||
|
||||
trail.m_StepsType = st;
|
||||
trail.m_CourseType = GetCourseType();
|
||||
trail.m_CourseDifficulty = cd;
|
||||
|
||||
/* Set to true if CourseDifficulty is able to change something. */
|
||||
@@ -687,7 +676,7 @@ void Course::GetTrails( vector<Trail*> &AddTo, StepsType st ) const
|
||||
void Course::GetAllTrails( vector<Trail*> &AddTo ) const
|
||||
{
|
||||
vector<StepsType> vStepsTypesToShow;
|
||||
GameManager::GetStepsTypesForGame( GAMESTATE->m_pCurGame, vStepsTypesToShow );
|
||||
GAMEMAN->GetStepsTypesForGame( GAMESTATE->m_pCurGame, vStepsTypesToShow );
|
||||
FOREACH( StepsType, vStepsTypesToShow, st )
|
||||
{
|
||||
GetTrails( AddTo, *st );
|
||||
@@ -739,7 +728,7 @@ bool Course::AllSongsAreFixed() const
|
||||
const Style *Course::GetCourseStyle( const Game *pGame, int iNumPlayers ) const
|
||||
{
|
||||
vector<const Style*> vpStyles;
|
||||
GameManager::GetCompatibleStyles( pGame, iNumPlayers, vpStyles );
|
||||
GAMEMAN->GetCompatibleStyles( pGame, iNumPlayers, vpStyles );
|
||||
|
||||
for( int s=0; s < (int) vpStyles.size(); ++s )
|
||||
{
|
||||
|
||||
@@ -20,20 +20,6 @@ class Game;
|
||||
|
||||
const int MAX_EDIT_COURSE_TITLE_LENGTH = 12;
|
||||
|
||||
enum CourseType
|
||||
{
|
||||
COURSE_TYPE_NONSTOP, // if life meter type is BAR
|
||||
COURSE_TYPE_ONI, // if life meter type is BATTERY
|
||||
COURSE_TYPE_ENDLESS, // if set to REPEAT
|
||||
COURSE_TYPE_SURVIVAL, // if life meter type is TIME
|
||||
NUM_CourseType,
|
||||
CourseType_Invalid
|
||||
};
|
||||
#define FOREACH_CourseType( i ) FOREACH_ENUM( CourseType, i )
|
||||
const RString& CourseTypeToString( CourseType i );
|
||||
const RString& CourseTypeToLocalizedString( CourseType i );
|
||||
LuaDeclareType( CourseType );
|
||||
|
||||
inline PlayMode CourseTypeToPlayMode( CourseType ct ) { return (PlayMode)(PLAY_MODE_NONSTOP+ct); }
|
||||
inline CourseType PlayModeToCourseType( PlayMode pm ) { return (CourseType)(pm-PLAY_MODE_NONSTOP); }
|
||||
|
||||
|
||||
@@ -377,9 +377,9 @@ bool EditCourseUtil::RemoveAndDeleteFile( Course *pCourse )
|
||||
return true;
|
||||
}
|
||||
|
||||
static LocalizedString YOU_MUST_SUPPLY_NAME ( "WorkoutManager", "You must supply a name for your workout." );
|
||||
static LocalizedString EDIT_NAME_CONFLICTS ( "WorkoutManager", "The name you chose conflicts with another workout. Please use a different name." );
|
||||
static LocalizedString EDIT_NAME_CANNOT_CONTAIN ( "WorkoutManager", "The workout name cannot contain any of the following characters: %s" );
|
||||
static LocalizedString YOU_MUST_SUPPLY_NAME ( "CourseUtil", "You must supply a name for your course." );
|
||||
static LocalizedString EDIT_NAME_CONFLICTS ( "CourseUtil", "The name you chose conflicts with another course. Please use a different name." );
|
||||
static LocalizedString EDIT_NAME_CANNOT_CONTAIN ( "CourseUtil", "The course name cannot contain any of the following characters: %s" );
|
||||
bool EditCourseUtil::ValidateEditCourseName( const RString &sAnswer, RString &sErrorOut )
|
||||
{
|
||||
if( sAnswer.empty() )
|
||||
@@ -415,9 +415,11 @@ bool EditCourseUtil::ValidateEditCourseName( const RString &sAnswer, RString &sE
|
||||
|
||||
void EditCourseUtil::UpdateAndSetTrail()
|
||||
{
|
||||
ASSERT( GAMESTATE->m_pCurStyle );
|
||||
StepsType st = GAMESTATE->m_pCurStyle->m_StepsType;
|
||||
Trail *pTrail = GAMESTATE->m_pCurCourse->GetTrailForceRegenCache( st );
|
||||
ASSERT( pTrail );
|
||||
Trail *pTrail = NULL;
|
||||
if( GAMESTATE->m_pCurCourse )
|
||||
GAMESTATE->m_pCurCourse->GetTrailForceRegenCache( st );
|
||||
GAMESTATE->m_pCurTrail[PLAYER_1].Set( pTrail );
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "LocalizedString.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "GameManager.h"
|
||||
#include "Steps.h"
|
||||
#include "Trail.h"
|
||||
|
||||
static const char *DifficultyNames[] = {
|
||||
"Beginner",
|
||||
@@ -78,9 +80,9 @@ CourseDifficulty GetNextShownCourseDifficulty( CourseDifficulty cd )
|
||||
|
||||
static ThemeMetric<RString> NAMES("CustomDifficulty","Names");
|
||||
|
||||
RString GetCustomDifficulty( StepsType st, Difficulty dc )
|
||||
RString GetCustomDifficulty( StepsType st, Difficulty dc, CourseType ct )
|
||||
{
|
||||
const StepsTypeInfo &sti = GameManager::GetStepsTypeInfo( st );
|
||||
const StepsTypeInfo &sti = GAMEMAN->GetStepsTypeInfo( st );
|
||||
|
||||
switch( sti.m_StepsTypeCategory )
|
||||
{
|
||||
@@ -104,11 +106,16 @@ RString GetCustomDifficulty( StepsType st, Difficulty dc )
|
||||
ThemeMetric<Difficulty> DIFFICULTY("CustomDifficulty",(*sName)+"Difficulty");
|
||||
if( DIFFICULTY == Difficulty_Invalid || dc == DIFFICULTY ) // match
|
||||
{
|
||||
ThemeMetric<RString> STRING("CustomDifficulty",(*sName)+"String");
|
||||
return STRING.GetValue();
|
||||
ThemeMetric<CourseType> COURSE_TYPE("CustomDifficulty",(*sName)+"CourseType");
|
||||
if( COURSE_TYPE == CourseType_Invalid || ct == COURSE_TYPE ) // match
|
||||
{
|
||||
ThemeMetric<RString> STRING("CustomDifficulty",(*sName)+"String");
|
||||
return STRING.GetValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// no matching CustomDifficulty, so use a regular difficulty name
|
||||
return DifficultyToString( dc );
|
||||
}
|
||||
case StepsTypeCategory_Couple:
|
||||
@@ -118,16 +125,48 @@ RString GetCustomDifficulty( StepsType st, Difficulty dc )
|
||||
}
|
||||
}
|
||||
|
||||
LuaFunction( GetCustomDifficulty, GetCustomDifficulty(Enum::Check<StepsType>(L,1),Enum::Check<Difficulty>(L, 2)) );
|
||||
LuaFunction( GetCustomDifficulty, GetCustomDifficulty(Enum::Check<StepsType>(L,1), Enum::Check<Difficulty>(L, 2), Enum::Check<CourseType>(L, 3)) );
|
||||
|
||||
RString GetLocalizedCustomDifficulty( const RString &sCustomDifficulty )
|
||||
RString CustomDifficultyToLocalizedString( const RString &sCustomDifficulty )
|
||||
{
|
||||
return THEME->GetString( "CustomDifficulty", sCustomDifficulty );
|
||||
}
|
||||
|
||||
LuaFunction( GetLocalizedCustomDifficulty, GetLocalizedCustomDifficulty(SArg(1)) );
|
||||
LuaFunction( CustomDifficultyToLocalizedString, CustomDifficultyToLocalizedString(SArg(1)) );
|
||||
|
||||
|
||||
RString StepsToCustomDifficulty( const Steps *pSteps )
|
||||
{
|
||||
return GetCustomDifficulty( pSteps->m_StepsType, pSteps->GetDifficulty(), CourseType_Invalid );
|
||||
}
|
||||
|
||||
RString TrailToCustomDifficulty( const Trail *pTrail )
|
||||
{
|
||||
return GetCustomDifficulty( pTrail->m_StepsType, pTrail->m_CourseDifficulty, pTrail->m_CourseType );
|
||||
}
|
||||
|
||||
|
||||
#include "LuaBinding.h"
|
||||
|
||||
static int StepsOrTrailToCustomDifficulty( lua_State *L )
|
||||
{
|
||||
Steps *pSteps = Luna<Steps>::check(L, 1);
|
||||
if( pSteps )
|
||||
{
|
||||
lua_pushstring(L, StepsToCustomDifficulty( pSteps ));
|
||||
return 1;
|
||||
}
|
||||
Trail *pTrail = Luna<Trail>::check(L, 1);
|
||||
if( pTrail )
|
||||
{
|
||||
lua_pushstring(L, TrailToCustomDifficulty( pTrail ));
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LuaFunction2( StepsOrTrailToCustomDifficulty );
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "EnumHelper.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
class Steps;
|
||||
class Trail;
|
||||
|
||||
//
|
||||
// Player number stuff
|
||||
@@ -33,11 +35,12 @@ const RString& CourseDifficultyToLocalizedString( Difficulty dc );
|
||||
Difficulty GetNextShownCourseDifficulty( Difficulty pn );
|
||||
|
||||
|
||||
// CustomDifficulty is a themeable difficulty name based on Difficulty, string matching on StepsType, and bCourse.
|
||||
// CustomDifficulty is a themeable difficulty name based on Difficulty, string matching on StepsType, and CourseType.
|
||||
// It is used to look up localized strings and look up colors.
|
||||
RString GetCustomDifficulty( StepsType st, Difficulty dc );
|
||||
RString GetLocalizedCustomDifficulty( const RString &sCustomDifficulty );
|
||||
static inline RString GetLocalizedCustomDifficulty( StepsType st, Difficulty dc ) { return GetLocalizedCustomDifficulty( GetCustomDifficulty(st,dc) ); }
|
||||
RString GetCustomDifficulty( StepsType st, Difficulty dc, CourseType ct );
|
||||
RString CustomDifficultyToLocalizedString( const RString &sCustomDifficulty );
|
||||
RString StepsToCustomDifficulty( const Steps *pSteps );
|
||||
RString TrailToCustomDifficulty( const Trail *pTrail );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
|
||||
#define MAX_METERS NUM_Difficulty + MAX_EDITS_PER_SONG
|
||||
|
||||
REGISTER_ACTOR_CLASS( DifficultyList )
|
||||
REGISTER_ACTOR_CLASS( StepsDisplayList )
|
||||
|
||||
DifficultyList::DifficultyList()
|
||||
StepsDisplayList::StepsDisplayList()
|
||||
{
|
||||
m_bShown = true;
|
||||
|
||||
@@ -26,15 +26,15 @@ DifficultyList::DifficultyList()
|
||||
}
|
||||
}
|
||||
|
||||
DifficultyList::~DifficultyList()
|
||||
StepsDisplayList::~StepsDisplayList()
|
||||
{
|
||||
}
|
||||
|
||||
void DifficultyList::LoadFromNode( const XNode* pNode )
|
||||
void StepsDisplayList::LoadFromNode( const XNode* pNode )
|
||||
{
|
||||
ActorFrame::LoadFromNode( pNode );
|
||||
|
||||
ASSERT_M( !m_sName.empty(), "DifficultyList must have a Name" );
|
||||
ASSERT_M( !m_sName.empty(), "StepsDisplayList must have a Name" );
|
||||
|
||||
ITEMS_SPACING_Y.Load( m_sName, "ItemsSpacingY" );
|
||||
NUM_SHOWN_ITEMS.Load( m_sName, "NumShownItems" );
|
||||
@@ -48,7 +48,7 @@ void DifficultyList::LoadFromNode( const XNode* pNode )
|
||||
{
|
||||
const XNode *pChild = pNode->GetChild( ssprintf("CursorP%i",pn+1) );
|
||||
if( pChild == NULL )
|
||||
RageException::Throw( "%s: DifficultyList: missing the node \"CursorP%d\"", ActorUtil::GetWhere(pNode).c_str(), pn+1 );
|
||||
RageException::Throw( "%s: StepsDisplayList: missing the node \"CursorP%d\"", ActorUtil::GetWhere(pNode).c_str(), pn+1 );
|
||||
m_Cursors[pn].LoadActorFromNode( pChild, this );
|
||||
|
||||
/* Hack: we need to tween cursors both up to down (cursor motion) and visible to
|
||||
@@ -59,7 +59,7 @@ void DifficultyList::LoadFromNode( const XNode* pNode )
|
||||
* colors; I think we do need a diffuse color stack ... */
|
||||
pChild = pNode->GetChild( ssprintf("CursorP%iFrame",pn+1) );
|
||||
if( pChild == NULL )
|
||||
RageException::Throw( "%s: DifficultyList: missing the node \"CursorP%dFrame\"", ActorUtil::GetWhere(pNode).c_str(), pn+1 );
|
||||
RageException::Throw( "%s: StepsDisplayList: missing the node \"CursorP%dFrame\"", ActorUtil::GetWhere(pNode).c_str(), pn+1 );
|
||||
m_CursorFrames[pn].LoadFromNode( pChild );
|
||||
m_CursorFrames[pn].AddChild( m_Cursors[pn] );
|
||||
this->AddChild( &m_CursorFrames[pn] );
|
||||
@@ -76,7 +76,7 @@ void DifficultyList::LoadFromNode( const XNode* pNode )
|
||||
PositionItems();
|
||||
}
|
||||
|
||||
int DifficultyList::GetCurrentRowIndex( PlayerNumber pn ) const
|
||||
int StepsDisplayList::GetCurrentRowIndex( PlayerNumber pn ) const
|
||||
{
|
||||
Difficulty ClosestDifficulty = GAMESTATE->GetClosestShownDifficulty(pn);
|
||||
|
||||
@@ -100,7 +100,7 @@ int DifficultyList::GetCurrentRowIndex( PlayerNumber pn ) const
|
||||
}
|
||||
|
||||
/* Update m_fY and m_bHidden[]. */
|
||||
void DifficultyList::UpdatePositions()
|
||||
void StepsDisplayList::UpdatePositions()
|
||||
{
|
||||
int iCurrentRow[NUM_PLAYERS];
|
||||
FOREACH_HumanPlayer( p )
|
||||
@@ -193,7 +193,7 @@ void DifficultyList::UpdatePositions()
|
||||
}
|
||||
|
||||
|
||||
void DifficultyList::PositionItems()
|
||||
void StepsDisplayList::PositionItems()
|
||||
{
|
||||
for( int i = 0; i < MAX_METERS; ++i )
|
||||
{
|
||||
@@ -244,7 +244,7 @@ void DifficultyList::PositionItems()
|
||||
}
|
||||
}
|
||||
|
||||
void DifficultyList::SetFromGameState()
|
||||
void StepsDisplayList::SetFromGameState()
|
||||
{
|
||||
const Song *pSong = GAMESTATE->m_pCurSong;
|
||||
unsigned i = 0;
|
||||
@@ -287,7 +287,7 @@ void DifficultyList::SetFromGameState()
|
||||
m_Lines[m].m_Meter.FinishTweening();
|
||||
}
|
||||
|
||||
void DifficultyList::HideRows()
|
||||
void StepsDisplayList::HideRows()
|
||||
{
|
||||
for( unsigned m = 0; m < m_Rows.size(); ++m )
|
||||
{
|
||||
@@ -298,7 +298,7 @@ void DifficultyList::HideRows()
|
||||
}
|
||||
}
|
||||
|
||||
void DifficultyList::TweenOnScreen()
|
||||
void StepsDisplayList::TweenOnScreen()
|
||||
{
|
||||
FOREACH_HumanPlayer( pn )
|
||||
ON_COMMAND( m_Cursors[pn] );
|
||||
@@ -322,12 +322,12 @@ void DifficultyList::TweenOnScreen()
|
||||
COMMAND( m_Cursors[pn], "TweenOn" );
|
||||
}
|
||||
|
||||
void DifficultyList::TweenOffScreen()
|
||||
void StepsDisplayList::TweenOffScreen()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DifficultyList::Show()
|
||||
void StepsDisplayList::Show()
|
||||
{
|
||||
m_bShown = true;
|
||||
|
||||
@@ -340,7 +340,7 @@ void DifficultyList::Show()
|
||||
COMMAND( m_Cursors[pn], "Show" );
|
||||
}
|
||||
|
||||
void DifficultyList::Hide()
|
||||
void StepsDisplayList::Hide()
|
||||
{
|
||||
m_bShown = false;
|
||||
PositionItems();
|
||||
@@ -349,7 +349,7 @@ void DifficultyList::Hide()
|
||||
COMMAND( m_Cursors[pn], "Hide" );
|
||||
}
|
||||
|
||||
void DifficultyList::HandleMessage( const Message &msg )
|
||||
void StepsDisplayList::HandleMessage( const Message &msg )
|
||||
{
|
||||
FOREACH_ENUM( PlayerNumber, pn )
|
||||
{
|
||||
@@ -365,18 +365,18 @@ void DifficultyList::HandleMessage( const Message &msg )
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
class LunaDifficultyList: public Luna<DifficultyList>
|
||||
class LunaStepsDisplayList: public Luna<StepsDisplayList>
|
||||
{
|
||||
public:
|
||||
static int setfromgamestate( T* p, lua_State *L ) { p->SetFromGameState(); return 0; }
|
||||
|
||||
LunaDifficultyList()
|
||||
LunaStepsDisplayList()
|
||||
{
|
||||
ADD_METHOD( setfromgamestate );
|
||||
}
|
||||
};
|
||||
|
||||
LUA_REGISTER_DERIVED_CLASS( DifficultyList, ActorFrame )
|
||||
LUA_REGISTER_DERIVED_CLASS( StepsDisplayList, ActorFrame )
|
||||
// lua end
|
||||
|
||||
/*
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
class Song;
|
||||
class Steps;
|
||||
|
||||
class DifficultyList: public ActorFrame
|
||||
class StepsDisplayList: public ActorFrame
|
||||
{
|
||||
public:
|
||||
DifficultyList();
|
||||
virtual ~DifficultyList();
|
||||
virtual DifficultyList *Copy() const;
|
||||
StepsDisplayList();
|
||||
virtual ~StepsDisplayList();
|
||||
virtual StepsDisplayList *Copy() const;
|
||||
virtual void LoadFromNode( const XNode* pNode );
|
||||
|
||||
void HandleMessage( const Message &msg );
|
||||
|
||||
@@ -387,7 +387,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
|
||||
// fall through
|
||||
case ROW_STEPS_TYPE:
|
||||
m_textValue[ROW_STEPS_TYPE].SetText( GameManager::GetStepsTypeInfo(GetSelectedStepsType()).GetLocalizedString() );
|
||||
m_textValue[ROW_STEPS_TYPE].SetText( GAMEMAN->GetStepsTypeInfo(GetSelectedStepsType()).GetLocalizedString() );
|
||||
|
||||
{
|
||||
Difficulty dcOld = Difficulty_Invalid;
|
||||
@@ -476,7 +476,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
// fall through
|
||||
case ROW_STEPS:
|
||||
{
|
||||
RString s = GetLocalizedCustomDifficulty( GetSelectedStepsType(), GetSelectedDifficulty() );
|
||||
RString s = CustomDifficultyToLocalizedString( GetCustomDifficulty( GetSelectedStepsType(), GetSelectedDifficulty(), CourseType_Invalid ) );
|
||||
|
||||
m_textValue[ROW_STEPS].SetText( s );
|
||||
}
|
||||
@@ -488,7 +488,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
case ROW_SOURCE_STEPS_TYPE:
|
||||
m_textLabel[ROW_SOURCE_STEPS_TYPE].SetVisible( GetSelectedSteps() ? false : true );
|
||||
m_textValue[ROW_SOURCE_STEPS_TYPE].SetVisible( GetSelectedSteps() ? false : true );
|
||||
m_textValue[ROW_SOURCE_STEPS_TYPE].SetText( GameManager::GetStepsTypeInfo(GetSelectedSourceStepsType()).GetLocalizedString() );
|
||||
m_textValue[ROW_SOURCE_STEPS_TYPE].SetText( GAMEMAN->GetStepsTypeInfo(GetSelectedSourceStepsType()).GetLocalizedString() );
|
||||
|
||||
m_vpSourceSteps.clear();
|
||||
m_vpSourceSteps.push_back( StepsAndDifficulty(NULL,Difficulty_Invalid) ); // "blank"
|
||||
@@ -525,7 +525,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
}
|
||||
else
|
||||
{
|
||||
s = GetLocalizedCustomDifficulty( GetSelectedSourceStepsType(), GetSelectedSourceDifficulty() );
|
||||
s = CustomDifficultyToLocalizedString( GetCustomDifficulty( GetSelectedSourceStepsType(), GetSelectedSourceDifficulty(), CourseType_Invalid ) );
|
||||
}
|
||||
m_textValue[ROW_SOURCE_STEPS].SetText( s );
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ void GameCommand::LoadOne( const Command& cmd )
|
||||
|
||||
if( sName == "style" )
|
||||
{
|
||||
const Style* style = GameManager::GameAndStringToStyle( GAMESTATE->m_pCurGame, sValue );
|
||||
const Style* style = GAMEMAN->GameAndStringToStyle( GAMESTATE->m_pCurGame, sValue );
|
||||
if( style )
|
||||
m_pStyle = style;
|
||||
else
|
||||
|
||||
@@ -45,7 +45,7 @@ LuaXType( RadarCategory );
|
||||
|
||||
RString StepsTypeToString( StepsType st )
|
||||
{
|
||||
RString s = GameManager::GetStepsTypeInfo( st ).szName; // "dance-single"
|
||||
RString s = GAMEMAN->GetStepsTypeInfo( st ).szName; // "dance-single"
|
||||
/* foo-bar -> Foo_Bar */
|
||||
s.Replace('-','_');
|
||||
return s;
|
||||
@@ -421,6 +421,18 @@ static const char *MultiPlayerStatusNames[] = {
|
||||
XToString( MultiPlayerStatus );
|
||||
|
||||
|
||||
static const char *CourseTypeNames[] = {
|
||||
"Nonstop",
|
||||
"Oni",
|
||||
"Endless",
|
||||
"Survival",
|
||||
};
|
||||
XToString( CourseType );
|
||||
XToLocalizedString( CourseType );
|
||||
LuaXType( CourseType );
|
||||
LuaFunction( CourseTypeToLocalizedString, CourseTypeToLocalizedString( Enum::Check<CourseType>( L, 1 ) ) );
|
||||
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
@@ -517,6 +517,21 @@ enum MultiPlayerStatus
|
||||
const RString& MultiPlayerStatusToString( MultiPlayerStatus i );
|
||||
|
||||
|
||||
enum CourseType
|
||||
{
|
||||
COURSE_TYPE_NONSTOP, // if life meter type is BAR
|
||||
COURSE_TYPE_ONI, // if life meter type is BATTERY
|
||||
COURSE_TYPE_ENDLESS, // if set to REPEAT
|
||||
COURSE_TYPE_SURVIVAL, // if life meter type is TIME
|
||||
NUM_CourseType,
|
||||
CourseType_Invalid
|
||||
};
|
||||
#define FOREACH_CourseType( i ) FOREACH_ENUM( CourseType, i )
|
||||
const RString& CourseTypeToString( CourseType i );
|
||||
const RString& CourseTypeToLocalizedString( CourseType i );
|
||||
LuaDeclareType( CourseType );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "Style.h"
|
||||
#include "Foreach.h"
|
||||
|
||||
GameManager* GAMEMAN = NULL; // global and accessable from anywhere in our program
|
||||
|
||||
enum
|
||||
{
|
||||
TRACK_1 = 0,
|
||||
@@ -2603,6 +2605,24 @@ static const Game *g_Games[] =
|
||||
&g_Game_Lights,
|
||||
};
|
||||
|
||||
GameManager::GameManager()
|
||||
{
|
||||
// Register with Lua.
|
||||
{
|
||||
Lua *L = LUA->Get();
|
||||
lua_pushstring( L, "GAMEMAN" );
|
||||
this->PushSelf( L );
|
||||
lua_settable( L, LUA_GLOBALSINDEX );
|
||||
LUA->Release( L );
|
||||
}
|
||||
}
|
||||
|
||||
GameManager::~GameManager()
|
||||
{
|
||||
// Unregister with Lua.
|
||||
LUA->UnsetGlobal( "GAMEMAN" );
|
||||
}
|
||||
|
||||
void GameManager::GetStylesForGame( const Game *pGame, vector<const Style*>& aStylesAddTo, bool editor )
|
||||
{
|
||||
for( int s=0; pGame->m_apStyles[s]; ++s )
|
||||
@@ -2855,31 +2875,30 @@ const Style* GameManager::GameAndStringToStyle( const Game *game, RString sStyle
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
namespace
|
||||
class LunaGameManager: public Luna<GameManager>
|
||||
{
|
||||
|
||||
int StepsTypeToLocalizedString( lua_State *L ) { lua_pushstring(L, GameManager::GetStepsTypeInfo(Enum::Check<StepsType>(L, 1)).GetLocalizedString() ); return 1; }
|
||||
int GetFirstStepsTypeForGame( lua_State *L )
|
||||
public:
|
||||
static int StepsTypeToLocalizedString( T* p, lua_State *L ) { lua_pushstring(L, p->GetStepsTypeInfo(Enum::Check<StepsType>(L, 1)).GetLocalizedString() ); return 1; }
|
||||
static int GetFirstStepsTypeForGame( T* p, lua_State *L )
|
||||
{
|
||||
Game *pGame = Luna<Game>::check( L, 1 );
|
||||
|
||||
vector<StepsType> vstAddTo;
|
||||
GameManager::GetStepsTypesForGame( pGame, vstAddTo );
|
||||
p->GetStepsTypesForGame( pGame, vstAddTo );
|
||||
ASSERT( !vstAddTo.empty() );
|
||||
StepsType st = vstAddTo[0];
|
||||
LuaHelpers::Push( L, st );
|
||||
return 1;
|
||||
}
|
||||
|
||||
const luaL_Reg GameManagerTable[] =
|
||||
LunaGameManager()
|
||||
{
|
||||
LIST_METHOD( StepsTypeToLocalizedString ),
|
||||
LIST_METHOD( GetFirstStepsTypeForGame ),
|
||||
{ NULL, NULL }
|
||||
};
|
||||
ADD_METHOD( StepsTypeToLocalizedString );
|
||||
ADD_METHOD( GetFirstStepsTypeForGame );
|
||||
}
|
||||
};
|
||||
|
||||
LUA_REGISTER_NAMESPACE( GameManager )
|
||||
LUA_REGISTER_CLASS( GameManager )
|
||||
// lua end
|
||||
|
||||
|
||||
|
||||
@@ -19,8 +19,12 @@ struct StepsTypeInfo
|
||||
RString GetLocalizedString() const;
|
||||
};
|
||||
|
||||
namespace GameManager
|
||||
class GameManager
|
||||
{
|
||||
public:
|
||||
GameManager();
|
||||
~GameManager();
|
||||
|
||||
void GetStylesForGame( const Game* pGame, vector<const Style*>& aStylesAddTo, bool editor=false );
|
||||
const Game *GetGameForStyle( const Style *pStyle );
|
||||
void GetStepsTypesForGame( const Game* pGame, vector<StepsType>& aStepsTypeAddTo );
|
||||
@@ -41,7 +45,12 @@ namespace GameManager
|
||||
const Game* StringToGame( RString sGame );
|
||||
const Style* GameAndStringToStyle( const Game* pGame, RString sStyle );
|
||||
RString StyleToLocalizedString( const Style* s );
|
||||
}
|
||||
|
||||
// Lua
|
||||
void PushSelf( lua_State *L );
|
||||
};
|
||||
|
||||
extern GameManager* GAMEMAN; // global and accessable from anywhere in our program
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -360,9 +360,9 @@ void GameState::JoinPlayer( PlayerNumber pn )
|
||||
// only use one player for StyleType_OnePlayerTwoSides.
|
||||
// XXX: still shows non master player's "Insert Card" -aj
|
||||
if( m_pCurStyle->m_StyleType == StyleType_OnePlayerTwoSides )
|
||||
pStyle = GameManager::GetFirstCompatibleStyle( m_pCurGame, 1, m_pCurStyle->m_StepsType );
|
||||
pStyle = GAMEMAN->GetFirstCompatibleStyle( m_pCurGame, 1, m_pCurStyle->m_StepsType );
|
||||
else
|
||||
pStyle = GameManager::GetFirstCompatibleStyle( m_pCurGame, GetNumSidesJoined(), m_pCurStyle->m_StepsType );
|
||||
pStyle = GAMEMAN->GetFirstCompatibleStyle( m_pCurGame, GetNumSidesJoined(), m_pCurStyle->m_StepsType );
|
||||
|
||||
// use SetCurrentStyle in case of StyleType_OnePlayerTwoSides
|
||||
SetCurrentStyle( pStyle );
|
||||
@@ -629,7 +629,7 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse() const
|
||||
{
|
||||
/* If a style isn't set, use the style of the selected steps. */
|
||||
StepsType st = pSteps->m_StepsType;
|
||||
pStyle = GameManager::GetFirstCompatibleStyle( m_pCurGame, GetNumSidesJoined(), st );
|
||||
pStyle = GAMEMAN->GetFirstCompatibleStyle( m_pCurGame, GetNumSidesJoined(), st );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -637,7 +637,7 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse() const
|
||||
* joined players, or one player if no players are joined. */
|
||||
vector<const Style*> vpStyles;
|
||||
int iJoined = max( GetNumSidesJoined(), 1 );
|
||||
GameManager::GetCompatibleStyles( m_pCurGame, iJoined, vpStyles );
|
||||
GAMEMAN->GetCompatibleStyles( m_pCurGame, iJoined, vpStyles );
|
||||
ASSERT( !vpStyles.empty() );
|
||||
pStyle = vpStyles[0];
|
||||
}
|
||||
@@ -2331,7 +2331,7 @@ public:
|
||||
for( unsigned i=0; i<vpStepsToShow.size(); i++ )
|
||||
{
|
||||
const Steps* pSteps = vpStepsToShow[i];
|
||||
RString sDifficulty = GetLocalizedCustomDifficulty( pSteps->m_StepsType, pSteps->GetDifficulty() );
|
||||
RString sDifficulty = CustomDifficultyToLocalizedString( GetCustomDifficulty( pSteps->m_StepsType, pSteps->GetDifficulty(), CourseType_Invalid ) );
|
||||
|
||||
lua_pushstring( L, sDifficulty );
|
||||
lua_pushstring( L, pSteps->GetDescription() );
|
||||
|
||||
@@ -70,7 +70,7 @@ static void GetUsedGameInputs( vector<GameInput> &vGameInputsOut )
|
||||
|
||||
set<GameInput> vGIs;
|
||||
vector<const Style*> vStyles;
|
||||
GameManager::GetStylesForGame( GAMESTATE->m_pCurGame, vStyles );
|
||||
GAMEMAN->GetStylesForGame( GAMESTATE->m_pCurGame, vStyles );
|
||||
FOREACH( const Style*, vStyles, style )
|
||||
{
|
||||
bool bFound = find( CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue().begin(), CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue().end(), (*style)->m_StepsType ) != CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue().end();
|
||||
|
||||
@@ -214,6 +214,10 @@ int LuaFunc_##func( lua_State *L ) { \
|
||||
void LuaFunc_Register_##func( lua_State *L ) { lua_register( L, #func, LuaFunc_##func ); } \
|
||||
REGISTER_WITH_LUA_FUNCTION( LuaFunc_Register_##func );
|
||||
|
||||
#define LuaFunction2( func ) \
|
||||
void LuaFunc_Register_##func( lua_State *L ) { lua_register( L, #func, func ); } \
|
||||
REGISTER_WITH_LUA_FUNCTION( LuaFunc_Register_##func );
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -1025,7 +1025,7 @@ void MusicWheel::SetOpenSection( RString group )
|
||||
|
||||
vector<const Style*> vpPossibleStyles;
|
||||
if( CommonMetrics::AUTO_SET_STYLE )
|
||||
GameManager::GetCompatibleStyles( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), vpPossibleStyles );
|
||||
GAMEMAN->GetCompatibleStyles( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), vpPossibleStyles );
|
||||
|
||||
m_CurWheelItemData.clear();
|
||||
vector<MusicWheelItemData *> &from = m_WheelItemDatas[GAMESTATE->m_SortOrder];
|
||||
|
||||
@@ -662,8 +662,8 @@ void NetworkSyncManager::ProcessInput()
|
||||
GameName = m_packet.ReadNT();
|
||||
StyleName = m_packet.ReadNT();
|
||||
|
||||
GAMESTATE->SetCurGame( GameManager::StringToGame(GameName) );
|
||||
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle(GAMESTATE->m_pCurGame,StyleName) );
|
||||
GAMESTATE->SetCurGame( GAMEMAN->StringToGame(GameName) );
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMESTATE->m_pCurGame,StyleName) );
|
||||
|
||||
SCREENMAN->SetNewScreen( "ScreenNetSelectMusic" ); //Should this be metric'd out?
|
||||
}
|
||||
|
||||
@@ -613,7 +613,7 @@ static bool LoadFromBMSFile( const RString &sPath, const NameToData_t &mapNameTo
|
||||
}
|
||||
|
||||
|
||||
int iNumNewTracks = GameManager::GetStepsTypeInfo( out.m_StepsType ).iNumTracks;
|
||||
int iNumNewTracks = GAMEMAN->GetStepsTypeInfo( out.m_StepsType ).iNumTracks;
|
||||
vector<int> iTransformNewToOld;
|
||||
iTransformNewToOld.resize( iNumNewTracks, -1 );
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ static void LoadFromSMTokens(
|
||||
|
||||
// LOG->Trace( "Steps::LoadFromSMTokens()" );
|
||||
|
||||
out.m_StepsType = GameManager::StringToStepsType( sStepsType );
|
||||
out.m_StepsType = GAMEMAN->StringToStepsType( sStepsType );
|
||||
out.SetDescription( sDescription );
|
||||
out.SetDifficulty( DwiCompatibleStringToDifficulty(sDifficulty) );
|
||||
|
||||
|
||||
@@ -201,9 +201,9 @@ static RString GetSMNotesTag( const Song &song, const Steps &in, bool bSavingCac
|
||||
lines.push_back( "" );
|
||||
// Escape to prevent some clown from making a comment of "\r\n;"
|
||||
lines.push_back( ssprintf("//---------------%s - %s----------------",
|
||||
GameManager::GetStepsTypeInfo(in.m_StepsType).szName, SmEscape(in.GetDescription()).c_str()) );
|
||||
GAMEMAN->GetStepsTypeInfo(in.m_StepsType).szName, SmEscape(in.GetDescription()).c_str()) );
|
||||
lines.push_back( song.m_vsKeysoundFile.empty() ? "#NOTES:" : "#NOTES2:" );
|
||||
lines.push_back( ssprintf( " %s:", GameManager::GetStepsTypeInfo(in.m_StepsType).szName ) );
|
||||
lines.push_back( ssprintf( " %s:", GAMEMAN->GetStepsTypeInfo(in.m_StepsType).szName ) );
|
||||
lines.push_back( ssprintf( " %s:", SmEscape(in.GetDescription()).c_str() ) );
|
||||
lines.push_back( ssprintf( " %s:", DifficultyToString(in.GetDifficulty()).c_str() ) );
|
||||
lines.push_back( ssprintf( " %d:", in.GetMeter() ) );
|
||||
|
||||
@@ -447,7 +447,7 @@ class OptionRowHandlerListSteps : public OptionRowHandlerList
|
||||
if( pSteps->IsAnEdit() )
|
||||
s = pSteps->GetDescription();
|
||||
else
|
||||
s = GetLocalizedCustomDifficulty( pSteps->m_StepsType, pSteps->GetDifficulty() );
|
||||
s = CustomDifficultyToLocalizedString( GetCustomDifficulty( pSteps->m_StepsType, pSteps->GetDifficulty(), CourseType_Invalid ) );
|
||||
}
|
||||
s += ssprintf( " %d", pSteps->GetMeter() );
|
||||
m_Def.m_vsChoices.push_back( s );
|
||||
@@ -560,7 +560,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
s = GetLocalizedCustomDifficulty( GAMESTATE->m_stEdit, dc );
|
||||
s = CustomDifficultyToLocalizedString( GetCustomDifficulty( GAMESTATE->m_stEdit, dc, CourseType_Invalid ) );
|
||||
}
|
||||
m_Def.m_vsChoices.push_back( s );
|
||||
}
|
||||
@@ -674,11 +674,11 @@ class OptionRowHandlerListStyles: public OptionRowHandlerList
|
||||
m_Def.m_bAllowThemeItems = false; // we theme the text ourself
|
||||
|
||||
vector<const Style*> vStyles;
|
||||
GameManager::GetStylesForGame( GAMESTATE->m_pCurGame, vStyles );
|
||||
GAMEMAN->GetStylesForGame( GAMESTATE->m_pCurGame, vStyles );
|
||||
ASSERT( vStyles.size() );
|
||||
FOREACH_CONST( const Style*, vStyles, s )
|
||||
{
|
||||
m_Def.m_vsChoices.push_back( GameManager::StyleToLocalizedString(*s) );
|
||||
m_Def.m_vsChoices.push_back( GAMEMAN->StyleToLocalizedString(*s) );
|
||||
GameCommand mc;
|
||||
mc.m_pStyle = *s;
|
||||
m_aListEntries.push_back( mc );
|
||||
@@ -736,8 +736,8 @@ class OptionRowHandlerListDifficulties: public OptionRowHandlerList
|
||||
|
||||
FOREACH_CONST( Difficulty, CommonMetrics::DIFFICULTIES_TO_SHOW.GetValue(), d )
|
||||
{
|
||||
StepsType st = GameManager::GetHowToPlayStyleForGame( GAMESTATE->m_pCurGame )->m_StepsType; // TODO: Is this the best thing we can do here?
|
||||
RString s = GetLocalizedCustomDifficulty( st, *d );
|
||||
StepsType st = GAMEMAN->GetHowToPlayStyleForGame( GAMESTATE->m_pCurGame )->m_StepsType; // TODO: Is this the best thing we can do here?
|
||||
RString s = CustomDifficultyToLocalizedString( GetCustomDifficulty(st, *d, CourseType_Invalid) );
|
||||
|
||||
m_Def.m_vsChoices.push_back( s );
|
||||
GameCommand mc;
|
||||
@@ -1205,7 +1205,7 @@ public:
|
||||
m_Def.m_vsChoices.clear();
|
||||
FOREACH_CONST( StepsType, m_vStepsTypesToShow, st )
|
||||
{
|
||||
RString s = GameManager::GetStepsTypeInfo( *st ).GetLocalizedString();
|
||||
RString s = GAMEMAN->GetStepsTypeInfo( *st ).GetLocalizedString();
|
||||
m_Def.m_vsChoices.push_back( s );
|
||||
}
|
||||
|
||||
|
||||
@@ -1053,7 +1053,7 @@ XNode* Profile::SaveGeneralDataCreateNode() const
|
||||
pGeneralDataNode->AppendChild( "LastDifficulty", DifficultyToString(m_LastDifficulty) );
|
||||
pGeneralDataNode->AppendChild( "LastCourseDifficulty", DifficultyToString(m_LastCourseDifficulty) );
|
||||
if( m_LastStepsType != StepsType_Invalid )
|
||||
pGeneralDataNode->AppendChild( "LastStepsType", GameManager::GetStepsTypeInfo(m_LastStepsType).szName );
|
||||
pGeneralDataNode->AppendChild( "LastStepsType", GAMEMAN->GetStepsTypeInfo(m_LastStepsType).szName );
|
||||
pGeneralDataNode->AppendChild( m_lastSong.CreateNode() );
|
||||
pGeneralDataNode->AppendChild( m_lastCourse.CreateNode() );
|
||||
pGeneralDataNode->AppendChild( "TotalSessions", m_iTotalSessions );
|
||||
@@ -1224,7 +1224,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode )
|
||||
pNode->GetChildValue( "SortOrder", s ); m_SortOrder = StringToSortOrder( s );
|
||||
pNode->GetChildValue( "LastDifficulty", s ); m_LastDifficulty = StringToDifficulty( s );
|
||||
pNode->GetChildValue( "LastCourseDifficulty", s ); m_LastCourseDifficulty = StringToDifficulty( s );
|
||||
pNode->GetChildValue( "LastStepsType", s ); m_LastStepsType = GameManager::StringToStepsType( s );
|
||||
pNode->GetChildValue( "LastStepsType", s ); m_LastStepsType = GAMEMAN->StringToStepsType( s );
|
||||
pTemp = pNode->GetChild( "Song" ); if( pTemp ) m_lastSong.LoadFromNode( pTemp );
|
||||
pTemp = pNode->GetChild( "Course" ); if( pTemp ) m_lastCourse.LoadFromNode( pTemp );
|
||||
pNode->GetChildValue( "TotalSessions", m_iTotalSessions );
|
||||
@@ -1564,7 +1564,7 @@ XNode* Profile::SaveCategoryScoresCreateNode() const
|
||||
continue;
|
||||
|
||||
XNode* pStepsTypeNode = pNode->AppendChild( "StepsType" );
|
||||
pStepsTypeNode->AppendAttr( "Type", GameManager::GetStepsTypeInfo(st).szName );
|
||||
pStepsTypeNode->AppendAttr( "Type", GAMEMAN->GetStepsTypeInfo(st).szName );
|
||||
|
||||
FOREACH_ENUM( RankingCategory,rc )
|
||||
{
|
||||
@@ -1598,7 +1598,7 @@ void Profile::LoadCategoryScoresFromNode( const XNode* pCategoryScores )
|
||||
RString str;
|
||||
if( !pStepsType->GetAttrValue( "Type", str ) )
|
||||
WARN_AND_CONTINUE;
|
||||
StepsType st = GameManager::StringToStepsType( str );
|
||||
StepsType st = GAMEMAN->StringToStepsType( str );
|
||||
if( st == StepsType_Invalid )
|
||||
WARN_AND_CONTINUE_M( str );
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ void ScreenDemonstration::Init()
|
||||
}
|
||||
|
||||
vector<const Style*> vStylePossible;
|
||||
GameManager::GetDemonstrationStylesForGame( GAMESTATE->m_pCurGame, vStylePossible );
|
||||
GAMEMAN->GetDemonstrationStylesForGame( GAMESTATE->m_pCurGame, vStylePossible );
|
||||
for( int i=(int)(vStylePossible.size())-1; i>=0; i-- )
|
||||
{
|
||||
bool bAllowThis = find( vStyleTypeAllow.begin(), vStyleTypeAllow.end(), vStylePossible[i]->m_StyleType ) != vStyleTypeAllow.end();
|
||||
|
||||
@@ -1504,7 +1504,7 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
|
||||
RString s = ssprintf(
|
||||
SWITCHED_TO.GetValue() + " %s %s '%s' (%d of %d)",
|
||||
GameManager::GetStepsTypeInfo( pSteps->m_StepsType ).szName,
|
||||
GAMEMAN->GetStepsTypeInfo( pSteps->m_StepsType ).szName,
|
||||
DifficultyToString( pSteps->GetDifficulty() ).c_str(),
|
||||
pSteps->GetDescription().c_str(),
|
||||
it - vSteps.begin() + 1,
|
||||
@@ -2903,7 +2903,7 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
|
||||
g_StepsInformation.rows[difficulty].choices.clear();
|
||||
FOREACH_ENUM( Difficulty, dc )
|
||||
{
|
||||
g_StepsInformation.rows[difficulty].choices.push_back( "|" + GetLocalizedCustomDifficulty( pSteps->m_StepsType, dc ) );
|
||||
g_StepsInformation.rows[difficulty].choices.push_back( "|" + CustomDifficultyToLocalizedString( GetCustomDifficulty(pSteps->m_StepsType, dc, CourseType_Invalid) ) );
|
||||
}
|
||||
g_StepsInformation.rows[difficulty].iDefaultChoice = pSteps->GetDifficulty();
|
||||
g_StepsInformation.rows[difficulty].bEnabled = (EDIT_MODE.GetValue() >= EditMode_Full);
|
||||
|
||||
@@ -183,7 +183,7 @@ void ScreenEditMenu::MenuStart( const InputEventPlus &input )
|
||||
|
||||
GAMESTATE->m_pCurSong.Set( pSong );
|
||||
GAMESTATE->m_pCurCourse.Set( NULL );
|
||||
GAMESTATE->SetCurrentStyle( GameManager::GetEditorStyleForStepsType(st) );
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GetEditorStyleForStepsType(st) );
|
||||
GAMESTATE->m_pCurSteps[PLAYER_1].Set( pSteps );
|
||||
|
||||
//
|
||||
|
||||
@@ -30,7 +30,7 @@ ScreenEnding::ScreenEnding()
|
||||
PROFILEMAN->LoadFirstAvailableProfile(PLAYER_2);
|
||||
|
||||
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
|
||||
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle( GameManager::GetDefaultGame(),"versus") );
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(),"versus") );
|
||||
GAMESTATE->JoinPlayer( PLAYER_1 );
|
||||
GAMESTATE->JoinPlayer( PLAYER_2 );
|
||||
GAMESTATE->m_pCurSong.Set( SONGMAN->GetRandomSong() );
|
||||
|
||||
@@ -96,7 +96,7 @@ void ScreenEvaluation::Init()
|
||||
StageStats &ss = STATSMAN->m_vPlayedStageStats.back();
|
||||
|
||||
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
|
||||
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle(GameManager::GetDefaultGame(),"versus") );
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMEMAN->GetDefaultGame(),"versus") );
|
||||
ss.m_playMode = GAMESTATE->m_PlayMode;
|
||||
ss.m_pStyle = GAMESTATE->GetCurrentStyle();
|
||||
ss.m_Stage = Stage_1st;
|
||||
|
||||
@@ -1311,7 +1311,7 @@ void ScreenGameplay::LoadLights()
|
||||
split( sDifficulty, ",", asDifficulties );
|
||||
|
||||
// Always use the steps from the primary steps type so that lights are consistent over single and double styles.
|
||||
StepsType st = GameManager::GetHowToPlayStyleForGame( GAMESTATE->m_pCurGame )->m_StepsType;
|
||||
StepsType st = GAMEMAN->GetHowToPlayStyleForGame( GAMESTATE->m_pCurGame )->m_StepsType;
|
||||
|
||||
Difficulty d1 = Difficulty_Invalid;
|
||||
if( asDifficulties.size() > 0 )
|
||||
@@ -1381,7 +1381,7 @@ void ScreenGameplay::LoadLights()
|
||||
/* fall through */
|
||||
}
|
||||
|
||||
NoteDataUtil::LoadTransformedLights( TapNoteData1, m_CabinetLightsNoteData, GameManager::GetStepsTypeInfo(StepsType_lights_cabinet).iNumTracks );
|
||||
NoteDataUtil::LoadTransformedLights( TapNoteData1, m_CabinetLightsNoteData, GAMEMAN->GetStepsTypeInfo(StepsType_lights_cabinet).iNumTracks );
|
||||
}
|
||||
|
||||
void ScreenGameplay::StartPlayingSong( float fMinTimeToNotes, float fMinTimeToMusic )
|
||||
|
||||
@@ -15,7 +15,7 @@ REGISTER_SCREEN_CLASS( ScreenGameplaySyncMachine );
|
||||
void ScreenGameplaySyncMachine::Init()
|
||||
{
|
||||
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
|
||||
GAMESTATE->SetCurrentStyle( GameManager::GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
|
||||
AdjustSync::ResetOriginalSyncData();
|
||||
|
||||
RString sFile = THEME->GetPathO("ScreenGameplaySyncMachine","music.sm");
|
||||
|
||||
@@ -116,7 +116,7 @@ void ScreenHowToPlay::Init()
|
||||
}
|
||||
}
|
||||
|
||||
GAMESTATE->SetCurrentStyle( GameManager::GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
|
||||
|
||||
if( USE_PLAYER )
|
||||
{
|
||||
|
||||
@@ -125,7 +125,7 @@ ScreenNameEntry::ScreenNameEntry()
|
||||
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
|
||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
|
||||
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle( GameManager::GetDefaultGame(),"versus") );
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(),"versus") );
|
||||
StageStats ss;
|
||||
for( int z = 0; z < 3; ++z )
|
||||
{
|
||||
@@ -172,8 +172,8 @@ void ScreenNameEntry::Init()
|
||||
{
|
||||
#if 0
|
||||
// DEBUGGING STUFF
|
||||
GAMESTATE->m_pCurGame.Set( GameManager::GetDefaultGame() );
|
||||
GAMESTATE->m_pCurStyle.Set( GameManager::GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
|
||||
GAMESTATE->m_pCurGame.Set( GAMEMAN->GetDefaultGame() );
|
||||
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
|
||||
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
|
||||
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true;
|
||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||
|
||||
@@ -24,7 +24,7 @@ void ScreenNameEntryTraditional::Init()
|
||||
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
|
||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
|
||||
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle( GameManager::GetDefaultGame(),"versus") );
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(),"versus") );
|
||||
for( int z = 0; z < 3; ++z )
|
||||
{
|
||||
StageStats ss;
|
||||
|
||||
@@ -18,19 +18,19 @@
|
||||
#include "Style.h"
|
||||
#include "PrefsManager.h"
|
||||
|
||||
enum ReviewWorkoutRow
|
||||
enum CourseOverviewRow
|
||||
{
|
||||
ReviewWorkoutRow_Play,
|
||||
ReviewWorkoutRow_Edit,
|
||||
ReviewWorkoutRow_Shuffle,
|
||||
ReviewWorkoutRow_Save,
|
||||
NUM_ReviewWorkoutRow
|
||||
CourseOverviewRow_Play,
|
||||
CourseOverviewRow_Edit,
|
||||
CourseOverviewRow_Shuffle,
|
||||
CourseOverviewRow_Save,
|
||||
NUM_CourseOverviewRow
|
||||
};
|
||||
|
||||
static const MenuRowDef g_MenuRows[] =
|
||||
{
|
||||
MenuRowDef( -1, "Play", true, EditMode_Practice, true, false, 0, NULL ),
|
||||
MenuRowDef( -1, "Edit Workout", true, EditMode_Practice, true, false, 0, NULL ),
|
||||
MenuRowDef( -1, "Edit Course", true, EditMode_Practice, true, false, 0, NULL ),
|
||||
MenuRowDef( -1, "Shuffle", true, EditMode_Practice, true, false, 0, NULL ),
|
||||
MenuRowDef( -1, "Save", true, EditMode_Practice, true, false, 0, NULL ),
|
||||
};
|
||||
@@ -54,7 +54,7 @@ void ScreenOptionsCourseOverview::Init()
|
||||
void ScreenOptionsCourseOverview::BeginScreen()
|
||||
{
|
||||
vector<OptionRowHandler*> vHands;
|
||||
FOREACH_ENUM( ReviewWorkoutRow, rowIndex )
|
||||
FOREACH_ENUM( CourseOverviewRow, rowIndex )
|
||||
{
|
||||
const MenuRowDef &mr = g_MenuRows[rowIndex];
|
||||
OptionRowHandler *pHand = OptionRowHandlerUtil::MakeSimple( mr );
|
||||
@@ -88,8 +88,8 @@ void ScreenOptionsCourseOverview::ExportOptions( int iRow, const vector<PlayerNu
|
||||
sValue = row.GetRowDef().m_vsChoices[ iIndex ];
|
||||
}
|
||||
|
||||
static LocalizedString ERROR_SAVING_WORKOUT ( "ScreenOptionsCourseOverview", "Error saving workout." );
|
||||
static LocalizedString WORKOUT_SAVED ( "ScreenOptionsCourseOverview", "Workout saved successfully." );
|
||||
static LocalizedString ERROR_SAVING_COURSE ( "ScreenOptionsCourseOverview", "Error saving course." );
|
||||
static LocalizedString COURSE_SAVED ( "ScreenOptionsCourseOverview", "Course saved successfully." );
|
||||
void ScreenOptionsCourseOverview::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
if( SM == SM_GoToNextScreen )
|
||||
@@ -97,11 +97,11 @@ void ScreenOptionsCourseOverview::HandleScreenMessage( const ScreenMessage SM )
|
||||
int iRow = m_iCurrentRow[GAMESTATE->m_MasterPlayerNumber];
|
||||
switch( iRow )
|
||||
{
|
||||
case ReviewWorkoutRow_Play:
|
||||
case CourseOverviewRow_Play:
|
||||
EditCourseUtil::PrepareForPlay();
|
||||
SCREENMAN->SetNewScreen( PLAY_SCREEN );
|
||||
return; // handled
|
||||
case ReviewWorkoutRow_Edit:
|
||||
case CourseOverviewRow_Edit:
|
||||
SCREENMAN->SetNewScreen( EDIT_SCREEN );
|
||||
return; // handled
|
||||
}
|
||||
@@ -115,7 +115,7 @@ void ScreenOptionsCourseOverview::HandleScreenMessage( const ScreenMessage SM )
|
||||
if( EditCourseUtil::RenameAndSave( GAMESTATE->m_pCurCourse, ScreenTextEntry::s_sLastAnswer ) )
|
||||
{
|
||||
m_soundSave.Play();
|
||||
SCREENMAN->SystemMessage( WORKOUT_SAVED );
|
||||
SCREENMAN->SystemMessage( COURSE_SAVED );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@ void ScreenOptionsCourseOverview::AfterChangeValueInRow( int iRow, PlayerNumber
|
||||
}
|
||||
|
||||
|
||||
static LocalizedString ENTER_WORKOUT_NAME ( "ScreenOptionsCourseOverview", "Enter a name for the workout." );
|
||||
static LocalizedString ENTER_COURSE_NAME ( "ScreenOptionsCourseOverview", "Enter a name for the course." );
|
||||
void ScreenOptionsCourseOverview::ProcessMenuStart( const InputEventPlus &input )
|
||||
{
|
||||
if( IsTransitioning() )
|
||||
@@ -138,12 +138,12 @@ void ScreenOptionsCourseOverview::ProcessMenuStart( const InputEventPlus &input
|
||||
int iRow = m_iCurrentRow[GAMESTATE->m_MasterPlayerNumber];
|
||||
switch( iRow )
|
||||
{
|
||||
case ReviewWorkoutRow_Play:
|
||||
case ReviewWorkoutRow_Edit:
|
||||
case CourseOverviewRow_Play:
|
||||
case CourseOverviewRow_Edit:
|
||||
SCREENMAN->PlayStartSound();
|
||||
this->BeginFadingOut();
|
||||
return; // handled
|
||||
case ReviewWorkoutRow_Shuffle:
|
||||
case CourseOverviewRow_Shuffle:
|
||||
{
|
||||
Course *pCourse = GAMESTATE->m_pCurCourse;
|
||||
random_shuffle( pCourse->m_vEntries.begin(), pCourse->m_vEntries.end() );
|
||||
@@ -153,14 +153,14 @@ void ScreenOptionsCourseOverview::ProcessMenuStart( const InputEventPlus &input
|
||||
MESSAGEMAN->Broadcast("CurrentCourseChanged");
|
||||
}
|
||||
return; // handled
|
||||
case ReviewWorkoutRow_Save:
|
||||
case CourseOverviewRow_Save:
|
||||
{
|
||||
bool bPromptForName = EditCourseUtil::s_bNewCourseNeedsName;
|
||||
if( bPromptForName )
|
||||
{
|
||||
ScreenTextEntry::TextEntry(
|
||||
SM_BackFromEnterName,
|
||||
ENTER_WORKOUT_NAME,
|
||||
ENTER_COURSE_NAME,
|
||||
GAMESTATE->m_pCurCourse->GetDisplayFullTitle(),
|
||||
EditCourseUtil::MAX_NAME_LENGTH,
|
||||
EditCourseUtil::ValidateEditCourseName );
|
||||
@@ -170,12 +170,12 @@ void ScreenOptionsCourseOverview::ProcessMenuStart( const InputEventPlus &input
|
||||
if( EditCourseUtil::Save( GAMESTATE->m_pCurCourse ) )
|
||||
{
|
||||
m_soundSave.Play();
|
||||
SCREENMAN->SystemMessage( WORKOUT_SAVED );
|
||||
SCREENMAN->SystemMessage( COURSE_SAVED );
|
||||
}
|
||||
else
|
||||
{
|
||||
SCREENMAN->PlayInvalidSound();
|
||||
SCREENMAN->SystemMessage( ERROR_SAVING_WORKOUT );
|
||||
SCREENMAN->SystemMessage( ERROR_SAVING_COURSE );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
if( (*steps)->GetDifficulty() == Difficulty_Edit )
|
||||
s = (*steps)->GetDescription();
|
||||
else
|
||||
s = GetLocalizedCustomDifficulty( (*steps)->m_StepsType, (*steps)->GetDifficulty() );
|
||||
s = CustomDifficultyToLocalizedString( StepsToCustomDifficulty(*steps) );
|
||||
s += ssprintf( " %d", (*steps)->GetMeter() );
|
||||
m_Def.m_vsChoices.push_back( s );
|
||||
}
|
||||
@@ -66,9 +66,12 @@ public:
|
||||
{
|
||||
Trail *pTrail = GAMESTATE->m_pCurTrail[PLAYER_1];
|
||||
Steps *pSteps;
|
||||
if( m_iEntryIndex < (int)pTrail->m_vEntries.size() )
|
||||
pSteps = pTrail->m_vEntries[ m_iEntryIndex ].pSteps;
|
||||
|
||||
if( pTrail )
|
||||
{
|
||||
if( m_iEntryIndex < (int)pTrail->m_vEntries.size() )
|
||||
pSteps = pTrail->m_vEntries[ m_iEntryIndex ].pSteps;
|
||||
}
|
||||
|
||||
vector<Steps*>::const_iterator iter = find( m_vpSteps.begin(), m_vpSteps.end(), pSteps );
|
||||
if( iter == m_vpSteps.end() )
|
||||
{
|
||||
@@ -101,10 +104,10 @@ const int NUM_SONG_ROWS = 20;
|
||||
|
||||
REGISTER_SCREEN_CLASS( ScreenOptionsEditCourse );
|
||||
|
||||
enum WorkoutDetailsRow
|
||||
enum EditCourseRow
|
||||
{
|
||||
WorkoutDetailsRow_Minutes,
|
||||
NUM_WorkoutDetailsRow
|
||||
EditCourseRow_Minutes,
|
||||
NUM_EditCourseRow
|
||||
};
|
||||
|
||||
enum RowType
|
||||
@@ -116,20 +119,20 @@ enum RowType
|
||||
};
|
||||
static int RowToEntryIndex( int iRow )
|
||||
{
|
||||
if( iRow < NUM_WorkoutDetailsRow )
|
||||
if( iRow < NUM_EditCourseRow )
|
||||
return -1;
|
||||
|
||||
return (iRow-NUM_WorkoutDetailsRow)/NUM_RowType;
|
||||
return (iRow-NUM_EditCourseRow)/NUM_RowType;
|
||||
}
|
||||
static RowType RowToRowType( int iRow )
|
||||
{
|
||||
if( iRow < NUM_WorkoutDetailsRow )
|
||||
if( iRow < NUM_EditCourseRow )
|
||||
return RowType_Invalid;
|
||||
return (RowType)((iRow-NUM_WorkoutDetailsRow) % NUM_RowType);
|
||||
return (RowType)((iRow-NUM_EditCourseRow) % NUM_RowType);
|
||||
}
|
||||
static int EntryIndexAndRowTypeToRow( int iEntryIndex, RowType rowType )
|
||||
{
|
||||
return NUM_WorkoutDetailsRow + iEntryIndex*NUM_RowType + rowType;
|
||||
return NUM_EditCourseRow + iEntryIndex*NUM_RowType + rowType;
|
||||
}
|
||||
|
||||
void ScreenOptionsEditCourse::Init()
|
||||
@@ -141,7 +144,7 @@ void ScreenOptionsEditCourse::Init()
|
||||
|
||||
const MenuRowDef g_MenuRows[] =
|
||||
{
|
||||
MenuRowDef( -1, "Workout Minutes", true, EditMode_Practice, true, false, 0, NULL ),
|
||||
MenuRowDef( -1, "Max Minutes", true, EditMode_Practice, true, false, 0, NULL ),
|
||||
};
|
||||
|
||||
static LocalizedString EMPTY ("ScreenOptionsEditCourse","-Empty-");
|
||||
@@ -160,7 +163,7 @@ void ScreenOptionsEditCourse::BeginScreen()
|
||||
{
|
||||
vector<OptionRowHandler*> vHands;
|
||||
|
||||
FOREACH_ENUM( WorkoutDetailsRow, rowIndex )
|
||||
FOREACH_ENUM( EditCourseRow, rowIndex )
|
||||
{
|
||||
const MenuRowDef &mr = g_MenuRows[rowIndex];
|
||||
OptionRowHandler *pHand = OptionRowHandlerUtil::MakeSimple( mr );
|
||||
@@ -171,7 +174,7 @@ void ScreenOptionsEditCourse::BeginScreen()
|
||||
switch( rowIndex )
|
||||
{
|
||||
DEFAULT_FAIL(rowIndex);
|
||||
case WorkoutDetailsRow_Minutes:
|
||||
case EditCourseRow_Minutes:
|
||||
pHand->m_Def.m_vsChoices.push_back( MakeMinutesString(0) );
|
||||
for( int i=EditCourseUtil::MIN_WORKOUT_MINUTES; i<=20; i+=2 )
|
||||
pHand->m_Def.m_vsChoices.push_back( MakeMinutesString(i) );
|
||||
@@ -249,7 +252,7 @@ void ScreenOptionsEditCourse::ImportOptions( int iRow, const vector<PlayerNumber
|
||||
|
||||
switch( iRow )
|
||||
{
|
||||
case WorkoutDetailsRow_Minutes:
|
||||
case EditCourseRow_Minutes:
|
||||
row.SetOneSharedSelection( 0 );
|
||||
row.SetOneSharedSelectionIfPresent( MakeMinutesString(GAMESTATE->m_pCurCourse->m_fGoalSeconds/60) );
|
||||
break;
|
||||
@@ -285,7 +288,7 @@ void ScreenOptionsEditCourse::ImportOptions( int iRow, const vector<PlayerNumber
|
||||
|
||||
void ScreenOptionsEditCourse::ExportOptions( int iRow, const vector<PlayerNumber> &vpns )
|
||||
{
|
||||
FOREACH_ENUM( WorkoutDetailsRow, i )
|
||||
FOREACH_ENUM( EditCourseRow, i )
|
||||
{
|
||||
OptionRow &row = *m_pRows[i];
|
||||
int iIndex = row.GetOneSharedSelection( true );
|
||||
@@ -296,7 +299,7 @@ void ScreenOptionsEditCourse::ExportOptions( int iRow, const vector<PlayerNumber
|
||||
switch( i )
|
||||
{
|
||||
DEFAULT_FAIL(i);
|
||||
case WorkoutDetailsRow_Minutes:
|
||||
case EditCourseRow_Minutes:
|
||||
GAMESTATE->m_pCurCourse->m_fGoalSeconds = 0;
|
||||
int mins;
|
||||
if( sscanf( sValue, "%d", &mins ) == 1 )
|
||||
@@ -307,7 +310,7 @@ void ScreenOptionsEditCourse::ExportOptions( int iRow, const vector<PlayerNumber
|
||||
|
||||
GAMESTATE->m_pCurCourse->m_vEntries.clear();
|
||||
|
||||
for( int i=NUM_WorkoutDetailsRow; i<(int)m_pRows.size(); i++ )
|
||||
for( int i=NUM_EditCourseRow; i<(int)m_pRows.size(); i++ )
|
||||
{
|
||||
OptionRow &row = *m_pRows[i];
|
||||
if( row.GetRowType() == OptionRow::RowType_Exit )
|
||||
|
||||
@@ -74,7 +74,7 @@ static void SetNextCombination()
|
||||
GAMESTATE->m_stEdit.Set( curVal.st );
|
||||
GAMESTATE->m_cdEdit.Set( curVal.cd );
|
||||
// XXX Testing.
|
||||
SCREENMAN->SystemMessage( ssprintf("%s, %s", GameManager::GetStepsTypeInfo(curVal.st).szName, DifficultyToString(curVal.cd).c_str()) );
|
||||
SCREENMAN->SystemMessage( ssprintf("%s, %s", GAMEMAN->GetStepsTypeInfo(curVal.st).szName, DifficultyToString(curVal.cd).c_str()) );
|
||||
|
||||
EditCourseUtil::UpdateAndSetTrail();
|
||||
}
|
||||
@@ -92,17 +92,18 @@ void ScreenOptionsManageCourses::Init()
|
||||
}
|
||||
|
||||
void ScreenOptionsManageCourses::BeginScreen()
|
||||
{
|
||||
{
|
||||
vector<const Style*> vpStyles;
|
||||
GAMEMAN->GetStylesForGame( GAMESTATE->m_pCurGame, vpStyles );
|
||||
const Style *pStyle = vpStyles[0];
|
||||
GAMESTATE->SetCurrentStyle( pStyle );
|
||||
|
||||
|
||||
if( GAMESTATE->m_stEdit == StepsType_Invalid ||
|
||||
GAMESTATE->m_cdEdit == Difficulty_Invalid )
|
||||
{
|
||||
SetNextCombination();
|
||||
}
|
||||
|
||||
vector<const Style*> vpStyles;
|
||||
GameManager::GetStylesForGame( GAMESTATE->m_pCurGame, vpStyles );
|
||||
const Style *pStyle = vpStyles[0];
|
||||
GAMESTATE->SetCurrentStyle( pStyle );
|
||||
|
||||
|
||||
// Remember the current course. All Course pointers will be invalidated when we load the machine profile below.
|
||||
|
||||
@@ -93,7 +93,7 @@ void ScreenOptionsManageEditSteps::BeginScreen()
|
||||
def.m_sExplanationName = "Select Edit Steps";
|
||||
def.m_vsChoices.clear();
|
||||
StepsType st = (*s)->m_StepsType;
|
||||
RString sType = GameManager::GetStepsTypeInfo(st).GetLocalizedString();
|
||||
RString sType = GAMEMAN->GetStepsTypeInfo(st).GetLocalizedString();
|
||||
def.m_vsChoices.push_back( sType );
|
||||
def.m_bAllowThemeItems = false; // already themed
|
||||
iIndex++;
|
||||
@@ -140,7 +140,7 @@ void ScreenOptionsManageEditSteps::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
Steps *pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||
ASSERT( pSteps );
|
||||
const Style *pStyle = GameManager::GetEditorStyleForStepsType( pSteps->m_StepsType );
|
||||
const Style *pStyle = GAMEMAN->GetEditorStyleForStepsType( pSteps->m_StepsType );
|
||||
GAMESTATE->SetCurrentStyle( pStyle );
|
||||
// do base behavior
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ static void MoveNop( int &iSel, bool bToSel, const ConfOption *pConfOption )
|
||||
static void GameChoices( vector<RString> &out )
|
||||
{
|
||||
vector<const Game*> aGames;
|
||||
GameManager::GetEnabledGames( aGames );
|
||||
GAMEMAN->GetEnabledGames( aGames );
|
||||
FOREACH( const Game*, aGames, g )
|
||||
{
|
||||
RString sGameName = (*g)->m_szName;
|
||||
@@ -179,7 +179,7 @@ static void GameSel( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
sel = i;
|
||||
} else {
|
||||
vector<const Game*> aGames;
|
||||
GameManager::GetEnabledGames( aGames );
|
||||
GAMEMAN->GetEnabledGames( aGames );
|
||||
StepMania::ChangeCurrentGame( aGames[sel] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ float ScreenRanking::SetPage( const PageToShow &pts )
|
||||
// init page
|
||||
//
|
||||
StepsType st = pts.aTypes.front().second;
|
||||
m_textStepsType.SetText( GameManager::GetStepsTypeInfo(st).GetLocalizedString() );
|
||||
m_textStepsType.SetText( GAMEMAN->GetStepsTypeInfo(st).GetLocalizedString() );
|
||||
|
||||
|
||||
bool bShowScores = false;
|
||||
|
||||
@@ -64,7 +64,7 @@ void ScreenSelectMusic::Init()
|
||||
if( PREFSMAN->m_sTestInitialScreen.Get() == m_sName )
|
||||
{
|
||||
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
|
||||
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle(GameManager::GetDefaultGame(),"versus") );
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMEMAN->GetDefaultGame(),"versus") );
|
||||
GAMESTATE->JoinPlayer( PLAYER_1 );
|
||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||
}
|
||||
@@ -193,8 +193,8 @@ void ScreenSelectMusic::BeginScreen()
|
||||
if( CommonMetrics::AUTO_SET_STYLE )
|
||||
{
|
||||
vector<StepsType> vst;
|
||||
GameManager::GetStepsTypesForGame( GAMESTATE->m_pCurGame, vst );
|
||||
const Style *pStyle = GameManager::GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), vst[0] );
|
||||
GAMEMAN->GetStepsTypesForGame( GAMESTATE->m_pCurGame, vst );
|
||||
const Style *pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), vst[0] );
|
||||
GAMESTATE->SetCurrentStyle( pStyle );
|
||||
}
|
||||
|
||||
@@ -769,7 +769,7 @@ void ScreenSelectMusic::HandleMessage( const Message &msg )
|
||||
// selected, they are no longer playable now that P2 has joined.
|
||||
|
||||
// TODO: Invalidate the CurSteps only if they are no longer playable. That way,
|
||||
// after music change will clamp to the nearest in the DifficultyList.
|
||||
// after music change will clamp to the nearest in the StepsDisplayList.
|
||||
GAMESTATE->m_pCurSteps[GAMESTATE->m_MasterPlayerNumber].SetWithoutBroadcast( NULL );
|
||||
FOREACH_ENUM( PlayerNumber, p )
|
||||
GAMESTATE->m_pCurSteps[p].SetWithoutBroadcast( NULL );
|
||||
@@ -1068,7 +1068,7 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
|
||||
stCurrent = GAMESTATE->m_pCurSteps[pn]->m_StepsType;
|
||||
}
|
||||
vector<StepsType> vst;
|
||||
pStyle = GameManager::GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), stCurrent );
|
||||
pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), stCurrent );
|
||||
}
|
||||
GAMESTATE->SetCurrentStyle( pStyle );
|
||||
}
|
||||
|
||||
@@ -917,11 +917,11 @@ void Song::AddAutoGenNotes()
|
||||
/* If m_bAutogenSteps is disabled, only autogen lights. */
|
||||
if( !PREFSMAN->m_bAutogenSteps && stMissing != StepsType_lights_cabinet )
|
||||
continue;
|
||||
if( !GameManager::GetStepsTypeInfo(stMissing).bAllowAutogen )
|
||||
if( !GAMEMAN->GetStepsTypeInfo(stMissing).bAllowAutogen )
|
||||
continue;
|
||||
|
||||
// missing Steps of this type
|
||||
int iNumTracksOfMissing = GameManager::GetStepsTypeInfo(stMissing).iNumTracks;
|
||||
int iNumTracksOfMissing = GAMEMAN->GetStepsTypeInfo(stMissing).iNumTracks;
|
||||
|
||||
// look for closest match
|
||||
StepsType stBestMatch = StepsType_Invalid;
|
||||
@@ -933,7 +933,7 @@ void Song::AddAutoGenNotes()
|
||||
continue;
|
||||
|
||||
/* has (non-autogen) Steps of this type */
|
||||
const int iNumTracks = GameManager::GetStepsTypeInfo(st).iNumTracks;
|
||||
const int iNumTracks = GAMEMAN->GetStepsTypeInfo(st).iNumTracks;
|
||||
const int iTrackDifference = abs(iNumTracks-iNumTracksOfMissing);
|
||||
if( iTrackDifference < iBestTrackDifference )
|
||||
{
|
||||
@@ -949,7 +949,7 @@ void Song::AddAutoGenNotes()
|
||||
|
||||
void Song::AutoGen( StepsType ntTo, StepsType ntFrom )
|
||||
{
|
||||
// int iNumTracksOfTo = GameManager::StepsTypeToNumTracks(ntTo);
|
||||
// int iNumTracksOfTo = GAMEMAN->StepsTypeToNumTracks(ntTo);
|
||||
|
||||
for( unsigned int j=0; j<m_vpSteps.size(); j++ )
|
||||
{
|
||||
|
||||
@@ -828,7 +828,7 @@ void SongUtil::GetPlayableStepsTypes( const Song *pSong, set<StepsType> &vOut )
|
||||
{
|
||||
vector<const Style*> vpPossibleStyles;
|
||||
if( CommonMetrics::AUTO_SET_STYLE )
|
||||
GameManager::GetCompatibleStyles( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), vpPossibleStyles );
|
||||
GAMEMAN->GetCompatibleStyles( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), vpPossibleStyles );
|
||||
else
|
||||
vpPossibleStyles.push_back( GAMESTATE->m_pCurStyle );
|
||||
|
||||
@@ -866,7 +866,7 @@ void SongUtil::GetPlayableStepsTypes( const Song *pSong, set<StepsType> &vOut )
|
||||
int iNumPlayers = GAMESTATE->GetNumPlayersEnabled();
|
||||
iNumPlayers = max( iNumPlayers, 1 );
|
||||
|
||||
const Style *pStyle = GameManager::GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, iNumPlayers, *st );
|
||||
const Style *pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, iNumPlayers, *st );
|
||||
bool bEnoughStages = GAMESTATE->IsAnExtraStage() || GAMESTATE->GetSmallestNumStagesLeftForAnyHumanPlayer() >= GAMESTATE->GetNumStagesForSongAndStyleType(pSong, pStyle->m_StyleType);
|
||||
|
||||
if( bShowThisStepsType && bEnoughStages )
|
||||
@@ -933,7 +933,7 @@ bool SongUtil::GetStepsTypeAndDifficultyFromSortOrder( SortOrder so, StepsType &
|
||||
case SORT_DOUBLE_CHALLENGE_METER:
|
||||
stOut = GAMESTATE->GetCurrentStyle()->m_StepsType; // in case we don't find any matches below
|
||||
vector<const Style*> vpStyles;
|
||||
GameManager::GetStylesForGame(GAMESTATE->m_pCurGame,vpStyles);
|
||||
GAMEMAN->GetStylesForGame(GAMESTATE->m_pCurGame,vpStyles);
|
||||
FOREACH_CONST( const Style*, vpStyles, i )
|
||||
{
|
||||
if( (*i)->m_StyleType == StyleType_OnePlayerTwoSides )
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386 "$(intdir)\verstub.obj""
|
||||
AdditionalDependencies="shell32.lib gdi32.lib user32.lib ole32.lib advapi32.lib"
|
||||
OutputFile="../Program/StepMania-fastdebug.exe"
|
||||
OutputFile="C:\cvs\piu/Program/StepMania-fastdebug.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=""
|
||||
@@ -987,11 +987,11 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="CatalogXml.cpp"
|
||||
RelativePath=".\CatalogXml.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="CatalogXml.h"
|
||||
RelativePath=".\CatalogXml.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
||||
@@ -308,6 +308,7 @@ void ShutdownGame()
|
||||
SAFE_DELETE( SOUND ); /* uses GAMESTATE, PREFSMAN */
|
||||
SAFE_DELETE( PREFSMAN );
|
||||
SAFE_DELETE( GAMESTATE );
|
||||
SAFE_DELETE( GAMEMAN );
|
||||
SAFE_DELETE( NOTESKIN );
|
||||
SAFE_DELETE( THEME );
|
||||
SAFE_DELETE( ANNOUNCER );
|
||||
@@ -786,20 +787,20 @@ RageDisplay *CreateDisplay()
|
||||
|
||||
static void SwitchToLastPlayedGame()
|
||||
{
|
||||
const Game *pGame = GameManager::StringToGame( PREFSMAN->GetCurrentGame() );
|
||||
const Game *pGame = GAMEMAN->StringToGame( PREFSMAN->GetCurrentGame() );
|
||||
|
||||
/* If the active game type isn't actually available, revert to the default. */
|
||||
if( pGame == NULL )
|
||||
pGame = GameManager::GetDefaultGame();
|
||||
pGame = GAMEMAN->GetDefaultGame();
|
||||
|
||||
if( !GameManager::IsGameEnabled( pGame ) && pGame != GameManager::GetDefaultGame() )
|
||||
if( !GAMEMAN->IsGameEnabled( pGame ) && pGame != GAMEMAN->GetDefaultGame() )
|
||||
{
|
||||
pGame = GameManager::GetDefaultGame();
|
||||
pGame = GAMEMAN->GetDefaultGame();
|
||||
LOG->Warn( "Default NoteSkin for \"%s\" missing, reverting to \"%s\"",
|
||||
pGame->m_szName, GameManager::GetDefaultGame()->m_szName );
|
||||
pGame->m_szName, GAMEMAN->GetDefaultGame()->m_szName );
|
||||
}
|
||||
|
||||
ASSERT( GameManager::IsGameEnabled(pGame) );
|
||||
ASSERT( GAMEMAN->IsGameEnabled(pGame) );
|
||||
|
||||
StepMania::ChangeCurrentGame( pGame );
|
||||
}
|
||||
@@ -1050,6 +1051,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
AdjustForChangedSystemCapabilities();
|
||||
|
||||
GAMEMAN = new GameManager;
|
||||
THEME = new ThemeManager;
|
||||
ANNOUNCER = new AnnouncerManager;
|
||||
NOTESKIN = new NoteSkinManager;
|
||||
|
||||
@@ -63,7 +63,7 @@ unsigned Steps::GetHash() const
|
||||
|
||||
void Steps::SetNoteData( const NoteData& noteDataNew )
|
||||
{
|
||||
ASSERT( noteDataNew.GetNumTracks() == GameManager::GetStepsTypeInfo(m_StepsType).iNumTracks );
|
||||
ASSERT( noteDataNew.GetNumTracks() == GAMEMAN->GetStepsTypeInfo(m_StepsType).iNumTracks );
|
||||
|
||||
DeAutogen( false );
|
||||
|
||||
@@ -86,7 +86,7 @@ void Steps::GetNoteData( NoteData& noteDataOut ) const
|
||||
else
|
||||
{
|
||||
noteDataOut.ClearAll();
|
||||
noteDataOut.SetNumTracks( GameManager::GetStepsTypeInfo(m_StepsType).iNumTracks );
|
||||
noteDataOut.SetNumTracks( GAMEMAN->GetStepsTypeInfo(m_StepsType).iNumTracks );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ void Steps::Decompress() const
|
||||
|
||||
m_bNoteDataIsFilled = true;
|
||||
|
||||
int iNewTracks = GameManager::GetStepsTypeInfo(m_StepsType).iNumTracks;
|
||||
int iNewTracks = GAMEMAN->GetStepsTypeInfo(m_StepsType).iNumTracks;
|
||||
|
||||
if( this->m_StepsType == StepsType_lights_cabinet )
|
||||
{
|
||||
@@ -267,7 +267,7 @@ void Steps::Decompress() const
|
||||
// load from compressed
|
||||
bool bComposite = m_StepsType == StepsType_dance_routine;
|
||||
m_bNoteDataIsFilled = true;
|
||||
m_pNoteData->SetNumTracks( GameManager::GetStepsTypeInfo(m_StepsType).iNumTracks );
|
||||
m_pNoteData->SetNumTracks( GAMEMAN->GetStepsTypeInfo(m_StepsType).iNumTracks );
|
||||
|
||||
NoteDataUtil::LoadFromSMNoteDataString( *m_pNoteData, m_sNoteDataCompressed, bComposite );
|
||||
}
|
||||
@@ -352,7 +352,7 @@ void Steps::CopyFrom( Steps* pSource, StepsType ntTo, float fMusicLengthSeconds
|
||||
m_StepsType = ntTo;
|
||||
NoteData noteData;
|
||||
pSource->GetNoteData( noteData );
|
||||
noteData.SetNumTracks( GameManager::GetStepsTypeInfo(ntTo).iNumTracks );
|
||||
noteData.SetNumTracks( GAMEMAN->GetStepsTypeInfo(ntTo).iNumTracks );
|
||||
parent = NULL;
|
||||
this->SetNoteData( noteData );
|
||||
this->SetDescription( pSource->GetDescription() );
|
||||
@@ -365,7 +365,7 @@ void Steps::CreateBlank( StepsType ntTo )
|
||||
{
|
||||
m_StepsType = ntTo;
|
||||
NoteData noteData;
|
||||
noteData.SetNumTracks( GameManager::GetStepsTypeInfo(ntTo).iNumTracks );
|
||||
noteData.SetNumTracks( GAMEMAN->GetStepsTypeInfo(ntTo).iNumTracks );
|
||||
this->SetNoteData( noteData );
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +194,10 @@ void StepsDisplay::SetInternal( const SetParams ¶ms )
|
||||
RString sCustomDifficulty;
|
||||
if( params.st != StepsType_Invalid )
|
||||
{
|
||||
sCustomDifficulty = GetCustomDifficulty( params.st, params.dc );
|
||||
if( params.pSteps )
|
||||
sCustomDifficulty = StepsToCustomDifficulty(params.pSteps);
|
||||
if( params.pTrail )
|
||||
sCustomDifficulty = TrailToCustomDifficulty(params.pTrail);
|
||||
msg.SetParam( "CustomDifficulty", sCustomDifficulty );
|
||||
}
|
||||
|
||||
@@ -238,7 +241,7 @@ void StepsDisplay::SetInternal( const SetParams ¶ms )
|
||||
if( params.pSteps && params.pSteps->IsAnEdit() )
|
||||
s = params.sDescription;
|
||||
else if( !sCustomDifficulty.empty() )
|
||||
s = GetLocalizedCustomDifficulty( sCustomDifficulty );
|
||||
s = CustomDifficultyToLocalizedString( sCustomDifficulty );
|
||||
}
|
||||
|
||||
m_textDescription.SetText( s );
|
||||
@@ -255,7 +258,7 @@ void StepsDisplay::SetInternal( const SetParams ¶ms )
|
||||
// TODO: Make this an AutoActor, optimize graphic loading
|
||||
if( params.st != StepsType_Invalid )
|
||||
{
|
||||
RString sStepsType = GameManager::GetStepsTypeInfo(params.st).szName;
|
||||
RString sStepsType = GAMEMAN->GetStepsTypeInfo(params.st).szName;
|
||||
m_sprStepsType.Load( THEME->GetPathG(m_sMetricsGroup,"StepsType "+sStepsType) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ XNode* StepsID::CreateNode() const
|
||||
{
|
||||
XNode* pNode = new XNode( "Steps" );
|
||||
|
||||
pNode->AppendAttr( "StepsType", GameManager::GetStepsTypeInfo(st).szName );
|
||||
pNode->AppendAttr( "StepsType", GAMEMAN->GetStepsTypeInfo(st).szName );
|
||||
pNode->AppendAttr( "Difficulty", DifficultyToString(dc) );
|
||||
if( dc == Difficulty_Edit )
|
||||
{
|
||||
@@ -298,7 +298,7 @@ void StepsID::LoadFromNode( const XNode* pNode )
|
||||
RString sTemp;
|
||||
|
||||
pNode->GetAttrValue( "StepsType", sTemp );
|
||||
st = GameManager::StringToStepsType( sTemp );
|
||||
st = GAMEMAN->StringToStepsType( sTemp );
|
||||
|
||||
pNode->GetAttrValue( "Difficulty", sTemp );
|
||||
dc = StringToDifficulty( sTemp );
|
||||
@@ -319,7 +319,7 @@ void StepsID::LoadFromNode( const XNode* pNode )
|
||||
|
||||
RString StepsID::ToString() const
|
||||
{
|
||||
RString s = GameManager::GetStepsTypeInfo( st ).szName;
|
||||
RString s = GAMEMAN->GetStepsTypeInfo( st ).szName;
|
||||
s += " " + DifficultyToString( dc );
|
||||
if( dc == Difficulty_Edit )
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ void StyleID::FromStyle( const Style *p )
|
||||
{
|
||||
if( p )
|
||||
{
|
||||
sGame = GameManager::GetGameForStyle(p)->m_szName;
|
||||
sGame = GAMEMAN->GetGameForStyle(p)->m_szName;
|
||||
sStyle = p->m_szName;
|
||||
}
|
||||
else
|
||||
@@ -22,11 +22,11 @@ void StyleID::FromStyle( const Style *p )
|
||||
|
||||
const Style *StyleID::ToStyle() const
|
||||
{
|
||||
const Game* pGame = GameManager::StringToGame( sGame );
|
||||
const Game* pGame = GAMEMAN->StringToGame( sGame );
|
||||
if( pGame == NULL )
|
||||
return NULL;
|
||||
|
||||
return GameManager::GameAndStringToStyle( pGame, sStyle );
|
||||
return GAMEMAN->GameAndStringToStyle( pGame, sStyle );
|
||||
}
|
||||
|
||||
XNode* StyleID::CreateNode() const
|
||||
|
||||
@@ -45,6 +45,7 @@ class Trail
|
||||
{
|
||||
public:
|
||||
StepsType m_StepsType;
|
||||
CourseType m_CourseType;
|
||||
CourseDifficulty m_CourseDifficulty;
|
||||
vector<TrailEntry> m_vEntries;
|
||||
int m_iSpecifiedMeter; // == -1 if no meter specified
|
||||
|
||||
@@ -59,7 +59,7 @@ XNode* TrailID::CreateNode() const
|
||||
{
|
||||
XNode* pNode = new XNode( "Trail" );
|
||||
|
||||
pNode->AppendAttr( "StepsType", GameManager::GetStepsTypeInfo(st).szName );
|
||||
pNode->AppendAttr( "StepsType", GAMEMAN->GetStepsTypeInfo(st).szName );
|
||||
pNode->AppendAttr( "CourseDifficulty", DifficultyToString(cd) );
|
||||
|
||||
return pNode;
|
||||
@@ -72,7 +72,7 @@ void TrailID::LoadFromNode( const XNode* pNode )
|
||||
RString sTemp;
|
||||
|
||||
pNode->GetAttrValue( "StepsType", sTemp );
|
||||
st = GameManager::StringToStepsType( sTemp );
|
||||
st = GAMEMAN->StringToStepsType( sTemp );
|
||||
|
||||
pNode->GetAttrValue( "CourseDifficulty", sTemp );
|
||||
cd = StringToDifficulty( sTemp );
|
||||
@@ -81,7 +81,7 @@ void TrailID::LoadFromNode( const XNode* pNode )
|
||||
|
||||
RString TrailID::ToString() const
|
||||
{
|
||||
RString s = GameManager::GetStepsTypeInfo(st).szName;
|
||||
RString s = GAMEMAN->GetStepsTypeInfo(st).szName;
|
||||
s += " " + DifficultyToString( cd );
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -362,8 +362,8 @@ RString UnlockEntry::GetDescription() const
|
||||
return pSong ? pSong->GetDisplayFullTitle() : "";
|
||||
case UnlockRewardType_Steps:
|
||||
{
|
||||
StepsType st = GameManager::GetHowToPlayStyleForGame( GAMESTATE->m_pCurGame )->m_StepsType; // TODO: Is this the best thing we can do here?
|
||||
return (pSong ? pSong->GetDisplayFullTitle() : "") + ", " + GetLocalizedCustomDifficulty( st, m_dc );
|
||||
StepsType st = GAMEMAN->GetHowToPlayStyleForGame( GAMESTATE->m_pCurGame )->m_StepsType; // TODO: Is this the best thing we can do here?
|
||||
return (pSong ? pSong->GetDisplayFullTitle() : "") + ", " + CustomDifficultyToLocalizedString( GetCustomDifficulty(st, m_dc, CourseType_Invalid) );
|
||||
}
|
||||
case UnlockRewardType_Course:
|
||||
return m_Course.IsValid() ? m_Course.ToCourse()->GetDisplayFullTitle() : "";
|
||||
|
||||
@@ -50,8 +50,6 @@ void WorkoutGraph::SetInternal( int iMinSongsPlayed )
|
||||
{
|
||||
Course *pCourse = GAMESTATE->m_pCurCourse;
|
||||
ASSERT( pCourse );
|
||||
Trail *pTrail = GAMESTATE->m_pCurTrail[PLAYER_1];
|
||||
ASSERT( pTrail );
|
||||
|
||||
FOREACH( Sprite*, m_vpBars, p )
|
||||
{
|
||||
@@ -60,6 +58,10 @@ void WorkoutGraph::SetInternal( int iMinSongsPlayed )
|
||||
}
|
||||
m_vpBars.clear();
|
||||
|
||||
Trail *pTrail = GAMESTATE->m_pCurTrail[PLAYER_1];
|
||||
if( pTrail == NULL )
|
||||
return;
|
||||
|
||||
vector<int> viMeters;
|
||||
FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e )
|
||||
{
|
||||
|
||||