fixed ThemeManager using element in base theme instead of current theme if base theme has a redir, simplifed a few sound element names.
This commit is contained in:
@@ -76,8 +76,8 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic()
|
||||
);
|
||||
this->AddChild( &m_Menu );
|
||||
|
||||
m_soundMusicChange.Load( THEME->GetPathTo("Sounds","select music change song"));
|
||||
m_soundMusicCycle.Load( THEME->GetPathTo("Sounds","select music cycle songs"));
|
||||
m_soundMusicChange.Load( THEME->GetPathTo("Sounds","select music change"));
|
||||
m_soundMusicCycle.Load( THEME->GetPathTo("Sounds","select music cycle"));
|
||||
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
|
||||
|
||||
m_ChoiceListFrame.Load( THEME->GetPathTo("Graphics","select mode list frame"));
|
||||
@@ -157,7 +157,7 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic()
|
||||
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprOptionsMessage );
|
||||
|
||||
m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music change options") );
|
||||
m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music options") );
|
||||
|
||||
m_bGoToOptions = false;
|
||||
m_bMadeChoice = false;
|
||||
|
||||
@@ -116,18 +116,20 @@ ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking","ranking")
|
||||
}
|
||||
}
|
||||
|
||||
vector<CString> asCoursePaths;
|
||||
split( COURSES_TO_SHOW, ",", asCoursePaths, true );
|
||||
for( unsigned i=0; i<aNotesTypesToShow.size(); i++ )
|
||||
{
|
||||
for( unsigned c=0; c<asCoursePaths.size(); c++ )
|
||||
vector<CString> asCoursePaths;
|
||||
split( COURSES_TO_SHOW, ",", asCoursePaths, true );
|
||||
for( unsigned i=0; i<aNotesTypesToShow.size(); i++ )
|
||||
{
|
||||
PageToShow pts;
|
||||
pts.type = PageToShow::TYPE_COURSE;
|
||||
pts.nt = aNotesTypesToShow[i];
|
||||
pts.pCourse = SONGMAN->GetCourseFromPath( asCoursePaths[c] );
|
||||
if( pts.pCourse )
|
||||
m_vPagesToShow.push_back( pts );
|
||||
for( unsigned c=0; c<asCoursePaths.size(); c++ )
|
||||
{
|
||||
PageToShow pts;
|
||||
pts.type = PageToShow::TYPE_COURSE;
|
||||
pts.nt = aNotesTypesToShow[i];
|
||||
pts.pCourse = SONGMAN->GetCourseFromPath( asCoursePaths[c] );
|
||||
if( pts.pCourse )
|
||||
m_vPagesToShow.push_back( pts );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -228,9 +228,9 @@ ScreenSelectMusic::ScreenSelectMusic()
|
||||
|
||||
|
||||
m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") );
|
||||
m_soundChangeNotes.Load( THEME->GetPathTo("Sounds","select music change notes") );
|
||||
m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music change options") );
|
||||
m_soundLocked.Load( THEME->GetPathTo("Sounds","select music wheel locked") );
|
||||
m_soundChangeNotes.Load( THEME->GetPathTo("Sounds","select music notes") );
|
||||
m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music options") );
|
||||
m_soundLocked.Load( THEME->GetPathTo("Sounds","select music locked") );
|
||||
|
||||
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select music intro") );
|
||||
|
||||
|
||||
+20
-12
@@ -57,10 +57,10 @@ LINK32=link.exe
|
||||
# SUBTRACT LINK32 /verbose /pdb:none
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\../Release6
|
||||
TargetDir=\Stepmania\stepmania
|
||||
TargetDir=\stepmania\stepmania
|
||||
TargetName=StepMania
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -92,10 +92,10 @@ LINK32=link.exe
|
||||
# SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\../Debug6
|
||||
TargetDir=\Stepmania\stepmania
|
||||
TargetDir=\stepmania\stepmania
|
||||
TargetName=StepMania-debug
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -1473,14 +1473,6 @@ SOURCE=.\ScreenGraphicOptions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenHighScores.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenHighScores.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenHowToPlay.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -1549,6 +1541,14 @@ SOURCE=.\ScreenMusicScroll.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenNameEntry.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenNameEntry.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenOptions.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -1573,6 +1573,14 @@ SOURCE=.\ScreenPrompt.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenRanking.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenRanking.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenSandbox.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -116,29 +116,21 @@ CString ThemeManager::GetThemeDirFromName( const CString &sThemeName )
|
||||
return THEMES_DIR + sThemeName + "\\";
|
||||
}
|
||||
|
||||
CString ThemeManager::GetPathToOptional( CString sAssetCategory, CString sFileName )
|
||||
CString ThemeManager::GetPathTo( CString sThemeName, CString sAssetCategory, CString sFileName )
|
||||
{
|
||||
try_element_again:
|
||||
sAssetCategory.MakeLower();
|
||||
sFileName.MakeLower();
|
||||
|
||||
const CString sCurrentThemeDir = GetThemeDirFromName( m_sCurThemeName );
|
||||
const CString sDefaultThemeDir = GetThemeDirFromName( BASE_THEME_NAME );
|
||||
const CString sThemeDir = GetThemeDirFromName( sThemeName );
|
||||
|
||||
CStringArray asPossibleElementFilePaths;
|
||||
|
||||
///////////////////////////////////////
|
||||
// Search both the current theme and the default theme dirs for this element
|
||||
///////////////////////////////////////
|
||||
|
||||
/* First, look for redirs. */
|
||||
GetDirListing( sCurrentThemeDir + sAssetCategory+"/"+sFileName + ".redir",
|
||||
asPossibleElementFilePaths, false, true );
|
||||
if(asPossibleElementFilePaths.empty())
|
||||
GetDirListing( sDefaultThemeDir + sAssetCategory+"/"+sFileName + ".redir",
|
||||
GetDirListing( sThemeDir + sAssetCategory+"/"+sFileName + ".redir",
|
||||
asPossibleElementFilePaths, false, true );
|
||||
|
||||
if( !asPossibleElementFilePaths.empty() && asPossibleElementFilePaths[0].GetLength() > 5 && asPossibleElementFilePaths[0].Right(5) == "redir" ) // this is a redirect file
|
||||
if( !asPossibleElementFilePaths.empty() ) // this is a redirect file
|
||||
{
|
||||
CString sNewFilePath = DerefRedir(asPossibleElementFilePaths[0]);
|
||||
|
||||
@@ -200,32 +192,26 @@ try_element_again:
|
||||
if( sAssetCategory == "bganimations" )
|
||||
DirsOnly=true;
|
||||
|
||||
int i;
|
||||
for(i = 0; asset_masks[i]; ++i)
|
||||
{
|
||||
GetDirListing( sCurrentThemeDir + sAssetCategory+"/" + sFileName + asset_masks[i],
|
||||
for(int i = 0; asset_masks[i]; ++i)
|
||||
GetDirListing( sThemeDir + sAssetCategory+"/" + sFileName + asset_masks[i],
|
||||
asPossibleElementFilePaths, DirsOnly, true );
|
||||
}
|
||||
|
||||
if( sAssetCategory == "fonts" )
|
||||
Font::WeedFontNames(asPossibleElementFilePaths, sFileName);
|
||||
|
||||
if(asPossibleElementFilePaths.empty())
|
||||
{
|
||||
for(i = 0; asset_masks[i]; ++i)
|
||||
{
|
||||
GetDirListing( sDefaultThemeDir + sAssetCategory+"/" + sFileName + asset_masks[i],
|
||||
asPossibleElementFilePaths, DirsOnly, true );
|
||||
}
|
||||
|
||||
if( sAssetCategory == "fonts" )
|
||||
Font::WeedFontNames(asPossibleElementFilePaths, sFileName);
|
||||
}
|
||||
|
||||
if(asPossibleElementFilePaths.empty())
|
||||
return "";
|
||||
else
|
||||
return asPossibleElementFilePaths[0];
|
||||
}
|
||||
|
||||
return asPossibleElementFilePaths[0];
|
||||
CString ThemeManager::GetPathToOptional( CString sAssetCategory, CString sFileName )
|
||||
{
|
||||
CString ret = GetPathTo( m_sCurThemeName, sAssetCategory, sFileName);
|
||||
if( !ret.empty() ) // we found something
|
||||
return ret;
|
||||
ret = GetPathTo( BASE_THEME_NAME, sAssetCategory, sFileName);
|
||||
return ret;
|
||||
}
|
||||
|
||||
CString ThemeManager::GetPathTo( CString sAssetCategory, CString sFileName )
|
||||
@@ -234,10 +220,8 @@ CString ThemeManager::GetPathTo( CString sAssetCategory, CString sFileName )
|
||||
try_element_again:
|
||||
#endif
|
||||
|
||||
CString ret = GetPathToOptional(sAssetCategory, sFileName);
|
||||
|
||||
/* If it's empty, we found nothing. */
|
||||
if( !ret.empty() )
|
||||
CString ret = GetPathToOptional( sAssetCategory, sFileName ) ;
|
||||
if( !ret.empty() ) // we found something
|
||||
return ret;
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
protected:
|
||||
void GetAllThemeNames( CStringArray& AddTo );
|
||||
|
||||
CString GetPathTo( CString sThemeName, CString sAssetCategory, CString sFileName );
|
||||
static CString GetThemeDirFromName( const CString &sThemeName );
|
||||
CString GetElementDir( CString sThemeName );
|
||||
static CString GetMetricsPathFromName( CString sThemeName );
|
||||
|
||||
Reference in New Issue
Block a user