use slashes as a directory separator instead of backslashes
This commit is contained in:
@@ -18,7 +18,7 @@ AnnouncerManager* ANNOUNCER = NULL; // global object accessable from anywhere in
|
||||
|
||||
|
||||
const CString EMPTY_ANNOUNCER_NAME = "Empty";
|
||||
const CString ANNOUNCERS_DIR = "Announcers\\";
|
||||
const CString ANNOUNCERS_DIR = "Announcers/";
|
||||
|
||||
|
||||
AnnouncerManager::AnnouncerManager()
|
||||
|
||||
@@ -50,8 +50,8 @@ void BGAnimation::LoadFromAniDir( CString sAniDir, CString sSongBGPath )
|
||||
{
|
||||
Unload();
|
||||
|
||||
if( sAniDir.Right(1) != "\\" )
|
||||
sAniDir += "\\";
|
||||
if( sAniDir.Right(1) != "/" )
|
||||
sAniDir += "/";
|
||||
|
||||
// loading a directory of layers
|
||||
CStringArray asImagePaths;
|
||||
|
||||
@@ -320,7 +320,7 @@ found_effect:
|
||||
|
||||
CString sDir, sFName, sExt;
|
||||
splitrelpath( sPath, sDir, sFName, sExt );
|
||||
CString sIniPath = sDir+"\\"+sFName+".ini";
|
||||
CString sIniPath = sDir+"/"+sFName+".ini";
|
||||
IniFile ini;
|
||||
ini.SetPath( sIniPath );
|
||||
if( ini.ReadFile() )
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
#include "PrefsManager.h"
|
||||
|
||||
|
||||
const CString BG_ANIMS_DIR = "BGAnimations\\";
|
||||
const CString VISUALIZATIONS_DIR = "Visualizations\\";
|
||||
const CString RANDOMMOVIES_DIR = "RandomMovies\\";
|
||||
const CString BG_ANIMS_DIR = "BGAnimations/";
|
||||
const CString VISUALIZATIONS_DIR = "Visualizations/";
|
||||
const CString RANDOMMOVIES_DIR = "RandomMovies/";
|
||||
|
||||
const float FADE_SECONDS = 1.0f;
|
||||
|
||||
|
||||
@@ -123,10 +123,10 @@ void Course::LoadFromCRSFile( CString sPath )
|
||||
splitrelpath( sPath, sDir, sFName, sExt );
|
||||
|
||||
CStringArray arrayPossibleBanners;
|
||||
GetDirListing( "Courses\\" + sFName + ".png", arrayPossibleBanners, false, true );
|
||||
GetDirListing( "Courses\\" + sFName + ".jpg", arrayPossibleBanners, false, true );
|
||||
GetDirListing( "Courses\\" + sFName + ".bmp", arrayPossibleBanners, false, true );
|
||||
GetDirListing( "Courses\\" + sFName + ".gif", arrayPossibleBanners, false, true );
|
||||
GetDirListing( "Courses/" + sFName + ".png", arrayPossibleBanners, false, true );
|
||||
GetDirListing( "Courses/" + sFName + ".jpg", arrayPossibleBanners, false, true );
|
||||
GetDirListing( "Courses/" + sFName + ".bmp", arrayPossibleBanners, false, true );
|
||||
GetDirListing( "Courses/" + sFName + ".gif", arrayPossibleBanners, false, true );
|
||||
if( !arrayPossibleBanners.empty() )
|
||||
m_sBannerPath = arrayPossibleBanners[0];
|
||||
|
||||
@@ -191,10 +191,10 @@ void Course::CreateEndlessCourseFromGroupAndDifficulty( CString sGroupName, Diff
|
||||
m_iLives = -1;
|
||||
|
||||
CStringArray asPossibleBannerPaths;
|
||||
GetDirListing( "Songs\\" + sGroupName + "\\banner.png", asPossibleBannerPaths, false, true );
|
||||
GetDirListing( "Songs\\" + sGroupName + "\\banner.jpg", asPossibleBannerPaths, false, true );
|
||||
GetDirListing( "Songs\\" + sGroupName + "\\banner.gif", asPossibleBannerPaths, false, true );
|
||||
GetDirListing( "Songs\\" + sGroupName + "\\banner.bmp", asPossibleBannerPaths, false, true );
|
||||
GetDirListing( "Songs/" + sGroupName + "/banner.png", asPossibleBannerPaths, false, true );
|
||||
GetDirListing( "Songs/" + sGroupName + "/banner.jpg", asPossibleBannerPaths, false, true );
|
||||
GetDirListing( "Songs/" + sGroupName + "/banner.gif", asPossibleBannerPaths, false, true );
|
||||
GetDirListing( "Songs/" + sGroupName + "/banner.bmp", asPossibleBannerPaths, false, true );
|
||||
if( !asPossibleBannerPaths.empty() )
|
||||
m_sBannerPath = asPossibleBannerPaths[0];
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
GameManager* GAMEMAN = NULL; // global and accessable from anywhere in our program
|
||||
|
||||
|
||||
const CString NOTESKIN_DIR = "NoteSkins\\";
|
||||
const CString NOTESKIN_DIR = "NoteSkins/";
|
||||
|
||||
|
||||
const int DANCE_COL_SPACING = 64;
|
||||
|
||||
@@ -44,7 +44,7 @@ void NoteSkinManager::GetNoteSkinNames( Game game, CStringArray &AddTo ) const
|
||||
{
|
||||
GameDef* pGameDef = GAMEMAN->GetGameDefForGame( game );
|
||||
|
||||
CString sBaseSkinFolder = NOTESKINS_DIR + pGameDef->m_szName + "\\";
|
||||
CString sBaseSkinFolder = NOTESKINS_DIR + pGameDef->m_szName + "/";
|
||||
GetDirListing( sBaseSkinFolder + "*", AddTo, true );
|
||||
|
||||
// strip out "CVS"
|
||||
|
||||
@@ -34,18 +34,20 @@ bool RandomSample::LoadSoundDir( CString sDir )
|
||||
if( sDir == "" )
|
||||
return true;
|
||||
|
||||
sDir.Replace("\\", "/");
|
||||
|
||||
#if 0
|
||||
/* (don't want to do this just yet) */
|
||||
/* If this is actually a directory, add a backslash to the filename,
|
||||
* 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,
|
||||
* eg. themes\Default\sounds\sDir*.mp3. */
|
||||
if(IsADirectory(sDir) && sDir[sDir.GetLength()-1] != '\\' )
|
||||
sDir += "\\";
|
||||
if(IsADirectory(sDir) && sDir[sDir.GetLength()-1] != '/' )
|
||||
sDir += "/";
|
||||
#else
|
||||
// make sure there's a backslash at the end of this path
|
||||
if( sDir[sDir.GetLength()-1] != '\\' )
|
||||
sDir += "\\";
|
||||
// make sure there's a slash at the end of this path
|
||||
if( sDir[sDir.GetLength()-1] != '/' )
|
||||
sDir += "/";
|
||||
#endif
|
||||
|
||||
CStringArray arraySoundFiles;
|
||||
|
||||
@@ -234,7 +234,7 @@ float Song::GetElapsedTimeFromBeat( float fBeat ) const
|
||||
|
||||
CString Song::GetCacheFilePath() const
|
||||
{
|
||||
return ssprintf( "Cache\\%u", GetHashForString(m_sSongDir) );
|
||||
return ssprintf( "Cache/%u", GetHashForString(m_sSongDir) );
|
||||
}
|
||||
|
||||
/* Get a path to the SM containing data for this song. It might
|
||||
@@ -303,7 +303,7 @@ bool Song::LoadFromSongDir( CString sDir )
|
||||
// LOG->Trace( "Song::LoadFromSongDir(%s)", sDir.GetString() );
|
||||
|
||||
sDir.Replace("\\", "/");
|
||||
// make sure there is a trailing '\\' at the end of sDir
|
||||
// make sure there is a trailing slash at the end of sDir
|
||||
if( sDir.Right(1) != "/" )
|
||||
sDir += "/";
|
||||
|
||||
@@ -1044,13 +1044,13 @@ CString Song::GetMusicPath() const
|
||||
{
|
||||
/* If there's no path in the music file, the file is in the same directory
|
||||
* as the song. (This is the preferred configuration.) */
|
||||
if( m_sMusicFile.Find('\\') == -1)
|
||||
if( m_sMusicFile.Find('/') == -1)
|
||||
return m_sSongDir+m_sMusicFile;
|
||||
|
||||
/* The file has a path. If it was loaded from the m_DWIPath, it's relative
|
||||
* to that. */
|
||||
if( PREFSMAN->m_DWIPath!="" && m_sSongDir.Left(PREFSMAN->m_DWIPath.GetLength()) == PREFSMAN->m_DWIPath )
|
||||
return PREFSMAN->m_DWIPath+"\\"+m_sMusicFile;
|
||||
return PREFSMAN->m_DWIPath+"/"+m_sMusicFile;
|
||||
|
||||
/* Otherwise, it's relative to the top of the SM directory (the CWD), so
|
||||
* return it directly. */
|
||||
@@ -1064,11 +1064,11 @@ CString Song::GetBannerPath() const
|
||||
|
||||
CString Song::GetCDTitlePath() const
|
||||
{
|
||||
if( m_sCDTitleFile.Find('\\') == -1)
|
||||
if( m_sCDTitleFile.Find('/') == -1)
|
||||
return m_sSongDir+m_sCDTitleFile;
|
||||
|
||||
if( PREFSMAN->m_DWIPath!="" && m_sSongDir.Left(PREFSMAN->m_DWIPath.GetLength()) == PREFSMAN->m_DWIPath )
|
||||
return PREFSMAN->m_DWIPath+"\\"+m_sCDTitleFile;
|
||||
return PREFSMAN->m_DWIPath+"/"+m_sCDTitleFile;
|
||||
|
||||
return m_sCDTitleFile;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ void SongManager::InitSongArrayFromDisk( LoadingWindow *ld )
|
||||
LoadStepManiaSongDir( PREFSMAN->m_asAdditionalSongFolders[i], ld );
|
||||
|
||||
if( PREFSMAN->m_DWIPath != "" )
|
||||
LoadStepManiaSongDir( PREFSMAN->m_DWIPath + "\\Songs", ld );
|
||||
LoadStepManiaSongDir( PREFSMAN->m_DWIPath + "/Songs", ld );
|
||||
|
||||
LOG->Trace( "Found %d Songs.", m_pSongs.size() );
|
||||
}
|
||||
@@ -83,14 +83,14 @@ void SongManager::SanityCheckGroupDir( CString sDir ) const
|
||||
{
|
||||
// Check to see if they put a song directly inside the group folder.
|
||||
CStringArray arrayFiles;
|
||||
GetDirListing( sDir + "\\*.mp3", arrayFiles );
|
||||
GetDirListing( sDir + "\\*.ogg", arrayFiles );
|
||||
GetDirListing( sDir + "\\*.wav", arrayFiles );
|
||||
GetDirListing( sDir + "/*.mp3", arrayFiles );
|
||||
GetDirListing( sDir + "/*.ogg", arrayFiles );
|
||||
GetDirListing( sDir + "/*.wav", arrayFiles );
|
||||
if( !arrayFiles.empty() )
|
||||
RageException::Throw(
|
||||
"The folder '%s' contains music files.\n\n"
|
||||
"This means that you have a music outside of a song folder.\n"
|
||||
"All song folders must reside in a group folder. For example, 'Songs\\DDR 4th Mix\\B4U'.\n"
|
||||
"All song folders must reside in a group folder. For example, 'Songs/DDR 4th Mix/B4U'.\n"
|
||||
"See the StepMania readme for more info.",
|
||||
sDir.GetString()
|
||||
);
|
||||
@@ -526,7 +526,7 @@ void SongManager::GetEndlessCourses( vector<Course*> &AddTo )
|
||||
bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredGroup,
|
||||
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out )
|
||||
{
|
||||
CString sCoursePath = "Songs\\" + sPreferredGroup + "\\" + (bExtra2 ? "extra2" : "extra1") + ".crs";
|
||||
CString sCoursePath = "Songs/" + sPreferredGroup + "/" + (bExtra2 ? "extra2" : "extra1") + ".crs";
|
||||
if( !DoesFileExist(sCoursePath) )
|
||||
{
|
||||
bool bFound = false;
|
||||
@@ -534,7 +534,7 @@ bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredG
|
||||
/* try alternative song folders */
|
||||
for( unsigned i=0; i<PREFSMAN->m_asAdditionalSongFolders.size(); i++ )
|
||||
{
|
||||
sCoursePath = PREFSMAN->m_asAdditionalSongFolders[i] + "\\" + sPreferredGroup + "\\" + (bExtra2 ? "extra2" : "extra1") + ".crs";
|
||||
sCoursePath = PREFSMAN->m_asAdditionalSongFolders[i] + "/" + sPreferredGroup + "/" + (bExtra2 ? "extra2" : "extra1") + ".crs";
|
||||
if( DoesFileExist(sCoursePath) )
|
||||
{
|
||||
bFound = true;
|
||||
@@ -544,7 +544,7 @@ bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredG
|
||||
|
||||
if( !bFound && PREFSMAN->m_DWIPath != "" )
|
||||
{
|
||||
sCoursePath = PREFSMAN->m_DWIPath + "\\Songs\\" + sPreferredGroup + "\\" + (bExtra2 ? "extra2" : "extra1") + ".crs";
|
||||
sCoursePath = PREFSMAN->m_DWIPath + "/Songs/" + sPreferredGroup + "/" + (bExtra2 ? "extra2" : "extra1") + ".crs";
|
||||
if( DoesFileExist(sCoursePath) )
|
||||
bFound = true;
|
||||
}
|
||||
@@ -672,8 +672,8 @@ Song* SongManager::GetRandomSong()
|
||||
|
||||
Song* SongManager::GetSongFromDir( CString sDir )
|
||||
{
|
||||
if( sDir[sDir.GetLength()-1] != '\\' )
|
||||
sDir += '\\';
|
||||
if( sDir[sDir.GetLength()-1] != '/' )
|
||||
sDir += '/';
|
||||
|
||||
for( unsigned int i=0; i<m_pSongs.size(); i++ )
|
||||
if( sDir.CompareNoCase(m_pSongs[i]->GetSongDir()) == 0 )
|
||||
|
||||
@@ -28,7 +28,7 @@ ThemeManager* THEME = NULL; // global object accessable from anywhere in the pro
|
||||
|
||||
|
||||
const CString BASE_THEME_NAME = "default";
|
||||
const CString THEMES_DIR = "Themes\\";
|
||||
const CString THEMES_DIR = "Themes/";
|
||||
|
||||
ThemeManager::ThemeManager()
|
||||
{
|
||||
@@ -50,7 +50,7 @@ ThemeManager::~ThemeManager()
|
||||
|
||||
void ThemeManager::GetAllThemeNames( CStringArray& AddTo )
|
||||
{
|
||||
GetDirListing( THEMES_DIR+"\\*", AddTo, true );
|
||||
GetDirListing( THEMES_DIR+"/*", AddTo, true );
|
||||
|
||||
// strip out the folder called "CVS"
|
||||
for( CStringArray::iterator i=AddTo.begin(); i != AddTo.end(); ++i )
|
||||
@@ -113,7 +113,7 @@ void ThemeManager::SwitchTheme( CString sThemeName )
|
||||
|
||||
CString ThemeManager::GetThemeDirFromName( const CString &sThemeName )
|
||||
{
|
||||
return THEMES_DIR + sThemeName + "\\";
|
||||
return THEMES_DIR + sThemeName + "/";
|
||||
}
|
||||
|
||||
CString ThemeManager::GetPathTo( CString sThemeName, CString sAssetCategory, CString sFileName )
|
||||
|
||||
Reference in New Issue
Block a user