27 : mTrack(pTrack), mTickDuration(pTickDuration), mNextCommand(0), mStartTick(0),
28 mWaitingTask(nullptr) {
63 if (mNextCommand < mTrack->NumCommands()) {
65 this, mStartTick + mTrack->GetCommand(mNextCommand)->mPosition,
false);
66 }
else if (mWaitingTask !=
nullptr) {
78 mStartTick = nStartTick;
88 mNextCommand = nNextCommand;
98 mWaitingTask = pWaitingTask;
103 float *mTickDuration;
Unit of work a Scheduler runs at a set time.
Definition command.h:13
void SetWaitingTask(Task *pWaitingTask)
Definition playscriptcmd.h:97
PlayScriptCmd(ScriptTrackData *pTrack, float *pTickDuration)
Construct a command at the first command of a track.
Definition playscriptcmd.h:26
void SetStartTick(int nStartTick)
Definition playscriptcmd.h:77
ScriptTrackData * GetTrack() const
Definition playscriptcmd.h:92
void SetNextCommand(int nNextCommand)
Definition playscriptcmd.h:87
void ScheduleNext()
Post the command at the tick of the next command of the track, or report the end of the track to the ...
Definition playscriptcmd.h:62
void Execute() override
Run the next command of the track and post the one after it.
Definition playscriptcmd.h:46
~PlayScriptCmd() override
Release the command.
Definition playscriptcmd.h:37
int GetStartTick() const
Definition playscriptcmd.h:72
int GetNextCommand() const
Definition playscriptcmd.h:82
static bool Dispatch(DataArray *pCommand)
Run a script command through the routine registered for its name.
The script commands of a song's SCRIPT track, each at its tick.
Definition scripttrackdata.h:14
static void ReportDone(Task *pTask)
Tell a waiting task that its work is done.
Definition taskdonenotifier.h:38
Unit of work an owner starts, polls until it reports that it is done, and stops.
Definition task.h:9
Scheduler TheSongScheduler
The scheduler of the song clock.