removed a few unused functions
This commit is contained in:
@@ -183,52 +183,6 @@ static bool CompareSongEntries(const SongEntry &se1, const SongEntry &se2)
|
||||
return se1.m_sSongName < se2.m_sSongName;
|
||||
}
|
||||
|
||||
/*
|
||||
* Why not just use one of the established, well-understood file formats?
|
||||
* MsdFile should work fine, eg.
|
||||
* #LOCK:song name:DP=50,SP=3;
|
||||
* #LOCK...;
|
||||
* and people don't have to learn a new file format.
|
||||
*/
|
||||
bool UnlockSystem::ParseRow(CString text, CString &type, float &qty,
|
||||
CString &songname)
|
||||
{
|
||||
int end = 0; // sets a value in case | does not exist
|
||||
char unlock_type[4];
|
||||
char qty_text[20];
|
||||
|
||||
for(unsigned pos = 0; pos < text.size(); pos++ )
|
||||
{
|
||||
if (text[pos] == '[') text[pos] = ' ';
|
||||
if (text[pos] == ']') text[pos] = ' ';
|
||||
if (text[pos] == '|')
|
||||
{
|
||||
end = pos;
|
||||
text[pos] = ' ';
|
||||
}
|
||||
}
|
||||
// this will bypass the last character, but it can't be |
|
||||
// since then it would be end of string
|
||||
|
||||
if (end == 0) // handle lines lacking content
|
||||
return false;
|
||||
|
||||
songname = text.Right(text.size() - 1 - end);
|
||||
|
||||
sscanf(text, "%s %s|", unlock_type, qty_text);
|
||||
|
||||
type = unlock_type;
|
||||
qty = (float) atof(qty_text);
|
||||
|
||||
LOG->Trace( "UnlockSystem Entry %s", text.c_str() );
|
||||
LOG->Trace( " Title %s", songname.c_str() );
|
||||
LOG->Trace( " Type %s", type.c_str() );
|
||||
LOG->Trace( " Value %s", qty_text );
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SongEntry::updateLocked()
|
||||
{
|
||||
if (!(isLocked)) return true; // if its already true
|
||||
@@ -424,18 +378,6 @@ Song *SongEntry::GetSong() const
|
||||
return SONGMAN->FindSong( "", m_sSongName );
|
||||
}
|
||||
|
||||
void UnlockSystem::DebugPrint()
|
||||
{
|
||||
for(unsigned i=0; i < m_SongEntries.size(); i++)
|
||||
{
|
||||
CString tmp = " ";
|
||||
if (!m_SongEntries[i].isLocked) tmp = "un";
|
||||
LOG->Trace( "UnlockSystem entry %d: %s",i, m_SongEntries[i].m_sSongName.c_str() );
|
||||
LOG->Trace( "Status:%slocked", tmp.c_str() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// This is mainly to streamline the INI for unnecessary values.
|
||||
void UnlockSystem::InitRouletteSeeds(int MaxRouletteSlot)
|
||||
{
|
||||
|
||||
@@ -56,17 +56,21 @@ public:
|
||||
float DancePointsUntilNextUnlock();
|
||||
float ArcadePointsUntilNextUnlock();
|
||||
float SongPointsUntilNextUnlock();
|
||||
// returns # of points till next unlock - used for ScreenUnlock
|
||||
|
||||
SongEntry *FindSong( CString songname );
|
||||
// used for screen unlock
|
||||
// retrieves a corresponding SongEntry, or NULL if none exists
|
||||
|
||||
bool SongIsLocked( const Song *song );
|
||||
bool CourseIsLocked( const Course *course );
|
||||
|
||||
bool SongIsRoulette( const Song *song );
|
||||
bool LoadFromDATFile( CString sPath );
|
||||
bool CourseIsLocked( const Course *course );
|
||||
// used on select screens
|
||||
|
||||
vector<SongEntry> m_SongEntries; // All locked songs are stored here
|
||||
bool LoadFromDATFile( CString sPath );
|
||||
// executed when program is first executed
|
||||
|
||||
vector<SongEntry> m_SongEntries;
|
||||
// All locked songs are stored here
|
||||
|
||||
// functions that add to values
|
||||
float UnlockAddAP(Grade credit);
|
||||
@@ -78,9 +82,11 @@ public:
|
||||
float UnlockFailExtraStage();
|
||||
float UnlockClearStage();
|
||||
float UnlockToasty();
|
||||
bool RouletteUnlock( const Song *song );
|
||||
|
||||
// read and write unlock functions
|
||||
bool RouletteUnlock( const Song *song );
|
||||
// unlocks given song in roulette
|
||||
|
||||
// read and write unlock in values
|
||||
bool ReadValues( CString filename);
|
||||
bool WriteValues( CString filename);
|
||||
|
||||
@@ -94,14 +100,13 @@ public:
|
||||
float StagesCleared;
|
||||
CString RouletteSeeds;
|
||||
|
||||
void DebugPrint();
|
||||
|
||||
private:
|
||||
void SortSongEntriesArray(); // sorts unlocks
|
||||
bool ParseRow(CString text, CString &type, float &qty, CString &songname);
|
||||
SongEntry *FindSong( const Song *pSong );
|
||||
SongEntry *FindCourse( const Course *pCourse );
|
||||
void InitRouletteSeeds(int MaxRouletteSlot);
|
||||
|
||||
void InitRouletteSeeds(int MaxRouletteSlot);
|
||||
// makes RouletteSeeds more efficient
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user