various changes from the ssc svn post-public beta 2 release.

* New Lua bindings SONGMAN:GetGroupNames() and SONGMAN:GetSongsInGroup(string)
* Add Lifts to PaneDisplay (StepMania 3.9+ added them)
* Fix an issue where course banners were able to trip off the uneven dimensions dialog
* NextSong/PrevSong now work when TwoPartSelection=true + TwoPartConfirmsOnly=true on ScreenSelectMusic. A new message ("TwoPartConfirmCanceled") was added to catch when this happens.
and there may have been some stray cleanup in here too
This commit is contained in:
AJ Kelly
2010-04-14 21:43:32 -05:00
parent 10a60946a8
commit 1867e92dee
13 changed files with 105 additions and 71 deletions
+1
View File
@@ -35,6 +35,7 @@ static const char *RadarCategoryNames[] = {
"Mines", "Mines",
"Hands", "Hands",
"Rolls", "Rolls",
"Lifts",
"MinMidiNote", "MinMidiNote",
"MaxMidiNote", "MaxMidiNote",
}; };
+2 -1
View File
@@ -29,6 +29,7 @@ enum RadarCategory
RadarCategory_Mines, RadarCategory_Mines,
RadarCategory_Hands, RadarCategory_Hands,
RadarCategory_Rolls, RadarCategory_Rolls,
RadarCategory_Lifts,
RadarCategory_MinMidiNote, RadarCategory_MinMidiNote,
RadarCategory_MaxMidiNote, RadarCategory_MaxMidiNote,
NUM_RadarCategory, // leave this at the end NUM_RadarCategory, // leave this at the end
@@ -54,7 +55,7 @@ enum StepsType
StepsType_dance_double, StepsType_dance_double,
StepsType_dance_couple, StepsType_dance_couple,
StepsType_dance_solo, StepsType_dance_solo,
//StepsType_dance_three, //StepsType_dance_three, // kurisu calls this "3panel"
StepsType_dance_routine, StepsType_dance_routine,
StepsType_pump_single, StepsType_pump_single,
StepsType_pump_halfdouble, StepsType_pump_halfdouble,
+38 -24
View File
@@ -37,18 +37,18 @@ bool NoteData::IsComposite() const
return false; return false;
} }
/* Clear [rowBegin,rowEnd). */ // Clear (rowBegin,rowEnd).
void NoteData::ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack ) void NoteData::ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack )
{ {
/* Optimization: if the range encloses everything, just clear the whole maps. */ // Optimization: if the range encloses everything, just clear the whole maps.
if( rowBegin == 0 && rowEnd == MAX_NOTE_ROW ) if( rowBegin == 0 && rowEnd == MAX_NOTE_ROW )
{ {
m_TapNotes[iTrack].clear(); m_TapNotes[iTrack].clear();
return; return;
} }
/* If the range is empty, don't do anything. Otherwise, an empty range will cause /* If the range is empty, don't do anything. Otherwise, an empty range will
* hold notes to be split when they shouldn't be. */ * cause hold notes to be split when they shouldn't be. */
if( rowBegin == rowEnd ) if( rowBegin == rowEnd )
return; return;
@@ -57,8 +57,8 @@ void NoteData::ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack )
if( begin != end && begin->first < rowBegin && begin->first + begin->second.iDuration > rowEnd ) if( begin != end && begin->first < rowBegin && begin->first + begin->second.iDuration > rowEnd )
{ {
/* A hold note overlaps the whole range. Truncate it, and add the remainder to /* A hold note overlaps the whole range. Truncate it, and add the
* the end. */ * remainder to the end. */
TapNote tn1 = begin->second; TapNote tn1 = begin->second;
TapNote tn2 = tn1; TapNote tn2 = tn1;
@@ -71,12 +71,12 @@ void NoteData::ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack )
SetTapNote( iTrack, iRow, tn1 ); SetTapNote( iTrack, iRow, tn1 );
SetTapNote( iTrack, rowEnd, tn2 ); SetTapNote( iTrack, rowEnd, tn2 );
/* We may have invalidated our iterators. */ // We may have invalidated our iterators.
GetTapNoteRangeInclusive( iTrack, rowBegin, rowEnd, begin, end ); GetTapNoteRangeInclusive( iTrack, rowBegin, rowEnd, begin, end );
} }
else if( begin != end && begin->first < rowBegin ) else if( begin != end && begin->first < rowBegin )
{ {
/* A hold note overlaps the beginning of the range. Truncate it. */ // A hold note overlaps the beginning of the range. Truncate it.
TapNote &tn1 = begin->second; TapNote &tn1 = begin->second;
int iRow = begin->first; int iRow = begin->first;
tn1.iDuration = rowBegin - iRow; tn1.iDuration = rowBegin - iRow;
@@ -92,7 +92,7 @@ void NoteData::ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack )
int iRow = prev->first; int iRow = prev->first;
if( tn.type == TapNote::hold_head && iRow + tn.iDuration > rowEnd ) if( tn.type == TapNote::hold_head && iRow + tn.iDuration > rowEnd )
{ {
/* A hold note overlaps the end of the range. Separate it. */ // A hold note overlaps the end of the range. Separate it.
SetTapNote( iTrack, iRow, TAP_EMPTY ); SetTapNote( iTrack, iRow, TAP_EMPTY );
int iAdd = rowEnd - iRow; int iAdd = rowEnd - iRow;
@@ -102,7 +102,7 @@ void NoteData::ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack )
end = prev; end = prev;
} }
/* We may have invalidated our iterators. */ // We may have invalidated our iterators.
GetTapNoteRangeInclusive( iTrack, rowBegin, rowEnd, begin, end ); GetTapNoteRangeInclusive( iTrack, rowBegin, rowEnd, begin, end );
} }
@@ -121,19 +121,19 @@ void NoteData::ClearAll()
m_TapNotes[t].clear(); m_TapNotes[t].clear();
} }
/* Copy [rowFromBegin,rowFromEnd) from pFrom to this. (Note that this does *not* overlay; /* Copy [rowFromBegin,rowFromEnd) from pFrom to this. (Note that this does
* all data in the range is overwritten.) */ * *not* overlay; all data in the range is overwritten.) */
void NoteData::CopyRange( const NoteData& from, int rowFromBegin, int rowFromEnd, int rowToBegin ) void NoteData::CopyRange( const NoteData& from, int rowFromBegin, int rowFromEnd, int rowToBegin )
{ {
ASSERT( from.GetNumTracks() == GetNumTracks() ); ASSERT( from.GetNumTracks() == GetNumTracks() );
if( rowFromBegin > rowFromEnd ) if( rowFromBegin > rowFromEnd )
return; /* empty range */ return; // empty range
const int rowToEnd = (rowFromEnd-rowFromBegin) + rowToBegin; const int rowToEnd = (rowFromEnd-rowFromBegin) + rowToBegin;
const int iMoveBy = rowToBegin-rowFromBegin; const int iMoveBy = rowToBegin-rowFromBegin;
/* Clear the region. */ // Clear the region.
ClearRange( rowToBegin, rowToEnd ); ClearRange( rowToBegin, rowToEnd );
for( int t=0; t<GetNumTracks(); t++ ) for( int t=0; t<GetNumTracks(); t++ )
@@ -310,7 +310,7 @@ void NoteData::AddHoldNote( int iTrack, int iStartRow, int iEndRow, TapNote tn )
iterator begin, end; iterator begin, end;
GetTapNoteRangeInclusive( iTrack, iStartRow, iEndRow, begin, end, true ); GetTapNoteRangeInclusive( iTrack, iStartRow, iEndRow, begin, end, true );
/* Look for other hold notes that overlap and merge them into add. */ // Look for other hold notes that overlap and merge them into add.
for( iterator it = begin; it != end; ++it ) for( iterator it = begin; it != end; ++it )
{ {
int iOtherRow = it->first; int iOtherRow = it->first;
@@ -324,7 +324,7 @@ void NoteData::AddHoldNote( int iTrack, int iStartRow, int iEndRow, TapNote tn )
tn.iDuration = iEndRow - iStartRow; tn.iDuration = iEndRow - iStartRow;
/* Remove everything in the range. */ // Remove everything in the range.
while( begin != end ) while( begin != end )
{ {
iterator next = begin; iterator next = begin;
@@ -335,8 +335,8 @@ void NoteData::AddHoldNote( int iTrack, int iStartRow, int iEndRow, TapNote tn )
begin = next; begin = next;
} }
/* Additionally, if there's a tap note lying at the end of our range, remove it, /* Additionally, if there's a tap note lying at the end of our range,
* too. */ * remove it too. */
SetTapNote( iTrack, iEndRow, TAP_EMPTY ); SetTapNote( iTrack, iEndRow, TAP_EMPTY );
// add a tap note at the start of this hold // add a tap note at the start of this hold
@@ -358,8 +358,8 @@ bool NoteData::IsHoldHeadOrBodyAtRow( int iTrack, int iRow, int *pHeadRow ) cons
return IsHoldNoteAtRow( iTrack, iRow, pHeadRow ); return IsHoldNoteAtRow( iTrack, iRow, pHeadRow );
} }
/* Determine if a hold note lies on the given spot. Return true if so. If /* Determine if a hold note lies on the given spot. Return true if so. If
* pHeadRow is non-NULL, return the row of the head. (Note that this returns * pHeadRow is non-NULL, return the row of the head. (Note that this returns
* false if a hold head lies on iRow itself.) */ * false if a hold head lies on iRow itself.) */
/* XXX: rename this to IsHoldBodyAtRow */ /* XXX: rename this to IsHoldBodyAtRow */
bool NoteData::IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow ) const bool NoteData::IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow ) const
@@ -368,9 +368,9 @@ bool NoteData::IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow ) const
if( pHeadRow == NULL ) if( pHeadRow == NULL )
pHeadRow = &iDummy; pHeadRow = &iDummy;
/* Starting at iRow, search upwards. If we find a TapNote::hold_head, we're within /* Starting at iRow, search upwards. If we find a TapNote::hold_head, we're within
* a hold. If we find a tap, mine or attack, we're not--those never lie within hold * a hold. If we find a tap, mine or attack, we're not--those never lie
* notes. Ignore autoKeysound. */ * within hold notes. Ignore autoKeysound. */
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE_REVERSE( *this, iTrack, r, 0, iRow ) FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE_REVERSE( *this, iTrack, r, 0, iRow )
{ {
const TapNote &tn = GetTapNote( iTrack, r ); const TapNote &tn = GetTapNote( iTrack, r );
@@ -391,7 +391,7 @@ bool NoteData::IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow ) const
case TapNote::empty: case TapNote::empty:
case TapNote::autoKeysound: case TapNote::autoKeysound:
/* ignore */ // ignore
continue; continue;
DEFAULT_FAIL( tn.type ); DEFAULT_FAIL( tn.type );
} }
@@ -621,6 +621,20 @@ int NoteData::GetNumRolls( int iStartIndex, int iEndIndex ) const
return iNumRolls; return iNumRolls;
} }
int NoteData::GetNumLifts( int iStartIndex, int iEndIndex ) const
{
int iNumLifts = 0;
for( int t=0; t<GetNumTracks(); t++ )
{
FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( *this, t, r, iStartIndex, iEndIndex )
if( GetTapNote(t, r).type == TapNote::lift )
iNumLifts++;
}
return iNumLifts;
}
/* /*
int NoteData::GetNumMinefields( int iStartIndex, int iEndIndex ) const int NoteData::GetNumMinefields( int iStartIndex, int iEndIndex ) const
{ {
+3
View File
@@ -207,6 +207,9 @@ public:
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 { return GetNumRowsWithSimultaneousPresses( 3, iStartIndex, iEndIndex ); }
int GetNumQuads( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const { return GetNumRowsWithSimultaneousPresses( 4, iStartIndex, iEndIndex ); } int GetNumQuads( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const { return GetNumRowsWithSimultaneousPresses( 4, iStartIndex, iEndIndex ); }
// and the other notetypes
int GetNumLifts( int iStartIndex = 0, int iEndIndex = 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
+3 -2
View File
@@ -729,8 +729,8 @@ void NoteDataUtil::CalculateRadarValues( const NoteData &in, float fSongSeconds,
switch( rc ) switch( rc )
{ {
case RadarCategory_Stream: out[rc] = GetStreamRadarValue( in, fSongSeconds ); break; case RadarCategory_Stream: out[rc] = GetStreamRadarValue( in, fSongSeconds ); break;
case RadarCategory_Voltage: out[rc] = GetVoltageRadarValue( in, fSongSeconds ); break; case RadarCategory_Voltage: out[rc] = GetVoltageRadarValue( in, fSongSeconds ); break;
case RadarCategory_Air: out[rc] = GetAirRadarValue( in, fSongSeconds ); break; case RadarCategory_Air: out[rc] = GetAirRadarValue( in, fSongSeconds ); break;
case RadarCategory_Freeze: out[rc] = GetFreezeRadarValue( in, fSongSeconds ); break; case RadarCategory_Freeze: out[rc] = GetFreezeRadarValue( in, fSongSeconds ); break;
case RadarCategory_Chaos: out[rc] = GetChaosRadarValue( in, fSongSeconds ); break; case RadarCategory_Chaos: out[rc] = GetChaosRadarValue( in, fSongSeconds ); break;
case RadarCategory_TapsAndHolds: out[rc] = (float) in.GetNumRowsWithTapOrHoldHead(); break; case RadarCategory_TapsAndHolds: out[rc] = (float) in.GetNumRowsWithTapOrHoldHead(); break;
@@ -739,6 +739,7 @@ void NoteDataUtil::CalculateRadarValues( const NoteData &in, float fSongSeconds,
case RadarCategory_Mines: out[rc] = (float) in.GetNumMines(); break; case RadarCategory_Mines: out[rc] = (float) in.GetNumMines(); break;
case RadarCategory_Hands: out[rc] = (float) in.GetNumHands(); break; case RadarCategory_Hands: out[rc] = (float) in.GetNumHands(); break;
case RadarCategory_Rolls: out[rc] = (float) in.GetNumRolls(); break; case RadarCategory_Rolls: out[rc] = (float) in.GetNumRolls(); break;
case RadarCategory_Lifts: out[rc] = (float) in.GetNumLifts(); break;
case RadarCategory_MinMidiNote: case RadarCategory_MinMidiNote:
break; // fill in below break; // fill in below
case RadarCategory_MaxMidiNote: case RadarCategory_MaxMidiNote:
+13
View File
@@ -129,6 +129,18 @@ int GetSuccessfulHands( const NoteData &in, int iStartIndex = 0, int iEndIndex =
return iNum; return iNum;
} }
int GetSuccessfulLifts( const NoteData &in, TapNoteScore tns, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW )
{
int iNumSuccessfulLiftNotes = 0;
NoteData::all_tracks_const_iterator iter = in.GetTapNoteRangeAllTracks( iStartIndex, iEndIndex );
for( ; !iter.IsAtEnd(); ++iter )
{
if( iter->type == TapNote::lift && iter->result.tns == tns )
++iNumSuccessfulLiftNotes;
}
return iNumSuccessfulLiftNotes;
}
/* Return the last tap score of a row: the grade of the tap that completed /* Return the last tap score of a row: the grade of the tap that completed
* the row. If the row has no tap notes, return -1. If any tap notes aren't * the row. If the row has no tap notes, return -1. If any tap notes aren't
* graded (any tap is TNS_None) or are missed (TNS_Miss), return it. */ * graded (any tap is TNS_None) or are missed (TNS_Miss), return it. */
@@ -336,6 +348,7 @@ void NoteDataWithScoring::GetActualRadarValues( const NoteData &in, const Player
case RadarCategory_Mines: out[rc] = (float) GetSuccessfulMines( in ); break; case RadarCategory_Mines: out[rc] = (float) GetSuccessfulMines( in ); break;
case RadarCategory_Hands: out[rc] = (float) GetSuccessfulHands( in ); break; case RadarCategory_Hands: out[rc] = (float) GetSuccessfulHands( in ); break;
case RadarCategory_Rolls: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNote::hold_head_roll, HNS_Held ); break; case RadarCategory_Rolls: out[rc] = (float) GetNumHoldNotesWithScore( in, TapNote::hold_head_roll, HNS_Held ); break;
case RadarCategory_Lifts: out[rc] = (float) GetSuccessfulLifts( in, TNS_W4 ); break;
case RadarCategory_MinMidiNote: out[rc] = 0; break; // no meaning case RadarCategory_MinMidiNote: out[rc] = 0; break; // no meaning
case RadarCategory_MaxMidiNote: out[rc] = 0; break; // no meaning case RadarCategory_MaxMidiNote: out[rc] = 0; break; // no meaning
//case RadarCategory_Minefields: out[rc] = (float) GetNumMinefieldsWithScore( in, TapNote::hold_head_mine, HNS_Held ); break; //case RadarCategory_Minefields: out[rc] = (float) GetNumMinefieldsWithScore( in, TapNote::hold_head_mine, HNS_Held ); break;
+13 -14
View File
@@ -25,7 +25,7 @@ static const char *PaneCategoryNames[] = {
"Rolls", "Rolls",
"Mines", "Mines",
"Hands", "Hands",
//"Lifts", "Lifts",
"MachineHighScore", "MachineHighScore",
"MachineHighName", "MachineHighName",
"ProfileHighScore", "ProfileHighScore",
@@ -43,16 +43,16 @@ struct Content_t
static const Content_t g_Contents[NUM_PaneCategory] = static const Content_t g_Contents[NUM_PaneCategory] =
{ {
{ NEED_NOTES, "count" }, { NEED_NOTES, "count" }, // NumSteps
{ NEED_NOTES, "count" }, { NEED_NOTES, "count" }, // Jumps
{ NEED_NOTES, "count" }, { NEED_NOTES, "count" }, // Holds
{ NEED_NOTES, "count" }, { NEED_NOTES, "count" }, // Rolls
{ NEED_NOTES, "count" }, { NEED_NOTES, "count" }, // Mines
{ NEED_NOTES, "count" }, { NEED_NOTES, "count" }, // Hands
//{ NEED_NOTES, "count" }, { NEED_NOTES, "count" }, // Lifts
{ NEED_NOTES, "score" }, { NEED_NOTES, "score" }, // MachineHighScore
{ NEED_NOTES, "name" }, { NEED_NOTES, "name" }, // MachineHighName
{ NEED_NOTES|NEED_PROFILE, "score" }, { NEED_NOTES|NEED_PROFILE, "score" }, // ProfileHighScore
}; };
REGISTER_ACTOR_CLASS( PaneDisplay ) REGISTER_ACTOR_CLASS( PaneDisplay )
@@ -65,7 +65,6 @@ void PaneDisplay::Load( const RString &sMetricsGroup, PlayerNumber pn )
NOT_AVAILABLE.Load( sMetricsGroup, "NotAvailable" ); NOT_AVAILABLE.Load( sMetricsGroup, "NotAvailable" );
COUNT_FORMAT.Load( sMetricsGroup, "CountFormat" ); COUNT_FORMAT.Load( sMetricsGroup, "CountFormat" );
FOREACH_ENUM( PaneCategory, pc ) FOREACH_ENUM( PaneCategory, pc )
{ {
LuaThreadVariable var( "PaneCategory", LuaReference::Create(pc) ); LuaThreadVariable var( "PaneCategory", LuaReference::Create(pc) );
@@ -160,7 +159,7 @@ void PaneDisplay::SetContent( PaneCategory c )
case PaneCategory_Rolls: val = rv[RadarCategory_Rolls]; break; case PaneCategory_Rolls: val = rv[RadarCategory_Rolls]; break;
case PaneCategory_Mines: val = rv[RadarCategory_Mines]; break; case PaneCategory_Mines: val = rv[RadarCategory_Mines]; break;
case PaneCategory_Hands: val = rv[RadarCategory_Hands]; break; case PaneCategory_Hands: val = rv[RadarCategory_Hands]; break;
//case PaneCategory_Lifts: val = rv[RadarCategory_Lifts]; break; case PaneCategory_Lifts: val = rv[RadarCategory_Lifts]; break;
case PaneCategory_ProfileHighScore: case PaneCategory_ProfileHighScore:
case PaneCategory_MachineHighName: /* set val for color */ case PaneCategory_MachineHighName: /* set val for color */
case PaneCategory_MachineHighScore: case PaneCategory_MachineHighScore:
@@ -199,7 +198,7 @@ void PaneDisplay::SetContent( PaneCategory c )
case PaneCategory_Rolls: case PaneCategory_Rolls:
case PaneCategory_Mines: case PaneCategory_Mines:
case PaneCategory_Hands: case PaneCategory_Hands:
//case PaneCategory_Lifts: case PaneCategory_Lifts:
str = ssprintf( COUNT_FORMAT.GetValue(), val ); str = ssprintf( COUNT_FORMAT.GetValue(), val );
} }
} }
+1 -1
View File
@@ -23,7 +23,7 @@ enum PaneCategory
PaneCategory_Rolls, PaneCategory_Rolls,
PaneCategory_Mines, PaneCategory_Mines,
PaneCategory_Hands, PaneCategory_Hands,
//PaneCategory_Lifts, PaneCategory_Lifts,
PaneCategory_MachineHighScore, PaneCategory_MachineHighScore,
PaneCategory_MachineHighName, PaneCategory_MachineHighName,
PaneCategory_ProfileHighScore, PaneCategory_ProfileHighScore,
+1
View File
@@ -28,6 +28,7 @@ struct RadarValues
float fNumMines; float fNumMines;
float fNumHands; float fNumHands;
float fNumRolls; float fNumRolls;
float fNumLifts;
float fMinMidiNote; float fMinMidiNote;
float fMaxMidiNote; float fMaxMidiNote;
} v; } v;
+14 -14
View File
@@ -357,7 +357,6 @@ void ScreenSelectMusic::CheckBackgroundRequests( bool bForce )
FallbackMusic.fFadeInLengthSeconds = SAMPLE_MUSIC_FALLBACK_FADE_IN_SECONDS; FallbackMusic.fFadeInLengthSeconds = SAMPLE_MUSIC_FALLBACK_FADE_IN_SECONDS;
FallbackMusic.bAlignBeat = ALIGN_MUSIC_BEATS; FallbackMusic.bAlignBeat = ALIGN_MUSIC_BEATS;
//if( SAMPLE_MUSIC_PREVIEW_MODE != SampleMusicPreviewMode_StartToPreview )
SOUND->PlayMusic( PlayParams, FallbackMusic ); SOUND->PlayMusic( PlayParams, FallbackMusic );
} }
} }
@@ -990,6 +989,15 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
// a song was selected // a song was selected
if( m_MusicWheel.GetSelectedSong() != NULL ) if( m_MusicWheel.GetSelectedSong() != NULL )
{ {
/*
if(TWO_PART_CONFIRMS_ONLY && SAMPLE_MUSIC_PREVIEW_MODE == SampleMusicPreviewMode_StartToPreview)
{
// start playing the preview music.
g_bSampleMusicWaiting = true;
CheckBackgroundRequests( true );
}
*/
const bool bIsNew = PROFILEMAN->IsSongNew( m_MusicWheel.GetSelectedSong() ); const bool bIsNew = PROFILEMAN->IsSongNew( m_MusicWheel.GetSelectedSong() );
bool bIsHard = false; bool bIsHard = false;
FOREACH_HumanPlayer( p ) FOREACH_HumanPlayer( p )
@@ -1048,15 +1056,6 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
// We haven't made a selection yet. // We haven't made a selection yet.
return; return;
} }
/*
if(TWO_PART_CONFIRMS_ONLY && SAMPLE_MUSIC_PREVIEW_MODE == SampleMusicPreviewMode_StartToPreview)
{
// start playing the preview music.
g_bSampleMusicWaiting = true;
}
*/
// I believe this is for those who like pump pro. -aj // I believe this is for those who like pump pro. -aj
MESSAGEMAN->Broadcast("SongChosen"); MESSAGEMAN->Broadcast("SongChosen");
@@ -1535,22 +1534,23 @@ void ScreenSelectMusic::AfterMusicChange()
// check SampleMusicPreviewMode here. // check SampleMusicPreviewMode here.
switch( SAMPLE_MUSIC_PREVIEW_MODE ) switch( SAMPLE_MUSIC_PREVIEW_MODE )
{ {
DEFAULT_FAIL(SAMPLE_MUSIC_PREVIEW_MODE);
case SampleMusicPreviewMode_ScreenMusic: case SampleMusicPreviewMode_ScreenMusic:
// play the screen music, hopefully? // play the screen music
m_sSampleMusicToPlay = m_sLoopMusicPath; m_sSampleMusicToPlay = m_sLoopMusicPath;
m_fSampleStartSeconds = 0; m_fSampleStartSeconds = 0;
m_fSampleLengthSeconds = -1; m_fSampleLengthSeconds = -1;
break; break;
case SampleMusicPreviewMode_Normal:
//case SampleMusicPreviewMode_StartToPreview: //case SampleMusicPreviewMode_StartToPreview:
// we want to load the sample music, but we don't want to
// actually play it; fall through for now. -aj
case SampleMusicPreviewMode_Normal:
// play the sample music // play the sample music
m_sSampleMusicToPlay = pSong->GetMusicPath(); m_sSampleMusicToPlay = pSong->GetMusicPath();
m_pSampleMusicTimingData = &pSong->m_Timing; m_pSampleMusicTimingData = &pSong->m_Timing;
m_fSampleStartSeconds = pSong->m_fMusicSampleStartSeconds; m_fSampleStartSeconds = pSong->m_fMusicSampleStartSeconds;
m_fSampleLengthSeconds = pSong->m_fMusicSampleLengthSeconds; m_fSampleLengthSeconds = pSong->m_fMusicSampleLengthSeconds;
break; break;
default:
ASSERT(0);
} }
SongUtil::GetPlayableSteps( pSong, m_vpSteps ); SongUtil::GetPlayableSteps( pSong, m_vpSteps );
+3 -3
View File
@@ -70,9 +70,9 @@ SongManager::SongManager()
} }
NUM_SONG_GROUP_COLORS .Load( "SongManager", "NumSongGroupColors" ); NUM_SONG_GROUP_COLORS .Load( "SongManager", "NumSongGroupColors" );
SONG_GROUP_COLOR .Load( "SongManager", SONG_GROUP_COLOR_NAME, NUM_SONG_GROUP_COLORS ); SONG_GROUP_COLOR .Load( "SongManager", SONG_GROUP_COLOR_NAME, NUM_SONG_GROUP_COLORS );
NUM_COURSE_GROUP_COLORS .Load( "SongManager", "NumCourseGroupColors" ); NUM_COURSE_GROUP_COLORS .Load( "SongManager", "NumCourseGroupColors" );
COURSE_GROUP_COLOR .Load( "SongManager", COURSE_GROUP_COLOR_NAME, NUM_COURSE_GROUP_COLORS ); COURSE_GROUP_COLOR .Load( "SongManager", COURSE_GROUP_COLOR_NAME, NUM_COURSE_GROUP_COLORS );
} }
SongManager::~SongManager() SongManager::~SongManager()
@@ -128,7 +128,7 @@ void SongManager::Reload( bool bAllowFastLoad, LoadingWindow *ld )
UpdatePreferredSort(); UpdatePreferredSort();
// Reload song/course group colors to prevent a crash when switching // Reload song/course group colors to prevent a crash when switching
// themes in-game. -aj // themes in-game. (apparently not, though.) -aj
NUM_SONG_GROUP_COLORS .Load( "SongManager", "NumSongGroupColors" ); NUM_SONG_GROUP_COLORS .Load( "SongManager", "NumSongGroupColors" );
SONG_GROUP_COLOR .Load( "SongManager", SONG_GROUP_COLOR_NAME, NUM_SONG_GROUP_COLORS ); SONG_GROUP_COLOR .Load( "SongManager", SONG_GROUP_COLOR_NAME, NUM_SONG_GROUP_COLORS );
NUM_COURSE_GROUP_COLORS .Load( "SongManager", "NumCourseGroupColors" ); NUM_COURSE_GROUP_COLORS .Load( "SongManager", "NumCourseGroupColors" );
+2 -1
View File
@@ -215,8 +215,9 @@ void StatsManager::CommitStatsToProfiles( const StageStats *pSS )
int iNumRolls = (int) pSS->m_player[pn].m_radarActual[RadarCategory_Rolls]; int iNumRolls = (int) pSS->m_player[pn].m_radarActual[RadarCategory_Rolls];
int iNumMines = (int) pSS->m_player[pn].m_radarActual[RadarCategory_Mines]; int iNumMines = (int) pSS->m_player[pn].m_radarActual[RadarCategory_Mines];
int iNumHands = (int) pSS->m_player[pn].m_radarActual[RadarCategory_Hands]; int iNumHands = (int) pSS->m_player[pn].m_radarActual[RadarCategory_Hands];
int iNumLifts = (int) pSS->m_player[pn].m_radarActual[RadarCategory_Lifts];
float fCaloriesBurned = pSS->m_player[pn].m_fCaloriesBurned; float fCaloriesBurned = pSS->m_player[pn].m_fCaloriesBurned;
PROFILEMAN->AddStepTotals( pn, iNumTapsAndHolds, iNumJumps, iNumHolds, iNumRolls, iNumMines, iNumHands, fCaloriesBurned ); PROFILEMAN->AddStepTotals( pn, iNumTapsAndHolds, iNumJumps, iNumHolds, iNumRolls, iNumMines, iNumHands, iNumLifts, fCaloriesBurned );
} }
// Update profile stats // Update profile stats