instead of assuming png, and returning a bad filename, return false
This commit is contained in:
@@ -47,7 +47,7 @@ Actor* ActorUtil::Create( const RString& sClassName, const XNode* pNode, Actor *
|
|||||||
return pRet;
|
return pRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActorUtil::ResolvePath( RString &sPath, const RString &sName )
|
bool ActorUtil::ResolvePath( RString &sPath, const RString &sName )
|
||||||
{
|
{
|
||||||
retry:
|
retry:
|
||||||
CollapsePath( sPath );
|
CollapsePath( sPath );
|
||||||
@@ -72,10 +72,7 @@ retry:
|
|||||||
FlushDirCache();
|
FlushDirCache();
|
||||||
goto retry;
|
goto retry;
|
||||||
case Dialog::ignore:
|
case Dialog::ignore:
|
||||||
asPaths.push_back( sPath );
|
return false;
|
||||||
if( GetExtension(asPaths[0]) == "" )
|
|
||||||
asPaths[0] = SetExtension( asPaths[0], "png" );
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
@@ -107,6 +104,7 @@ retry:
|
|||||||
}
|
}
|
||||||
|
|
||||||
sPath = DerefRedir( sPath );
|
sPath = DerefRedir( sPath );
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PushParamsTable( Lua *L )
|
static void PushParamsTable( Lua *L )
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace ActorUtil
|
|||||||
RString GetWhere( const XNode *pNode );
|
RString GetWhere( const XNode *pNode );
|
||||||
bool GetAttrPath( const XNode *pNode, const RString &sName, RString &sOut );
|
bool GetAttrPath( const XNode *pNode, const RString &sName, RString &sOut );
|
||||||
|
|
||||||
void ResolvePath( RString &sPath, const RString &sName );
|
bool ResolvePath( RString &sPath, const RString &sName );
|
||||||
|
|
||||||
void SortByZPosition( vector<Actor*> &vActors );
|
void SortByZPosition( vector<Actor*> &vActors );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user