From ea6821cc60e9dd7ff9f6e29aeaaa798b10e348ef Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 27 May 2007 06:24:16 +0000 Subject: [PATCH] remove obsolete .XML actor support --- stepmania/src/ActorUtil.cpp | 45 +----------------------------------- stepmania/src/ActorUtil.h | 1 - stepmania/src/Background.cpp | 1 - 3 files changed, 1 insertion(+), 46 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 6531823284..f9473556c3 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -105,13 +105,6 @@ retry: if( ft == RageFileManager::TYPE_DIR ) { - RString sXMLPath = sPath + "/default.xml"; - if( DoesFileExist(sXMLPath) ) - { - sPath = sXMLPath; - return true; - } - RString sLuaPath = sPath + "/default.lua"; if( DoesFileExist(sLuaPath) ) { @@ -222,26 +215,6 @@ static void MergeActorXML( XNode *pChild, const XNode *pParent ) namespace { - void AnnotateXMLTree( XNode *pNode, const RString &sFile ) - { - RString sDir = Dirname( sFile ); - - vector queue; - queue.push_back( pNode ); - while( !queue.empty() ) - { - pNode = queue.back(); - queue.pop_back(); - queue.insert( queue.end(), pNode->m_childs.begin(), pNode->m_childs.end() ); - - /* Source file, for error messages: */ - pNode->AppendAttr( "_Source", sFile ); - - /* Directory of caller, for relative paths: */ - pNode->AppendAttr( "_Dir", sDir ); - } - } - XNode *LoadXNodeFromLuaShowErrors( const RString &sFile ) { RString sScript; @@ -320,20 +293,6 @@ Actor* ActorUtil::MakeActor( const RString &sPath_, Actor *pParentActor, const X switch( ft ) { - case FT_Xml: - { - XNode xml; - if( !XmlFileUtil::LoadFromFileShowErrors(xml, sPath) ) - { - // XNode will warn about the error - return new Actor; - } - - XmlFileUtil::CompileXNodeTree( &xml, sPath ); - AnnotateXMLTree( &xml, sPath ); - MergeActorXML( &xml, pParent ); - return ActorUtil::LoadFromNode( &xml, pParentActor ); - } case FT_Lua: { auto_ptr pNode( LoadXNodeFromLuaShowErrors(sPath) ); @@ -495,7 +454,6 @@ static const char *FileTypeNames[] = { "Sound", "Movie", "Directory", - "Xml", "Lua", "Model", }; @@ -507,8 +465,7 @@ FileType ActorUtil::GetFileType( const RString &sPath ) RString sExt = GetExtension( sPath ); sExt.MakeLower(); - if( sExt=="xml" ) return FT_Xml; - else if( sExt=="lua" ) return FT_Lua; + if( sExt=="lua" ) return FT_Lua; else if( sExt=="png" || sExt=="jpg" || diff --git a/stepmania/src/ActorUtil.h b/stepmania/src/ActorUtil.h index 972603a76e..3d1c5dfcaa 100644 --- a/stepmania/src/ActorUtil.h +++ b/stepmania/src/ActorUtil.h @@ -29,7 +29,6 @@ enum FileType FT_Sound, FT_Movie, FT_Directory, - FT_Xml, FT_Lua, FT_Model, NUM_FileType, diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 325bd0c4ca..e58790d274 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -354,7 +354,6 @@ bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const Backgroun sEffect = SBE_StretchNormal; break; case FT_Directory: - case FT_Xml: case FT_Lua: case FT_Model: sEffect = SBE_UpperLeft;