This commit is contained in:
Glenn Maynard
2005-02-21 06:16:52 +00:00
parent afd53b6eb8
commit ec75aae7ac
2 changed files with 5 additions and 3 deletions
+4 -3
View File
@@ -14,7 +14,7 @@ UnlockManager* UNLOCKMAN = NULL; // global and accessable from anywhere in our p
#define UNLOCKS_PATH "Data/Unlocks.dat" #define UNLOCKS_PATH "Data/Unlocks.dat"
static const char *g_UnlockNames[NUM_UNLOCK_TYPES] = static CString UnlockTypeNames[NUM_UNLOCK_TYPES] =
{ {
"ArcadePointsAccumulated", "ArcadePointsAccumulated",
"DancePointsAccumulated", "DancePointsAccumulated",
@@ -24,6 +24,7 @@ static const char *g_UnlockNames[NUM_UNLOCK_TYPES] =
"TotalToastysSeen", "TotalToastysSeen",
"TotalStagesCleared" "TotalStagesCleared"
}; };
XToString(UnlockType);
UnlockManager::UnlockManager() UnlockManager::UnlockManager()
{ {
@@ -314,9 +315,9 @@ bool UnlockManager::Load()
for(unsigned i=0; i < m_SongEntries.size(); i++) for(unsigned i=0; i < m_SongEntries.size(); i++)
{ {
CString str = ssprintf( "Unlock: %s; ", m_SongEntries[i].m_sSongName.c_str() ); CString str = ssprintf( "Unlock: %s; ", m_SongEntries[i].m_sSongName.c_str() );
for( int j = 0; j < NUM_UNLOCK_TYPES; ++j ) FOREACH_UnlockType(j)
if( m_SongEntries[i].m_fRequired[j] ) if( m_SongEntries[i].m_fRequired[j] )
str += ssprintf( "%s = %f; ", g_UnlockNames[j], m_SongEntries[i].m_fRequired[j] ); str += ssprintf( "%s = %f; ", UnlockTypeToString(j).c_str(), m_SongEntries[i].m_fRequired[j] );
str += ssprintf( "code = %i ", m_SongEntries[i].m_iCode ); str += ssprintf( "code = %i ", m_SongEntries[i].m_iCode );
str += m_SongEntries[i].IsLocked()? "locked":"unlocked"; str += m_SongEntries[i].IsLocked()? "locked":"unlocked";
+1
View File
@@ -21,6 +21,7 @@ enum UnlockType
NUM_UNLOCK_TYPES, NUM_UNLOCK_TYPES,
UNLOCK_INVALID, UNLOCK_INVALID,
}; };
#define FOREACH_UnlockType( u ) FOREACH_ENUM( UnlockType, NUM_UNLOCK_TYPES, u )
struct UnlockEntry struct UnlockEntry
{ {