Create an "Other" category for ScreenHowToPlay steps.sm, and other
files that don't really go anywhere else. Fix possible ELEMENT_CATEGORY_STRING null pointer dereference.
This commit is contained in:
@@ -109,7 +109,7 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay")
|
||||
}
|
||||
|
||||
SMLoader smfile;
|
||||
smfile.LoadFromSMFile( THEME->GetPathToSM(STEPFILE), m_Song, false );
|
||||
smfile.LoadFromSMFile( THEME->GetPathToO(STEPFILE), m_Song, false );
|
||||
ASSERT( m_Song.m_apNotes.size() == 1 );
|
||||
m_Song.m_apNotes[0]->GetNoteData(&m_NoteData);
|
||||
|
||||
|
||||
@@ -41,7 +41,8 @@ const CString ELEMENT_CATEGORY_STRING[NUM_ELEMENT_CATEGORIES] =
|
||||
"Fonts",
|
||||
"Graphics",
|
||||
"Numbers",
|
||||
"Sounds"
|
||||
"Sounds",
|
||||
"Other"
|
||||
};
|
||||
|
||||
ThemeManager::ThemeManager()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
class IniFile;
|
||||
|
||||
enum ElementCategory { BGAnimations, Fonts, Graphics, Numbers, Sounds, SMFiles, NUM_ELEMENT_CATEGORIES };
|
||||
enum ElementCategory { BGAnimations, Fonts, Graphics, Numbers, Sounds, Other, NUM_ELEMENT_CATEGORIES };
|
||||
|
||||
class ThemeManager
|
||||
{
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
CString GetPathToG( CString sFileName, bool bOptional=false ) { return GetPathTo(Graphics,sFileName,bOptional); };
|
||||
CString GetPathToN( CString sFileName, bool bOptional=false ) { return GetPathTo(Numbers,sFileName,bOptional); };
|
||||
CString GetPathToS( CString sFileName, bool bOptional=false ) { return GetPathTo(Sounds,sFileName,bOptional); };
|
||||
CString GetPathToSM( CString sFileName, bool bOptional=false ) { return GetPathTo(SMFiles,sFileName,bOptional); };
|
||||
CString GetPathToO( CString sFileName, bool bOptional=false ) { return GetPathTo(Other,sFileName,bOptional); };
|
||||
|
||||
bool HasMetric( CString sClassName, CString sValueName );
|
||||
CString GetMetricRaw( CString sClassName, CString sValueName );
|
||||
|
||||
Reference in New Issue
Block a user