95 void SetEnabled(
int nStartBar,
int nEndBar,
bool bEnabled);
228 static constexpr int kAnyLane = -1;
242 GemCursor FindCursor(
int nLane,
int nTick) {
243 GemCursor cursor(mPlayMap, mData, nTick);
244 if ((nLane != kAnyLane) && cursor.IsValid() && (cursor.GetLane() != nLane)) {
245 cursor.AdvanceToLane(nLane);
261 CatchTrackData *mData;
264 std::vector<BarState> mBars;
The gems of one catch track, in the order of their ticks.
Definition catchtrackdata.h:14
void SetPowerup(int nBar, int nPowerup)
Set the power-up a bar awards when its phrase is caught.
bool IsEnabled(int nBar)
Report whether the gems of a bar can be caught.
void SetWrittenPowerup(int nBar, int nPowerup)
Set the power-up a bar awards when its phrase is caught.
void SetCapturedBy(int nStartBar, int nEndBar, Player *pPlayer)
Record the player who captured the phrases of a range of bars.
CatchTrackData * GetData() const
Report the gems of the track.
Definition catchtrackstate.h:222
void SetWrittenEnabled(int nBar, bool bEnabled)
Set whether the gems of a bar can be caught.
GemCursor GetCursor(int nTick)
Construct a cursor at the first gem of any lane at or after a tick.
void ClearBars(int nStartBar, int nEndBar)
Disable a range of bars and remove the gems the range has.
Player * GetCapturedBy(int nBar)
Report the player who captured the phrase of a bar.
void SetWrittenCapturedBy(int nBar, Player *pPlayer)
Record the player who captured the phrase of a bar.
void SetEnabled(int nStartBar, int nEndBar, bool bEnabled)
Set whether the gems of a range of bars can be caught.
GemCursor GetCursor(int nLane, int nTick)
Construct a cursor at the first gem of a lane at or after a tick.
bool IsBarEmpty(int nBar)
Report whether no gem of the track lies in a bar.
~CatchTrackState()
Release the state of the bars.
int GetPowerup(int nBar)
Report the power-up a bar awards when its phrase is caught.
GemCursor GetCursor()
Construct a cursor at the first gem of the track.
bool IsWrittenBarEmpty(int nBar)
Report whether no gem of the track lies in a bar.
CatchTrackState(CatchTrackData *pData, int nNumBars, int nTicksPerBar, PlayMap *pPlayMap)
Construct the state of every bar and mark the bars that have gems.
Position at one gem of a catch track, walked in the order the song plays the gems.
Definition gemcursor.h:14
Map from the bars a song plays to the bars of the song as written, with the loops that repeat stretch...
Definition playmap.h:11
One participant in a song: the track the participant plays, the score, and the streak.
Definition player.h:19
State of one bar of the song as written.
Definition catchtrackstate.h:24
Player * mCapturedBy
Definition catchtrackstate.h:25
int mHasGems
Definition catchtrackstate.h:27
int mPowerup
Definition catchtrackstate.h:28
int mEnabled
Definition catchtrackstate.h:26