rearrange
This commit is contained in:
+11
-11
@@ -240,17 +240,6 @@ Actor* ActorUtil::MakeActor( const CString &sPath )
|
|||||||
FileType ft = GetFileType( sPath );
|
FileType ft = GetFileType( sPath );
|
||||||
switch( ft )
|
switch( ft )
|
||||||
{
|
{
|
||||||
case FT_Xml:
|
|
||||||
{
|
|
||||||
XNode xml;
|
|
||||||
if( !xml.LoadFromFile(sPath) )
|
|
||||||
{
|
|
||||||
// XNode will warn about the error
|
|
||||||
return new Actor;
|
|
||||||
}
|
|
||||||
CString sDir = Dirname( sPath );
|
|
||||||
return LoadFromActorFile( sDir, &xml );
|
|
||||||
}
|
|
||||||
case FT_Directory:
|
case FT_Directory:
|
||||||
{
|
{
|
||||||
CString sDir = sPath;
|
CString sDir = sPath;
|
||||||
@@ -275,6 +264,17 @@ Actor* ActorUtil::MakeActor( const CString &sPath )
|
|||||||
return pBGA;
|
return pBGA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case FT_Xml:
|
||||||
|
{
|
||||||
|
XNode xml;
|
||||||
|
if( !xml.LoadFromFile(sPath) )
|
||||||
|
{
|
||||||
|
// XNode will warn about the error
|
||||||
|
return new Actor;
|
||||||
|
}
|
||||||
|
CString sDir = Dirname( sPath );
|
||||||
|
return LoadFromActorFile( sDir, &xml );
|
||||||
|
}
|
||||||
case FT_Bitmap:
|
case FT_Bitmap:
|
||||||
case FT_Movie:
|
case FT_Movie:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user