This commit is contained in:
Glenn Maynard
2006-10-07 03:32:16 +00:00
parent 0e1dffeba5
commit b67e57864e
12 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -208,7 +208,7 @@ void Course::Init()
m_sSubTitleTranslit = ""; m_sSubTitleTranslit = "";
m_sBannerPath = ""; m_sBannerPath = "";
m_sCDTitlePath = ""; m_sCDTitlePath = "";
m_LoadedFromProfile = ProfileSlot_INVALID; m_LoadedFromProfile = ProfileSlot_Invalid;
m_iTrailCacheSeed = 0; m_iTrailCacheSeed = 0;
} }
+2 -2
View File
@@ -190,8 +190,8 @@ public:
bool GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) const; bool GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) const;
bool GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) const; bool GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) const;
bool IsAnEdit() const { return m_LoadedFromProfile != ProfileSlot_INVALID; } bool IsAnEdit() const { return m_LoadedFromProfile != ProfileSlot_Invalid; }
ProfileSlot m_LoadedFromProfile; // ProfileSlot_INVALID if wasn't loaded from a profile ProfileSlot m_LoadedFromProfile; // ProfileSlot_Invalid if wasn't loaded from a profile
typedef pair<StepsType,Difficulty> CacheEntry; typedef pair<StepsType,Difficulty> CacheEntry;
struct CacheData struct CacheData
+1 -1
View File
@@ -208,7 +208,7 @@ enum ProfileSlot
ProfileSlot_Player2, ProfileSlot_Player2,
ProfileSlot_Machine, ProfileSlot_Machine,
NUM_ProfileSlot, NUM_ProfileSlot,
ProfileSlot_INVALID ProfileSlot_Invalid
}; };
#define FOREACH_ProfileSlot( slot ) FOREACH_ENUM2( ProfileSlot, slot ) #define FOREACH_ProfileSlot( slot ) FOREACH_ENUM2( ProfileSlot, slot )
+2 -2
View File
@@ -47,7 +47,7 @@ Song::Song()
m_ForegroundChanges = AutoPtrCopyOnWrite<VBackgroundChange>(new VBackgroundChange); m_ForegroundChanges = AutoPtrCopyOnWrite<VBackgroundChange>(new VBackgroundChange);
m_LoadedFromProfile = ProfileSlot_INVALID; m_LoadedFromProfile = ProfileSlot_Invalid;
m_fMusicSampleStartSeconds = -1; m_fMusicSampleStartSeconds = -1;
m_fMusicSampleLengthSeconds = DEFAULT_MUSIC_SAMPLE_LENGTH; m_fMusicSampleLengthSeconds = DEFAULT_MUSIC_SAMPLE_LENGTH;
m_fMusicLengthSeconds = 0; m_fMusicLengthSeconds = 0;
@@ -1143,7 +1143,7 @@ void Song::FreeAllLoadedFromProfile( ProfileSlot slot )
Steps* pSteps = m_vpSteps[s]; Steps* pSteps = m_vpSteps[s];
if( !pSteps->WasLoadedFromProfile() ) if( !pSteps->WasLoadedFromProfile() )
continue; continue;
if( slot == ProfileSlot_INVALID || pSteps->GetLoadedFromProfileSlot() == slot ) if( slot == ProfileSlot_Invalid || pSteps->GetLoadedFromProfileSlot() == slot )
apToRemove.push_back( pSteps ); apToRemove.push_back( pSteps );
} }
+3 -3
View File
@@ -1742,10 +1742,10 @@ void SongManager::FreeAllLoadedFromProfile( ProfileSlot slot )
FOREACH( Course*, m_pCourses, c ) FOREACH( Course*, m_pCourses, c )
{ {
Course *pCourse = *c; Course *pCourse = *c;
if( pCourse->GetLoadedFromProfileSlot() == ProfileSlot_INVALID ) if( pCourse->GetLoadedFromProfileSlot() == ProfileSlot_Invalid )
continue; continue;
if( slot == ProfileSlot_INVALID || pCourse->GetLoadedFromProfileSlot() == slot ) if( slot == ProfileSlot_Invalid || pCourse->GetLoadedFromProfileSlot() == slot )
apToDelete.push_back( *c ); apToDelete.push_back( *c );
} }
@@ -1766,7 +1766,7 @@ int SongManager::GetNumStepsLoadedFromProfile()
FOREACH( Steps*, vpAllSteps, ss ) FOREACH( Steps*, vpAllSteps, ss )
{ {
if( (*ss)->GetLoadedFromProfileSlot() != ProfileSlot_INVALID ) if( (*ss)->GetLoadedFromProfileSlot() != ProfileSlot_Invalid )
iCount++; iCount++;
} }
} }
+1 -1
View File
@@ -41,7 +41,7 @@ public:
void LoadAllFromProfileDir( const RString &sProfileDir, ProfileSlot slot ); void LoadAllFromProfileDir( const RString &sProfileDir, ProfileSlot slot );
int GetNumStepsLoadedFromProfile(); int GetNumStepsLoadedFromProfile();
void FreeAllLoadedFromProfile( ProfileSlot slot = ProfileSlot_INVALID ); void FreeAllLoadedFromProfile( ProfileSlot slot = ProfileSlot_Invalid );
void LoadGroupSymLinks( RString sDir, RString sGroupFolder ); void LoadGroupSymLinks( RString sDir, RString sGroupFolder );
+3 -3
View File
@@ -51,7 +51,7 @@
AdditionalOptions="/EHa" AdditionalOptions="/EHa"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories=".;vorbis;libjpeg;&quot;lua-5.1\include&quot;;ffmpeg\include;BaseClasses" AdditionalIncludeDirectories=".;vorbis;libjpeg;&quot;lua-5.1\include&quot;;ffmpeg\include;BaseClasses"
PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,WINDOWS,DEBUG" PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,WINDOWS,DEBUG,_CRT_SECURE_NO_DEPRECATE"
ExceptionHandling="0" ExceptionHandling="0"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
@@ -158,7 +158,7 @@
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="2" FavorSizeOrSpeed="2"
AdditionalIncludeDirectories=".;vorbis;libjpeg;&quot;lua-5.1\include&quot;;ffmpeg\include;BaseClasses" AdditionalIncludeDirectories=".;vorbis;libjpeg;&quot;lua-5.1\include&quot;;ffmpeg\include;BaseClasses"
PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE" PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE,_CRT_SECURE_NO_DEPRECATE"
StringPooling="true" StringPooling="true"
MinimalRebuild="false" MinimalRebuild="false"
ExceptionHandling="0" ExceptionHandling="0"
@@ -263,7 +263,7 @@
AdditionalOptions="/EHa" AdditionalOptions="/EHa"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories=".;vorbis;libjpeg;&quot;lua-5.1\include&quot;;ffmpeg\include;BaseClasses" AdditionalIncludeDirectories=".;vorbis;libjpeg;&quot;lua-5.1\include&quot;;ffmpeg\include;BaseClasses"
PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,WINDOWS,DEBUG" PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,WINDOWS,DEBUG,_CRT_SECURE_NO_DEPRECATE"
ExceptionHandling="0" ExceptionHandling="0"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
+2 -2
View File
@@ -30,7 +30,7 @@ Steps::Steps()
{ {
m_bSavedToDisk = false; m_bSavedToDisk = false;
m_StepsType = StepsType_Invalid; m_StepsType = StepsType_Invalid;
m_LoadedFromProfile = ProfileSlot_INVALID; m_LoadedFromProfile = ProfileSlot_Invalid;
m_iHash = 0; m_iHash = 0;
m_Difficulty = DIFFICULTY_INVALID; m_Difficulty = DIFFICULTY_INVALID;
m_iMeter = 0; m_iMeter = 0;
@@ -282,7 +282,7 @@ void Steps::Compress() const
return; return;
} }
if( !m_sFilename.empty() && m_LoadedFromProfile == ProfileSlot_INVALID ) if( !m_sFilename.empty() && m_LoadedFromProfile == ProfileSlot_Invalid )
{ {
/* /*
* We have a file on disk; clear all data in memory. * We have a file on disk; clear all data in memory.
+2 -2
View File
@@ -34,7 +34,7 @@ public:
// Use a special value of difficulty // Use a special value of difficulty
bool IsAnEdit() const { return m_Difficulty == DIFFICULTY_EDIT; } bool IsAnEdit() const { return m_Difficulty == DIFFICULTY_EDIT; }
bool IsAPlayerEdit() const { return IsAnEdit() && GetLoadedFromProfileSlot() < ProfileSlot_Machine; } bool IsAPlayerEdit() const { return IsAnEdit() && GetLoadedFromProfileSlot() < ProfileSlot_Machine; }
bool WasLoadedFromProfile() const { return m_LoadedFromProfile != ProfileSlot_INVALID; } bool WasLoadedFromProfile() const { return m_LoadedFromProfile != ProfileSlot_Invalid; }
ProfileSlot GetLoadedFromProfileSlot() const { return m_LoadedFromProfile; } ProfileSlot GetLoadedFromProfileSlot() const { return m_LoadedFromProfile; }
RString GetDescription() const { return Real()->m_sDescription; } RString GetDescription() const { return Real()->m_sDescription; }
Difficulty GetDifficulty() const { return Real()->m_Difficulty; } Difficulty GetDifficulty() const { return Real()->m_Difficulty; }
@@ -84,7 +84,7 @@ private:
RString m_sFilename; RString m_sFilename;
bool m_bSavedToDisk; // true if this was loaded from disk or has been saved to disk. bool m_bSavedToDisk; // true if this was loaded from disk or has been saved to disk.
ProfileSlot m_LoadedFromProfile; // ProfileSlot_INVALID if wasn't loaded from a profile ProfileSlot m_LoadedFromProfile; // ProfileSlot_Invalid if wasn't loaded from a profile
/* These values are pulled from the autogen source first, if there is one. */ /* These values are pulled from the autogen source first, if there is one. */
mutable unsigned m_iHash; // only used if m_Difficulty == DIFFICULTY_EDIT mutable unsigned m_iHash; // only used if m_Difficulty == DIFFICULTY_EDIT
+1 -1
View File
@@ -453,7 +453,7 @@ void UnlockManager::Load()
else else
{ {
const UnlockRequirement ut = StringToUnlockRequirement( cmd.GetName() ); const UnlockRequirement ut = StringToUnlockRequirement( cmd.GetName() );
if( ut != UnlockRequirement_INVALID ) if( ut != UnlockRequirement_Invalid )
current.m_fRequirement[ut] = cmd.GetArg(1); current.m_fRequirement[ut] = cmd.GetArg(1);
} }
} }
+3 -3
View File
@@ -24,7 +24,7 @@ enum UnlockRequirement
UnlockRequirement_Toasties, UnlockRequirement_Toasties,
UnlockRequirement_StagesCleared, UnlockRequirement_StagesCleared,
NUM_UnlockRequirement, NUM_UnlockRequirement,
UnlockRequirement_INVALID, UnlockRequirement_Invalid,
}; };
LuaDeclareType( UnlockRequirement ); LuaDeclareType( UnlockRequirement );
@@ -35,7 +35,7 @@ enum UnlockRewardType {
UnlockRewardType_Course, UnlockRewardType_Course,
UnlockRewardType_Modifier, UnlockRewardType_Modifier,
NUM_UnlockRewardType, NUM_UnlockRewardType,
UnlockRewardType_INVALID UnlockRewardType_Invalid
}; };
const RString& UnlockRewardTypeToString( UnlockRewardType i ); const RString& UnlockRewardTypeToString( UnlockRewardType i );
const RString& UnlockRewardTypeToLocalizedString( UnlockRewardType i ); const RString& UnlockRewardTypeToLocalizedString( UnlockRewardType i );
@@ -52,7 +52,7 @@ class UnlockEntry
public: public:
UnlockEntry() UnlockEntry()
{ {
m_Type = UnlockRewardType_INVALID; m_Type = UnlockRewardType_Invalid;
m_pSong = NULL; m_pSong = NULL;
m_dc = DIFFICULTY_INVALID; m_dc = DIFFICULTY_INVALID;
+3 -3
View File
@@ -87,7 +87,7 @@ public:
RString m_sGroupName; RString m_sGroupName;
ProfileSlot m_LoadedFromProfile; // ProfileSlot_INVALID if wasn't loaded from a profile ProfileSlot m_LoadedFromProfile; // ProfileSlot_Invalid if wasn't loaded from a profile
bool m_bIsSymLink; bool m_bIsSymLink;
RString m_sMainTitle, m_sSubTitle, m_sArtist; RString m_sMainTitle, m_sSubTitle, m_sArtist;
@@ -199,8 +199,8 @@ public:
void AddSteps( Steps* pSteps ); // we are responsible for deleting the memory pointed to by pSteps! void AddSteps( Steps* pSteps ); // we are responsible for deleting the memory pointed to by pSteps!
void DeleteSteps( const Steps* pSteps, bool bReAutoGen = true ); void DeleteSteps( const Steps* pSteps, bool bReAutoGen = true );
void FreeAllLoadedFromProfile( ProfileSlot slot = ProfileSlot_INVALID ); void FreeAllLoadedFromProfile( ProfileSlot slot = ProfileSlot_Invalid );
bool WasLoadedFromProfile() const { return m_LoadedFromProfile != ProfileSlot_INVALID; } bool WasLoadedFromProfile() const { return m_LoadedFromProfile != ProfileSlot_Invalid; }
void GetStepsLoadedFromProfile( ProfileSlot slot, vector<Steps*> &vpStepsOut ) const; void GetStepsLoadedFromProfile( ProfileSlot slot, vector<Steps*> &vpStepsOut ) const;
int GetNumStepsLoadedFromProfile( ProfileSlot slot ) const; int GetNumStepsLoadedFromProfile( ProfileSlot slot ) const;
bool IsEditAlreadyLoaded( Steps* pSteps ) const; bool IsEditAlreadyLoaded( Steps* pSteps ) const;