seems to work; cleanup
This commit is contained in:
@@ -466,29 +466,6 @@ void BGAnimationLayer::LoadFromIni( const CString& sAniDir_, const IniKey& layer
|
|||||||
m_Type = TYPE_SPRITE;
|
m_Type = TYPE_SPRITE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
{
|
|
||||||
for( IniKey::const_iterator i = layer.begin();
|
|
||||||
i != layer.end(); ++i)
|
|
||||||
{
|
|
||||||
CString KeyName = i->first; /* "OnCommand" */
|
|
||||||
KeyName.MakeLower();
|
|
||||||
|
|
||||||
if( KeyName.Right(7) != "command" )
|
|
||||||
continue; /* not a command */
|
|
||||||
|
|
||||||
const CString &sData = i->second;
|
|
||||||
Commands cmds = ParseCommands( sData );
|
|
||||||
CString sCmdName;
|
|
||||||
/* Special case: "Command=foo" -> "OnCommand=foo" */
|
|
||||||
if( KeyName.size() == 7 )
|
|
||||||
sCmdName="on";
|
|
||||||
else
|
|
||||||
sCmdName = KeyName.Left( KeyName.size()-7 );
|
|
||||||
m_mapNameToCommands[sCmdName] = cmds;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
layer.GetValue( "CommandRepeatSeconds", m_fRepeatCommandEverySeconds );
|
layer.GetValue( "CommandRepeatSeconds", m_fRepeatCommandEverySeconds );
|
||||||
m_fSecondsUntilNextCommand = m_fRepeatCommandEverySeconds;
|
m_fSecondsUntilNextCommand = m_fRepeatCommandEverySeconds;
|
||||||
@@ -841,21 +818,6 @@ void BGAnimationLayer::LoseFocus()
|
|||||||
void BGAnimationLayer::PlayCommand( const CString &sCommandName )
|
void BGAnimationLayer::PlayCommand( const CString &sCommandName )
|
||||||
{
|
{
|
||||||
ActorFrame::PlayCommand( sCommandName );
|
ActorFrame::PlayCommand( sCommandName );
|
||||||
|
|
||||||
#if 0
|
|
||||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
|
||||||
m_SubActors[i]->RunCommands( ParseCommands("playcommand,"+sCommandName) );
|
|
||||||
|
|
||||||
CString sKey = sCommandName;
|
|
||||||
sKey.MakeLower();
|
|
||||||
map<CString, Commands>::const_iterator it = m_mapNameToCommands.find( sKey );
|
|
||||||
|
|
||||||
if( it == m_mapNameToCommands.end() )
|
|
||||||
return;
|
|
||||||
|
|
||||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
|
||||||
m_SubActors[i]->RunCommands( it->second );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user