From c9ae1296d1e66380ce641df4946e93a1990a19e5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 1 Jul 2006 05:33:49 +0000 Subject: [PATCH] Add BeginCommand. There are several initialization commands; they all serve distinct purposes. InitCommand is run exactly once; it sets initial state, typically state which never changes for the lifetime of the actor. Copied actors will not call this command again; they'll simply inherit the state from the original. BeginCommand is run from BeginScreen, and is intended to set the actor up for that run of the screen, as BeginScreen does for the screen. This includes setting text or graphics based on current game state; eg. "settext,GAMESTATE:GetCurrentSong():GetDisplayFullTitle()". OnCommand is also run from BeginScreen, and begins the actor's on tween. BeginCommand are mostly equivalent; they're run from the same place. BeginCommand is intended to be used from base XML actors; OnCommand is set by derived XML actors (explanation of this out of scope). Also, OnCommand is run inconsistently, at least in implementation, until the GenericTweenOn() transition is complete. BeginCommand is not. (As with all commands, this can be declared for the screen itself by using the "ScreenBeginCommand" metric--untested.) --- stepmania/src/Screen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index d461df4a88..58f1ee7962 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -79,6 +79,8 @@ void Screen::BeginScreen() if( m_fLockInputSecs == 0 ) m_fLockInputSecs = 0.0001f; // always lock for a tiny amount of time so that we throw away any queued inputs during the load. + + this->PlayCommand( "Begin" ); } void Screen::Update( float fDeltaTime )