|
wavelength 1.0.0
|
Freestyle track the player scratches on. More...
#include <scratchtrack.h>


Public Member Functions | |
| ScratchTrack (ScratchTrackData *pData, const SectionBoundaries *pSections, PlayMap *pPlayMap, const float *pfMsPerTick, int nIndex, int nIntroBars, int nNumBars, int nTicksPerBar) | |
| Construct a track and its release sounds. | |
| ~ScratchTrack () override | |
| Stop the track and release it. | |
| void | Start () override |
| Select the scratchers of the set at the song position. | |
| void | Stop () override |
| Withdraw the scheduled commands and stop every scratcher. | |
| void | SetPlayer (Player *pPlayer) override |
| End the active scratch, then assign the player. | |
| void | HandleInput (Player *pPlayer, const PlayNoteEvent &event) override |
| Start or end a scratch of the track's player. | |
| void | HandleInput (Player *pPlayer, const StickEvent< 2 > &event) override |
| Move the active scratcher with a stick position of the track's player. | |
| void | HandleInput (Player *pPlayer, const BtnEvent< 10 > &event) override |
| Release the scratch of the track's player and play the release sound. | |
| bool | IsActive () override |
| Report whether a scratch is active. | |
| void | Refresh () override |
| Withdraw the scheduled update and select the scratchers of the set at the song position. | |
| void | HandleInput (Player *pPlayer, const BtnEvent< 8 > &event) override |
| Ignore the event. | |
| void | HandleInput (Player *pPlayer, const StickEvent< 6 > &event) override |
| Pass a stick position of the track's player to the graphics. | |
| Public Member Functions inherited from FreestyleTrack | |
| FreestyleTrack (const SectionBoundaries *pSections, PlayMap *pPlayMap, const float *pfMsPerTick, int nIndex, int nNumBars, int nTicksPerBar) | |
| Construct a track. | |
| ~FreestyleTrack () override | |
| Release the track. | |
| int | WrapTick (int nTick) |
| Wrap a tick into the repeat period of the track. | |
| int | SpanEnd (int nTick, int nStart, int nEnd) |
| Report the tick at which the span that starts at a tick ends. | |
| void | UpdatePoints () |
| Award the player pending points for the time the active note sounded in the bar, and run again a twentieth of a bar later. | |
| void | StartBar (bool bSchedule) |
| Commit the pending points of the bar that ends and restart the timing of the active note. | |
| void | SendUpdate (Player *pPlayer, float fX, float fY) |
| Send the button and a stick position of a local player to the other consoles, at most once every 150 milliseconds. | |
| int | GetTickOffset () const |
| void | SetTickOffset (int nTickOffset) |
| Public Member Functions inherited from Track | |
| Track (int nIndex) | |
| Construct a track with no player. | |
| virtual | ~Track () |
| Release the track. | |
| int | GetIndex () const |
| Player * | GetPlayer () const |
Static Public Member Functions | |
| static void | operator delete (void *pBlock) |
| Release a track to the pool heap GameLogic allocated it from. | |
Static Public Attributes | |
| static constexpr int | kNumScratchers = ScratchTrackData::kSetSize |
| The number of scratchers in a set, one for each gem button. | |
Additional Inherited Members | |
| Protected Attributes inherited from FreestyleTrack | |
| int | mTickOffset |
| Protected Attributes inherited from Track | |
| int | mIndex |
| Player * | mPlayer |
Freestyle track the player scratches on.
The RTTI records the class as deriving from FreestyleTrack. Each gem button the player holds plays one scratcher of the set that plays at the song position. Releasing the scratch plays a short sound on the next quantisation boundary.
| ScratchTrack::ScratchTrack | ( | ScratchTrackData * | pData, |
| const SectionBoundaries * | pSections, | ||
| PlayMap * | pPlayMap, | ||
| const float * | pfMsPerTick, | ||
| int | nIndex, | ||
| int | nIntroBars, | ||
| int | nNumBars, | ||
| int | nTicksPerBar ) |
Construct a track and its release sounds.
| pData | The scratchers to play. |
| pSections | The section boundaries of the song. |
| pPlayMap | The map of the song positions. |
| pfMsPerTick | The length of a tick, in milliseconds. |
| nIndex | The track's index in the song, also the MIDI channel of the release sounds. |
| nIntroBars | The intro length, in bars, which the track ignores. |
| nNumBars | The length of the song, in bars. |
| nTicksPerBar | The length of a bar, in ticks. |
|
override |
Stop the track and release it.
|
inlinestatic |
Release a track to the pool heap GameLogic allocated it from.
| pBlock | The block. |
|
overridevirtual |
Select the scratchers of the set at the song position.
Implements Track.
|
overridevirtual |
Withdraw the scheduled commands and stop every scratcher.
Reimplemented from FreestyleTrack.
|
overridevirtual |
End the active scratch, then assign the player.
| pPlayer | The player, or null. |
Reimplemented from FreestyleTrack.
|
overridevirtual |
Start or end a scratch of the track's player.
| pPlayer | The player. |
| event | The event. |
Reimplemented from FreestyleTrack.
|
overridevirtual |
Move the active scratcher with a stick position of the track's player.
| pPlayer | The player. |
| event | The event. |
Reimplemented from FreestyleTrack.
Release the scratch of the track's player and play the release sound.
| pPlayer | The player. |
| event | The event. |
Reimplemented from FreestyleTrack.
|
inlineoverridevirtual |
Report whether a scratch is active.
Implements FreestyleTrack.
|
overridevirtual |
Withdraw the scheduled update and select the scratchers of the set at the song position.
Implements FreestyleTrack.
|
inlineoverridevirtual |
Ignore the event.
| pPlayer | The player. |
| event | The event. |
Reimplemented from FreestyleTrack.
|
overridevirtual |
Pass a stick position of the track's player to the graphics.
| pPlayer | The player. |
| event | The event. |
Reimplemented from FreestyleTrack.
|
staticconstexpr |
The number of scratchers in a set, one for each gem button.