wavelength 1.0.0
Loading...
Searching...
No Matches
catchtrackdata.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "game/gem.h"
6#include "game/playmap.h"
7
15public:
23 explicit CatchTrackData(int nLengthTicks);
24
32
40
50 void AddGem(const Gem &gem);
51
62 static void InsertSorted(const Gem &gem, std::vector<Gem> &gems, int);
63
76 void EraseSpan(PlayMap *pPlayMap, int nStartTick, int nEndTick);
77
85 int GetNumGems() const;
86
95 Gem *GetGem(int nIndex);
96
105 const Gem *GetGem(int nIndex) const;
106
117 int FindGemAt(int nTick) const;
118
127 int FindGem(int nTick) const;
128
129private:
136 void CheckGems() const;
137
138 std::vector<Gem> mGems;
139 int mLengthTicks;
140};
void EraseSpan(PlayMap *pPlayMap, int nStartTick, int nEndTick)
Remove the gems of a span of the song, which wraps past the end of the track when it ends before it s...
void AddGem(const Gem &gem)
Insert a gem at the place its tick orders it, unless it is past the end of the track.
int FindGem(int nTick) const
Find the first gem at or after a tick.
static void InsertSorted(const Gem &gem, std::vector< Gem > &gems, int)
Insert a gem into a vector of gems at the place its tick and lane order it.
int FindGemAt(int nTick) const
Find the gem at a tick.
int GetNumGems() const
Report the number of gems.
const Gem * GetGem(int nIndex) const
Report one gem.
CatchTrackData(int nLengthTicks)
Construct an empty list with room for 500 gems.
CatchTrackData()
Construct an empty list with room for 500 gems and no length.
Gem * GetGem(int nIndex)
Report one gem.
~CatchTrackData()
Release the gems.
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 gem of a catch track.
Definition gem.h:12