[Various] Allow loading of *.jpeg in addition to *.jpg.
This commit is contained in:
@@ -8,6 +8,10 @@ ________________________________________________________________________________
|
||||
StepMania 5.0 $next | 20111xxx
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
2011/12/17
|
||||
----------
|
||||
* [Various] Allow loading of *.jpeg in addition to *.jpg. [AJ]
|
||||
|
||||
2011/12/16
|
||||
----------
|
||||
* [StreamDisplay] Added VelocityMultiplier, VelocityMin, VelocityMax,
|
||||
|
||||
@@ -390,6 +390,7 @@ FileType ActorUtil::GetFileType( const RString &sPath )
|
||||
else if(
|
||||
sExt=="png" ||
|
||||
sExt=="jpg" ||
|
||||
sExt=="jpeg" ||
|
||||
sExt=="gif" ||
|
||||
sExt=="bmp" ) return FT_Bitmap;
|
||||
else if(
|
||||
|
||||
@@ -135,6 +135,7 @@ void BGAnimation::LoadFromAniDir( const RString &_sAniDir )
|
||||
|
||||
GetDirListing( sAniDir+"*.png", asImagePaths, false, true );
|
||||
GetDirListing( sAniDir+"*.jpg", asImagePaths, false, true );
|
||||
GetDirListing( sAniDir+"*.jpeg", asImagePaths, false, true );
|
||||
GetDirListing( sAniDir+"*.gif", asImagePaths, false, true );
|
||||
GetDirListing( sAniDir+"*.ogv", asImagePaths, false, true );
|
||||
GetDirListing( sAniDir+"*.avi", asImagePaths, false, true );
|
||||
|
||||
@@ -211,6 +211,7 @@ void BackgroundUtil::GetSongBitmaps( const Song *pSong, const RString &sMatch, v
|
||||
{
|
||||
GetDirListing( pSong->GetSongDir()+sMatch+"*.png", vsPathsOut, false, true );
|
||||
GetDirListing( pSong->GetSongDir()+sMatch+"*.jpg", vsPathsOut, false, true );
|
||||
GetDirListing( pSong->GetSongDir()+sMatch+"*.jpeg", vsPathsOut, false, true );
|
||||
GetDirListing( pSong->GetSongDir()+sMatch+"*.gif", vsPathsOut, false, true );
|
||||
GetDirListing( pSong->GetSongDir()+sMatch+"*.bmp", vsPathsOut, false, true );
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ bool Character::Load( RString sCharDir )
|
||||
vector<RString> as;
|
||||
GetDirListing( m_sCharDir+"card.png", as, false, true );
|
||||
GetDirListing( m_sCharDir+"card.jpg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"card.jpeg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"card.gif", as, false, true );
|
||||
GetDirListing( m_sCharDir+"card.bmp", as, false, true );
|
||||
if( as.empty() )
|
||||
@@ -41,6 +42,7 @@ bool Character::Load( RString sCharDir )
|
||||
vector<RString> as;
|
||||
GetDirListing( m_sCharDir+"icon.png", as, false, true );
|
||||
GetDirListing( m_sCharDir+"icon.jpg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"icon.jpeg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"icon.gif", as, false, true );
|
||||
GetDirListing( m_sCharDir+"icon.bmp", as, false, true );
|
||||
if( as.empty() )
|
||||
@@ -97,6 +99,7 @@ RString Character::GetTakingABreakPath() const
|
||||
vector<RString> as;
|
||||
GetDirListing( m_sCharDir+"break.png", as, false, true );
|
||||
GetDirListing( m_sCharDir+"break.jpg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"break.jpeg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"break.gif", as, false, true );
|
||||
GetDirListing( m_sCharDir+"break.bmp", as, false, true );
|
||||
if( as.empty() )
|
||||
@@ -112,6 +115,7 @@ RString Character::GetSongSelectIconPath() const
|
||||
// so you can have different icons for music select / char select
|
||||
GetDirListing( m_sCharDir+"selectmusicicon.png", as, false, true );
|
||||
GetDirListing( m_sCharDir+"selectmusicicon.jpg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"selectmusicicon.jpeg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"selectmusicicon.gif", as, false, true );
|
||||
GetDirListing( m_sCharDir+"selectmusicicon.bmp", as, false, true );
|
||||
|
||||
@@ -120,6 +124,7 @@ RString Character::GetSongSelectIconPath() const
|
||||
// if that failed, try using the regular icon
|
||||
GetDirListing( m_sCharDir+"icon.png", as, false, true );
|
||||
GetDirListing( m_sCharDir+"icon.jpg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"icon.jpeg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"icon.gif", as, false, true );
|
||||
GetDirListing( m_sCharDir+"icon.bmp", as, false, true );
|
||||
if( as.empty() )
|
||||
@@ -138,6 +143,7 @@ RString Character::GetStageIconPath() const
|
||||
// so you can have different icons for music select / char select
|
||||
GetDirListing( m_sCharDir+"stageicon.png", as, false, true );
|
||||
GetDirListing( m_sCharDir+"stageicon.jpg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"stageicon.jpeg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"stageicon.gif", as, false, true );
|
||||
GetDirListing( m_sCharDir+"stageicon.bmp", as, false, true );
|
||||
|
||||
@@ -146,6 +152,7 @@ RString Character::GetStageIconPath() const
|
||||
// if that failed, try using the regular icon
|
||||
GetDirListing( m_sCharDir+"card.png", as, false, true );
|
||||
GetDirListing( m_sCharDir+"card.jpg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"card.jpeg", as, false, true );
|
||||
GetDirListing( m_sCharDir+"card.gif", as, false, true );
|
||||
GetDirListing( m_sCharDir+"card.bmp", as, false, true );
|
||||
if( as.empty() )
|
||||
|
||||
@@ -359,6 +359,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
||||
vector<RString> arrayPossibleBanners;
|
||||
GetDirListing( sFName + "*.png", arrayPossibleBanners, false, false );
|
||||
GetDirListing( sFName + "*.jpg", arrayPossibleBanners, false, false );
|
||||
GetDirListing( sFName + "*.jpeg", arrayPossibleBanners, false, false );
|
||||
GetDirListing( sFName + "*.bmp", arrayPossibleBanners, false, false );
|
||||
GetDirListing( sFName + "*.gif", arrayPossibleBanners, false, false );
|
||||
if( !arrayPossibleBanners.empty() )
|
||||
|
||||
@@ -18,7 +18,7 @@ static RageSurface *TryOpenFile( RString sPath, bool bHeaderOnly, RString &error
|
||||
result = RageSurface_Load_PNG( sPath, ret, bHeaderOnly, error );
|
||||
else if( !format.CompareNoCase("gif") )
|
||||
result = RageSurface_Load_GIF( sPath, ret, bHeaderOnly, error );
|
||||
else if( !format.CompareNoCase("jpg") )
|
||||
else if( !format.CompareNoCase("jpg") || !format.CompareNoCase("jpeg") )
|
||||
result = RageSurface_Load_JPEG( sPath, ret, bHeaderOnly, error );
|
||||
else if( !format.CompareNoCase("bmp") )
|
||||
result = RageSurface_Load_BMP( sPath, ret, bHeaderOnly, error );
|
||||
@@ -87,6 +87,7 @@ RageSurface *RageSurfaceUtils::LoadFile( const RString &sPath, RString &error, b
|
||||
set<RString> FileTypes;
|
||||
FileTypes.insert("png");
|
||||
FileTypes.insert("jpg");
|
||||
FileTypes.insert("jpeg");
|
||||
FileTypes.insert("gif");
|
||||
FileTypes.insert("bmp");
|
||||
|
||||
|
||||
@@ -429,6 +429,7 @@ static void GetImageDirListing( RString sPath, vector<RString> &AddTo )
|
||||
{
|
||||
GetDirListing( sPath + ".png", AddTo, false, false );
|
||||
GetDirListing( sPath + ".jpg", AddTo, false, false );
|
||||
GetDirListing( sPath + ".jpeg", AddTo, false, false );
|
||||
GetDirListing( sPath + ".bmp", AddTo, false, false );
|
||||
GetDirListing( sPath + ".gif", AddTo, false, false );
|
||||
}
|
||||
|
||||
@@ -179,6 +179,7 @@ void SongManager::AddGroup( RString sDir, RString sGroupDirName )
|
||||
vector<RString> arrayGroupBanners;
|
||||
GetDirListing( sDir+sGroupDirName+"/*.png", arrayGroupBanners );
|
||||
GetDirListing( sDir+sGroupDirName+"/*.jpg", arrayGroupBanners );
|
||||
GetDirListing( sDir+sGroupDirName+"/*.jpeg", arrayGroupBanners );
|
||||
GetDirListing( sDir+sGroupDirName+"/*.gif", arrayGroupBanners );
|
||||
GetDirListing( sDir+sGroupDirName+"/*.bmp", arrayGroupBanners );
|
||||
|
||||
@@ -190,6 +191,7 @@ void SongManager::AddGroup( RString sDir, RString sGroupDirName )
|
||||
// Look for a group banner in the parent folder
|
||||
GetDirListing( sDir+sGroupDirName+".png", arrayGroupBanners );
|
||||
GetDirListing( sDir+sGroupDirName+".jpg", arrayGroupBanners );
|
||||
GetDirListing( sDir+sGroupDirName+".jpeg", arrayGroupBanners );
|
||||
GetDirListing( sDir+sGroupDirName+".gif", arrayGroupBanners );
|
||||
GetDirListing( sDir+sGroupDirName+".bmp", arrayGroupBanners );
|
||||
if( !arrayGroupBanners.empty() )
|
||||
@@ -206,6 +208,7 @@ void SongManager::AddGroup( RString sDir, RString sGroupDirName )
|
||||
//vector<RString> arrayGroupBackgrounds;
|
||||
//GetDirListing( sDir+sGroupDirName+"/*-bg.png", arrayGroupBanners );
|
||||
//GetDirListing( sDir+sGroupDirName+"/*-bg.jpg", arrayGroupBanners );
|
||||
//GetDirListing( sDir+sGroupDirName+"/*-bg.jpeg", arrayGroupBanners );
|
||||
//GetDirListing( sDir+sGroupDirName+"/*-bg.gif", arrayGroupBanners );
|
||||
//GetDirListing( sDir+sGroupDirName+"/*-bg.bmp", arrayGroupBanners );
|
||||
/*
|
||||
@@ -217,6 +220,7 @@ void SongManager::AddGroup( RString sDir, RString sGroupDirName )
|
||||
// Look for a group background in the parent folder
|
||||
GetDirListing( sDir+sGroupDirName+"-bg.png", arrayGroupBackgrounds );
|
||||
GetDirListing( sDir+sGroupDirName+"-bg.jpg", arrayGroupBackgrounds );
|
||||
GetDirListing( sDir+sGroupDirName+"-bg.jpeg", arrayGroupBackgrounds );
|
||||
GetDirListing( sDir+sGroupDirName+"-bg.gif", arrayGroupBackgrounds );
|
||||
GetDirListing( sDir+sGroupDirName+"-bg.bmp", arrayGroupBackgrounds );
|
||||
if( !arrayGroupBackgrounds.empty() )
|
||||
|
||||
@@ -604,10 +604,10 @@ try_element_again:
|
||||
for( unsigned p = 0; p < asPaths.size(); ++p )
|
||||
{
|
||||
// BGAnimations, Fonts, Graphics, Sounds, Other
|
||||
static const char *masks[NUM_ElementCategory][14] = {
|
||||
{ "redir", "lua", "xml", "png", "jpg", "bmp", "gif", "ogv", "avi", "mpg", "mpeg", "txt", "", NULL},
|
||||
static const char *masks[NUM_ElementCategory][15] = {
|
||||
{ "redir", "lua", "xml", "png", "jpg", "jpeg", "bmp", "gif", "ogv", "avi", "mpg", "mpeg", "txt", "", NULL},
|
||||
{ "redir", "ini", NULL },
|
||||
{ "redir", "lua", "xml", "png", "jpg", "bmp", "gif", "ogv", "avi", "mpg", "mpeg", "txt", "", NULL},
|
||||
{ "redir", "lua", "xml", "png", "jpg", "jpeg", "bmp", "gif", "ogv", "avi", "mpg", "mpeg", "txt", "", NULL},
|
||||
{ "redir", "lua", "mp3", "oga", "ogg", "wav", NULL },
|
||||
{ "*", NULL },
|
||||
};
|
||||
|
||||
@@ -189,6 +189,7 @@ static bool ExportPackage( const RString &sPackageName, const RString &sSourceIn
|
||||
sExt.CompareNoCase("ogg")==0 ||
|
||||
sExt.CompareNoCase("gif")==0 ||
|
||||
sExt.CompareNoCase("jpg")==0 ||
|
||||
sExt.CompareNoCase("jpeg")==0 ||
|
||||
sExt.CompareNoCase("png")==0 )
|
||||
bUseCompression = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user