Remove support for .actor. Use .xml instead.
This commit is contained in:
@@ -232,7 +232,7 @@ Actor* ActorUtil::LoadFromActorFile( const CString& sDir, const XNode* pNode )
|
||||
* loading the layer we're in. */
|
||||
if( sFile == "" )
|
||||
{
|
||||
CString sError = ssprintf( "The actor file in '%s' is missing the File attribute or has an invalid Class \"%s\"",
|
||||
CString sError = ssprintf( "An xml file in '%s' is missing the File attribute or has an invalid Class \"%s\"",
|
||||
sDir.c_str(), sClass.c_str() );
|
||||
Dialog::OK( sError );
|
||||
pReturn = new Sprite; // Return a dummy object so that we don't crash in AutoActor later.
|
||||
@@ -287,21 +287,6 @@ Actor* ActorUtil::MakeActor( const RageTextureID &ID )
|
||||
CString sDir = Dirname( ID.filename );
|
||||
return LoadFromActorFile( sDir, &xml );
|
||||
}
|
||||
case FT_Actor:
|
||||
{
|
||||
// TODO: Check for recursive loading
|
||||
IniFile ini;
|
||||
if( !ini.ReadFile( ID.filename ) )
|
||||
RageException::Throw( "%s", ini.GetError().c_str() );
|
||||
|
||||
CString sDir = Dirname( ID.filename );
|
||||
|
||||
const XNode* pNode = ini.GetChild( "Actor" );
|
||||
if( pNode == NULL )
|
||||
RageException::Throw( "The file '%s' doesn't have layer 'Actor'.", ID.filename.c_str() );
|
||||
|
||||
return LoadFromActorFile( sDir, pNode );
|
||||
}
|
||||
case FT_Directory:
|
||||
{
|
||||
CString sDir = ID.filename;
|
||||
@@ -425,7 +410,6 @@ void ActorUtil::SortByZPosition( vector<Actor*> &vActors )
|
||||
}
|
||||
|
||||
static const CString FileTypeNames[] = {
|
||||
"Actor",
|
||||
"Bitmap",
|
||||
"Movie",
|
||||
"Directory",
|
||||
@@ -439,8 +423,7 @@ FileType ActorUtil::GetFileType( const CString &sPath )
|
||||
CString sExt = GetExtension( sPath );
|
||||
sExt.MakeLower();
|
||||
|
||||
if( sExt=="xml" ) return FT_Xml;
|
||||
else if( sExt=="actor" ) return FT_Actor;
|
||||
if( sExt=="xml" ) return FT_Xml;
|
||||
else if(
|
||||
sExt=="png" ||
|
||||
sExt=="jpg" ||
|
||||
|
||||
@@ -27,7 +27,6 @@ typedef Actor* (*CreateActorFn)(const CString& sDir, const XNode* pNode);
|
||||
|
||||
enum FileType
|
||||
{
|
||||
FT_Actor,
|
||||
FT_Bitmap,
|
||||
FT_Movie,
|
||||
FT_Directory,
|
||||
|
||||
@@ -368,7 +368,6 @@ bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const Backgroun
|
||||
case FT_Movie:
|
||||
sEffect = SBE_StretchNormal;
|
||||
break;
|
||||
case FT_Actor:
|
||||
case FT_Directory:
|
||||
case FT_Xml:
|
||||
case FT_Model:
|
||||
|
||||
@@ -334,7 +334,7 @@ CString ThemeManager::GetPathToAndFallback( const CString &sThemeName, ElementCa
|
||||
CString sFallback;
|
||||
GetMetricRaw( sClass, "Fallback", sFallback );
|
||||
if( sFallback.empty() )
|
||||
return "";
|
||||
return NULL;
|
||||
sClass = sFallback;
|
||||
}
|
||||
|
||||
@@ -373,9 +373,9 @@ try_element_again:
|
||||
for( unsigned p = 0; p < asPaths.size(); ++p )
|
||||
{
|
||||
static const char *masks[NUM_ElementCategory][14] = {
|
||||
{ "redir", "", "actor", "xml", NULL },
|
||||
{ "redir", "", "xml", NULL },
|
||||
{ "redir", "ini", NULL },
|
||||
{ "redir", "xml", "actor", "png", "jpg", "bmp", "gif","avi", "mpg", "mpeg", "txt", "", NULL},
|
||||
{ "redir", "xml", "png", "jpg", "bmp", "gif","avi", "mpg", "mpeg", "txt", "", NULL},
|
||||
{ "redir", "png", NULL },
|
||||
{ "redir", "mp3", "ogg", "wav", NULL },
|
||||
{ "*", NULL },
|
||||
@@ -408,7 +408,7 @@ try_element_again:
|
||||
// HACK: have Fonts fall back to Numbers. Eventually Numbers will be removed.
|
||||
if( category == EC_FONTS )
|
||||
return GetPathToRaw( sThemeName, EC_NUMBERS, sClassName, sElement ) ;
|
||||
return ""; // This isn't fatal.
|
||||
return NULL; // This isn't fatal.
|
||||
}
|
||||
|
||||
if( asElementPaths.size() > 1 )
|
||||
@@ -524,7 +524,7 @@ try_element_again:
|
||||
if( bOptional )
|
||||
{
|
||||
Cache[sFileName] = "";
|
||||
return "";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const CString &sCategory = ElementCategoryToString(category);
|
||||
@@ -564,7 +564,7 @@ try_element_again:
|
||||
GetThemeDirFromName(BASE_THEME_NAME).c_str() );
|
||||
default:
|
||||
ASSERT(0);
|
||||
return "";
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,7 +645,7 @@ try_metric_again:
|
||||
ReloadMetrics();
|
||||
goto try_metric_again;
|
||||
case Dialog::ignore:
|
||||
return "";
|
||||
return NULL;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user