[default -> loading window] Booring.
This commit is contained in:
@@ -13,6 +13,8 @@ StepMania 5.0 ????????? | 20110???
|
|||||||
* [Difficulty] Allow ALL StepsTypes to use CustomDifficulty properly.
|
* [Difficulty] Allow ALL StepsTypes to use CustomDifficulty properly.
|
||||||
There was some unfair targeting of Couple and Routine. [Wolfman2000]
|
There was some unfair targeting of Couple and Routine. [Wolfman2000]
|
||||||
* [Steps] Calculate accurate radar values for Couple charts. [Wolfman2000]
|
* [Steps] Calculate accurate radar values for Couple charts. [Wolfman2000]
|
||||||
|
* [ScreenEdit] Display more accurate chart data for Couple and Routine charts
|
||||||
|
for the future. No more having (almost) every row as a jump! [Wolfman2000]
|
||||||
|
|
||||||
2011/07/12
|
2011/07/12
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -2453,6 +2453,7 @@ LineHighlightP2ChangeToExitCommand=
|
|||||||
CursorOnCommand=visible,false
|
CursorOnCommand=visible,false
|
||||||
|
|
||||||
[ScreenOptionsService]
|
[ScreenOptionsService]
|
||||||
|
AllowOperatorMenuButton=false
|
||||||
Class="ScreenOptionsMaster"
|
Class="ScreenOptionsMaster"
|
||||||
Fallback="ScreenOptionsSimpleService"
|
Fallback="ScreenOptionsSimpleService"
|
||||||
#
|
#
|
||||||
@@ -3641,6 +3642,14 @@ NumHandsFormat="%s: %d\n"
|
|||||||
NumRollsFormat="%s: %d\n"
|
NumRollsFormat="%s: %d\n"
|
||||||
NumLiftsFormat="%s: %d\n"
|
NumLiftsFormat="%s: %d\n"
|
||||||
NumFakesFormat="%s: %d\n"
|
NumFakesFormat="%s: %d\n"
|
||||||
|
NumStepsFormatTwoPlayer="%s: %d/%d\n"
|
||||||
|
NumJumpsFormatTwoPlayer="%s: %d/%d\n"
|
||||||
|
NumHoldsFormatTwoPlayer="%s: %d/%d\n"
|
||||||
|
NumMinesFormatTwoPlayer="%s: %d/%d\n"
|
||||||
|
NumHandsFormatTwoPlayer="%s: %d/%d\n"
|
||||||
|
NumRollsFormatTwoPlayer="%s: %d/%d\n"
|
||||||
|
NumLiftsFormatTwoPlayer="%s: %d/%d\n"
|
||||||
|
NumFakesFormatTwoPlayer="%s: %d/%d\n"
|
||||||
TimingModeFormat="%s:\n %s\n"
|
TimingModeFormat="%s:\n %s\n"
|
||||||
Beat0OffsetFormat="%s:\n %.6f secs\n"
|
Beat0OffsetFormat="%s:\n %.6f secs\n"
|
||||||
PreviewStartFormat="%s:\n %.6f secs\n"
|
PreviewStartFormat="%s:\n %.6f secs\n"
|
||||||
|
|||||||
@@ -321,7 +321,6 @@
|
|||||||
AA29CDD50558741A00961A51 /* ScreenSelectCharacter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E005B047711F3005F316C /* ScreenSelectCharacter.cpp */; };
|
AA29CDD50558741A00961A51 /* ScreenSelectCharacter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E005B047711F3005F316C /* ScreenSelectCharacter.cpp */; };
|
||||||
AA29CDDB0558741A00961A51 /* ScreenSelectMusic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E0069047711F3005F316C /* ScreenSelectMusic.cpp */; };
|
AA29CDDB0558741A00961A51 /* ScreenSelectMusic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E0069047711F3005F316C /* ScreenSelectMusic.cpp */; };
|
||||||
AA29CDDD0558741A00961A51 /* ScreenSongOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E006F047711F3005F316C /* ScreenSongOptions.cpp */; };
|
AA29CDDD0558741A00961A51 /* ScreenSongOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E006F047711F3005F316C /* ScreenSongOptions.cpp */; };
|
||||||
AA29CDE10558741A00961A51 /* ScreenTestFonts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E0079047711F3005F316C /* ScreenTestFonts.cpp */; };
|
|
||||||
AA29CDE20558741A00961A51 /* ScreenTestSound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007B047711F3005F316C /* ScreenTestSound.cpp */; };
|
AA29CDE20558741A00961A51 /* ScreenTestSound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007B047711F3005F316C /* ScreenTestSound.cpp */; };
|
||||||
AA29CDE30558741A00961A51 /* ScreenTextEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007D047711F3005F316C /* ScreenTextEntry.cpp */; };
|
AA29CDE30558741A00961A51 /* ScreenTextEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007D047711F3005F316C /* ScreenTextEntry.cpp */; };
|
||||||
AA29CDE40558741A00961A51 /* ScreenTitleMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007F047711F3005F316C /* ScreenTitleMenu.cpp */; };
|
AA29CDE40558741A00961A51 /* ScreenTitleMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007F047711F3005F316C /* ScreenTitleMenu.cpp */; };
|
||||||
@@ -535,7 +534,6 @@
|
|||||||
AA40D24209A08D650068C0D5 /* ScreenSelectCharacter.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E005C047711F3005F316C /* ScreenSelectCharacter.h */; };
|
AA40D24209A08D650068C0D5 /* ScreenSelectCharacter.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E005C047711F3005F316C /* ScreenSelectCharacter.h */; };
|
||||||
AA40D24609A08D650068C0D5 /* ScreenSelectMusic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E006A047711F3005F316C /* ScreenSelectMusic.h */; };
|
AA40D24609A08D650068C0D5 /* ScreenSelectMusic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E006A047711F3005F316C /* ScreenSelectMusic.h */; };
|
||||||
AA40D24809A08D650068C0D5 /* ScreenSongOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E0070047711F3005F316C /* ScreenSongOptions.h */; };
|
AA40D24809A08D650068C0D5 /* ScreenSongOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E0070047711F3005F316C /* ScreenSongOptions.h */; };
|
||||||
AA40D24A09A08D650068C0D5 /* ScreenTestFonts.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E007A047711F3005F316C /* ScreenTestFonts.h */; };
|
|
||||||
AA40D24B09A08D650068C0D5 /* ScreenTestSound.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E007C047711F3005F316C /* ScreenTestSound.h */; };
|
AA40D24B09A08D650068C0D5 /* ScreenTestSound.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E007C047711F3005F316C /* ScreenTestSound.h */; };
|
||||||
AA40D24C09A08D650068C0D5 /* ScreenTextEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E007E047711F3005F316C /* ScreenTextEntry.h */; };
|
AA40D24C09A08D650068C0D5 /* ScreenTextEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E007E047711F3005F316C /* ScreenTextEntry.h */; };
|
||||||
AA40D24D09A08D650068C0D5 /* ScreenTitleMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E0080047711F3005F316C /* ScreenTitleMenu.h */; };
|
AA40D24D09A08D650068C0D5 /* ScreenTitleMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = AA6E0080047711F3005F316C /* ScreenTitleMenu.h */; };
|
||||||
@@ -862,7 +860,6 @@
|
|||||||
AA40D3FF09A08D650068C0D5 /* ScreenSelectCharacter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E005B047711F3005F316C /* ScreenSelectCharacter.cpp */; };
|
AA40D3FF09A08D650068C0D5 /* ScreenSelectCharacter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E005B047711F3005F316C /* ScreenSelectCharacter.cpp */; };
|
||||||
AA40D40309A08D650068C0D5 /* ScreenSelectMusic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E0069047711F3005F316C /* ScreenSelectMusic.cpp */; };
|
AA40D40309A08D650068C0D5 /* ScreenSelectMusic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E0069047711F3005F316C /* ScreenSelectMusic.cpp */; };
|
||||||
AA40D40509A08D650068C0D5 /* ScreenSongOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E006F047711F3005F316C /* ScreenSongOptions.cpp */; };
|
AA40D40509A08D650068C0D5 /* ScreenSongOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E006F047711F3005F316C /* ScreenSongOptions.cpp */; };
|
||||||
AA40D40709A08D650068C0D5 /* ScreenTestFonts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E0079047711F3005F316C /* ScreenTestFonts.cpp */; };
|
|
||||||
AA40D40809A08D650068C0D5 /* ScreenTestSound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007B047711F3005F316C /* ScreenTestSound.cpp */; };
|
AA40D40809A08D650068C0D5 /* ScreenTestSound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007B047711F3005F316C /* ScreenTestSound.cpp */; };
|
||||||
AA40D40909A08D650068C0D5 /* ScreenTextEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007D047711F3005F316C /* ScreenTextEntry.cpp */; };
|
AA40D40909A08D650068C0D5 /* ScreenTextEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007D047711F3005F316C /* ScreenTextEntry.cpp */; };
|
||||||
AA40D40A09A08D650068C0D5 /* ScreenTitleMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007F047711F3005F316C /* ScreenTitleMenu.cpp */; };
|
AA40D40A09A08D650068C0D5 /* ScreenTitleMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA6E007F047711F3005F316C /* ScreenTitleMenu.cpp */; };
|
||||||
@@ -2163,8 +2160,6 @@
|
|||||||
AA6E006A047711F3005F316C /* ScreenSelectMusic.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ScreenSelectMusic.h; path = ../src/ScreenSelectMusic.h; sourceTree = "<group>"; };
|
AA6E006A047711F3005F316C /* ScreenSelectMusic.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ScreenSelectMusic.h; path = ../src/ScreenSelectMusic.h; sourceTree = "<group>"; };
|
||||||
AA6E006F047711F3005F316C /* ScreenSongOptions.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ScreenSongOptions.cpp; path = ../src/ScreenSongOptions.cpp; sourceTree = "<group>"; };
|
AA6E006F047711F3005F316C /* ScreenSongOptions.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ScreenSongOptions.cpp; path = ../src/ScreenSongOptions.cpp; sourceTree = "<group>"; };
|
||||||
AA6E0070047711F3005F316C /* ScreenSongOptions.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ScreenSongOptions.h; path = ../src/ScreenSongOptions.h; sourceTree = "<group>"; };
|
AA6E0070047711F3005F316C /* ScreenSongOptions.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ScreenSongOptions.h; path = ../src/ScreenSongOptions.h; sourceTree = "<group>"; };
|
||||||
AA6E0079047711F3005F316C /* ScreenTestFonts.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ScreenTestFonts.cpp; path = ../src/ScreenTestFonts.cpp; sourceTree = "<group>"; };
|
|
||||||
AA6E007A047711F3005F316C /* ScreenTestFonts.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ScreenTestFonts.h; path = ../src/ScreenTestFonts.h; sourceTree = "<group>"; };
|
|
||||||
AA6E007B047711F3005F316C /* ScreenTestSound.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ScreenTestSound.cpp; path = ../src/ScreenTestSound.cpp; sourceTree = "<group>"; };
|
AA6E007B047711F3005F316C /* ScreenTestSound.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ScreenTestSound.cpp; path = ../src/ScreenTestSound.cpp; sourceTree = "<group>"; };
|
||||||
AA6E007C047711F3005F316C /* ScreenTestSound.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ScreenTestSound.h; path = ../src/ScreenTestSound.h; sourceTree = "<group>"; };
|
AA6E007C047711F3005F316C /* ScreenTestSound.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ScreenTestSound.h; path = ../src/ScreenTestSound.h; sourceTree = "<group>"; };
|
||||||
AA6E007D047711F3005F316C /* ScreenTextEntry.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ScreenTextEntry.cpp; path = ../src/ScreenTextEntry.cpp; sourceTree = "<group>"; };
|
AA6E007D047711F3005F316C /* ScreenTextEntry.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; name = ScreenTextEntry.cpp; path = ../src/ScreenTextEntry.cpp; sourceTree = "<group>"; };
|
||||||
@@ -3540,8 +3535,6 @@
|
|||||||
AA07A55E0843E72B00E33D21 /* ScreenSyncOverlay.h */,
|
AA07A55E0843E72B00E33D21 /* ScreenSyncOverlay.h */,
|
||||||
AA1145DB075DFADF0050A3D1 /* ScreenSystemLayer.cpp */,
|
AA1145DB075DFADF0050A3D1 /* ScreenSystemLayer.cpp */,
|
||||||
AA1145DC075DFADF0050A3D1 /* ScreenSystemLayer.h */,
|
AA1145DC075DFADF0050A3D1 /* ScreenSystemLayer.h */,
|
||||||
AA6E0079047711F3005F316C /* ScreenTestFonts.cpp */,
|
|
||||||
AA6E007A047711F3005F316C /* ScreenTestFonts.h */,
|
|
||||||
AAC622FA05389A0500D02EE9 /* ScreenTestInput.cpp */,
|
AAC622FA05389A0500D02EE9 /* ScreenTestInput.cpp */,
|
||||||
AAC622FB05389A0500D02EE9 /* ScreenTestInput.h */,
|
AAC622FB05389A0500D02EE9 /* ScreenTestInput.h */,
|
||||||
AAF7435906110E8D00B19AD1 /* ScreenTestLights.cpp */,
|
AAF7435906110E8D00B19AD1 /* ScreenTestLights.cpp */,
|
||||||
@@ -5283,7 +5276,6 @@
|
|||||||
AA40D24209A08D650068C0D5 /* ScreenSelectCharacter.h in Headers */,
|
AA40D24209A08D650068C0D5 /* ScreenSelectCharacter.h in Headers */,
|
||||||
AA40D24609A08D650068C0D5 /* ScreenSelectMusic.h in Headers */,
|
AA40D24609A08D650068C0D5 /* ScreenSelectMusic.h in Headers */,
|
||||||
AA40D24809A08D650068C0D5 /* ScreenSongOptions.h in Headers */,
|
AA40D24809A08D650068C0D5 /* ScreenSongOptions.h in Headers */,
|
||||||
AA40D24A09A08D650068C0D5 /* ScreenTestFonts.h in Headers */,
|
|
||||||
AA40D24B09A08D650068C0D5 /* ScreenTestSound.h in Headers */,
|
AA40D24B09A08D650068C0D5 /* ScreenTestSound.h in Headers */,
|
||||||
AA40D24C09A08D650068C0D5 /* ScreenTextEntry.h in Headers */,
|
AA40D24C09A08D650068C0D5 /* ScreenTextEntry.h in Headers */,
|
||||||
AA40D24D09A08D650068C0D5 /* ScreenTitleMenu.h in Headers */,
|
AA40D24D09A08D650068C0D5 /* ScreenTitleMenu.h in Headers */,
|
||||||
@@ -6207,7 +6199,6 @@
|
|||||||
AA29CDD50558741A00961A51 /* ScreenSelectCharacter.cpp in Sources */,
|
AA29CDD50558741A00961A51 /* ScreenSelectCharacter.cpp in Sources */,
|
||||||
AA29CDDB0558741A00961A51 /* ScreenSelectMusic.cpp in Sources */,
|
AA29CDDB0558741A00961A51 /* ScreenSelectMusic.cpp in Sources */,
|
||||||
AA29CDDD0558741A00961A51 /* ScreenSongOptions.cpp in Sources */,
|
AA29CDDD0558741A00961A51 /* ScreenSongOptions.cpp in Sources */,
|
||||||
AA29CDE10558741A00961A51 /* ScreenTestFonts.cpp in Sources */,
|
|
||||||
AA29CDE20558741A00961A51 /* ScreenTestSound.cpp in Sources */,
|
AA29CDE20558741A00961A51 /* ScreenTestSound.cpp in Sources */,
|
||||||
AA29CDE30558741A00961A51 /* ScreenTextEntry.cpp in Sources */,
|
AA29CDE30558741A00961A51 /* ScreenTextEntry.cpp in Sources */,
|
||||||
AA29CDE40558741A00961A51 /* ScreenTitleMenu.cpp in Sources */,
|
AA29CDE40558741A00961A51 /* ScreenTitleMenu.cpp in Sources */,
|
||||||
@@ -6615,7 +6606,6 @@
|
|||||||
AA40D3FF09A08D650068C0D5 /* ScreenSelectCharacter.cpp in Sources */,
|
AA40D3FF09A08D650068C0D5 /* ScreenSelectCharacter.cpp in Sources */,
|
||||||
AA40D40309A08D650068C0D5 /* ScreenSelectMusic.cpp in Sources */,
|
AA40D40309A08D650068C0D5 /* ScreenSelectMusic.cpp in Sources */,
|
||||||
AA40D40509A08D650068C0D5 /* ScreenSongOptions.cpp in Sources */,
|
AA40D40509A08D650068C0D5 /* ScreenSongOptions.cpp in Sources */,
|
||||||
AA40D40709A08D650068C0D5 /* ScreenTestFonts.cpp in Sources */,
|
|
||||||
AA40D40809A08D650068C0D5 /* ScreenTestSound.cpp in Sources */,
|
AA40D40809A08D650068C0D5 /* ScreenTestSound.cpp in Sources */,
|
||||||
AA40D40909A08D650068C0D5 /* ScreenTextEntry.cpp in Sources */,
|
AA40D40909A08D650068C0D5 /* ScreenTextEntry.cpp in Sources */,
|
||||||
AA40D40A09A08D650068C0D5 /* ScreenTitleMenu.cpp in Sources */,
|
AA40D40A09A08D650068C0D5 /* ScreenTitleMenu.cpp in Sources */,
|
||||||
|
|||||||
+1
-1
@@ -107,7 +107,7 @@ ScreenSyncOverlay.cpp ScreenSyncOverlay.h \
|
|||||||
ScreenSystemLayer.cpp ScreenSystemLayer.h ScreenSetTime.cpp ScreenSetTime.h \
|
ScreenSystemLayer.cpp ScreenSystemLayer.h ScreenSetTime.cpp ScreenSetTime.h \
|
||||||
ScreenSongOptions.cpp ScreenSongOptions.h \
|
ScreenSongOptions.cpp ScreenSongOptions.h \
|
||||||
ScreenSplash.cpp ScreenSplash.h \
|
ScreenSplash.cpp ScreenSplash.h \
|
||||||
ScreenTestFonts.cpp ScreenTestFonts.h ScreenTestInput.cpp ScreenTestInput.h \
|
ScreenTestInput.cpp ScreenTestInput.h \
|
||||||
ScreenTestLights.cpp ScreenTestLights.h ScreenTestSound.cpp ScreenTestSound.h ScreenTextEntry.cpp ScreenTextEntry.h \
|
ScreenTestLights.cpp ScreenTestLights.h ScreenTestSound.cpp ScreenTestSound.h ScreenTextEntry.cpp ScreenTextEntry.h \
|
||||||
ScreenTitleMenu.cpp ScreenTitleMenu.h \
|
ScreenTitleMenu.cpp ScreenTitleMenu.h \
|
||||||
ScreenUnlockBrowse.cpp ScreenUnlockBrowse.h \
|
ScreenUnlockBrowse.cpp ScreenUnlockBrowse.h \
|
||||||
|
|||||||
+207
-11
@@ -459,6 +459,31 @@ int NoteData::GetLastRow() const
|
|||||||
return iOldestRowFoundSoFar;
|
return iOldestRowFoundSoFar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NoteData::IsTap(const TapNote &tn, const int row) const
|
||||||
|
{
|
||||||
|
return (tn.type != TapNote::empty && tn.type != TapNote::mine
|
||||||
|
&& tn.type != TapNote::lift && tn.type != TapNote::fake
|
||||||
|
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(row));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool NoteData::IsMine(const TapNote &tn, const int row) const
|
||||||
|
{
|
||||||
|
return (tn.type == TapNote::mine
|
||||||
|
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(row));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool NoteData::IsLift(const TapNote &tn, const int row) const
|
||||||
|
{
|
||||||
|
return (tn.type == TapNote::lift
|
||||||
|
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(row));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool NoteData::IsFake(const TapNote &tn, const int row) const
|
||||||
|
{
|
||||||
|
return (tn.type == TapNote::fake
|
||||||
|
|| !GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(row));
|
||||||
|
}
|
||||||
|
|
||||||
int NoteData::GetNumTapNotes( int iStartIndex, int iEndIndex ) const
|
int NoteData::GetNumTapNotes( int iStartIndex, int iEndIndex ) const
|
||||||
{
|
{
|
||||||
int iNumNotes = 0;
|
int iNumNotes = 0;
|
||||||
@@ -466,10 +491,7 @@ int NoteData::GetNumTapNotes( int iStartIndex, int iEndIndex ) const
|
|||||||
{
|
{
|
||||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
||||||
{
|
{
|
||||||
const TapNote &tn = GetTapNote(t, r);
|
if (this->IsTap(GetTapNote(t, r), r))
|
||||||
if( tn.type != TapNote::empty && tn.type != TapNote::mine
|
|
||||||
&& tn.type != TapNote::lift && tn.type != TapNote::fake
|
|
||||||
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r) )
|
|
||||||
iNumNotes++;
|
iNumNotes++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -500,8 +522,7 @@ int NoteData::GetNumMines( int iStartIndex, int iEndIndex ) const
|
|||||||
for( int t=0; t<GetNumTracks(); t++ )
|
for( int t=0; t<GetNumTracks(); t++ )
|
||||||
{
|
{
|
||||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
||||||
if( GetTapNote(t, r).type == TapNote::mine
|
if (this->IsMine(GetTapNote(t, r), r))
|
||||||
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r))
|
|
||||||
iNumMines++;
|
iNumMines++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -640,8 +661,7 @@ int NoteData::GetNumLifts( int iStartIndex, int iEndIndex ) const
|
|||||||
for( int t=0; t<GetNumTracks(); t++ )
|
for( int t=0; t<GetNumTracks(); t++ )
|
||||||
{
|
{
|
||||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
||||||
if( GetTapNote(t, r).type == TapNote::lift
|
if( this->IsLift(GetTapNote(t, r), r))
|
||||||
&& GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r))
|
|
||||||
iNumLifts++;
|
iNumLifts++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -655,14 +675,190 @@ int NoteData::GetNumFakes( int iStartIndex, int iEndIndex ) const
|
|||||||
for( int t=0; t<GetNumTracks(); t++ )
|
for( int t=0; t<GetNumTracks(); t++ )
|
||||||
{
|
{
|
||||||
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
||||||
if( GetTapNote(t, r).type == TapNote::fake
|
if( this->IsFake(GetTapNote(t, r), r))
|
||||||
|| !GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(r))
|
iNumFakes++;
|
||||||
iNumFakes++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return iNumFakes;
|
return iNumFakes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NoteData::IsPlayer1(const int track, const TapNote &tn) const
|
||||||
|
{
|
||||||
|
if (this->IsComposite())
|
||||||
|
{
|
||||||
|
return tn.pn == PLAYER_1;
|
||||||
|
}
|
||||||
|
return track < (this->GetNumTracks() / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<int, int> NoteData::GetNumTapNotesTwoPlayer( int iStartIndex, int iEndIndex ) const
|
||||||
|
{
|
||||||
|
pair<int, int> num(0, 0);
|
||||||
|
for( int t=0; t<GetNumTracks(); t++ )
|
||||||
|
{
|
||||||
|
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
||||||
|
{
|
||||||
|
const TapNote &tn = GetTapNote(t, r);
|
||||||
|
if (this->IsTap(tn, r))
|
||||||
|
{
|
||||||
|
if (this->IsPlayer1(t, tn))
|
||||||
|
num.first++;
|
||||||
|
else
|
||||||
|
num.second++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<int, int> NoteData::GetNumRowsWithSimultaneousTapsTwoPlayer(int minTaps,
|
||||||
|
int startRow,
|
||||||
|
int endRow) const
|
||||||
|
{
|
||||||
|
pair<int, int> num(0, 0);
|
||||||
|
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( *this, r, startRow, endRow )
|
||||||
|
{
|
||||||
|
pair<int, int> found(0, 0);
|
||||||
|
for( int t=0; t<GetNumTracks(); t++ )
|
||||||
|
{
|
||||||
|
const TapNote &tn = GetTapNote(t, r);
|
||||||
|
if (this->IsTap(tn, r))
|
||||||
|
{
|
||||||
|
if (this->IsPlayer1(t, tn))
|
||||||
|
found.first++;
|
||||||
|
else
|
||||||
|
found.second++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found.first >= minTaps)
|
||||||
|
num.first++;
|
||||||
|
if (found.second >= minTaps)
|
||||||
|
num.second++;
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<int, int> NoteData::GetNumJumpsTwoPlayer( int iStartIndex, int iEndIndex ) const
|
||||||
|
{
|
||||||
|
return GetNumRowsWithSimultaneousTapsTwoPlayer( 2, iStartIndex, iEndIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<int, int> NoteData::GetNumHandsTwoPlayer( int iStartIndex, int iEndIndex ) const
|
||||||
|
{
|
||||||
|
return GetNumRowsWithSimultaneousTapsTwoPlayer( 3, iStartIndex, iEndIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<int, int> NoteData::GetNumQuadsTwoPlayer( int iStartIndex, int iEndIndex ) const
|
||||||
|
{
|
||||||
|
return GetNumRowsWithSimultaneousTapsTwoPlayer( 4, iStartIndex, iEndIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<int, int> NoteData::GetNumHoldNotesTwoPlayer( int iStartIndex, int iEndIndex ) const
|
||||||
|
{
|
||||||
|
pair<int, int> num(0, 0);
|
||||||
|
for( int t=0; t<GetNumTracks(); ++t )
|
||||||
|
{
|
||||||
|
NoteData::TrackMap::const_iterator lBegin, lEnd;
|
||||||
|
GetTapNoteRangeExclusive( t, iStartIndex, iEndIndex, lBegin, lEnd );
|
||||||
|
for( ; lBegin != lEnd; ++lBegin )
|
||||||
|
{
|
||||||
|
if( lBegin->second.type != TapNote::hold_head ||
|
||||||
|
lBegin->second.subType != TapNote::hold_head_hold )
|
||||||
|
continue;
|
||||||
|
if (!GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(lBegin->first))
|
||||||
|
continue;
|
||||||
|
if (this->IsPlayer1(t, lBegin->second))
|
||||||
|
num.first++;
|
||||||
|
else
|
||||||
|
num.second++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<int, int> NoteData::GetNumMinesTwoPlayer( int iStartIndex, int iEndIndex ) const
|
||||||
|
{
|
||||||
|
pair<int, int> num(0, 0);
|
||||||
|
for( int t=0; t<GetNumTracks(); t++ )
|
||||||
|
{
|
||||||
|
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
||||||
|
{
|
||||||
|
const TapNote &tn = GetTapNote(t, r);
|
||||||
|
if (this->IsMine(tn, r))
|
||||||
|
{
|
||||||
|
if (this->IsPlayer1(t, tn))
|
||||||
|
num.first++;
|
||||||
|
else
|
||||||
|
num.second++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<int, int> NoteData::GetNumRollsTwoPlayer( int iStartIndex, int iEndIndex ) const
|
||||||
|
{
|
||||||
|
pair<int, int> num(0, 0);
|
||||||
|
for( int t=0; t<GetNumTracks(); ++t )
|
||||||
|
{
|
||||||
|
NoteData::TrackMap::const_iterator lBegin, lEnd;
|
||||||
|
GetTapNoteRangeExclusive( t, iStartIndex, iEndIndex, lBegin, lEnd );
|
||||||
|
for( ; lBegin != lEnd; ++lBegin )
|
||||||
|
{
|
||||||
|
if( lBegin->second.type != TapNote::hold_head ||
|
||||||
|
lBegin->second.subType != TapNote::hold_head_roll )
|
||||||
|
continue;
|
||||||
|
if (!GAMESTATE->GetProcessedTimingData()->IsJudgableAtRow(lBegin->first))
|
||||||
|
continue;
|
||||||
|
if (this->IsPlayer1(t, lBegin->second))
|
||||||
|
num.first++;
|
||||||
|
else
|
||||||
|
num.second++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<int, int> NoteData::GetNumLiftsTwoPlayer( int iStartIndex, int iEndIndex ) const
|
||||||
|
{
|
||||||
|
pair<int, int> num(0, 0);
|
||||||
|
for( int t=0; t<GetNumTracks(); t++ )
|
||||||
|
{
|
||||||
|
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
||||||
|
{
|
||||||
|
const TapNote &tn = GetTapNote(t, r);
|
||||||
|
if (this->IsLift(tn, r))
|
||||||
|
{
|
||||||
|
if (this->IsPlayer1(t, tn))
|
||||||
|
num.first++;
|
||||||
|
else
|
||||||
|
num.second++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
pair<int, int> NoteData::GetNumFakesTwoPlayer( int iStartIndex, int iEndIndex ) const
|
||||||
|
{
|
||||||
|
pair<int, int> num(0, 0);
|
||||||
|
for( int t=0; t<GetNumTracks(); t++ )
|
||||||
|
{
|
||||||
|
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
|
||||||
|
{
|
||||||
|
const TapNote &tn = GetTapNote(t, r);
|
||||||
|
if (this->IsFake(tn, r))
|
||||||
|
{
|
||||||
|
if (this->IsPlayer1(t, tn))
|
||||||
|
num.first++;
|
||||||
|
else
|
||||||
|
num.second++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
int NoteData::GetNumMinefields( int iStartIndex, int iEndIndex ) const
|
int NoteData::GetNumMinefields( int iStartIndex, int iEndIndex ) const
|
||||||
{
|
{
|
||||||
|
|||||||
+105
-10
@@ -91,6 +91,45 @@ private:
|
|||||||
// Any blank space in the map is defined to be empty.
|
// Any blank space in the map is defined to be empty.
|
||||||
vector<TrackMap> m_TapNotes;
|
vector<TrackMap> m_TapNotes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Determine whether this note is for Player 1 or Player 2.
|
||||||
|
* @param track the track/column the note is in.
|
||||||
|
* @param tn the note in question. Required for routine mode.
|
||||||
|
* @return true if it's for player 1, false for player 2. */
|
||||||
|
bool IsPlayer1(const int track, const TapNote &tn) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Determine if the note in questino should be counted as a tap.
|
||||||
|
* @param tn the note in question.
|
||||||
|
* @param row the row it lives in.
|
||||||
|
* @return true if it's a tap, false otherwise. */
|
||||||
|
bool IsTap(const TapNote &tn, const int row) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Determine if the note in questino should be counted as a mine.
|
||||||
|
* @param tn the note in question.
|
||||||
|
* @param row the row it lives in.
|
||||||
|
* @return true if it's a mine, false otherwise. */
|
||||||
|
bool IsMine(const TapNote &tn, const int row) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Determine if the note in questino should be counted as a lift.
|
||||||
|
* @param tn the note in question.
|
||||||
|
* @param row the row it lives in.
|
||||||
|
* @return true if it's a lift, false otherwise. */
|
||||||
|
bool IsLift(const TapNote &tn, const int row) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Determine if the note in questino should be counted as a fake.
|
||||||
|
* @param tn the note in question.
|
||||||
|
* @param row the row it lives in.
|
||||||
|
* @return true if it's a fake, false otherwise. */
|
||||||
|
bool IsFake(const TapNote &tn, const int row) const;
|
||||||
|
|
||||||
|
pair<int, int> GetNumRowsWithSimultaneousTapsTwoPlayer(int minTaps = 2,
|
||||||
|
int startRow = 0,
|
||||||
|
int endRow = MAX_NOTE_ROW) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
@@ -130,7 +169,8 @@ public:
|
|||||||
* @param iEndRow the ending point.
|
* @param iEndRow the ending point.
|
||||||
* @param begin the eventual beginning point of the range.
|
* @param begin the eventual beginning point of the range.
|
||||||
* @param end the eventual end point of the range. */
|
* @param end the eventual end point of the range. */
|
||||||
void GetTapNoteRange( int iTrack, int iStartRow, int iEndRow, TrackMap::const_iterator &begin, TrackMap::const_iterator &end ) const;
|
void GetTapNoteRange(int iTrack, int iStartRow, int iEndRow,
|
||||||
|
TrackMap::const_iterator &begin, TrackMap::const_iterator &end ) const;
|
||||||
/**
|
/**
|
||||||
* @brief Return a constant iterator range for [rowBegin,rowEnd).
|
* @brief Return a constant iterator range for [rowBegin,rowEnd).
|
||||||
* @param iTrack the column to use.
|
* @param iTrack the column to use.
|
||||||
@@ -158,13 +198,17 @@ public:
|
|||||||
|
|
||||||
/* Return an iterator range include iStartRow to iEndRow. Extend the range to include
|
/* Return an iterator range include iStartRow to iEndRow. Extend the range to include
|
||||||
* hold notes overlapping the boundary. */
|
* hold notes overlapping the boundary. */
|
||||||
void GetTapNoteRangeInclusive( int iTrack, int iStartRow, int iEndRow, TrackMap::const_iterator &begin, TrackMap::const_iterator &end, bool bIncludeAdjacent=false ) const;
|
void GetTapNoteRangeInclusive(int iTrack, int iStartRow, int iEndRow,
|
||||||
void GetTapNoteRangeInclusive( int iTrack, int iStartRow, int iEndRow, TrackMap::iterator &begin, TrackMap::iterator &end, bool bIncludeAdjacent=false );
|
TrackMap::const_iterator &begin, TrackMap::const_iterator &end, bool bIncludeAdjacent=false ) const;
|
||||||
|
void GetTapNoteRangeInclusive(int iTrack, int iStartRow, int iEndRow,
|
||||||
|
TrackMap::iterator &begin, TrackMap::iterator &end, bool bIncludeAdjacent=false );
|
||||||
|
|
||||||
/* Return an iterator range include iStartRow to iEndRow. Shrink the range to exclude
|
/* Return an iterator range include iStartRow to iEndRow. Shrink the range to exclude
|
||||||
* hold notes overlapping the boundary. */
|
* hold notes overlapping the boundary. */
|
||||||
void GetTapNoteRangeExclusive( int iTrack, int iStartRow, int iEndRow, TrackMap::const_iterator &begin, TrackMap::const_iterator &end ) const;
|
void GetTapNoteRangeExclusive(int iTrack, int iStartRow, int iEndRow,
|
||||||
void GetTapNoteRangeExclusive( int iTrack, int iStartRow, int iEndRow, TrackMap::iterator &begin, TrackMap::iterator &end );
|
TrackMap::const_iterator &begin, TrackMap::const_iterator &end ) const;
|
||||||
|
void GetTapNoteRangeExclusive(int iTrack, int iStartRow, int iEndRow,
|
||||||
|
TrackMap::iterator &begin, TrackMap::iterator &end );
|
||||||
|
|
||||||
|
|
||||||
/* Returns the row of the first TapNote on the track that has a row greater than rowInOut. */
|
/* Returns the row of the first TapNote on the track that has a row greater than rowInOut. */
|
||||||
@@ -175,7 +219,17 @@ public:
|
|||||||
|
|
||||||
void MoveTapNoteTrack( int dest, int src );
|
void MoveTapNoteTrack( int dest, int src );
|
||||||
void SetTapNote( int track, int row, const TapNote& tn );
|
void SetTapNote( int track, int row, const TapNote& tn );
|
||||||
void AddHoldNote( int iTrack, int iStartRow, int iEndRow, TapNote tn ); // add note hold note merging overlapping HoldNotes and destroying TapNotes underneath
|
/**
|
||||||
|
* @brief Add a hold note, merging other overlapping holds and destroying
|
||||||
|
* tap notes underneath.
|
||||||
|
* @param iTrack the column to work with.
|
||||||
|
* @param iStartRow the starting row.
|
||||||
|
* @param iEndRow the ending row.
|
||||||
|
* @param tn the tap note. */
|
||||||
|
void AddHoldNote(int iTrack,
|
||||||
|
int iStartRow,
|
||||||
|
int iEndRow,
|
||||||
|
TapNote tn );
|
||||||
|
|
||||||
void ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack );
|
void ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack );
|
||||||
void ClearRange( int rowBegin, int rowEnd );
|
void ClearRange( int rowBegin, int rowEnd );
|
||||||
@@ -222,7 +276,12 @@ public:
|
|||||||
|
|
||||||
// Count rows that contain iMinTaps or more taps.
|
// Count rows that contain iMinTaps or more taps.
|
||||||
int GetNumRowsWithSimultaneousTaps( int iMinTaps, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
int GetNumRowsWithSimultaneousTaps( int iMinTaps, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||||
int GetNumJumps( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const { return GetNumRowsWithSimultaneousTaps( 2, iStartIndex, iEndIndex ); }
|
int GetNumJumps( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const
|
||||||
|
{
|
||||||
|
return GetNumRowsWithSimultaneousTaps( 2, iStartIndex, iEndIndex );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// This row needs at least iMinSimultaneousPresses either tapped or held.
|
// This row needs at least iMinSimultaneousPresses either tapped or held.
|
||||||
bool RowNeedsAtLeastSimultaneousPresses( int iMinSimultaneousPresses, int row ) const;
|
bool RowNeedsAtLeastSimultaneousPresses( int iMinSimultaneousPresses, int row ) const;
|
||||||
@@ -230,15 +289,51 @@ public:
|
|||||||
|
|
||||||
// Count rows that need iMinSimultaneousPresses either tapped or held.
|
// Count rows that need iMinSimultaneousPresses either tapped or held.
|
||||||
int GetNumRowsWithSimultaneousPresses( int iMinSimultaneousPresses, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
int GetNumRowsWithSimultaneousPresses( int iMinSimultaneousPresses, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||||
int GetNumHands( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const { return GetNumRowsWithSimultaneousPresses( 3, iStartIndex, iEndIndex ); }
|
int GetNumHands( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const
|
||||||
int GetNumQuads( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const { return GetNumRowsWithSimultaneousPresses( 4, iStartIndex, iEndIndex ); }
|
{
|
||||||
|
return GetNumRowsWithSimultaneousPresses( 3, iStartIndex, iEndIndex );
|
||||||
|
}
|
||||||
|
int GetNumQuads( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const
|
||||||
|
{
|
||||||
|
return GetNumRowsWithSimultaneousPresses( 4, iStartIndex, iEndIndex );
|
||||||
|
}
|
||||||
|
|
||||||
// and the other notetypes
|
// and the other notetypes
|
||||||
int GetNumLifts( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
int GetNumLifts( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||||
int GetNumFakes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
int GetNumFakes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||||
|
|
||||||
|
// the couple/routine style variants of the above.
|
||||||
|
pair<int, int> GetNumTapNotesTwoPlayer(int startRow = 0,
|
||||||
|
int endRow = MAX_NOTE_ROW) const;
|
||||||
|
|
||||||
|
pair<int, int> GetNumJumpsTwoPlayer(int startRow = 0,
|
||||||
|
int endRow = MAX_NOTE_ROW) const;
|
||||||
|
|
||||||
|
pair<int, int> GetNumHandsTwoPlayer(int startRow = 0,
|
||||||
|
int endRow = MAX_NOTE_ROW) const;
|
||||||
|
|
||||||
|
pair<int, int> GetNumQuadsTwoPlayer(int startRow = 0,
|
||||||
|
int endRow = MAX_NOTE_ROW) const;
|
||||||
|
|
||||||
|
pair<int, int> GetNumHoldNotesTwoPlayer(int startRow = 0,
|
||||||
|
int endRow = MAX_NOTE_ROW) const;
|
||||||
|
|
||||||
|
pair<int, int> GetNumMinesTwoPlayer(int startRow = 0,
|
||||||
|
int endRow = MAX_NOTE_ROW) const;
|
||||||
|
|
||||||
|
pair<int, int> GetNumRollsTwoPlayer(int startRow = 0,
|
||||||
|
int endRow = MAX_NOTE_ROW) const;
|
||||||
|
|
||||||
|
pair<int, int> GetNumLiftsTwoPlayer(int startRow = 0,
|
||||||
|
int endRow = MAX_NOTE_ROW) const;
|
||||||
|
|
||||||
|
pair<int, int> GetNumFakesTwoPlayer(int startRow = 0,
|
||||||
|
int endRow = MAX_NOTE_ROW) const;
|
||||||
|
|
||||||
// Transformations
|
// Transformations
|
||||||
void LoadTransformed( const NoteData& original, int iNewNumTracks, const int iOriginalTrackToTakeFrom[] ); // -1 for iOriginalTracksToTakeFrom means no track
|
void LoadTransformed(const NoteData& original,
|
||||||
|
int iNewNumTracks,
|
||||||
|
const int iOriginalTrackToTakeFrom[] ); // -1 for iOriginalTracksToTakeFrom means no track
|
||||||
|
|
||||||
// XML
|
// XML
|
||||||
XNode* CreateNode() const;
|
XNode* CreateNode() const;
|
||||||
|
|||||||
+11
-4
@@ -692,11 +692,18 @@ void NoteDisplay::DrawActor( const TapNote& tn, Actor* pActor, NotePart part, in
|
|||||||
const float fGlow = ArrowEffects::GetGlow( m_pPlayerState, iCol, fYOffset, fPercentFadeToFail, m_fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
const float fGlow = ArrowEffects::GetGlow( m_pPlayerState, iCol, fYOffset, fPercentFadeToFail, m_fYReverseOffsetPixels, fDrawDistanceBeforeTargetsPixels, fFadeInPercentOfDrawFar );
|
||||||
const RageColor diffuse = RageColor(fColorScale,fColorScale,fColorScale,fAlpha);
|
const RageColor diffuse = RageColor(fColorScale,fColorScale,fColorScale,fAlpha);
|
||||||
const RageColor glow = RageColor(1,1,1,fGlow);
|
const RageColor glow = RageColor(1,1,1,fGlow);
|
||||||
float fRotationX = 0, fRotationY = 0, fRotationZ = 0;
|
float fRotationX = 0, fRotationZ = 0;
|
||||||
|
const float fRotationY = ArrowEffects::GetRotationY( m_pPlayerState, fYOffset );
|
||||||
|
|
||||||
|
bool bIsHoldHead = tn.type == tn.hold_head;
|
||||||
|
bool bIsHoldCap = bIsHoldHead || tn.type == tn.hold_tail;
|
||||||
|
|
||||||
|
fRotationZ = ArrowEffects::GetRotationZ( m_pPlayerState, fBeat, bIsHoldHead );
|
||||||
|
if( !bIsHoldCap )
|
||||||
|
{
|
||||||
|
fRotationX = ArrowEffects::GetRotationX( m_pPlayerState, fYOffset );
|
||||||
|
}
|
||||||
|
|
||||||
fRotationX = ArrowEffects::GetRotationX( m_pPlayerState, fYOffset );
|
|
||||||
fRotationY = ArrowEffects::GetRotationY( m_pPlayerState, fYOffset );
|
|
||||||
fRotationZ = ArrowEffects::GetRotationZ( m_pPlayerState, fBeat, tn.type == tn.hold_head );
|
|
||||||
if( tn.type != tn.hold_head )
|
if( tn.type != tn.hold_head )
|
||||||
fColorScale *= ArrowEffects::GetBrightness( m_pPlayerState, fBeat );
|
fColorScale *= ArrowEffects::GetBrightness( m_pPlayerState, fBeat );
|
||||||
|
|
||||||
|
|||||||
@@ -242,7 +242,6 @@ bool SMLoader::ProcessBPMs( TimingData &out, const RString line, const int rowsP
|
|||||||
|
|
||||||
if( fNewBPM < 0.0f )
|
if( fNewBPM < 0.0f )
|
||||||
{
|
{
|
||||||
out.m_bHasNegativeBpms = true;
|
|
||||||
negBeat = fBeat;
|
negBeat = fBeat;
|
||||||
negBPM = fNewBPM;
|
negBPM = fNewBPM;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ class OptionRowHandlerListSteps : public OptionRowHandlerList
|
|||||||
if (STEPS_USE_CHART_NAME)
|
if (STEPS_USE_CHART_NAME)
|
||||||
{
|
{
|
||||||
s = pSteps->GetChartName();
|
s = pSteps->GetChartName();
|
||||||
// TODO: find a way to make this use lua.
|
// TODO: find a way to make this use lua or metrics.
|
||||||
if (!(s == "" || s == "blank" || s == "Blank"))
|
if (!(s == "" || s == "blank" || s == "Blank"))
|
||||||
{
|
{
|
||||||
goto nameGotten;
|
goto nameGotten;
|
||||||
@@ -461,12 +461,18 @@ class OptionRowHandlerListSteps : public OptionRowHandlerList
|
|||||||
}
|
}
|
||||||
if( pSteps->GetDifficulty() == Difficulty_Edit )
|
if( pSteps->GetDifficulty() == Difficulty_Edit )
|
||||||
{
|
{
|
||||||
s = pSteps->GetDescription();
|
s = pSteps->GetChartName();
|
||||||
|
if (s == "" || s == "blank" || s == "Blank")
|
||||||
|
s = pSteps->GetDescription();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( pSteps->IsAnEdit() )
|
if( pSteps->IsAnEdit() )
|
||||||
s = pSteps->GetDescription();
|
{
|
||||||
|
s = pSteps->GetChartName();
|
||||||
|
if (s == "" || s == "blank" || s == "Blank")
|
||||||
|
s = pSteps->GetDescription();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
s = CustomDifficultyToLocalizedString( GetCustomDifficulty( pSteps->m_StepsType, pSteps->GetDifficulty(), CourseType_Invalid ) );
|
s = CustomDifficultyToLocalizedString( GetCustomDifficulty( pSteps->m_StepsType, pSteps->GetDifficulty(), CourseType_Invalid ) );
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-5
@@ -1512,7 +1512,7 @@ void Player::DrawPrimitives()
|
|||||||
DISPLAY->PopMatrix();
|
DISPLAY->PopMatrix();
|
||||||
|
|
||||||
// m_pNoteField->m_sprBoard->GetVisible()
|
// m_pNoteField->m_sprBoard->GetVisible()
|
||||||
if( !(bool)COMBO_UNDER_FIELD && m_pPlayerState->m_PlayerOptions.GetCurrent().m_fBlind == 0 )
|
if( !COMBO_UNDER_FIELD && m_pPlayerState->m_PlayerOptions.GetCurrent().m_fBlind == 0 )
|
||||||
if( m_sprCombo )
|
if( m_sprCombo )
|
||||||
m_sprCombo->Draw();
|
m_sprCombo->Draw();
|
||||||
|
|
||||||
@@ -2965,10 +2965,12 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
|||||||
if( iCheckpointFrequencyRows > 0 )
|
if( iCheckpointFrequencyRows > 0 )
|
||||||
{
|
{
|
||||||
// "the first row after the start of the range that lands on a beat"
|
// "the first row after the start of the range that lands on a beat"
|
||||||
int iFirstCheckpointInRange = ((m_iFirstUncrossedRow+iCheckpointFrequencyRows-1)/iCheckpointFrequencyRows) * iCheckpointFrequencyRows;
|
int iFirstCheckpointInRange = QuantizeUp(m_iFirstUncrossedRow,
|
||||||
|
iCheckpointFrequencyRows);
|
||||||
|
|
||||||
// "the last row or first row earlier that lands on a beat"
|
// "the last row or first row earlier that lands on a beat"
|
||||||
int iLastCheckpointInRange = ((iLastRowCrossed)/iCheckpointFrequencyRows) * iCheckpointFrequencyRows;
|
int iLastCheckpointInRange = QuantizeDown(iLastRowCrossed,
|
||||||
|
iCheckpointFrequencyRows);
|
||||||
|
|
||||||
for( int r = iFirstCheckpointInRange; r <= iLastCheckpointInRange; r += iCheckpointFrequencyRows )
|
for( int r = iFirstCheckpointInRange; r <= iLastCheckpointInRange; r += iCheckpointFrequencyRows )
|
||||||
{
|
{
|
||||||
@@ -2990,10 +2992,12 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
|||||||
int iTrack = nIter.Track();
|
int iTrack = nIter.Track();
|
||||||
|
|
||||||
// "the first row after the hold head that lands on a beat"
|
// "the first row after the hold head that lands on a beat"
|
||||||
int iFirstCheckpointOfHold = ((iStartRow+iCheckpointFrequencyRows)/iCheckpointFrequencyRows) * iCheckpointFrequencyRows;
|
int iFirstCheckpointOfHold = QuantizeUp(iStartRow,
|
||||||
|
iCheckpointFrequencyRows);
|
||||||
|
|
||||||
// "the end row or the first earlier row that lands on a beat"
|
// "the end row or the first earlier row that lands on a beat"
|
||||||
int iLastCheckpointOfHold = ((iEndRow)/iCheckpointFrequencyRows) * iCheckpointFrequencyRows;
|
int iLastCheckpointOfHold = QuantizeDown(iEndRow,
|
||||||
|
iCheckpointFrequencyRows);
|
||||||
|
|
||||||
// count the end of the hold as a checkpoint
|
// count the end of the hold as a checkpoint
|
||||||
bool bHoldOverlapsRow = iFirstCheckpointOfHold <= r && r <= iLastCheckpointOfHold;
|
bool bHoldOverlapsRow = iFirstCheckpointOfHold <= r && r <= iLastCheckpointOfHold;
|
||||||
|
|||||||
+91
-19
@@ -1190,6 +1190,14 @@ static ThemeMetric<RString> NUM_HANDS_FORMAT("ScreenEdit", "NumHandsFormat");
|
|||||||
static ThemeMetric<RString> NUM_ROLLS_FORMAT("ScreenEdit", "NumRollsFormat");
|
static ThemeMetric<RString> NUM_ROLLS_FORMAT("ScreenEdit", "NumRollsFormat");
|
||||||
static ThemeMetric<RString> NUM_LIFTS_FORMAT("ScreenEdit", "NumLiftsFormat");
|
static ThemeMetric<RString> NUM_LIFTS_FORMAT("ScreenEdit", "NumLiftsFormat");
|
||||||
static ThemeMetric<RString> NUM_FAKES_FORMAT("ScreenEdit", "NumFakesFormat");
|
static ThemeMetric<RString> NUM_FAKES_FORMAT("ScreenEdit", "NumFakesFormat");
|
||||||
|
static ThemeMetric<RString> NUM_STEPS_FORMAT_TWO_PLAYER("ScreenEdit", "NumStepsFormatTwoPlayer");
|
||||||
|
static ThemeMetric<RString> NUM_JUMPS_FORMAT_TWO_PLAYER("ScreenEdit", "NumJumpsFormatTwoPlayer");
|
||||||
|
static ThemeMetric<RString> NUM_HOLDS_FORMAT_TWO_PLAYER("ScreenEdit", "NumHoldsFormatTwoPlayer");
|
||||||
|
static ThemeMetric<RString> NUM_MINES_FORMAT_TWO_PLAYER("ScreenEdit", "NumMinesFormatTwoPlayer");
|
||||||
|
static ThemeMetric<RString> NUM_HANDS_FORMAT_TWO_PLAYER("ScreenEdit", "NumHandsFormatTwoPlayer");
|
||||||
|
static ThemeMetric<RString> NUM_ROLLS_FORMAT_TWO_PLAYER("ScreenEdit", "NumRollsFormatTwoPlayer");
|
||||||
|
static ThemeMetric<RString> NUM_LIFTS_FORMAT_TWO_PLAYER("ScreenEdit", "NumLiftsFormatTwoPlayer");
|
||||||
|
static ThemeMetric<RString> NUM_FAKES_FORMAT_TWO_PLAYER("ScreenEdit", "NumFakesFormatTwoPlayer");
|
||||||
static ThemeMetric<RString> TIMING_MODE_FORMAT("ScreenEdit", "TimingModeFormat");
|
static ThemeMetric<RString> TIMING_MODE_FORMAT("ScreenEdit", "TimingModeFormat");
|
||||||
static ThemeMetric<RString> BEAT_0_OFFSET_FORMAT("ScreenEdit", "Beat0OffsetFormat");
|
static ThemeMetric<RString> BEAT_0_OFFSET_FORMAT("ScreenEdit", "Beat0OffsetFormat");
|
||||||
static ThemeMetric<RString> PREVIEW_START_FORMAT("ScreenEdit", "PreviewStartFormat");
|
static ThemeMetric<RString> PREVIEW_START_FORMAT("ScreenEdit", "PreviewStartFormat");
|
||||||
@@ -1259,15 +1267,53 @@ void ScreenEdit::UpdateTextInfo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
GAMESTATE->SetProcessedTimingData(&m_pSteps->m_Timing);
|
GAMESTATE->SetProcessedTimingData(&m_pSteps->m_Timing);
|
||||||
|
const StepsTypeCategory &cat = GAMEMAN->GetStepsTypeInfo(m_pSteps->m_StepsType).m_StepsTypeCategory;
|
||||||
sText += ssprintf( NUM_STEPS_FORMAT.GetValue(), TAP_STEPS.GetValue().c_str(), m_NoteDataEdit.GetNumTapNotes() );
|
if (cat == StepsTypeCategory_Couple || cat == StepsTypeCategory_Routine)
|
||||||
sText += ssprintf( NUM_JUMPS_FORMAT.GetValue(), JUMPS.GetValue().c_str(), m_NoteDataEdit.GetNumJumps() );
|
{
|
||||||
sText += ssprintf( NUM_HANDS_FORMAT.GetValue(), HANDS.GetValue().c_str(), m_NoteDataEdit.GetNumHands() );
|
pair<int, int> tmp = m_NoteDataEdit.GetNumTapNotesTwoPlayer();
|
||||||
sText += ssprintf( NUM_HOLDS_FORMAT.GetValue(), HOLDS.GetValue().c_str(), m_NoteDataEdit.GetNumHoldNotes() );
|
sText += ssprintf(NUM_STEPS_FORMAT_TWO_PLAYER.GetValue(),
|
||||||
sText += ssprintf( NUM_MINES_FORMAT.GetValue(), MINES.GetValue().c_str(), m_NoteDataEdit.GetNumMines() );
|
TAP_STEPS.GetValue().c_str(),
|
||||||
sText += ssprintf( NUM_ROLLS_FORMAT.GetValue(), ROLLS.GetValue().c_str(), m_NoteDataEdit.GetNumRolls() );
|
tmp.first, tmp.second);
|
||||||
sText += ssprintf( NUM_LIFTS_FORMAT.GetValue(), LIFTS.GetValue().c_str(), m_NoteDataEdit.GetNumLifts() );
|
tmp = m_NoteDataEdit.GetNumJumpsTwoPlayer();
|
||||||
sText += ssprintf( NUM_FAKES_FORMAT.GetValue(), FAKES.GetValue().c_str(), m_NoteDataEdit.GetNumFakes() );
|
sText += ssprintf(NUM_JUMPS_FORMAT_TWO_PLAYER.GetValue(),
|
||||||
|
JUMPS.GetValue().c_str(),
|
||||||
|
tmp.first, tmp.second);
|
||||||
|
tmp = m_NoteDataEdit.GetNumHandsTwoPlayer();
|
||||||
|
sText += ssprintf(NUM_HANDS_FORMAT_TWO_PLAYER.GetValue(),
|
||||||
|
HANDS.GetValue().c_str(),
|
||||||
|
tmp.first, tmp.second);
|
||||||
|
tmp = m_NoteDataEdit.GetNumHoldNotesTwoPlayer();
|
||||||
|
sText += ssprintf(NUM_HOLDS_FORMAT_TWO_PLAYER.GetValue(),
|
||||||
|
HOLDS.GetValue().c_str(),
|
||||||
|
tmp.first, tmp.second);
|
||||||
|
tmp = m_NoteDataEdit.GetNumMinesTwoPlayer();
|
||||||
|
sText += ssprintf(NUM_MINES_FORMAT_TWO_PLAYER.GetValue(),
|
||||||
|
MINES.GetValue().c_str(),
|
||||||
|
tmp.first, tmp.second);
|
||||||
|
tmp = m_NoteDataEdit.GetNumRollsTwoPlayer();
|
||||||
|
sText += ssprintf(NUM_ROLLS_FORMAT_TWO_PLAYER.GetValue(),
|
||||||
|
ROLLS.GetValue().c_str(),
|
||||||
|
tmp.first, tmp.second);
|
||||||
|
tmp = m_NoteDataEdit.GetNumLiftsTwoPlayer();
|
||||||
|
sText += ssprintf(NUM_LIFTS_FORMAT_TWO_PLAYER.GetValue(),
|
||||||
|
LIFTS.GetValue().c_str(),
|
||||||
|
tmp.first, tmp.second);
|
||||||
|
tmp = m_NoteDataEdit.GetNumFakesTwoPlayer();
|
||||||
|
sText += ssprintf(NUM_FAKES_FORMAT_TWO_PLAYER.GetValue(),
|
||||||
|
FAKES.GetValue().c_str(),
|
||||||
|
tmp.first, tmp.second);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sText += ssprintf( NUM_STEPS_FORMAT.GetValue(), TAP_STEPS.GetValue().c_str(), m_NoteDataEdit.GetNumTapNotes() );
|
||||||
|
sText += ssprintf( NUM_JUMPS_FORMAT.GetValue(), JUMPS.GetValue().c_str(), m_NoteDataEdit.GetNumJumps() );
|
||||||
|
sText += ssprintf( NUM_HANDS_FORMAT.GetValue(), HANDS.GetValue().c_str(), m_NoteDataEdit.GetNumHands() );
|
||||||
|
sText += ssprintf( NUM_HOLDS_FORMAT.GetValue(), HOLDS.GetValue().c_str(), m_NoteDataEdit.GetNumHoldNotes() );
|
||||||
|
sText += ssprintf( NUM_MINES_FORMAT.GetValue(), MINES.GetValue().c_str(), m_NoteDataEdit.GetNumMines() );
|
||||||
|
sText += ssprintf( NUM_ROLLS_FORMAT.GetValue(), ROLLS.GetValue().c_str(), m_NoteDataEdit.GetNumRolls() );
|
||||||
|
sText += ssprintf( NUM_LIFTS_FORMAT.GetValue(), LIFTS.GetValue().c_str(), m_NoteDataEdit.GetNumLifts() );
|
||||||
|
sText += ssprintf( NUM_FAKES_FORMAT.GetValue(), FAKES.GetValue().c_str(), m_NoteDataEdit.GetNumFakes() );
|
||||||
|
}
|
||||||
switch( EDIT_MODE.GetValue() )
|
switch( EDIT_MODE.GetValue() )
|
||||||
{
|
{
|
||||||
DEFAULT_FAIL( EDIT_MODE.GetValue() );
|
DEFAULT_FAIL( EDIT_MODE.GetValue() );
|
||||||
@@ -3738,15 +3784,41 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
|
|||||||
case view_steps_data:
|
case view_steps_data:
|
||||||
{
|
{
|
||||||
float fMusicSeconds = m_pSoundMusic->GetLengthSeconds();
|
float fMusicSeconds = m_pSoundMusic->GetLengthSeconds();
|
||||||
g_StepsData.rows[tap_notes].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumTapNotes()) );
|
Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||||
g_StepsData.rows[jumps].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumJumps()) );
|
const StepsTypeCategory &cat = GAMEMAN->GetStepsTypeInfo(pSteps->m_StepsType).m_StepsTypeCategory;
|
||||||
g_StepsData.rows[hands].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumHands()) );
|
if (cat == StepsTypeCategory_Couple || cat == StepsTypeCategory_Routine)
|
||||||
g_StepsData.rows[quads].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumQuads()) );
|
{
|
||||||
g_StepsData.rows[holds].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumHoldNotes()) );
|
pair<int, int> tmp = m_NoteDataEdit.GetNumTapNotesTwoPlayer();
|
||||||
g_StepsData.rows[mines].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumMines()) );
|
g_StepsData.rows[tap_notes].SetOneUnthemedChoice( ssprintf("%d / %d", tmp.first, tmp.second) );
|
||||||
g_StepsData.rows[rolls].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumRolls()) );
|
tmp = m_NoteDataEdit.GetNumJumpsTwoPlayer();
|
||||||
g_StepsData.rows[lifts].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumLifts()) );
|
g_StepsData.rows[jumps].SetOneUnthemedChoice( ssprintf("%d / %d", tmp.first, tmp.second) );
|
||||||
g_StepsData.rows[fakes].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumFakes()) );
|
tmp = m_NoteDataEdit.GetNumHandsTwoPlayer();
|
||||||
|
g_StepsData.rows[hands].SetOneUnthemedChoice( ssprintf("%d / %d", tmp.first, tmp.second) );
|
||||||
|
tmp = m_NoteDataEdit.GetNumQuadsTwoPlayer();
|
||||||
|
g_StepsData.rows[quads].SetOneUnthemedChoice( ssprintf("%d / %d", tmp.first, tmp.second) );
|
||||||
|
tmp = m_NoteDataEdit.GetNumHoldNotesTwoPlayer();
|
||||||
|
g_StepsData.rows[holds].SetOneUnthemedChoice( ssprintf("%d / %d", tmp.first, tmp.second) );
|
||||||
|
tmp = m_NoteDataEdit.GetNumMinesTwoPlayer();
|
||||||
|
g_StepsData.rows[mines].SetOneUnthemedChoice( ssprintf("%d / %d", tmp.first, tmp.second) );
|
||||||
|
tmp = m_NoteDataEdit.GetNumRollsTwoPlayer();
|
||||||
|
g_StepsData.rows[rolls].SetOneUnthemedChoice( ssprintf("%d / %d", tmp.first, tmp.second) );
|
||||||
|
tmp = m_NoteDataEdit.GetNumLiftsTwoPlayer();
|
||||||
|
g_StepsData.rows[lifts].SetOneUnthemedChoice( ssprintf("%d / %d", tmp.first, tmp.second) );
|
||||||
|
tmp = m_NoteDataEdit.GetNumFakesTwoPlayer();
|
||||||
|
g_StepsData.rows[fakes].SetOneUnthemedChoice( ssprintf("%d / %d", tmp.first, tmp.second) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_StepsData.rows[tap_notes].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumTapNotes()) );
|
||||||
|
g_StepsData.rows[jumps].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumJumps()) );
|
||||||
|
g_StepsData.rows[hands].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumHands()) );
|
||||||
|
g_StepsData.rows[quads].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumQuads()) );
|
||||||
|
g_StepsData.rows[holds].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumHoldNotes()) );
|
||||||
|
g_StepsData.rows[mines].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumMines()) );
|
||||||
|
g_StepsData.rows[rolls].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumRolls()) );
|
||||||
|
g_StepsData.rows[lifts].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumLifts()) );
|
||||||
|
g_StepsData.rows[fakes].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumFakes()) );
|
||||||
|
}
|
||||||
g_StepsData.rows[stream].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetStreamRadarValue(m_NoteDataEdit,fMusicSeconds)) );
|
g_StepsData.rows[stream].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetStreamRadarValue(m_NoteDataEdit,fMusicSeconds)) );
|
||||||
g_StepsData.rows[voltage].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetVoltageRadarValue(m_NoteDataEdit,fMusicSeconds)) );
|
g_StepsData.rows[voltage].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetVoltageRadarValue(m_NoteDataEdit,fMusicSeconds)) );
|
||||||
g_StepsData.rows[air].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetAirRadarValue(m_NoteDataEdit,fMusicSeconds)) );
|
g_StepsData.rows[air].SetOneUnthemedChoice( ssprintf("%.2f", NoteDataUtil::GetAirRadarValue(m_NoteDataEdit,fMusicSeconds)) );
|
||||||
@@ -5123,7 +5195,7 @@ void ScreenEdit::DoHelp()
|
|||||||
RString sDescription = THEME->GetString( "EditHelpDescription", hl.szEnglishDescription );
|
RString sDescription = THEME->GetString( "EditHelpDescription", hl.szEnglishDescription );
|
||||||
|
|
||||||
// TODO: Better way of hiding routine only key on non-routine.
|
// TODO: Better way of hiding routine only key on non-routine.
|
||||||
if( sDescription.Left(13) == "Switch player" && m_InputPlayerNumber == PLAYER_INVALID )
|
if( hl.veb[0] == EDIT_BUTTON_SWITCH_PLAYERS && m_InputPlayerNumber == PLAYER_INVALID )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,153 +0,0 @@
|
|||||||
#include "global.h"
|
|
||||||
#include "ScreenTestFonts.h"
|
|
||||||
#include "FontManager.h"
|
|
||||||
#include "RageTextureManager.h"
|
|
||||||
#include "ScreenTextEntry.h"
|
|
||||||
#include "ScreenDimensions.h"
|
|
||||||
#include "InputEventPlus.h"
|
|
||||||
#include "RageUtil.h"
|
|
||||||
|
|
||||||
|
|
||||||
static const float LineWidth = 400;
|
|
||||||
static const float LineHeight = 50;
|
|
||||||
|
|
||||||
/** @brief A quick way of getting a font metric. */
|
|
||||||
#define FONT( i ) THEME->GetMetric (m_sName,ssprintf("Font%i",i))
|
|
||||||
/** @brief A quick way of getting a particular string. */
|
|
||||||
#define TEXT( i ) THEME->GetString (m_sName,ssprintf("Text%i",i))
|
|
||||||
|
|
||||||
static RString g_sCustomText;
|
|
||||||
|
|
||||||
static void ChangeText( const RString &sText )
|
|
||||||
{
|
|
||||||
g_sCustomText = sText;
|
|
||||||
}
|
|
||||||
|
|
||||||
AutoScreenMessage( SM_ChangeText );
|
|
||||||
|
|
||||||
void ScreenTestFonts::HandleScreenMessage( const ScreenMessage SM )
|
|
||||||
{
|
|
||||||
if( SM == ScreenMessage(SM_ChangeText) )
|
|
||||||
SetText( g_sCustomText );
|
|
||||||
}
|
|
||||||
|
|
||||||
REGISTER_SCREEN_CLASS( ScreenTestFonts );
|
|
||||||
|
|
||||||
void ScreenTestFonts::Init()
|
|
||||||
{
|
|
||||||
Screen::Init();
|
|
||||||
|
|
||||||
Hline.SetXY(SCREEN_CENTER_X, SCREEN_CENTER_Y);
|
|
||||||
Hline.SetZoomX(LineWidth);
|
|
||||||
Hline.SetDiffuse( RageColor(1, 1, 1, 1) );
|
|
||||||
this->AddChild(&Hline);
|
|
||||||
|
|
||||||
Vline.SetXY(SCREEN_CENTER_X, SCREEN_CENTER_Y);
|
|
||||||
Vline.SetZoomY(LineHeight);
|
|
||||||
Vline.SetDiffuse( RageColor(0, 1, 0, .8f) );
|
|
||||||
this->AddChild(&Vline);
|
|
||||||
|
|
||||||
font.SetXY( SCREEN_CENTER_X, SCREEN_CENTER_Y+100 );
|
|
||||||
font.LoadFromFont( THEME->GetPathF("Common", "normal") );
|
|
||||||
font.SetZoom(.5f);
|
|
||||||
this->AddChild(&font);
|
|
||||||
|
|
||||||
txt.SetName( "Text" );
|
|
||||||
SetFont( THEME->GetPathF("", FONT(1)) );
|
|
||||||
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( txt );
|
|
||||||
SetText( "Foo" );
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenTestFonts::SetText( RString sText )
|
|
||||||
{
|
|
||||||
txt.SetShadowLength( 0 );
|
|
||||||
txt.SetText( "" ); /* force it */
|
|
||||||
txt.SetText( sText );
|
|
||||||
m_sCurText = sText;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenTestFonts::SetFont( RString sFont )
|
|
||||||
{
|
|
||||||
m_sFont = sFont;
|
|
||||||
|
|
||||||
txt.LoadFromFont( m_sFont );
|
|
||||||
font.SetText( m_sFont );
|
|
||||||
/* The font changed, so we need to reset the text or it'll be
|
|
||||||
* misaligned. */
|
|
||||||
SetText( m_sCurText );
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenTestFonts::DrawPrimitives()
|
|
||||||
{
|
|
||||||
Screen::DrawPrimitives();
|
|
||||||
|
|
||||||
/* Draw this manually, so we can breakpoint here. */
|
|
||||||
txt.Draw();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ScreenTestFonts::Input( const InputEventPlus &input )
|
|
||||||
{
|
|
||||||
if( input.type != IET_FIRST_PRESS )
|
|
||||||
return;
|
|
||||||
switch( input.DeviceI.button )
|
|
||||||
{
|
|
||||||
case '[': txt.SetVertAlign( align_bottom ); break;
|
|
||||||
case '\\': txt.SetVertAlign( align_middle ); break;
|
|
||||||
case ']': txt.SetVertAlign( align_top ); break;
|
|
||||||
|
|
||||||
case ',': txt.SetHorizAlign( align_left ); break;
|
|
||||||
case '.': txt.SetHorizAlign( align_center ); break;
|
|
||||||
case '/': txt.SetHorizAlign( align_right ); break;
|
|
||||||
|
|
||||||
case '`': if( m_sCurText != g_sCustomText )
|
|
||||||
SetText( g_sCustomText );
|
|
||||||
else
|
|
||||||
ScreenTextEntry::TextEntry( SM_ChangeText, "Edit text.", g_sCustomText, 100, NULL, ChangeText, NULL);
|
|
||||||
break;
|
|
||||||
case '1': SetText( TEXT(1) ); break;
|
|
||||||
case '2': SetText( TEXT(2) ); break;
|
|
||||||
case '3': SetText( TEXT(3) ); break;
|
|
||||||
case '4': SetText( TEXT(4) ); break;
|
|
||||||
case '5': SetText( TEXT(5) ); break;
|
|
||||||
|
|
||||||
case 'q': SetFont( THEME->GetPathF("", FONT(1)) ); break;
|
|
||||||
case 'w': SetFont( THEME->GetPathF("", FONT(2)) ); break;
|
|
||||||
case 'e': SetFont( THEME->GetPathF("", FONT(3)) ); break;
|
|
||||||
case 'r': SetFont( THEME->GetPathF("", FONT(4)) ); break;
|
|
||||||
case 't': SetFont( THEME->GetPathF("", FONT(5)) ); break;
|
|
||||||
|
|
||||||
case 'a': SetFont( THEME->GetPathF("", FONT(1)) ); break;
|
|
||||||
|
|
||||||
case 'z': FONT->ReloadFonts();
|
|
||||||
TEXTUREMAN->ReloadAll();
|
|
||||||
SetText( m_sCurText );
|
|
||||||
SetFont( m_sFont );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) 2003-2005 Glenn Maynard
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
* copy of this software and associated documentation files (the
|
|
||||||
* "Software"), to deal in the Software without restriction, including
|
|
||||||
* without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
||||||
* whom the Software is furnished to do so, provided that the above
|
|
||||||
* copyright notice(s) and this permission notice appear in all copies of
|
|
||||||
* the Software and that both the above copyright notice(s) and this
|
|
||||||
* permission notice appear in supporting documentation.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
||||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
||||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
||||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
||||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
||||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
#ifndef SCREEN_TEST_FONTS_H
|
|
||||||
#define SCREEN_TEST_FONTS_H
|
|
||||||
|
|
||||||
#include "Screen.h"
|
|
||||||
#include "BitmapText.h"
|
|
||||||
#include "Quad.h"
|
|
||||||
|
|
||||||
/** @brief Display and test fonts. */
|
|
||||||
class ScreenTestFonts: public Screen
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void Init();
|
|
||||||
|
|
||||||
void Input( const InputEventPlus &input );
|
|
||||||
void DrawPrimitives();
|
|
||||||
void HandleScreenMessage( const ScreenMessage SM );
|
|
||||||
|
|
||||||
private:
|
|
||||||
void SetText( RString sText );
|
|
||||||
void SetFont( RString sFont );
|
|
||||||
|
|
||||||
/** @brief The current text to display. */
|
|
||||||
RString m_sCurText;
|
|
||||||
/** @brief The current font in use. */
|
|
||||||
RString m_sFont;
|
|
||||||
BitmapText txt, font;
|
|
||||||
Quad Vline, Hline;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (c) 2003-2005 Glenn Maynard
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
* copy of this software and associated documentation files (the
|
|
||||||
* "Software"), to deal in the Software without restriction, including
|
|
||||||
* without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
||||||
* whom the Software is furnished to do so, provided that the above
|
|
||||||
* copyright notice(s) and this permission notice appear in all copies of
|
|
||||||
* the Software and that both the above copyright notice(s) and this
|
|
||||||
* permission notice appear in supporting documentation.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
||||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
||||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
||||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
||||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
||||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
@@ -1055,14 +1055,6 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Test"
|
Name="Test"
|
||||||
>
|
>
|
||||||
<File
|
|
||||||
RelativePath="ScreenTestFonts.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="ScreenTestFonts.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="ScreenTestInput.cpp"
|
RelativePath="ScreenTestInput.cpp"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -420,7 +420,6 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)</Command>
|
|||||||
<ClCompile Include="ScreenStatsOverlay.cpp" />
|
<ClCompile Include="ScreenStatsOverlay.cpp" />
|
||||||
<ClCompile Include="ScreenSyncOverlay.cpp" />
|
<ClCompile Include="ScreenSyncOverlay.cpp" />
|
||||||
<ClCompile Include="ScreenSystemLayer.cpp" />
|
<ClCompile Include="ScreenSystemLayer.cpp" />
|
||||||
<ClCompile Include="ScreenTestFonts.cpp" />
|
|
||||||
<ClCompile Include="ScreenTestInput.cpp" />
|
<ClCompile Include="ScreenTestInput.cpp" />
|
||||||
<ClCompile Include="ScreenTestLights.cpp" />
|
<ClCompile Include="ScreenTestLights.cpp" />
|
||||||
<ClCompile Include="ScreenTestSound.cpp" />
|
<ClCompile Include="ScreenTestSound.cpp" />
|
||||||
@@ -1740,7 +1739,6 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)</Command>
|
|||||||
<ClInclude Include="ScreenStatsOverlay.h" />
|
<ClInclude Include="ScreenStatsOverlay.h" />
|
||||||
<ClInclude Include="ScreenSyncOverlay.h" />
|
<ClInclude Include="ScreenSyncOverlay.h" />
|
||||||
<ClInclude Include="ScreenSystemLayer.h" />
|
<ClInclude Include="ScreenSystemLayer.h" />
|
||||||
<ClInclude Include="ScreenTestFonts.h" />
|
|
||||||
<ClInclude Include="ScreenTestInput.h" />
|
<ClInclude Include="ScreenTestInput.h" />
|
||||||
<ClInclude Include="ScreenTestLights.h" />
|
<ClInclude Include="ScreenTestLights.h" />
|
||||||
<ClInclude Include="ScreenTestSound.h" />
|
<ClInclude Include="ScreenTestSound.h" />
|
||||||
|
|||||||
@@ -264,9 +264,6 @@
|
|||||||
<ClCompile Include="ScreenSystemLayer.cpp">
|
<ClCompile Include="ScreenSystemLayer.cpp">
|
||||||
<Filter>Screens</Filter>
|
<Filter>Screens</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="ScreenTestFonts.cpp">
|
|
||||||
<Filter>Screens</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="ScreenTestInput.cpp">
|
<ClCompile Include="ScreenTestInput.cpp">
|
||||||
<Filter>Screens</Filter>
|
<Filter>Screens</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -1781,9 +1778,6 @@
|
|||||||
<ClInclude Include="ScreenSystemLayer.h">
|
<ClInclude Include="ScreenSystemLayer.h">
|
||||||
<Filter>Screens</Filter>
|
<Filter>Screens</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="ScreenTestFonts.h">
|
|
||||||
<Filter>Screens</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="ScreenTestInput.h">
|
<ClInclude Include="ScreenTestInput.h">
|
||||||
<Filter>Screens</Filter>
|
<Filter>Screens</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|||||||
+2
-4
@@ -9,14 +9,12 @@
|
|||||||
|
|
||||||
|
|
||||||
TimingData::TimingData() :
|
TimingData::TimingData() :
|
||||||
m_fBeat0OffsetInSeconds(0),
|
m_fBeat0OffsetInSeconds(0)
|
||||||
m_bHasNegativeBpms(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
TimingData::TimingData(float fOffset) :
|
TimingData::TimingData(float fOffset) :
|
||||||
m_fBeat0OffsetInSeconds(fOffset),
|
m_fBeat0OffsetInSeconds(fOffset)
|
||||||
m_bHasNegativeBpms(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-7
@@ -1395,17 +1395,11 @@ public:
|
|||||||
vector<ScrollSegment> m_ScrollSegments;
|
vector<ScrollSegment> m_ScrollSegments;
|
||||||
/** @brief The collection of FakeSegments. */
|
/** @brief The collection of FakeSegments. */
|
||||||
vector<FakeSegment> m_FakeSegments;
|
vector<FakeSegment> m_FakeSegments;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The initial offset of a song.
|
* @brief The initial offset of a song.
|
||||||
*/
|
*/
|
||||||
float m_fBeat0OffsetInSeconds;
|
float m_fBeat0OffsetInSeconds;
|
||||||
/**
|
|
||||||
* @brief A flag to see if negative BPMs are used in this song.
|
|
||||||
*
|
|
||||||
* This is only used for Lua bindings in the Song, with the intentions that
|
|
||||||
* this is moved into TimingData at a future point in time.
|
|
||||||
*/
|
|
||||||
bool m_bHasNegativeBpms;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef COMPARE
|
#undef COMPARE
|
||||||
|
|||||||
+10
-10
@@ -3,31 +3,31 @@
|
|||||||
|
|
||||||
#define LTCOMPARE(x) if(this->x < other.x) return true; if(this->x > other.x) return false;
|
#define LTCOMPARE(x) if(this->x < other.x) return true; if(this->x > other.x) return false;
|
||||||
|
|
||||||
BaseTimingSegment::~BaseTimingSegment() {}
|
TimingSegment::~TimingSegment() {}
|
||||||
|
|
||||||
void BaseTimingSegment::SetRow(const int s)
|
void TimingSegment::SetRow(const int s)
|
||||||
{
|
{
|
||||||
this->startingRow = s;
|
this->startingRow = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseTimingSegment::SetBeat(const float s)
|
void TimingSegment::SetBeat(const float s)
|
||||||
{
|
{
|
||||||
SetRow(BeatToNoteRow(s));
|
SetRow(BeatToNoteRow(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
int BaseTimingSegment::GetRow() const
|
int TimingSegment::GetRow() const
|
||||||
{
|
{
|
||||||
return this->startingRow;
|
return this->startingRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
float BaseTimingSegment::GetBeat() const
|
float TimingSegment::GetBeat() const
|
||||||
{
|
{
|
||||||
return NoteRowToBeat(GetRow());
|
return NoteRowToBeat(GetRow());
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseTimingSegment::Scale( int start, int length, int newLength )
|
void TimingSegment::Scale( int start, int length, int newLength )
|
||||||
{
|
{
|
||||||
SetRow( ScalePosition( start, length, newLength, GetRow() ) );
|
SetRow( ScalePosition( start, length, newLength, this->GetRow() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ void FakeSegment::Scale( int start, int length, int newLength )
|
|||||||
float newStartBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), startBeat );
|
float newStartBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), startBeat );
|
||||||
float newEndBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), endBeat );
|
float newEndBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), endBeat );
|
||||||
SetLength( newEndBeat - newStartBeat );
|
SetLength( newEndBeat - newStartBeat );
|
||||||
TimingSegment<FakeSegment>::Scale( start, length, newLength );
|
TimingSegment::Scale( start, length, newLength );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FakeSegment::operator<( const FakeSegment &other ) const
|
bool FakeSegment::operator<( const FakeSegment &other ) const
|
||||||
@@ -82,7 +82,7 @@ void WarpSegment::Scale( int start, int length, int newLength )
|
|||||||
float newStartBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), startBeat );
|
float newStartBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), startBeat );
|
||||||
float newEndBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), endBeat );
|
float newEndBeat = ScalePosition( NoteRowToBeat(start), NoteRowToBeat(length), NoteRowToBeat(newLength), endBeat );
|
||||||
SetLength( newEndBeat - newStartBeat );
|
SetLength( newEndBeat - newStartBeat );
|
||||||
TimingSegment<WarpSegment>::Scale( start, length, newLength );
|
TimingSegment::Scale( start, length, newLength );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WarpSegment::operator<( const WarpSegment &other ) const
|
bool WarpSegment::operator<( const WarpSegment &other ) const
|
||||||
@@ -278,7 +278,7 @@ void SpeedSegment::Scale( int start, int oldLength, int newLength )
|
|||||||
endBeat);
|
endBeat);
|
||||||
SetLength( newEndBeat - newStartBeat );
|
SetLength( newEndBeat - newStartBeat );
|
||||||
}
|
}
|
||||||
TimingSegment<SpeedSegment>::Scale( start, oldLength, newLength );
|
TimingSegment::Scale( start, oldLength, newLength );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SpeedSegment::operator<( const SpeedSegment &other ) const
|
bool SpeedSegment::operator<( const SpeedSegment &other ) const
|
||||||
|
|||||||
+108
-87
@@ -3,29 +3,44 @@
|
|||||||
|
|
||||||
#include "NoteTypes.h" // Converting rows to beats and vice~versa.
|
#include "NoteTypes.h" // Converting rows to beats and vice~versa.
|
||||||
|
|
||||||
|
enum TimingSegmentType
|
||||||
|
{
|
||||||
|
SEGMENT_BPM,
|
||||||
|
SEGMENT_STOP_DELAY,
|
||||||
|
// uncomment the below two when stops and delays don't share one.
|
||||||
|
// SEGMENT_STOP,
|
||||||
|
// SEGMENT_DELAY,
|
||||||
|
SEGMENT_TIME_SIG,
|
||||||
|
SEGMENT_WARP,
|
||||||
|
SEGMENT_LABEL,
|
||||||
|
SEGMENT_TICKCOUNT,
|
||||||
|
SEGMENT_COMBO,
|
||||||
|
SEGMENT_SPEED,
|
||||||
|
SEGMENT_SCROLL,
|
||||||
|
SEGMENT_FAKE,
|
||||||
|
NUM_TimingSegmentTypes
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The base timing segment for all of the changing glory.
|
* @brief The base timing segment for all of the changing glory.
|
||||||
*
|
|
||||||
* Do not derive from this class!! Instead, derive from TimingSegment<DerivedClass>!
|
|
||||||
*/
|
*/
|
||||||
struct BaseTimingSegment
|
struct TimingSegment
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @brief Set up a BaseTimingSegment with default values. */
|
/** @brief Set up a TimingSegment with default values. */
|
||||||
BaseTimingSegment():
|
TimingSegment():
|
||||||
startingRow(-1) {};
|
startingRow(-1) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set up a BaseTimingSegment with specified values.
|
* @brief Set up a TimingSegment with specified values.
|
||||||
* @param s the starting row / beat. */
|
* @param s the starting row / beat. */
|
||||||
BaseTimingSegment(int s): startingRow(ToNoteRow(s)) {}
|
TimingSegment(int s): startingRow(ToNoteRow(s)) {}
|
||||||
BaseTimingSegment(float s): startingRow(ToNoteRow(s)) {}
|
TimingSegment(float s): startingRow(ToNoteRow(s)) {}
|
||||||
|
|
||||||
template <class DerivedSegment>
|
TimingSegment(const TimingSegment &other):
|
||||||
BaseTimingSegment(const DerivedSegment &other):
|
|
||||||
startingRow(other.GetRow()) {};
|
startingRow(other.GetRow()) {};
|
||||||
|
|
||||||
virtual ~BaseTimingSegment();
|
virtual ~TimingSegment();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Scales itself.
|
* @brief Scales itself.
|
||||||
@@ -59,25 +74,7 @@ struct BaseTimingSegment
|
|||||||
* @return the starting beat. */
|
* @return the starting beat. */
|
||||||
float GetBeat() const;
|
float GetBeat() const;
|
||||||
|
|
||||||
private:
|
virtual TimingSegmentType GetType() const = 0;
|
||||||
/** @brief The row in which this segment activates. */
|
|
||||||
int startingRow;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief The general TimingSegment for all of the changing glory.
|
|
||||||
*
|
|
||||||
* Each segment is supposed to derive from this one. */
|
|
||||||
template <class DerivedSegment>
|
|
||||||
struct TimingSegment: public BaseTimingSegment
|
|
||||||
{
|
|
||||||
|
|
||||||
TimingSegment(): BaseTimingSegment(-1) {};
|
|
||||||
TimingSegment(const DerivedSegment &other): BaseTimingSegment(other) {};
|
|
||||||
|
|
||||||
template <typename StartType>
|
|
||||||
TimingSegment(StartType s): BaseTimingSegment(s) {};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Compares two DrivedSegments to see if one is less than the other.
|
* @brief Compares two DrivedSegments to see if one is less than the other.
|
||||||
@@ -87,7 +84,7 @@ struct TimingSegment: public BaseTimingSegment
|
|||||||
* This is virtual to allow other segments to implement comparison
|
* This is virtual to allow other segments to implement comparison
|
||||||
* as required by them.
|
* as required by them.
|
||||||
*/
|
*/
|
||||||
virtual bool operator<( const DerivedSegment &other ) const
|
bool operator<( const TimingSegment &other ) const
|
||||||
{
|
{
|
||||||
return this->GetRow() < other.GetRow();
|
return this->GetRow() < other.GetRow();
|
||||||
};
|
};
|
||||||
@@ -100,38 +97,45 @@ struct TimingSegment: public BaseTimingSegment
|
|||||||
* This is virtual to allow other segments to implement comparison
|
* This is virtual to allow other segments to implement comparison
|
||||||
* as required by them.
|
* as required by them.
|
||||||
*/
|
*/
|
||||||
bool operator==( const DerivedSegment &other ) const
|
bool operator==( const TimingSegment &other ) const
|
||||||
{
|
{
|
||||||
return !this->operator<(other) &&
|
return !this->operator<(other) &&
|
||||||
!other.operator<(*static_cast<const DerivedSegment *>(this));
|
!other.operator<(*static_cast<const TimingSegment *>(this));
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @brief Compares two DrivedSegments to see if they are not equal to each other.
|
* @brief Compares two DrivedSegments to see if they are not equal to each other.
|
||||||
* @param other the other DrivedSegments to compare to.
|
* @param other the other DrivedSegments to compare to.
|
||||||
* @return the inequality of the two segments.
|
* @return the inequality of the two segments.
|
||||||
*/
|
*/
|
||||||
bool operator!=( const DerivedSegment &other ) const { return !this->operator==(other); };
|
bool operator!=( const TimingSegment &other ) const { return !this->operator==(other); };
|
||||||
/**
|
/**
|
||||||
* @brief Compares two DrivedSegments to see if one is less than or equal to the other.
|
* @brief Compares two DrivedSegments to see if one is less than or equal to the other.
|
||||||
* @param other the other DrivedSegments to compare to.
|
* @param other the other DrivedSegments to compare to.
|
||||||
* @return the truth/falsehood of if the first is less or equal to than the second.
|
* @return the truth/falsehood of if the first is less or equal to than the second.
|
||||||
*/
|
*/
|
||||||
bool operator<=( const DerivedSegment &other ) const { return !this->operator>(other); };
|
bool operator<=( const TimingSegment &other ) const { return !this->operator>(other); };
|
||||||
/**
|
/**
|
||||||
* @brief Compares two DrivedSegments to see if one is greater than the other.
|
* @brief Compares two DrivedSegments to see if one is greater than the other.
|
||||||
* @param other the other DrivedSegments to compare to.
|
* @param other the other DrivedSegments to compare to.
|
||||||
* @return the truth/falsehood of if the first is greater than the second.
|
* @return the truth/falsehood of if the first is greater than the second.
|
||||||
*/
|
*/
|
||||||
bool operator>( const DerivedSegment &other ) const
|
bool operator>( const TimingSegment &other ) const
|
||||||
{
|
{
|
||||||
return other.operator<(*static_cast<const DerivedSegment *>(this));
|
return other.operator<(*static_cast<const TimingSegment *>(this));
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @brief Compares two DrivedSegments to see if one is greater than or equal to the other.
|
* @brief Compares two DrivedSegments to see if one is greater than or equal to the other.
|
||||||
* @param other the other DrivedSegments to compare to.
|
* @param other the other DrivedSegments to compare to.
|
||||||
* @return the truth/falsehood of if the first is greater than or equal to the second.
|
* @return the truth/falsehood of if the first is greater than or equal to the second.
|
||||||
*/
|
*/
|
||||||
bool operator>=( const DerivedSegment &other ) const { return !this->operator<(other); };
|
bool operator>=( const TimingSegment &other ) const { return !this->operator<(other); };
|
||||||
|
|
||||||
|
private:
|
||||||
|
/** @brief The row in which this segment activates. */
|
||||||
|
int startingRow;
|
||||||
|
|
||||||
|
/** @brief The specific type of segment this is. */
|
||||||
|
TimingSegmentType segType;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -147,7 +151,7 @@ struct TimingSegment: public BaseTimingSegment
|
|||||||
* drawn normally.
|
* drawn normally.
|
||||||
*
|
*
|
||||||
* These were inspired by the Pump It Up series. */
|
* These were inspired by the Pump It Up series. */
|
||||||
struct FakeSegment : public TimingSegment<FakeSegment>
|
struct FakeSegment : public TimingSegment
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Create a simple Fake Segment with default values.
|
* @brief Create a simple Fake Segment with default values.
|
||||||
@@ -155,14 +159,14 @@ struct FakeSegment : public TimingSegment<FakeSegment>
|
|||||||
* It is best to override the values as soon as possible.
|
* It is best to override the values as soon as possible.
|
||||||
*/
|
*/
|
||||||
FakeSegment():
|
FakeSegment():
|
||||||
TimingSegment<FakeSegment>(-1), lengthBeats(-1) {};
|
TimingSegment(-1), lengthBeats(-1) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create a copy of another Fake Segment.
|
* @brief Create a copy of another Fake Segment.
|
||||||
* @param other the other fake segment
|
* @param other the other fake segment
|
||||||
*/
|
*/
|
||||||
FakeSegment(const FakeSegment &other):
|
FakeSegment(const FakeSegment &other):
|
||||||
TimingSegment<FakeSegment>(other),
|
TimingSegment(other.GetRow()),
|
||||||
lengthBeats(other.GetLength()) {};
|
lengthBeats(other.GetLength()) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -172,7 +176,7 @@ struct FakeSegment : public TimingSegment<FakeSegment>
|
|||||||
*/
|
*/
|
||||||
template <typename StartType, typename LengthType>
|
template <typename StartType, typename LengthType>
|
||||||
FakeSegment( StartType s, LengthType r ):
|
FakeSegment( StartType s, LengthType r ):
|
||||||
TimingSegment<FakeSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
lengthBeats(ToBeat(max((LengthType)0, r))) {};
|
lengthBeats(ToBeat(max((LengthType)0, r))) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -194,6 +198,8 @@ struct FakeSegment : public TimingSegment<FakeSegment>
|
|||||||
*/
|
*/
|
||||||
bool operator<( const FakeSegment &other ) const;
|
bool operator<( const FakeSegment &other ) const;
|
||||||
|
|
||||||
|
TimingSegmentType GetType() const { return SEGMENT_FAKE; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief The number of beats the FakeSegment is alive for.
|
* @brief The number of beats the FakeSegment is alive for.
|
||||||
@@ -208,7 +214,7 @@ private:
|
|||||||
* abusing negative BPMs. Negative BPMs should be converted to warp segments.
|
* abusing negative BPMs. Negative BPMs should be converted to warp segments.
|
||||||
* WarpAt=WarpToRelative is the format, where both are in beats.
|
* WarpAt=WarpToRelative is the format, where both are in beats.
|
||||||
* (Technically they're both rows though.) */
|
* (Technically they're both rows though.) */
|
||||||
struct WarpSegment : public TimingSegment<WarpSegment>
|
struct WarpSegment : public TimingSegment
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Create a simple Warp Segment with default values.
|
* @brief Create a simple Warp Segment with default values.
|
||||||
@@ -216,14 +222,14 @@ struct WarpSegment : public TimingSegment<WarpSegment>
|
|||||||
* It is best to override the values as soon as possible.
|
* It is best to override the values as soon as possible.
|
||||||
*/
|
*/
|
||||||
WarpSegment():
|
WarpSegment():
|
||||||
TimingSegment<WarpSegment>(-1), lengthBeats(-1) {};
|
TimingSegment(-1), lengthBeats(-1) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create a copy of another Warp Segment.
|
* @brief Create a copy of another Warp Segment.
|
||||||
* @param other the other warp segment
|
* @param other the other warp segment
|
||||||
*/
|
*/
|
||||||
WarpSegment(const WarpSegment &other):
|
WarpSegment(const WarpSegment &other):
|
||||||
TimingSegment<WarpSegment>(other),
|
TimingSegment(other.GetRow()),
|
||||||
lengthBeats(other.GetLength()) {};
|
lengthBeats(other.GetLength()) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -233,7 +239,7 @@ struct WarpSegment : public TimingSegment<WarpSegment>
|
|||||||
*/
|
*/
|
||||||
template <typename StartType, typename LengthType>
|
template <typename StartType, typename LengthType>
|
||||||
WarpSegment( StartType s, LengthType r ):
|
WarpSegment( StartType s, LengthType r ):
|
||||||
TimingSegment<WarpSegment>(s),
|
TimingSegment(s),
|
||||||
lengthBeats(ToBeat(max((LengthType)0, r))) {};
|
lengthBeats(ToBeat(max((LengthType)0, r))) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -254,6 +260,8 @@ struct WarpSegment : public TimingSegment<WarpSegment>
|
|||||||
* @return the truth/falsehood of if the first is less than the second.
|
* @return the truth/falsehood of if the first is less than the second.
|
||||||
*/
|
*/
|
||||||
bool operator<( const WarpSegment &other ) const;
|
bool operator<( const WarpSegment &other ) const;
|
||||||
|
|
||||||
|
TimingSegmentType GetType() const { return SEGMENT_WARP; }
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief The number of beats the FakeSegment is alive for.
|
* @brief The number of beats the FakeSegment is alive for.
|
||||||
@@ -269,7 +277,7 @@ private:
|
|||||||
* system used by various based video games. The number is used to
|
* system used by various based video games. The number is used to
|
||||||
* represent how many ticks can be counted in one beat.
|
* represent how many ticks can be counted in one beat.
|
||||||
*/
|
*/
|
||||||
struct TickcountSegment : public TimingSegment<TickcountSegment>
|
struct TickcountSegment : public TimingSegment
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Creates a simple Tickcount Segment with default values.
|
* @brief Creates a simple Tickcount Segment with default values.
|
||||||
@@ -277,14 +285,14 @@ struct TickcountSegment : public TimingSegment<TickcountSegment>
|
|||||||
* It is best to override the values as soon as possible.
|
* It is best to override the values as soon as possible.
|
||||||
*/
|
*/
|
||||||
TickcountSegment():
|
TickcountSegment():
|
||||||
TimingSegment<TickcountSegment>(-1), ticks(4) {};
|
TimingSegment(-1), ticks(4) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create a copy of another Tickcount Segment.
|
* @brief Create a copy of another Tickcount Segment.
|
||||||
* @param other the other tickcount segment
|
* @param other the other tickcount segment
|
||||||
*/
|
*/
|
||||||
TickcountSegment(const TickcountSegment &other):
|
TickcountSegment(const TickcountSegment &other):
|
||||||
TimingSegment<TickcountSegment>(other),
|
TimingSegment(other.GetRow()),
|
||||||
ticks(other.GetTicks()) {};
|
ticks(other.GetTicks()) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -292,7 +300,7 @@ struct TickcountSegment : public TimingSegment<TickcountSegment>
|
|||||||
* @param s the starting row / beat. */
|
* @param s the starting row / beat. */
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
TickcountSegment( StartType s ):
|
TickcountSegment( StartType s ):
|
||||||
TimingSegment<TickcountSegment>(max((StartType)0, s)), ticks(4) {};
|
TimingSegment(max((StartType)0, s)), ticks(4) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a TickcountSegment with specified values.
|
* @brief Creates a TickcountSegment with specified values.
|
||||||
@@ -300,7 +308,7 @@ struct TickcountSegment : public TimingSegment<TickcountSegment>
|
|||||||
* @param t the amount of ticks counted per beat. */
|
* @param t the amount of ticks counted per beat. */
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
TickcountSegment( StartType s, int t ):
|
TickcountSegment( StartType s, int t ):
|
||||||
TimingSegment<TickcountSegment>(max((StartType)0, s)), ticks(max(0, t)) {};
|
TimingSegment(max((StartType)0, s)), ticks(max(0, t)) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the number of ticks in this TickcountSegment.
|
* @brief Get the number of ticks in this TickcountSegment.
|
||||||
@@ -319,6 +327,8 @@ struct TickcountSegment : public TimingSegment<TickcountSegment>
|
|||||||
*/
|
*/
|
||||||
bool operator<( const TickcountSegment &other ) const;
|
bool operator<( const TickcountSegment &other ) const;
|
||||||
|
|
||||||
|
TimingSegmentType GetType() const { return SEGMENT_TICKCOUNT; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief The amount of ticks counted per beat.
|
* @brief The amount of ticks counted per beat.
|
||||||
@@ -332,7 +342,7 @@ private:
|
|||||||
* Admitedly, this would primarily be used for mission mode style charts. However,
|
* Admitedly, this would primarily be used for mission mode style charts. However,
|
||||||
* it can have its place during normal gameplay.
|
* it can have its place during normal gameplay.
|
||||||
*/
|
*/
|
||||||
struct ComboSegment : public TimingSegment<ComboSegment>
|
struct ComboSegment : public TimingSegment
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Creates a simple Combo Segment with default values.
|
* @brief Creates a simple Combo Segment with default values.
|
||||||
@@ -340,10 +350,10 @@ struct ComboSegment : public TimingSegment<ComboSegment>
|
|||||||
* It is best to override the values as soon as possible.
|
* It is best to override the values as soon as possible.
|
||||||
*/
|
*/
|
||||||
ComboSegment() :
|
ComboSegment() :
|
||||||
TimingSegment<ComboSegment>(-1), combo(1) { }
|
TimingSegment(-1), combo(1) { }
|
||||||
|
|
||||||
ComboSegment(const ComboSegment &other) :
|
ComboSegment(const ComboSegment &other) :
|
||||||
TimingSegment<ComboSegment>(other),
|
TimingSegment(other.GetRow()),
|
||||||
combo(other.GetCombo()),
|
combo(other.GetCombo()),
|
||||||
missCombo(other.GetMissCombo()) {};
|
missCombo(other.GetMissCombo()) {};
|
||||||
|
|
||||||
@@ -354,7 +364,7 @@ struct ComboSegment : public TimingSegment<ComboSegment>
|
|||||||
*/
|
*/
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
ComboSegment( StartType s, int t ):
|
ComboSegment( StartType s, int t ):
|
||||||
TimingSegment<ComboSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
combo(max(0,t)), missCombo(max(0,t)) {}
|
combo(max(0,t)), missCombo(max(0,t)) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -365,7 +375,7 @@ struct ComboSegment : public TimingSegment<ComboSegment>
|
|||||||
*/
|
*/
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
ComboSegment(StartType s, int t, int m):
|
ComboSegment(StartType s, int t, int m):
|
||||||
TimingSegment<ComboSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
combo(max(0,t)), missCombo(max(0,m)) {}
|
combo(max(0,t)), missCombo(max(0,m)) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -394,6 +404,8 @@ struct ComboSegment : public TimingSegment<ComboSegment>
|
|||||||
* @return the truth/falsehood of if the first is less than the second.
|
* @return the truth/falsehood of if the first is less than the second.
|
||||||
*/
|
*/
|
||||||
bool operator<( const ComboSegment &other ) const;
|
bool operator<( const ComboSegment &other ) const;
|
||||||
|
|
||||||
|
TimingSegmentType GetType() const { return SEGMENT_COMBO; }
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief The amount the combo increases at this point.
|
* @brief The amount the combo increases at this point.
|
||||||
@@ -410,7 +422,7 @@ private:
|
|||||||
* This is meant for helping to identify different sections of a chart
|
* This is meant for helping to identify different sections of a chart
|
||||||
* versus relying on measures and beats alone.
|
* versus relying on measures and beats alone.
|
||||||
*/
|
*/
|
||||||
struct LabelSegment : public TimingSegment<LabelSegment>
|
struct LabelSegment : public TimingSegment
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Creates a simple Label Segment with default values.
|
* @brief Creates a simple Label Segment with default values.
|
||||||
@@ -418,10 +430,10 @@ struct LabelSegment : public TimingSegment<LabelSegment>
|
|||||||
* It is best to override the values as soon as possible.
|
* It is best to override the values as soon as possible.
|
||||||
*/
|
*/
|
||||||
LabelSegment() :
|
LabelSegment() :
|
||||||
TimingSegment<LabelSegment>(-1), label("") { }
|
TimingSegment(-1), label("") { }
|
||||||
|
|
||||||
LabelSegment(const LabelSegment &other) :
|
LabelSegment(const LabelSegment &other) :
|
||||||
TimingSegment<LabelSegment>(other),
|
TimingSegment(other.GetRow()),
|
||||||
label(other.GetLabel()) {};
|
label(other.GetLabel()) {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -431,7 +443,7 @@ struct LabelSegment : public TimingSegment<LabelSegment>
|
|||||||
*/
|
*/
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
LabelSegment( StartType s, RString l ):
|
LabelSegment( StartType s, RString l ):
|
||||||
TimingSegment<LabelSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
label(l) {}
|
label(l) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -451,6 +463,8 @@ struct LabelSegment : public TimingSegment<LabelSegment>
|
|||||||
*/
|
*/
|
||||||
bool operator<( const LabelSegment &other ) const;
|
bool operator<( const LabelSegment &other ) const;
|
||||||
|
|
||||||
|
TimingSegmentType GetType() const { return SEGMENT_LABEL; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief The label/section name for this point.
|
* @brief The label/section name for this point.
|
||||||
@@ -463,7 +477,7 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief Identifies when a song changes its BPM.
|
* @brief Identifies when a song changes its BPM.
|
||||||
*/
|
*/
|
||||||
struct BPMSegment : public TimingSegment<BPMSegment>
|
struct BPMSegment : public TimingSegment
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Creates a simple BPM Segment with default values.
|
* @brief Creates a simple BPM Segment with default values.
|
||||||
@@ -471,15 +485,12 @@ struct BPMSegment : public TimingSegment<BPMSegment>
|
|||||||
* It is best to override the values as soon as possible.
|
* It is best to override the values as soon as possible.
|
||||||
*/
|
*/
|
||||||
BPMSegment() :
|
BPMSegment() :
|
||||||
TimingSegment<BPMSegment>(-1), bps(-1.0f) { }
|
TimingSegment(-1), bps(-1.0f) { }
|
||||||
|
|
||||||
BPMSegment(const BPMSegment &other) :
|
BPMSegment(const BPMSegment &other) :
|
||||||
TimingSegment<BPMSegment>(other),
|
TimingSegment(other.GetRow()),
|
||||||
bps(other.GetBPS()) {};
|
bps(other.GetBPS()) {};
|
||||||
|
|
||||||
operator int() const { return 1; }
|
|
||||||
operator float() const { return 2.0f; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a BPM Segment with the specified starting row and beats per second.
|
* @brief Creates a BPM Segment with the specified starting row and beats per second.
|
||||||
* @param s the starting row / beat of this segment.
|
* @param s the starting row / beat of this segment.
|
||||||
@@ -487,7 +498,7 @@ struct BPMSegment : public TimingSegment<BPMSegment>
|
|||||||
*/
|
*/
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
BPMSegment( StartType s, float bpm ):
|
BPMSegment( StartType s, float bpm ):
|
||||||
TimingSegment<BPMSegment>(max((StartType)0, s)), bps(0.0f) { SetBPM(bpm); }
|
TimingSegment(max((StartType)0, s)), bps(0.0f) { SetBPM(bpm); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the label in this LabelSegment.
|
* @brief Get the label in this LabelSegment.
|
||||||
@@ -516,6 +527,8 @@ struct BPMSegment : public TimingSegment<BPMSegment>
|
|||||||
*/
|
*/
|
||||||
bool operator<( const BPMSegment &other ) const;
|
bool operator<( const BPMSegment &other ) const;
|
||||||
|
|
||||||
|
TimingSegmentType GetType() const { return SEGMENT_BPM; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief The label/section name for this point.
|
* @brief The label/section name for this point.
|
||||||
@@ -530,17 +543,17 @@ private:
|
|||||||
* (called the numerator here, though this isn't properly a
|
* (called the numerator here, though this isn't properly a
|
||||||
* fraction) is the number of beats per measure. The lower number
|
* fraction) is the number of beats per measure. The lower number
|
||||||
* (denominator here) is the note value representing one beat. */
|
* (denominator here) is the note value representing one beat. */
|
||||||
struct TimeSignatureSegment : public TimingSegment<TimeSignatureSegment>
|
struct TimeSignatureSegment : public TimingSegment
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Creates a simple Time Signature Segment with default values.
|
* @brief Creates a simple Time Signature Segment with default values.
|
||||||
*/
|
*/
|
||||||
TimeSignatureSegment():
|
TimeSignatureSegment():
|
||||||
TimingSegment<TimeSignatureSegment>(-1),
|
TimingSegment(-1),
|
||||||
numerator(4), denominator(4) { }
|
numerator(4), denominator(4) { }
|
||||||
|
|
||||||
TimeSignatureSegment(const TimeSignatureSegment &other) :
|
TimeSignatureSegment(const TimeSignatureSegment &other) :
|
||||||
TimingSegment<TimeSignatureSegment>(other),
|
TimingSegment(other.GetRow()),
|
||||||
numerator(other.GetNum()),
|
numerator(other.GetNum()),
|
||||||
denominator(other.GetDen()) {};
|
denominator(other.GetDen()) {};
|
||||||
/**
|
/**
|
||||||
@@ -552,7 +565,7 @@ struct TimeSignatureSegment : public TimingSegment<TimeSignatureSegment>
|
|||||||
*/
|
*/
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
TimeSignatureSegment( StartType s, int n ):
|
TimeSignatureSegment( StartType s, int n ):
|
||||||
TimingSegment<TimeSignatureSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
numerator(max(1, n)), denominator(4) {}
|
numerator(max(1, n)), denominator(4) {}
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Time Signature Segment with supplied values.
|
* @brief Creates a Time Signature Segment with supplied values.
|
||||||
@@ -562,7 +575,7 @@ struct TimeSignatureSegment : public TimingSegment<TimeSignatureSegment>
|
|||||||
*/
|
*/
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
TimeSignatureSegment( StartType s, int n, int d ):
|
TimeSignatureSegment( StartType s, int n, int d ):
|
||||||
TimingSegment<TimeSignatureSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
numerator(max(1, n)), denominator(max(1, d)) {}
|
numerator(max(1, n)), denominator(max(1, d)) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -603,6 +616,8 @@ struct TimeSignatureSegment : public TimingSegment<TimeSignatureSegment>
|
|||||||
* @return the truth/falsehood of if the first is less than the second.
|
* @return the truth/falsehood of if the first is less than the second.
|
||||||
*/
|
*/
|
||||||
bool operator<( const TimeSignatureSegment &other ) const;
|
bool operator<( const TimeSignatureSegment &other ) const;
|
||||||
|
|
||||||
|
TimingSegmentType GetType() const { return SEGMENT_TIME_SIG; }
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief The numerator of the TimeSignatureSegment.
|
* @brief The numerator of the TimeSignatureSegment.
|
||||||
@@ -624,15 +639,15 @@ private:
|
|||||||
* back to 1.
|
* back to 1.
|
||||||
*
|
*
|
||||||
* These were inspired by the Pump It Up series. */
|
* These were inspired by the Pump It Up series. */
|
||||||
struct SpeedSegment : public TimingSegment<SpeedSegment>
|
struct SpeedSegment : public TimingSegment
|
||||||
{
|
{
|
||||||
/** @brief Sets up the SpeedSegment with default values. */
|
/** @brief Sets up the SpeedSegment with default values. */
|
||||||
SpeedSegment():
|
SpeedSegment():
|
||||||
TimingSegment<SpeedSegment>(0),
|
TimingSegment(0),
|
||||||
ratio(1), length(0), unit(0) {}
|
ratio(1), length(0), unit(0) {}
|
||||||
|
|
||||||
SpeedSegment(const SpeedSegment &other) :
|
SpeedSegment(const SpeedSegment &other) :
|
||||||
TimingSegment<SpeedSegment>(other),
|
TimingSegment(other.GetRow()),
|
||||||
ratio(other.GetRatio()),
|
ratio(other.GetRatio()),
|
||||||
length(other.GetLength()),
|
length(other.GetLength()),
|
||||||
unit(other.GetUnit()) {};
|
unit(other.GetUnit()) {};
|
||||||
@@ -643,7 +658,7 @@ struct SpeedSegment : public TimingSegment<SpeedSegment>
|
|||||||
* @param p The percentage to use. */
|
* @param p The percentage to use. */
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
SpeedSegment( StartType s, float p):
|
SpeedSegment( StartType s, float p):
|
||||||
TimingSegment<SpeedSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
ratio(p), length(0), unit(0) {}
|
ratio(p), length(0), unit(0) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -653,7 +668,7 @@ struct SpeedSegment : public TimingSegment<SpeedSegment>
|
|||||||
* @param w The number of beats to wait. */
|
* @param w The number of beats to wait. */
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
SpeedSegment(StartType s, float p, float w):
|
SpeedSegment(StartType s, float p, float w):
|
||||||
TimingSegment<SpeedSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
ratio(p), length(w), unit(0) {}
|
ratio(p), length(w), unit(0) {}
|
||||||
|
|
||||||
|
|
||||||
@@ -665,7 +680,7 @@ struct SpeedSegment : public TimingSegment<SpeedSegment>
|
|||||||
* @param k The mode used for the wait variable. */
|
* @param k The mode used for the wait variable. */
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
SpeedSegment(StartType s, float p, float w, unsigned short k):
|
SpeedSegment(StartType s, float p, float w, unsigned short k):
|
||||||
TimingSegment<SpeedSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
ratio(p), length(w), unit(k) {}
|
ratio(p), length(w), unit(k) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -713,6 +728,8 @@ struct SpeedSegment : public TimingSegment<SpeedSegment>
|
|||||||
* @return the truth/falsehood of if the first is less than the second.
|
* @return the truth/falsehood of if the first is less than the second.
|
||||||
*/
|
*/
|
||||||
bool operator<( const SpeedSegment &other ) const;
|
bool operator<( const SpeedSegment &other ) const;
|
||||||
|
|
||||||
|
TimingSegmentType GetType() const { return SEGMENT_SPEED; }
|
||||||
private:
|
private:
|
||||||
/** @brief The percentage (ratio) to use when multiplying the Player's BPM. */
|
/** @brief The percentage (ratio) to use when multiplying the Player's BPM. */
|
||||||
float ratio;
|
float ratio;
|
||||||
@@ -740,10 +757,10 @@ private:
|
|||||||
* reset it by setting the precentage back to 1.
|
* reset it by setting the precentage back to 1.
|
||||||
*
|
*
|
||||||
* These were inspired by the Pump It Up series. */
|
* These were inspired by the Pump It Up series. */
|
||||||
struct ScrollSegment : public TimingSegment<ScrollSegment>
|
struct ScrollSegment : public TimingSegment
|
||||||
{
|
{
|
||||||
/** @brief Sets up the ScrollSegment with default values. */
|
/** @brief Sets up the ScrollSegment with default values. */
|
||||||
ScrollSegment(): TimingSegment<ScrollSegment>(0),
|
ScrollSegment(): TimingSegment(0),
|
||||||
ratio(1) {}
|
ratio(1) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -752,11 +769,11 @@ struct ScrollSegment : public TimingSegment<ScrollSegment>
|
|||||||
* @param p The percentage to use. */
|
* @param p The percentage to use. */
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
ScrollSegment( StartType s, float p):
|
ScrollSegment( StartType s, float p):
|
||||||
TimingSegment<ScrollSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
ratio(p) {}
|
ratio(p) {}
|
||||||
|
|
||||||
ScrollSegment(const ScrollSegment &other) :
|
ScrollSegment(const ScrollSegment &other) :
|
||||||
TimingSegment<ScrollSegment>(other),
|
TimingSegment(other.GetRow()),
|
||||||
ratio(other.GetRatio()) {}
|
ratio(other.GetRatio()) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -775,6 +792,8 @@ struct ScrollSegment : public TimingSegment<ScrollSegment>
|
|||||||
* @return the truth/falsehood of if the first is less than the second.
|
* @return the truth/falsehood of if the first is less than the second.
|
||||||
*/
|
*/
|
||||||
bool operator<( const ScrollSegment &other ) const;
|
bool operator<( const ScrollSegment &other ) const;
|
||||||
|
|
||||||
|
TimingSegmentType GetType() const { return SEGMENT_SCROLL; }
|
||||||
private:
|
private:
|
||||||
/** @brief The ratio / percentage to use when multiplying the chart's scroll rate. */
|
/** @brief The ratio / percentage to use when multiplying the chart's scroll rate. */
|
||||||
float ratio;
|
float ratio;
|
||||||
@@ -785,18 +804,18 @@ private:
|
|||||||
*
|
*
|
||||||
* It is hopeful that stops and delays can be made into their own segments at some point.
|
* It is hopeful that stops and delays can be made into their own segments at some point.
|
||||||
*/
|
*/
|
||||||
struct StopSegment : public TimingSegment<StopSegment>
|
struct StopSegment : public TimingSegment
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Creates a simple Stop Segment with default values.
|
* @brief Creates a simple Stop Segment with default values.
|
||||||
*
|
*
|
||||||
* It is best to override the values as soon as possible.
|
* It is best to override the values as soon as possible.
|
||||||
*/
|
*/
|
||||||
StopSegment() : TimingSegment<StopSegment>(-1),
|
StopSegment() : TimingSegment(-1),
|
||||||
pauseSeconds(-1.0f), isDelay(false) {}
|
pauseSeconds(-1.0f), isDelay(false) {}
|
||||||
|
|
||||||
StopSegment (const StopSegment &other):
|
StopSegment (const StopSegment &other):
|
||||||
TimingSegment<StopSegment>(other),
|
TimingSegment(other.GetRow()),
|
||||||
pauseSeconds(other.GetPause()),
|
pauseSeconds(other.GetPause()),
|
||||||
isDelay(other.GetDelay()) {}
|
isDelay(other.GetDelay()) {}
|
||||||
|
|
||||||
@@ -810,7 +829,7 @@ struct StopSegment : public TimingSegment<StopSegment>
|
|||||||
*/
|
*/
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
StopSegment( StartType s, float f ):
|
StopSegment( StartType s, float f ):
|
||||||
TimingSegment<StopSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
pauseSeconds(f), isDelay(false) {}
|
pauseSeconds(f), isDelay(false) {}
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Stop/Delay Segment with specified values.
|
* @brief Creates a Stop/Delay Segment with specified values.
|
||||||
@@ -820,7 +839,7 @@ struct StopSegment : public TimingSegment<StopSegment>
|
|||||||
*/
|
*/
|
||||||
template <typename StartType>
|
template <typename StartType>
|
||||||
StopSegment( StartType s, float f, bool d ):
|
StopSegment( StartType s, float f, bool d ):
|
||||||
TimingSegment<StopSegment>(max((StartType)0, s)),
|
TimingSegment(max((StartType)0, s)),
|
||||||
pauseSeconds(f), isDelay(d) {}
|
pauseSeconds(f), isDelay(d) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -853,6 +872,8 @@ struct StopSegment : public TimingSegment<StopSegment>
|
|||||||
* @return the truth/falsehood of if the first is less than the second.
|
* @return the truth/falsehood of if the first is less than the second.
|
||||||
*/
|
*/
|
||||||
bool operator<( const StopSegment &other ) const;
|
bool operator<( const StopSegment &other ) const;
|
||||||
|
|
||||||
|
TimingSegmentType GetType() const { return SEGMENT_STOP_DELAY; }
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief The amount of time to complete the pause at the given row.
|
* @brief The amount of time to complete the pause at the given row.
|
||||||
|
|||||||
Reference in New Issue
Block a user