mystery -> secret

This commit is contained in:
Chris Danford
2005-03-10 22:54:55 +00:00
parent ef68b4acdd
commit 2957b7939f
10 changed files with 31 additions and 27 deletions
+10 -10
View File
@@ -180,12 +180,12 @@ void Course::LoadFromCRSFile( CString sPath )
} }
else if( sParams[1] == "*" ) else if( sParams[1] == "*" )
{ {
new_entry.mystery = true; new_entry.bSecret = true;
new_entry.type = COURSE_ENTRY_RANDOM; new_entry.type = COURSE_ENTRY_RANDOM;
} }
else if( sParams[1].Right(1) == "*" ) else if( sParams[1].Right(1) == "*" )
{ {
new_entry.mystery = true; new_entry.bSecret = true;
new_entry.type = COURSE_ENTRY_RANDOM_WITHIN_GROUP; new_entry.type = COURSE_ENTRY_RANDOM_WITHIN_GROUP;
CString sSong = sParams[1]; CString sSong = sParams[1];
sSong.Replace( "\\", "/" ); sSong.Replace( "\\", "/" );
@@ -241,16 +241,16 @@ void Course::LoadFromCRSFile( CString sPath )
} }
{ {
/* If "showcourse" or "noshowcourse" is in the list, force new_entry.mystery /* If "showcourse" or "noshowcourse" is in the list, force new_entry.secret
* on or off. */ * on or off. */
CStringArray mods; CStringArray mods;
split( sParams[3], ",", mods, true ); split( sParams[3], ",", mods, true );
for( int j = (int) mods.size()-1; j >= 0 ; --j ) for( int j = (int) mods.size()-1; j >= 0 ; --j )
{ {
if( !mods[j].CompareNoCase("showcourse") ) if( !mods[j].CompareNoCase("showcourse") )
new_entry.mystery = false; new_entry.bSecret = false;
else if( !mods[j].CompareNoCase("noshowcourse") ) else if( !mods[j].CompareNoCase("noshowcourse") )
new_entry.mystery = true; new_entry.bSecret = true;
else if( !mods[j].CompareNoCase("nodifficult") ) else if( !mods[j].CompareNoCase("nodifficult") )
new_entry.no_difficult = true; new_entry.no_difficult = true;
else else
@@ -496,12 +496,12 @@ void Course::Save( CString sPath, bool bSavingCache )
line += ":"; line += ":";
CString modifiers = entry.modifiers; CString modifiers = entry.modifiers;
bool default_mystery = (entry.type == COURSE_ENTRY_RANDOM || entry.type == COURSE_ENTRY_RANDOM_WITHIN_GROUP); bool default_secret = (entry.type == COURSE_ENTRY_RANDOM || entry.type == COURSE_ENTRY_RANDOM_WITHIN_GROUP);
if( default_mystery != entry.mystery ) if( default_secret != entry.bSecret )
{ {
if( modifiers != "" ) if( modifiers != "" )
modifiers += ","; modifiers += ",";
modifiers += entry.mystery? "noshowcourse":"showcourse"; modifiers += entry.bSecret? "noshowcourse":"showcourse";
} }
if( entry.no_difficult ) if( entry.no_difficult )
@@ -547,7 +547,7 @@ void Course::AutogenEndlessFromGroup( CString sGroupName, Difficulty diff )
e.group_name = sGroupName; e.group_name = sGroupName;
e.difficulty = diff; e.difficulty = diff;
e.mystery = true; e.bSecret = true;
vector<Song*> vSongs; vector<Song*> vSongs;
SONGMAN->GetSongs( vSongs, e.group_name ); SONGMAN->GetSongs( vSongs, e.group_name );
@@ -1014,7 +1014,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
te.pSteps = pSteps; te.pSteps = pSteps;
te.Modifiers = e.modifiers; te.Modifiers = e.modifiers;
te.Attacks = e.attacks; te.Attacks = e.attacks;
te.bMystery = e.mystery; te.bSecret = e.bSecret;
te.iLowMeter = low_meter; te.iLowMeter = low_meter;
te.iHighMeter = high_meter; te.iHighMeter = high_meter;
/* If we chose based on meter (not difficulty), then store DIFFICULTY_INVALID, so /* If we chose based on meter (not difficulty), then store DIFFICULTY_INVALID, so
+2 -2
View File
@@ -44,7 +44,7 @@ class CourseEntry
{ {
public: public:
CourseEntryType type; CourseEntryType type;
bool mystery; // show "??????" bool bSecret; // show "??????"
Song* pSong; // used in type=fixed Song* pSong; // used in type=fixed
CString group_name; // used in type=random_within_group CString group_name; // used in type=random_within_group
Difficulty difficulty; // = DIFFICULTY_INVALID if no difficulty specified Difficulty difficulty; // = DIFFICULTY_INVALID if no difficulty specified
@@ -58,7 +58,7 @@ public:
CourseEntry() CourseEntry()
{ {
type = (CourseEntryType)0; type = (CourseEntryType)0;
mystery = false; bSecret = false;
pSong = NULL; pSong = NULL;
group_name = ""; group_name = "";
difficulty = DIFFICULTY_INVALID; difficulty = DIFFICULTY_INVALID;
+3 -1
View File
@@ -79,7 +79,7 @@ void CourseEntryDisplay::LoadFromTrailEntry( int iNum, const TrailEntry *tes[NUM
if( te == NULL ) if( te == NULL )
return; return;
if( te->bMystery ) if( te->bSecret )
{ {
FOREACH_EnabledPlayer(pn) FOREACH_EnabledPlayer(pn)
{ {
@@ -96,7 +96,9 @@ void CourseEntryDisplay::LoadFromTrailEntry( int iNum, const TrailEntry *tes[NUM
SetDifficulty( pn, ssprintf(iLow==iHigh?"%d":"%d-%d", iLow, iHigh), colorNotes ); SetDifficulty( pn, ssprintf(iLow==iHigh?"%d":"%d-%d", iLow, iHigh), colorNotes );
} }
else else
{
SetDifficulty( pn, "?", SONGMAN->GetDifficultyColor( dc ) ); SetDifficulty( pn, "?", SONGMAN->GetDifficultyColor( dc ) );
}
} }
m_TextBanner.LoadFromString( "??????????", "??????????", "", "", "", "" ); m_TextBanner.LoadFromString( "??????????", "??????????", "", "", "", "" );
+1 -1
View File
@@ -246,7 +246,7 @@ bool DisplayBpms::BpmIsConstant() const
return fabsf( GetMin() - GetMax() ) < 0.001f; return fabsf( GetMin() - GetMax() ) < 0.001f;
} }
bool DisplayBpms::IsMystery() const bool DisplayBpms::IsSecret() const
{ {
FOREACH_CONST( float, vfBpms, f ) FOREACH_CONST( float, vfBpms, f )
{ {
+1 -1
View File
@@ -328,7 +328,7 @@ struct DisplayBpms
float GetMin() const; float GetMin() const;
float GetMax() const; float GetMax() const;
bool BpmIsConstant() const; bool BpmIsConstant() const;
bool IsMystery() const; bool IsSecret() const;
vector<float> vfBpms; vector<float> vfBpms;
}; };
+1 -1
View File
@@ -118,7 +118,7 @@ void GenreDisplay::PlayCommand( const CString &sCommandName )
FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e ) FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e )
{ {
if( e->bMystery ) if( e->bSecret )
{ {
m_Artists.push_back( "???" ); m_Artists.push_back( "???" );
m_AltArtists.push_back( "???" ); m_AltArtists.push_back( "???" );
+1 -1
View File
@@ -338,7 +338,7 @@ CString ScreenOptions::GetExplanationTitle( int iRow ) const
pTrail->GetDisplayBpms( bpms ); pTrail->GetDisplayBpms( bpms );
} }
if( bpms.IsMystery() ) if( bpms.IsSecret() )
sTitle += ssprintf( " (??" "?)" ); /* split so gcc doesn't think this is a trigraph */ sTitle += ssprintf( " (??" "?)" ); /* split so gcc doesn't think this is a trigraph */
else if( bpms.BpmIsConstant() ) else if( bpms.BpmIsConstant() )
sTitle += ssprintf( " (%.0f)", bpms.GetMin() ); sTitle += ssprintf( " (%.0f)", bpms.GetMin() );
+4 -2
View File
@@ -1641,11 +1641,13 @@ void ScreenSelectMusic::AfterMusicChange()
FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e ) FOREACH_CONST( TrailEntry, pTrail->m_vEntries, e )
{ {
if( e->bMystery ) if( e->bSecret )
{ {
m_Artists.push_back( "???" ); m_Artists.push_back( "???" );
m_AltArtists.push_back( "???" ); m_AltArtists.push_back( "???" );
} else { }
else
{
m_Artists.push_back( e->pSong->GetDisplayArtist() ); m_Artists.push_back( e->pSong->GetDisplayArtist() );
m_AltArtists.push_back( e->pSong->GetTranslitArtist() ); m_AltArtists.push_back( e->pSong->GetTranslitArtist() );
} }
+5 -5
View File
@@ -23,7 +23,7 @@ bool TrailEntry::operator== ( const TrailEntry &rhs ) const
EQUAL(pSteps) && EQUAL(pSteps) &&
EQUAL(Modifiers) && EQUAL(Modifiers) &&
EQUAL(Attacks) && EQUAL(Attacks) &&
EQUAL(bMystery) && EQUAL(bSecret) &&
EQUAL(iLowMeter) && EQUAL(iLowMeter) &&
EQUAL(iHighMeter) && EQUAL(iHighMeter) &&
EQUAL(dc); EQUAL(dc);
@@ -62,7 +62,7 @@ void Trail::SetRadarValues( const RadarValues &rv )
RadarValues Trail::GetRadarValues() const RadarValues Trail::GetRadarValues() const
{ {
if( IsMystery() ) if( IsSecret() )
{ {
// Don't calculate RadarValues for a non-fixed Course. They values are // Don't calculate RadarValues for a non-fixed Course. They values are
// worthless because they'll change every time this Trail is // worthless because they'll change every time this Trail is
@@ -152,7 +152,7 @@ void Trail::GetDisplayBpms( DisplayBpms &AddTo )
{ {
FOREACH_CONST( TrailEntry, m_vEntries, e ) FOREACH_CONST( TrailEntry, m_vEntries, e )
{ {
if( e->bMystery ) if( e->bSecret )
{ {
AddTo.Add( -1 ); AddTo.Add( -1 );
continue; continue;
@@ -177,11 +177,11 @@ void Trail::GetDisplayBpms( DisplayBpms &AddTo )
} }
} }
bool Trail::IsMystery() const bool Trail::IsSecret() const
{ {
FOREACH_CONST( TrailEntry, m_vEntries, e ) FOREACH_CONST( TrailEntry, m_vEntries, e )
{ {
if( e->bMystery ) if( e->bSecret )
return true; return true;
} }
return false; return false;
+3 -3
View File
@@ -15,7 +15,7 @@ struct TrailEntry
TrailEntry(): TrailEntry():
pSong(NULL), pSong(NULL),
pSteps(NULL), pSteps(NULL),
bMystery(false), bSecret(false),
iLowMeter(-1), iLowMeter(-1),
iHighMeter(-1), iHighMeter(-1),
dc(DIFFICULTY_INVALID) dc(DIFFICULTY_INVALID)
@@ -27,7 +27,7 @@ struct TrailEntry
Steps* pSteps; Steps* pSteps;
CString Modifiers; CString Modifiers;
AttackArray Attacks; AttackArray Attacks;
bool bMystery; bool bSecret;
/* These represent the meter and difficulty used by the course to pick the /* These represent the meter and difficulty used by the course to pick the
* steps; if you want the real difficulty and meter, look at pSteps. */ * steps; if you want the real difficulty and meter, look at pSteps. */
@@ -69,7 +69,7 @@ public:
int GetTotalMeter() const; int GetTotalMeter() const;
float GetLengthSeconds() const; float GetLengthSeconds() const;
void GetDisplayBpms( DisplayBpms &AddTo ); void GetDisplayBpms( DisplayBpms &AddTo );
bool IsMystery() const; bool IsSecret() const;
bool ContainsSong( Song* pSong ) const; bool ContainsSong( Song* pSong ) const;
}; };