From ef5952192ed2cc8a494d41b32e025aa7d6f79441 Mon Sep 17 00:00:00 2001 From: Kevin Slaughter Date: Thu, 11 Sep 2003 09:14:46 +0000 Subject: [PATCH] Add ability to find a proprietary SM file, for things such as ScreenHowToPlay --- stepmania/src/ThemeManager.cpp | 1 + stepmania/src/ThemeManager.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 430ee95f8d..ad0f3c78ef 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -193,6 +193,7 @@ try_element_again: { "*.model", "*.sprite", "*.png", "*.jpg", "*.bmp", "*.gif","*.avi", "*.mpg", "*.mpeg", NULL}, { "*.png", NULL }, { ".set", "*.mp3", "*.ogg", "*.wav", NULL }, + { "*.sm", NULL }, }; const char **asset_masks = masks[category]; diff --git a/stepmania/src/ThemeManager.h b/stepmania/src/ThemeManager.h index e53ea9ea3a..d57e545ec9 100644 --- a/stepmania/src/ThemeManager.h +++ b/stepmania/src/ThemeManager.h @@ -17,7 +17,7 @@ class IniFile; -enum ElementCategory { BGAnimations, Fonts, Graphics, Numbers, Sounds, NUM_ELEMENT_CATEGORIES }; +enum ElementCategory { BGAnimations, Fonts, Graphics, Numbers, Sounds, SMFiles, NUM_ELEMENT_CATEGORIES }; class ThemeManager { @@ -41,6 +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); }; bool HasMetric( CString sClassName, CString sValueName ); CString GetMetricRaw( CString sClassName, CString sValueName );