continue phasing out BASE_PATH and SLASH
This commit is contained in:
@@ -57,7 +57,7 @@ bool AnnouncerManager::DoesAnnouncerExist( CString sAnnouncerName )
|
|||||||
|
|
||||||
CString AnnouncerManager::GetAnnouncerDirFromName( CString sAnnouncerName )
|
CString AnnouncerManager::GetAnnouncerDirFromName( CString sAnnouncerName )
|
||||||
{
|
{
|
||||||
return ANNOUNCERS_DIR + sAnnouncerName + SLASH;
|
return ANNOUNCERS_DIR + sAnnouncerName + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnnouncerManager::SwitchAnnouncer( CString sNewAnnouncerName )
|
void AnnouncerManager::SwitchAnnouncer( CString sNewAnnouncerName )
|
||||||
@@ -103,8 +103,8 @@ CString AnnouncerManager::GetPathTo( CString sAnnouncerName, CString sFolderName
|
|||||||
|
|
||||||
const CString AnnouncerPath = GetAnnouncerDirFromName(sAnnouncerName);
|
const CString AnnouncerPath = GetAnnouncerDirFromName(sAnnouncerName);
|
||||||
|
|
||||||
if( !DirectoryIsEmpty(AnnouncerPath+sFolderName+SLASH) )
|
if( !DirectoryIsEmpty(AnnouncerPath+sFolderName+"/") )
|
||||||
return AnnouncerPath+sFolderName+SLASH;
|
return AnnouncerPath+sFolderName+"/";
|
||||||
|
|
||||||
/* Search for the announcer folder in the list of aliases. */
|
/* Search for the announcer folder in the list of aliases. */
|
||||||
int i;
|
int i;
|
||||||
@@ -113,8 +113,8 @@ CString AnnouncerManager::GetPathTo( CString sAnnouncerName, CString sFolderName
|
|||||||
if(sFolderName.CompareNoCase(aliases[i][0]))
|
if(sFolderName.CompareNoCase(aliases[i][0]))
|
||||||
continue; /* no match */
|
continue; /* no match */
|
||||||
|
|
||||||
if( !DirectoryIsEmpty(AnnouncerPath+aliases[i][1]+SLASH) )
|
if( !DirectoryIsEmpty(AnnouncerPath+aliases[i][1]+"/") )
|
||||||
return AnnouncerPath+aliases[i][1]+SLASH;
|
return AnnouncerPath+aliases[i][1]+"/";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No announcer directory matched. In debug, create the directory by
|
/* No announcer directory matched. In debug, create the directory by
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ CString BannerCache::GetBannerCachePath( CString BannerPath )
|
|||||||
{
|
{
|
||||||
/* Use GetHashForString, not ForFile, since we don't want to spend time
|
/* Use GetHashForString, not ForFile, since we don't want to spend time
|
||||||
* checking the file size and date. */
|
* checking the file size and date. */
|
||||||
return ssprintf( CACHE_DIR "Banners" SLASH "%u", GetHashForString(BannerPath) );
|
return ssprintf( CACHE_DIR "Banners/%u", GetHashForString(BannerPath) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void BannerCache::LoadBanner( CString BannerPath )
|
void BannerCache::LoadBanner( CString BannerPath )
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
Bookkeeper* BOOKKEEPER = NULL; // global and accessable from anywhere in our program
|
Bookkeeper* BOOKKEEPER = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
static const CString COINS_DAT = BASE_PATH "Data" SLASH "Coins.dat";
|
static const CString COINS_DAT = "Data/Coins.dat";
|
||||||
|
|
||||||
const int COINS_DAT_VERSION = 1;
|
const int COINS_DAT_VERSION = 1;
|
||||||
|
|
||||||
|
|||||||
+14
-14
@@ -19,13 +19,13 @@
|
|||||||
bool Character::Load( CString sCharDir )
|
bool Character::Load( CString sCharDir )
|
||||||
{
|
{
|
||||||
// Save character directory
|
// Save character directory
|
||||||
if( sCharDir.Right(1)!=SLASH )
|
if( sCharDir.Right(1) != "/" )
|
||||||
sCharDir += SLASH;
|
sCharDir += "/";
|
||||||
m_sCharDir = sCharDir;
|
m_sCharDir = sCharDir;
|
||||||
|
|
||||||
// Save character name
|
// Save character name
|
||||||
vector<CString> as;
|
vector<CString> as;
|
||||||
split( sCharDir, SLASH, as );
|
split( sCharDir, "/", as );
|
||||||
m_sName = as.back();
|
m_sName = as.back();
|
||||||
|
|
||||||
// Save attacks
|
// Save attacks
|
||||||
@@ -61,9 +61,9 @@ CString Character::GetModelPath() const
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
CString Character::GetRestAnimationPath() const { return DerefRedir(GetRandomFileInDir(m_sCharDir + "Rest" SLASH)); }
|
CString Character::GetRestAnimationPath() const { return DerefRedir(GetRandomFileInDir(m_sCharDir + "Rest/")); }
|
||||||
CString Character::GetWarmUpAnimationPath() const { return DerefRedir(GetRandomFileInDir(m_sCharDir + "WarmUp" SLASH)); }
|
CString Character::GetWarmUpAnimationPath() const { return DerefRedir(GetRandomFileInDir(m_sCharDir + "WarmUp/")); }
|
||||||
CString Character::GetDanceAnimationPath() const { return DerefRedir(GetRandomFileInDir(m_sCharDir + "Dance" SLASH)); }
|
CString Character::GetDanceAnimationPath() const { return DerefRedir(GetRandomFileInDir(m_sCharDir + "Dance/")); }
|
||||||
CString Character::GetTakingABreakPath() const
|
CString Character::GetTakingABreakPath() const
|
||||||
{
|
{
|
||||||
CStringArray as;
|
CStringArray as;
|
||||||
@@ -144,21 +144,21 @@ CString Character::GetHeadPath() const
|
|||||||
|
|
||||||
bool Character::Has2DElems()
|
bool Character::Has2DElems()
|
||||||
{
|
{
|
||||||
if( DoesFileExist(m_sCharDir + SLASH + "2DFail" + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(m_sCharDir + "2DFail/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
return true;
|
return true;
|
||||||
if( DoesFileExist(m_sCharDir + SLASH + "2DFever" + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(m_sCharDir + "2DFever/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
return true;
|
return true;
|
||||||
if( DoesFileExist(m_sCharDir + SLASH + "2DGood" + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(m_sCharDir + "2DGood/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
return true;
|
return true;
|
||||||
if( DoesFileExist(m_sCharDir + SLASH + "2DMiss" + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(m_sCharDir + "2DMiss/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
return true;
|
return true;
|
||||||
if( DoesFileExist(m_sCharDir + SLASH + "2DWin" + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(m_sCharDir + "2DWin/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
return true;
|
return true;
|
||||||
if( DoesFileExist(m_sCharDir + SLASH + "2DWinFever" + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(m_sCharDir + "2DWinFever/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
return true;
|
return true;
|
||||||
if( DoesFileExist(m_sCharDir + SLASH + "2DGreat" + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(m_sCharDir + "2DGreat/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
return true;
|
return true;
|
||||||
if( DoesFileExist(m_sCharDir + SLASH + "2DIdle" + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(m_sCharDir + "2DIdle/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ float Course::GetMeter( int Difficult ) const
|
|||||||
return float(m_iMeter + (IsDifficult(Difficult)? DifficultMeterRamp:0));
|
return float(m_iMeter + (IsDifficult(Difficult)? DifficultMeterRamp:0));
|
||||||
|
|
||||||
/*LOG->Trace( "Course file '%s' contains a song '%s%s%s' that is not present",
|
/*LOG->Trace( "Course file '%s' contains a song '%s%s%s' that is not present",
|
||||||
m_sPath.c_str(), sGroup.c_str(), sGroup.size()? SLASH:"", sSong.c_str());*/
|
m_sPath.c_str(), sGroup.c_str(), sGroup.size()? "/":"", sSong.c_str());*/
|
||||||
vector<Info> ci;
|
vector<Info> ci;
|
||||||
GetCourseInfo( GAMESTATE->GetCurrentStyleDef()->m_StepsType, ci, Difficult );
|
GetCourseInfo( GAMESTATE->GetCurrentStyleDef()->m_StepsType, ci, Difficult );
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ void Course::Save()
|
|||||||
{
|
{
|
||||||
// strip off everything but the group name and song dir
|
// strip off everything but the group name and song dir
|
||||||
CStringArray as;
|
CStringArray as;
|
||||||
split( entry.pSong->GetSongDir(), SLASH, as );
|
split( entry.pSong->GetSongDir(), "/", as );
|
||||||
ASSERT( !as.empty() );
|
ASSERT( !as.empty() );
|
||||||
CString sGroup = as[ as.size()-2 ];
|
CString sGroup = as[ as.size()-2 ];
|
||||||
CString sSong = as[ as.size()-1 ];
|
CString sSong = as[ as.size()-1 ];
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ DancingCharacters::DancingCharacters()
|
|||||||
CString sCharacterDirectory = pChar->m_sCharDir;
|
CString sCharacterDirectory = pChar->m_sCharDir;
|
||||||
CString sCurrentAnim;
|
CString sCurrentAnim;
|
||||||
sCurrentAnim = sCharacterDirectory + "2DIdle";
|
sCurrentAnim = sCharacterDirectory + "2DIdle";
|
||||||
if( DoesFileExist(sCurrentAnim + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(sCurrentAnim + "/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
{
|
{
|
||||||
m_bHasIdleAnim[p] = m_bHas2DElements[p] = true;
|
m_bHasIdleAnim[p] = m_bHas2DElements[p] = true;
|
||||||
m_bgIdle[p].LoadFromAniDir( sCurrentAnim );
|
m_bgIdle[p].LoadFromAniDir( sCurrentAnim );
|
||||||
@@ -71,7 +71,7 @@ DancingCharacters::DancingCharacters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sCurrentAnim = sCharacterDirectory + "2DMiss";
|
sCurrentAnim = sCharacterDirectory + "2DMiss";
|
||||||
if( DoesFileExist(sCurrentAnim + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(sCurrentAnim + "/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
{
|
{
|
||||||
m_bHasMissAnim[p] = m_bHas2DElements[p] = true;
|
m_bHasMissAnim[p] = m_bHas2DElements[p] = true;
|
||||||
m_bgMiss[p].LoadFromAniDir( sCurrentAnim );
|
m_bgMiss[p].LoadFromAniDir( sCurrentAnim );
|
||||||
@@ -79,7 +79,7 @@ DancingCharacters::DancingCharacters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sCurrentAnim = sCharacterDirectory + "2DGood";
|
sCurrentAnim = sCharacterDirectory + "2DGood";
|
||||||
if( DoesFileExist(sCurrentAnim + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(sCurrentAnim + "/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
{
|
{
|
||||||
m_bHasGoodAnim[p] = m_bHas2DElements[p] = true;
|
m_bHasGoodAnim[p] = m_bHas2DElements[p] = true;
|
||||||
m_bgGood[p].LoadFromAniDir( sCurrentAnim );
|
m_bgGood[p].LoadFromAniDir( sCurrentAnim );
|
||||||
@@ -87,7 +87,7 @@ DancingCharacters::DancingCharacters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sCurrentAnim = sCharacterDirectory + "2DGreat";
|
sCurrentAnim = sCharacterDirectory + "2DGreat";
|
||||||
if( DoesFileExist(sCurrentAnim + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(sCurrentAnim + "/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
{
|
{
|
||||||
m_bHasGreatAnim[p] = m_bHas2DElements[p] = true;
|
m_bHasGreatAnim[p] = m_bHas2DElements[p] = true;
|
||||||
m_bgGreat[p].LoadFromAniDir( sCurrentAnim );
|
m_bgGreat[p].LoadFromAniDir( sCurrentAnim );
|
||||||
@@ -95,7 +95,7 @@ DancingCharacters::DancingCharacters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sCurrentAnim = sCharacterDirectory + "2DFever";
|
sCurrentAnim = sCharacterDirectory + "2DFever";
|
||||||
if( DoesFileExist(sCurrentAnim + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(sCurrentAnim + "/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
{
|
{
|
||||||
m_bHasFeverAnim[p] = m_bHas2DElements[p] = true;
|
m_bHasFeverAnim[p] = m_bHas2DElements[p] = true;
|
||||||
m_bgFever[p].LoadFromAniDir( sCurrentAnim );
|
m_bgFever[p].LoadFromAniDir( sCurrentAnim );
|
||||||
@@ -103,7 +103,7 @@ DancingCharacters::DancingCharacters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sCurrentAnim = sCharacterDirectory + "2DFail";
|
sCurrentAnim = sCharacterDirectory + "2DFail";
|
||||||
if( DoesFileExist(sCurrentAnim + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(sCurrentAnim + "/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
{
|
{
|
||||||
m_bHasFailAnim[p] = m_bHas2DElements[p] = true;
|
m_bHasFailAnim[p] = m_bHas2DElements[p] = true;
|
||||||
m_bgFail[p].LoadFromAniDir( sCurrentAnim );
|
m_bgFail[p].LoadFromAniDir( sCurrentAnim );
|
||||||
@@ -111,7 +111,7 @@ DancingCharacters::DancingCharacters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sCurrentAnim = sCharacterDirectory + "2DWin";
|
sCurrentAnim = sCharacterDirectory + "2DWin";
|
||||||
if( DoesFileExist(sCurrentAnim + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(sCurrentAnim + "/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
{
|
{
|
||||||
m_bHasWinAnim[p] = m_bHas2DElements[p] = true;
|
m_bHasWinAnim[p] = m_bHas2DElements[p] = true;
|
||||||
m_bgWin[p].LoadFromAniDir( sCurrentAnim );
|
m_bgWin[p].LoadFromAniDir( sCurrentAnim );
|
||||||
@@ -119,7 +119,7 @@ DancingCharacters::DancingCharacters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sCurrentAnim = sCharacterDirectory + "2DWinFever";
|
sCurrentAnim = sCharacterDirectory + "2DWinFever";
|
||||||
if( DoesFileExist(sCurrentAnim + SLASH + "BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
if( DoesFileExist(sCurrentAnim + "/BGAnimation.ini") ) // check 2D Idle BGAnim exists
|
||||||
{
|
{
|
||||||
m_bHasWinFeverAnim[p] = m_bHas2DElements[p] = true;
|
m_bHasWinFeverAnim[p] = m_bHas2DElements[p] = true;
|
||||||
m_bgWinFever[p].LoadFromAniDir( sCurrentAnim );
|
m_bgWinFever[p].LoadFromAniDir( sCurrentAnim );
|
||||||
|
|||||||
@@ -261,9 +261,9 @@ const int NUM_ATTACKS_PER_LEVEL = 3;
|
|||||||
const int ITEM_NONE = -1;
|
const int ITEM_NONE = -1;
|
||||||
|
|
||||||
|
|
||||||
#define BG_ANIMS_DIR CString(BASE_PATH "BGAnimations" SLASH)
|
#define BG_ANIMS_DIR CString("BGAnimations/")
|
||||||
#define VISUALIZATIONS_DIR CString(BASE_PATH "Visualizations" SLASH)
|
#define VISUALIZATIONS_DIR CString("Visualizations/")
|
||||||
#define RANDOMMOVIES_DIR CString(BASE_PATH "RandomMovies" SLASH)
|
#define RANDOMMOVIES_DIR CString("RandomMovies/")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
|
|
||||||
GameState* GAMESTATE = NULL; // global and accessable from anywhere in our program
|
GameState* GAMESTATE = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
#define CHARACTERS_DIR BASE_PATH "Characters" SLASH
|
#define CHARACTERS_DIR "Characters/"
|
||||||
#define NAMES_BLACKLIST_FILE BASE_PATH "Data" SLASH "NamesBlacklist.dat"
|
#define NAMES_BLACKLIST_FILE "Data/NamesBlacklist.dat"
|
||||||
|
|
||||||
GameState::GameState()
|
GameState::GameState()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
InputMapper* INPUTMAPPER = NULL; // global and accessable from anywhere in our program
|
InputMapper* INPUTMAPPER = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
#define KEYMAPS_PATH BASE_PATH "Data" SLASH "Keymaps.ini"
|
#define KEYMAPS_PATH "Data/Keymaps.ini"
|
||||||
|
|
||||||
InputMapper::InputMapper()
|
InputMapper::InputMapper()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,9 +27,9 @@
|
|||||||
NoteSkinManager* NOTESKIN = NULL; // global object accessable from anywhere in the program
|
NoteSkinManager* NOTESKIN = NULL; // global object accessable from anywhere in the program
|
||||||
|
|
||||||
|
|
||||||
const CString NOTESKINS_DIR = BASE_PATH "NoteSkins" SLASH;
|
const CString NOTESKINS_DIR = "NoteSkins/";
|
||||||
const CString GAME_BASE_NOTESKIN_NAME = "default";
|
const CString GAME_BASE_NOTESKIN_NAME = "default";
|
||||||
const CString GLOBAL_BASE_NOTESKIN_DIR = NOTESKINS_DIR + "common" SLASH "default" SLASH;
|
const CString GLOBAL_BASE_NOTESKIN_DIR = NOTESKINS_DIR + "common/default/";
|
||||||
|
|
||||||
NoteSkinManager::NoteSkinManager()
|
NoteSkinManager::NoteSkinManager()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ bool KSFLoader::LoadGlobalData( const CString &sPath, Song &out )
|
|||||||
/* Try to fill in missing bits of information from the pathname. */
|
/* Try to fill in missing bits of information from the pathname. */
|
||||||
{
|
{
|
||||||
CStringArray asBits;
|
CStringArray asBits;
|
||||||
split( sPath, SLASH, asBits, true);
|
split( sPath, "/", asBits, true);
|
||||||
|
|
||||||
ASSERT(asBits.size() > 1);
|
ASSERT(asBits.size() > 1);
|
||||||
LoadTags(asBits[asBits.size()-2], out);
|
LoadTags(asBits[asBits.size()-2], out);
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
#include "RageSoundReader_Resample.h" /* for ResampleQuality */
|
#include "RageSoundReader_Resample.h" /* for ResampleQuality */
|
||||||
#include "RageFile.h"
|
#include "RageFile.h"
|
||||||
|
|
||||||
#define STEPMANIA_INI_PATH BASE_PATH "Data" SLASH "StepMania.ini"
|
#define STEPMANIA_INI_PATH "Data/StepMania.ini"
|
||||||
#define STATIC_INI_PATH BASE_PATH "Data" SLASH "Static.ini"
|
#define STATIC_INI_PATH "Data/Static.ini"
|
||||||
|
|
||||||
PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program
|
PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ const int COURSE_SCORES_VERSION = 7;
|
|||||||
static const char *MemCardDirs[NUM_PLAYERS] =
|
static const char *MemCardDirs[NUM_PLAYERS] =
|
||||||
{
|
{
|
||||||
/* @ is important; see RageFileManager LoadedDriver::GetPath */
|
/* @ is important; see RageFileManager LoadedDriver::GetPath */
|
||||||
"@mc1" SLASH,
|
"@mc1/",
|
||||||
"@mc2" SLASH,
|
"@mc2/",
|
||||||
};
|
};
|
||||||
|
|
||||||
ProfileManager::ProfileManager()
|
ProfileManager::ProfileManager()
|
||||||
@@ -94,7 +94,7 @@ void ProfileManager::GetLocalProfileNames( vector<CString> &asNamesOut )
|
|||||||
CString sProfileID = vsProfileIDs[i];
|
CString sProfileID = vsProfileIDs[i];
|
||||||
|
|
||||||
Profile pro;
|
Profile pro;
|
||||||
pro.LoadFromIni( USER_PROFILES_DIR + sProfileID + SLASH + PROFILE_FILE );
|
pro.LoadFromIni( USER_PROFILES_DIR + sProfileID + "/" + PROFILE_FILE );
|
||||||
asNamesOut.push_back( pro.m_sName );
|
asNamesOut.push_back( pro.m_sName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@ void ProfileManager::GetLocalProfileNames( vector<CString> &asNamesOut )
|
|||||||
bool ProfileManager::LoadProfile( PlayerNumber pn, CString sProfileDir, bool bIsMemCard )
|
bool ProfileManager::LoadProfile( PlayerNumber pn, CString sProfileDir, bool bIsMemCard )
|
||||||
{
|
{
|
||||||
ASSERT( !sProfileDir.empty() );
|
ASSERT( !sProfileDir.empty() );
|
||||||
ASSERT( sProfileDir.Right(1) == SLASH );
|
ASSERT( sProfileDir.Right(1) == "/" );
|
||||||
|
|
||||||
m_sProfileDir[pn] = sProfileDir;
|
m_sProfileDir[pn] = sProfileDir;
|
||||||
m_bUsingMemoryCard[pn] = bIsMemCard;
|
m_bUsingMemoryCard[pn] = bIsMemCard;
|
||||||
@@ -155,7 +155,7 @@ bool ProfileManager::LoadDefaultProfileFromMachine( PlayerNumber pn )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CString sDir = USER_PROFILES_DIR + sProfileID + SLASH;
|
CString sDir = USER_PROFILES_DIR + sProfileID + "/";
|
||||||
|
|
||||||
return LoadProfile( pn, sDir, false );
|
return LoadProfile( pn, sDir, false );
|
||||||
}
|
}
|
||||||
@@ -237,7 +237,7 @@ bool Profile::LoadFromIni( CString sIniPath )
|
|||||||
Init();
|
Init();
|
||||||
|
|
||||||
CStringArray asBits;
|
CStringArray asBits;
|
||||||
split( Dirname(sIniPath), SLASH, asBits, true );
|
split( Dirname(sIniPath), "/", asBits, true );
|
||||||
CString sLastDir = asBits.back(); // this is a number name, e.g. "0000001"
|
CString sLastDir = asBits.back(); // this is a number name, e.g. "0000001"
|
||||||
|
|
||||||
// Fill in a default value in case ini doesn't have it.
|
// Fill in a default value in case ini doesn't have it.
|
||||||
@@ -317,7 +317,7 @@ bool ProfileManager::CreateLocalProfile( CString sName )
|
|||||||
}
|
}
|
||||||
if( i == MAX_TRIES )
|
if( i == MAX_TRIES )
|
||||||
return false;
|
return false;
|
||||||
sProfileDir += SLASH;
|
sProfileDir += "/";
|
||||||
|
|
||||||
Profile pro;
|
Profile pro;
|
||||||
pro.m_sName = sName;
|
pro.m_sName = sName;
|
||||||
@@ -336,7 +336,7 @@ bool ProfileManager::RenameLocalProfile( CString sProfileID, CString sNewName )
|
|||||||
ASSERT( !sProfileID.empty() );
|
ASSERT( !sProfileID.empty() );
|
||||||
|
|
||||||
CString sProfileDir = USER_PROFILES_DIR + sProfileID;
|
CString sProfileDir = USER_PROFILES_DIR + sProfileID;
|
||||||
CString sProfileFile = sProfileDir + SLASH PROFILE_FILE;
|
CString sProfileFile = sProfileDir + "/" + PROFILE_FILE;
|
||||||
|
|
||||||
Profile pro;
|
Profile pro;
|
||||||
bool bResult;
|
bool bResult;
|
||||||
@@ -356,7 +356,7 @@ bool ProfileManager::DeleteLocalProfile( CString sProfileID )
|
|||||||
// delete all files in profile dir
|
// delete all files in profile dir
|
||||||
CString sProfileDir = USER_PROFILES_DIR + sProfileID;
|
CString sProfileDir = USER_PROFILES_DIR + sProfileID;
|
||||||
CStringArray asFilesToDelete;
|
CStringArray asFilesToDelete;
|
||||||
GetDirListing( sProfileDir + SLASH "*", asFilesToDelete, false, true );
|
GetDirListing( sProfileDir + "/*", asFilesToDelete, false, true );
|
||||||
for( unsigned i=0; i<asFilesToDelete.size(); i++ )
|
for( unsigned i=0; i<asFilesToDelete.size(); i++ )
|
||||||
remove( asFilesToDelete[i] );
|
remove( asFilesToDelete[i] );
|
||||||
|
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ bool RandomSample::LoadSoundDir( CString sDir, int iMaxToLoad )
|
|||||||
* so we'll look for eg. themes\Default\sounds\sDir\*.mp3. Otherwise,
|
* so we'll look for eg. themes\Default\sounds\sDir\*.mp3. Otherwise,
|
||||||
* don't, so we'll look for all of the files starting with sDir,
|
* don't, so we'll look for all of the files starting with sDir,
|
||||||
* eg. themes\Default\sounds\sDir*.mp3. */
|
* eg. themes\Default\sounds\sDir*.mp3. */
|
||||||
if(IsADirectory(sDir) && sDir[sDir.GetLength()-1] != SLASH )
|
if(IsADirectory(sDir) && sDir[sDir.GetLength()-1] != "/" )
|
||||||
sDir += SLASH;
|
sDir += "/";
|
||||||
#else
|
#else
|
||||||
// make sure there's a slash at the end of this path
|
// make sure there's a slash at the end of this path
|
||||||
if( sDir.Right(1) != SLASH )
|
if( sDir.Right(1) != "/" )
|
||||||
sDir += SLASH;
|
sDir += "/";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CStringArray arraySoundFiles;
|
CStringArray arraySoundFiles;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ static const char *anims[NUM_ANIMATIONS] =
|
|||||||
|
|
||||||
static CString GetAnimPath( Animation a )
|
static CString GetAnimPath( Animation a )
|
||||||
{
|
{
|
||||||
return ssprintf("Characters%s%s", SLASH, anims[a]);
|
return CString("Characters/") + anims[a];
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool HaveAllCharAnimations()
|
static bool HaveAllCharAnimations()
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ ScreenSandbox::ScreenSandbox( CString sClassName ) : Screen( sClassName )
|
|||||||
|
|
||||||
//m_model.LoadMilkshapeAscii( "C:\\stepmania\\stepmania\\Themes\\groove\\BGAnimations\\ScreenCaution background\\2 platforms and backbar.txt" );
|
//m_model.LoadMilkshapeAscii( "C:\\stepmania\\stepmania\\Themes\\groove\\BGAnimations\\ScreenCaution background\\2 platforms and backbar.txt" );
|
||||||
|
|
||||||
m_model.LoadMilkshapeAscii( "Characters" SLASH "DancePads-DDR.txt" );
|
m_model.LoadMilkshapeAscii( "Characters/DancePads-DDR.txt" );
|
||||||
m_model.SetXY(CENTER_X, CENTER_Y);
|
m_model.SetXY(CENTER_X, CENTER_Y);
|
||||||
m_model.SetRotationX( 15 );
|
m_model.SetRotationX( 15 );
|
||||||
m_model.SetZoom(5);
|
m_model.SetZoom(5);
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ float Song::GetElapsedTimeFromBeat( float fBeat ) const
|
|||||||
|
|
||||||
CString Song::GetCacheFilePath() const
|
CString Song::GetCacheFilePath() const
|
||||||
{
|
{
|
||||||
return ssprintf( CACHE_DIR "Songs" SLASH "%u", GetHashForString(m_sSongDir) );
|
return ssprintf( CACHE_DIR "Songs/%u", GetHashForString(m_sSongDir) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get a path to the SM containing data for this song. It might
|
/* Get a path to the SM containing data for this song. It might
|
||||||
@@ -366,15 +366,15 @@ bool Song::LoadFromSongDir( CString sDir, bool bAllowCache )
|
|||||||
ASSERT( sDir != "" );
|
ASSERT( sDir != "" );
|
||||||
|
|
||||||
// make sure there is a trailing slash at the end of sDir
|
// make sure there is a trailing slash at the end of sDir
|
||||||
if( sDir.Right(1) != SLASH )
|
if( sDir.Right(1) != "/" )
|
||||||
sDir += SLASH;
|
sDir += "/";
|
||||||
|
|
||||||
// save song dir
|
// save song dir
|
||||||
m_sSongDir = sDir;
|
m_sSongDir = sDir;
|
||||||
|
|
||||||
// save group name
|
// save group name
|
||||||
CStringArray sDirectoryParts;
|
CStringArray sDirectoryParts;
|
||||||
split( m_sSongDir, SLASH, sDirectoryParts, false );
|
split( m_sSongDir, "/", sDirectoryParts, false );
|
||||||
ASSERT( sDirectoryParts.size() >= 4 ); /* Songs/Slow/Taps/ */
|
ASSERT( sDirectoryParts.size() >= 4 ); /* Songs/Slow/Taps/ */
|
||||||
m_sGroupName = sDirectoryParts[sDirectoryParts.size()-3]; // second from last item
|
m_sGroupName = sDirectoryParts[sDirectoryParts.size()-3]; // second from last item
|
||||||
ASSERT( m_sGroupName != "" );
|
ASSERT( m_sGroupName != "" );
|
||||||
@@ -660,7 +660,7 @@ void Song::TidyUpData()
|
|||||||
/* Use the song directory name. */
|
/* Use the song directory name. */
|
||||||
CString SongDir = this->GetSongDir();
|
CString SongDir = this->GetSongDir();
|
||||||
vector<CString> parts;
|
vector<CString> parts;
|
||||||
split(SongDir, SLASH, parts);
|
split(SongDir, "/", parts);
|
||||||
ASSERT(parts.size() > 0);
|
ASSERT(parts.size() > 0);
|
||||||
|
|
||||||
NotesLoader::GetMainAndSubTitlesFromFullTitle( parts[parts.size()-1], m_sMainTitle, m_sSubTitle );
|
NotesLoader::GetMainAndSubTitlesFromFullTitle( parts[parts.size()-1], m_sMainTitle, m_sSubTitle );
|
||||||
@@ -1651,7 +1651,7 @@ CString Song::GetMusicPath() const
|
|||||||
{
|
{
|
||||||
/* If there's no path in the music file, the file is in the same directory
|
/* If there's no path in the music file, the file is in the same directory
|
||||||
* as the song. (This is the preferred configuration.) */
|
* as the song. (This is the preferred configuration.) */
|
||||||
if( m_sMusicFile.Find(SLASH[0]) == -1)
|
if( m_sMusicFile.Find('/') == -1)
|
||||||
return m_sSongDir+m_sMusicFile;
|
return m_sSongDir+m_sMusicFile;
|
||||||
|
|
||||||
/* Otherwise, it's relative to the top of the SM directory (the CWD), so
|
/* Otherwise, it's relative to the top of the SM directory (the CWD), so
|
||||||
@@ -1675,7 +1675,7 @@ CString Song::GetLyricsPath() const
|
|||||||
|
|
||||||
CString Song::GetCDTitlePath() const
|
CString Song::GetCDTitlePath() const
|
||||||
{
|
{
|
||||||
if( m_sCDTitleFile.Find(SLASH[0]) != -1 )
|
if( m_sCDTitleFile.Find('/') != -1 )
|
||||||
return m_sSongDir+m_sCDTitleFile;
|
return m_sSongDir+m_sCDTitleFile;
|
||||||
return m_sCDTitleFile;
|
return m_sCDTitleFile;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,8 +34,8 @@
|
|||||||
|
|
||||||
SongManager* SONGMAN = NULL; // global and accessable from anywhere in our program
|
SongManager* SONGMAN = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
#define SONGS_DIR BASE_PATH "Songs" SLASH
|
#define SONGS_DIR "Songs/"
|
||||||
#define COURSES_DIR BASE_PATH "Courses" SLASH
|
#define COURSES_DIR "Courses/"
|
||||||
|
|
||||||
|
|
||||||
#define NUM_GROUP_COLORS THEME->GetMetricI("SongManager","NumGroupColors")
|
#define NUM_GROUP_COLORS THEME->GetMetricI("SongManager","NumGroupColors")
|
||||||
|
|||||||
@@ -773,7 +773,7 @@ static void MountTreeOfZips( const CString &dir )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define UNLOCKS_PATH BASE_PATH "Data/Unlocks.dat"
|
#define UNLOCKS_PATH "Data/Unlocks.dat"
|
||||||
|
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
char *xboxargv[] = { "d:\\default.xbe" };
|
char *xboxargv[] = { "d:\\default.xbe" };
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const CString BASE_THEME_NAME = "default";
|
|||||||
const CString FALLBACK_THEME_NAME = "fallback";
|
const CString FALLBACK_THEME_NAME = "fallback";
|
||||||
const CString LANGUAGES_SUBDIR = "Languages" SLASH;
|
const CString LANGUAGES_SUBDIR = "Languages" SLASH;
|
||||||
const CString BASE_LANGUAGE = "english";
|
const CString BASE_LANGUAGE = "english";
|
||||||
const CString THEMES_DIR = BASE_PATH "Themes" SLASH;
|
const CString THEMES_DIR = "Themes/";
|
||||||
const CString METRICS_FILE = "metrics.ini";
|
const CString METRICS_FILE = "metrics.ini";
|
||||||
const CString ELEMENT_CATEGORY_STRING[NUM_ELEMENT_CATEGORIES] =
|
const CString ELEMENT_CATEGORY_STRING[NUM_ELEMENT_CATEGORIES] =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,12 +22,10 @@
|
|||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
#include "MsdFile.h"
|
#include "MsdFile.h"
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
#include "stdio.h"
|
|
||||||
|
|
||||||
UnlockSystem* UNLOCKSYS = NULL; // global and accessable from anywhere in our program
|
UnlockSystem* UNLOCKSYS = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
|
#define MEMCARD_PATH "Data/MemCard.ini"
|
||||||
|
|
||||||
UnlockSystem::UnlockSystem()
|
UnlockSystem::UnlockSystem()
|
||||||
{
|
{
|
||||||
UNLOCKSYS = this;
|
UNLOCKSYS = this;
|
||||||
@@ -41,9 +39,9 @@ UnlockSystem::UnlockSystem()
|
|||||||
StagesCleared = 0;
|
StagesCleared = 0;
|
||||||
RouletteSeeds = "1";
|
RouletteSeeds = "1";
|
||||||
|
|
||||||
ReadValues("Data" SLASH "MemCard.ini"); // in case its ever accessed,
|
ReadValues( MEMCARD_PATH ); // in case its ever accessed,
|
||||||
// we want the values to be available
|
// we want the values to be available
|
||||||
WriteValues("Data" SLASH "MemCard.ini"); // create if it does not exist
|
WriteValues( MEMCARD_PATH ); // create if it does not exist
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnlockSystem::RouletteUnlock( const Song *song )
|
void UnlockSystem::RouletteUnlock( const Song *song )
|
||||||
@@ -60,7 +58,7 @@ void UnlockSystem::RouletteUnlock( const Song *song )
|
|||||||
|
|
||||||
ASSERT( p->m_iRouletteSeed < (int) RouletteSeeds.size() );
|
ASSERT( p->m_iRouletteSeed < (int) RouletteSeeds.size() );
|
||||||
RouletteSeeds[p->m_iRouletteSeed] = '1';
|
RouletteSeeds[p->m_iRouletteSeed] = '1';
|
||||||
WriteValues("Data" SLASH "MemCard.ini");
|
WriteValues( MEMCARD_PATH );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UnlockSystem::CourseIsLocked( const Course *course )
|
bool UnlockSystem::CourseIsLocked( const Course *course )
|
||||||
@@ -420,88 +418,88 @@ bool UnlockSystem::WriteValues( CString filename)
|
|||||||
|
|
||||||
float UnlockSystem::UnlockAddAP(float credit)
|
float UnlockSystem::UnlockAddAP(float credit)
|
||||||
{
|
{
|
||||||
ReadValues("Data" SLASH "MemCard.ini");
|
ReadValues( MEMCARD_PATH );
|
||||||
ArcadePoints += credit;
|
ArcadePoints += credit;
|
||||||
WriteValues("Data" SLASH "MemCard.ini");
|
WriteValues( MEMCARD_PATH );
|
||||||
|
|
||||||
return ArcadePoints;
|
return ArcadePoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
float UnlockSystem::UnlockAddAP(Grade credit)
|
float UnlockSystem::UnlockAddAP(Grade credit)
|
||||||
{
|
{
|
||||||
ReadValues("Data" SLASH "MemCard.ini");
|
ReadValues( MEMCARD_PATH );
|
||||||
if (credit != GRADE_E && credit != GRADE_D)
|
if (credit != GRADE_E && credit != GRADE_D)
|
||||||
ArcadePoints += 1;
|
ArcadePoints += 1;
|
||||||
if (credit == GRADE_AAA)
|
if (credit == GRADE_AAA)
|
||||||
ArcadePoints += 9;
|
ArcadePoints += 9;
|
||||||
WriteValues("Data" SLASH "MemCard.ini");
|
WriteValues( MEMCARD_PATH );
|
||||||
|
|
||||||
return ArcadePoints;
|
return ArcadePoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
float UnlockSystem::UnlockAddDP(float credit)
|
float UnlockSystem::UnlockAddDP(float credit)
|
||||||
{
|
{
|
||||||
ReadValues("Data" SLASH "MemCard.ini");
|
ReadValues( MEMCARD_PATH );
|
||||||
|
|
||||||
// we don't want to ever take away dance points
|
// we don't want to ever take away dance points
|
||||||
if (credit > 0) DancePoints += credit;
|
if (credit > 0) DancePoints += credit;
|
||||||
WriteValues("Data" SLASH "MemCard.ini");
|
WriteValues( MEMCARD_PATH );
|
||||||
|
|
||||||
return DancePoints;
|
return DancePoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
float UnlockSystem::UnlockAddSP(float credit)
|
float UnlockSystem::UnlockAddSP(float credit)
|
||||||
{
|
{
|
||||||
ReadValues("Data" SLASH "MemCard.ini");
|
ReadValues( MEMCARD_PATH );
|
||||||
SongPoints += credit;
|
SongPoints += credit;
|
||||||
WriteValues("Data" SLASH "MemCard.ini");
|
WriteValues( MEMCARD_PATH );
|
||||||
|
|
||||||
return SongPoints;
|
return SongPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
float UnlockSystem::UnlockAddSP(Grade credit)
|
float UnlockSystem::UnlockAddSP(Grade credit)
|
||||||
{
|
{
|
||||||
ReadValues("Data" SLASH "MemCard.ini");
|
ReadValues( MEMCARD_PATH );
|
||||||
const float SongPointsVals[NUM_GRADES] = { -1 /* unused */, 0, 1, 2, 3, 4, 5, 10, 20 };
|
const float SongPointsVals[NUM_GRADES] = { -1 /* unused */, 0, 1, 2, 3, 4, 5, 10, 20 };
|
||||||
|
|
||||||
SongPoints += SongPointsVals[credit];
|
SongPoints += SongPointsVals[credit];
|
||||||
WriteValues("Data" SLASH "MemCard.ini");
|
WriteValues( MEMCARD_PATH );
|
||||||
|
|
||||||
return SongPoints;
|
return SongPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
float UnlockSystem::UnlockClearExtraStage()
|
float UnlockSystem::UnlockClearExtraStage()
|
||||||
{
|
{
|
||||||
ReadValues("Data" SLASH "MemCard.ini");
|
ReadValues( MEMCARD_PATH );
|
||||||
ExtraClearPoints++;
|
ExtraClearPoints++;
|
||||||
WriteValues("Data" SLASH "MemCard.ini");
|
WriteValues( MEMCARD_PATH );
|
||||||
|
|
||||||
return ExtraClearPoints;
|
return ExtraClearPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
float UnlockSystem::UnlockFailExtraStage()
|
float UnlockSystem::UnlockFailExtraStage()
|
||||||
{
|
{
|
||||||
ReadValues("Data" SLASH "MemCard.ini");
|
ReadValues( MEMCARD_PATH );
|
||||||
ExtraFailPoints++;
|
ExtraFailPoints++;
|
||||||
WriteValues("Data" SLASH "MemCard.ini");
|
WriteValues( MEMCARD_PATH );
|
||||||
|
|
||||||
return ExtraFailPoints;
|
return ExtraFailPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
float UnlockSystem::UnlockClearStage()
|
float UnlockSystem::UnlockClearStage()
|
||||||
{
|
{
|
||||||
ReadValues("Data" SLASH "MemCard.ini");
|
ReadValues( MEMCARD_PATH );
|
||||||
StagesCleared++;
|
StagesCleared++;
|
||||||
WriteValues("Data" SLASH "MemCard.ini");
|
WriteValues( MEMCARD_PATH );
|
||||||
|
|
||||||
return StagesCleared;
|
return StagesCleared;
|
||||||
}
|
}
|
||||||
|
|
||||||
float UnlockSystem::UnlockToasty()
|
float UnlockSystem::UnlockToasty()
|
||||||
{
|
{
|
||||||
ReadValues("Data" SLASH "MemCard.ini");
|
ReadValues( MEMCARD_PATH );
|
||||||
ToastyPoints++;
|
ToastyPoints++;
|
||||||
WriteValues("Data" SLASH "MemCard.ini");
|
WriteValues( MEMCARD_PATH );
|
||||||
|
|
||||||
return ToastyPoints;
|
return ToastyPoints;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user