cleanup
This commit is contained in:
+11
-11
@@ -222,20 +222,20 @@ void Actor::LoadFromNode( const CString& sDir, const XNode* pNode )
|
||||
FOREACH_CONST_Attr( pNode, pAttr )
|
||||
{
|
||||
// Load Name, if any.
|
||||
if( pAttr->m_sName == "Name" )
|
||||
const CString &sKeyName = pAttr->m_sName;
|
||||
const CString &sValue = pAttr->m_sValue;
|
||||
if( sKeyName == "Name" )
|
||||
{
|
||||
m_sName = pAttr->m_sValue;
|
||||
m_sName = sValue;
|
||||
}
|
||||
else if( pAttr->m_sName == "BaseRotationXDegrees" ) SetBaseRotationX( strtof( pAttr->m_sValue, NULL ) );
|
||||
else if( pAttr->m_sName == "BaseRotationYDegrees" ) SetBaseRotationY( strtof( pAttr->m_sValue, NULL ) );
|
||||
else if( pAttr->m_sName == "BaseRotationZDegrees" ) SetBaseRotationZ( strtof( pAttr->m_sValue, NULL ) );
|
||||
else if( pAttr->m_sName == "BaseZoomX" ) SetBaseZoomX( strtof( pAttr->m_sValue, NULL ) );
|
||||
else if( pAttr->m_sName == "BaseZoomY" ) SetBaseZoomY( strtof( pAttr->m_sValue, NULL ) );
|
||||
else if( pAttr->m_sName == "BaseZoomZ" ) SetBaseZoomZ( strtof( pAttr->m_sValue, NULL ) );
|
||||
else if( EndsWith(pAttr->m_sName,"Command") )
|
||||
else if( sKeyName == "BaseRotationXDegrees" ) SetBaseRotationX( strtof( sValue, NULL ) );
|
||||
else if( sKeyName == "BaseRotationYDegrees" ) SetBaseRotationY( strtof( sValue, NULL ) );
|
||||
else if( sKeyName == "BaseRotationZDegrees" ) SetBaseRotationZ( strtof( sValue, NULL ) );
|
||||
else if( sKeyName == "BaseZoomX" ) SetBaseZoomX( strtof( sValue, NULL ) );
|
||||
else if( sKeyName == "BaseZoomY" ) SetBaseZoomY( strtof( sValue, NULL ) );
|
||||
else if( sKeyName == "BaseZoomZ" ) SetBaseZoomZ( strtof( sValue, NULL ) );
|
||||
else if( EndsWith(sKeyName,"Command") )
|
||||
{
|
||||
const CString &sKeyName = pAttr->m_sName; /* "OnCommand" */
|
||||
const CString &sValue = pAttr->m_sValue;
|
||||
apActorCommands apac( new ActorCommands( sValue ) );
|
||||
|
||||
CString sCmdName = sKeyName.Left( sKeyName.size()-7 );
|
||||
|
||||
@@ -50,18 +50,20 @@ void TitleTrans::LoadFromNode( const XNode* pNode )
|
||||
{
|
||||
/* Surround each regex with ^(...)$, to force all comparisons to default
|
||||
* to being a full-line match. (Add ".*" manually if this isn't wanted.) */
|
||||
if( attr->m_sName == "DontTransliterate" ) translit = false;
|
||||
else if( attr->m_sName == "TitleFrom" ) TitleFrom = "^(" + attr->m_sValue + ")$";
|
||||
else if( attr->m_sName == "ArtistFrom" ) ArtistFrom = "^(" + attr->m_sValue + ")$";
|
||||
else if( attr->m_sName == "SubtitleFrom") SubFrom = "^(" + attr->m_sValue + ")$";
|
||||
else if( attr->m_sName == "TitleTo") Replacement.Title = attr->m_sValue;
|
||||
else if( attr->m_sName == "ArtistTo") Replacement.Artist = attr->m_sValue;
|
||||
else if( attr->m_sName == "SubtitleTo") Replacement.Subtitle = attr->m_sValue;
|
||||
else if( attr->m_sName == "TitleTransTo") Replacement.TitleTranslit = attr->m_sValue;
|
||||
else if( attr->m_sName == "ArtistTransTo") Replacement.ArtistTranslit = attr->m_sValue;
|
||||
else if( attr->m_sName == "SubtitleTransTo") Replacement.SubtitleTranslit= attr->m_sValue;
|
||||
const CString &sKeyName = attr->m_sName;
|
||||
const CString &sValue = attr->m_sValue;
|
||||
if( sKeyName == "DontTransliterate" ) translit = false;
|
||||
else if( sKeyName == "TitleFrom" ) TitleFrom = "^(" + sValue + ")$";
|
||||
else if( sKeyName == "ArtistFrom" ) ArtistFrom = "^(" + sValue + ")$";
|
||||
else if( sKeyName == "SubtitleFrom") SubFrom = "^(" + sValue + ")$";
|
||||
else if( sKeyName == "TitleTo") Replacement.Title = sValue;
|
||||
else if( sKeyName == "ArtistTo") Replacement.Artist = sValue;
|
||||
else if( sKeyName == "SubtitleTo") Replacement.Subtitle = sValue;
|
||||
else if( sKeyName == "TitleTransTo") Replacement.TitleTranslit = sValue;
|
||||
else if( sKeyName == "ArtistTransTo") Replacement.ArtistTranslit = sValue;
|
||||
else if( sKeyName == "SubtitleTransTo") Replacement.SubtitleTranslit= sValue;
|
||||
else
|
||||
LOG->Warn( "Unknown TitleSubst tag: \"%s\"", attr->m_sName.c_str() );
|
||||
LOG->Warn( "Unknown TitleSubst tag: \"%s\"", sKeyName.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user