rename: ActorCommand -> Command

Make Command smaller and more generic.
Parse arguments on use, not in Command::Load.
This commit is contained in:
Chris Danford
2004-12-03 05:19:46 +00:00
parent abb6a73e4b
commit ed19821e09
67 changed files with 592 additions and 581 deletions
+7 -7
View File
@@ -9,7 +9,7 @@
#include "ThemeManager.h"
#include "GameConstantsAndTypes.h"
#include "Font.h"
#include "ActorUtil.h" // for BeginHandleParams
#include "ActorUtil.h" // for BeginHandleArgs
/* XXX:
* We need some kind of font modifier string for metrics. For example,
@@ -514,23 +514,23 @@ void BitmapText::SetVertAlign( VertAlign va )
BuildChars();
}
void BitmapText::HandleCommand( const ActorCommand &command )
void BitmapText::HandleCommand( const Command &command )
{
BeginHandleParams;
BeginHandleArgs;
const CString& sName = sParam(0);
const CString& sName = command.GetName();
// Commands that go in the tweening queue:
// Commands that take effect immediately (ignoring the tweening queue):
if( sName=="wrapwidthpixels" ) SetWrapWidthPixels( iParam(1) );
else if( sName=="maxwidth" ) SetMaxWidth( fParam(1) );
if( sName=="wrapwidthpixels" ) SetWrapWidthPixels( iArg(1) );
else if( sName=="maxwidth" ) SetMaxWidth( fArg(1) );
else
{
Actor::HandleCommand( command );
return;
}
EndHandleParams;
EndHandleArgs;
}
void BitmapText::SetWrapWidthPixels( int iWrapWidthPixels )