|
wavelength 1.0.0
|
Track of one player in a duel, on which the player places a phrase or catches the phrase the other player placed. More...
#include <dueltrack.h>


Public Types | |
| enum | Mode { kModeIdle = 0 , kModePitch = 1 , kModeCatch = 2 } |
| The values of SetMode() and ShowPhrase(). More... | |
Public Member Functions | |
| DuelTrack (DuelLogic *pLogic, Player *pPlayer, CatchTrackData *pCatchGems, CatchTrackData *pPitchGems, PitchTrackRiffData *pRiffData, DuelPatternTable *pPatterns, const float *pTickDuration, PlayMap *pPlayMap, SectionBoundaries *pSections, int nSide, int nOpponentSide, int nLeadInBars, int nNumBars, int nTicksPerBar, int nPhraseBars, bool bEasiest) | |
| Construct the track of one player. | |
| ~DuelTrack () override | |
| Release the track. | |
| void | Start () override |
| Start the track with the song. | |
| void | Stop () override |
| Stop the track with the song. | |
| void | HandleInput (Player *pPlayer, const PlayNoteEvent &event) override |
| Hand a press of the player on the track to the pitcher or to the catcher. | |
| void | HandleInput (Player *pPlayer, const BtnEvent< 8 > &event) override |
| Ignore a button event. | |
| void | HandleInput (Player *pPlayer, const StickEvent< 2 > &event) override |
| Ignore a stick event. | |
| void | HandleInput (Player *pPlayer, const StickEvent< 6 > &event) override |
| Ignore a stick event. | |
| void | HandleInput (Player *pPlayer, const BtnEvent< 10 > &event) override |
| Ignore a button event. | |
| int | GetTicksPerBar () const override |
| Report the song ticks in one bar. | |
| Player * | GetPlayer () const override |
| Report the player of the side the track belongs to. | |
| bool | IsBarActive (int nBar) override |
| Report that the phrase of every bar can be played. | |
| void | HitGem (int nTick, const GemCursor &cursor, bool bRemote) override |
| Play the riff of a caught gem and show the catch. | |
| void | MissGem (int nTick, const GemCursor &cursor, bool bRemote) override |
| End the catch as missed when a gem of the phrase to catch passes without a press. | |
| GemCursor | GetCursor () override |
| Report a cursor at the first gem the player catches. | |
| void | ShowPhrase (int nMode, int nStartBar, int nEndBar) |
| Show the bars of the next phrase. | |
| void | SetMode (int nMode, int nBar) |
| Change what the player does on the track. | |
| void | CountGem () |
| Count one more gem in the phrase to catch. | |
| void | DropBars (int nStartBar, int nEndBar) |
| Disable a range of bars the song has passed and remove the gems the range has. | |
| void | Rewind () |
| Move the playback of the track to the current song position. | |
| void | CancelPhrase () |
| Withdraw the command that runs once per phrase. | |
| void | MissCatch () |
| End the current catch as missed. | |
| void | MakeCatch (int nBar) |
| End the current catch as made. | |
| void | SetRiffData (PitchTrackRiffData *pRiffData) |
| Change the riffs the gems the player places play. | |
| Public Member Functions inherited from Track | |
| Track (int nIndex) | |
| Construct a track with no player. | |
| virtual | ~Track () |
| Release the track. | |
| virtual void | SetPlayer (Player *pPlayer) |
| Assign the player, and record the assignment in the session statistics. | |
| int | GetIndex () const |
| Player * | GetPlayer () const |
| Public Member Functions inherited from TrackReactor | |
| virtual | ~TrackReactor () |
| Release the interface. | |
Additional Inherited Members | |
| Protected Attributes inherited from Track | |
| int | mIndex |
| Player * | mPlayer |
Track of one player in a duel, on which the player places a phrase or catches the phrase the other player placed.
The RTTI records the class as deriving from Track and TrackReactor. The object is 0x10c bytes. The presses of a phrase to place go to a DuelTrackPitcher, and the presses of a phrase to catch go to a GemCatcher. Each reports to the track through a nested receiver. The names of the members other than the constructor, the destructor, and the Track and TrackReactor overrides are inferred.
| enum DuelTrack::Mode |
The values of SetMode() and ShowPhrase().
| Enumerator | |
|---|---|
| kModeIdle | The track shows no phrase. |
| kModePitch | The player places a phrase. |
| kModeCatch | The player catches the phrase the other player placed. |
| DuelTrack::DuelTrack | ( | DuelLogic * | pLogic, |
| Player * | pPlayer, | ||
| CatchTrackData * | pCatchGems, | ||
| CatchTrackData * | pPitchGems, | ||
| PitchTrackRiffData * | pRiffData, | ||
| DuelPatternTable * | pPatterns, | ||
| const float * | pTickDuration, | ||
| PlayMap * | pPlayMap, | ||
| SectionBoundaries * | pSections, | ||
| int | nSide, | ||
| int | nOpponentSide, | ||
| int | nLeadInBars, | ||
| int | nNumBars, | ||
| int | nTicksPerBar, | ||
| int | nPhraseBars, | ||
| bool | bEasiest ) |
Construct the track of one player.
| pLogic | The rules the track reports to. |
| pPlayer | The player. |
| pCatchGems | The gems the other player places for the player to catch. |
| pPitchGems | The gems the player places for the other player to catch. |
| pRiffData | The riffs of the song track the duel plays first. |
| pPatterns | The duel patterns of the song. |
| pTickDuration | The duration of one tick on the song clock. |
| pPlayMap | The map of the song positions. |
| pSections | The sections of the song. It is unused. |
| nSide | The side of the player. |
| nOpponentSide | The side of the other player. |
| nLeadInBars | One more than the bars the song plays before bar 0. It is unused. |
| nNumBars | The length of the song in bars. |
| nTicksPerBar | The song ticks in one bar. |
| nPhraseBars | The length of a phrase in bars. |
| bEasiest | Whether the song is at the easiest difficulty, at which the duel coaches the players. |
|
override |
Release the track.
|
overridevirtual |
Start the track with the song.
Implements Track.
|
overridevirtual |
Stop the track with the song.
Implements Track.
|
overridevirtual |
Hand a press of the player on the track to the pitcher or to the catcher.
A press while the phrase is already decided plays the refusal sound.
| pPlayer | The player. |
| event | The event. |
Implements Track.
Ignore a button event.
The body is empty.
| pPlayer | The player. |
| event | The event. |
Implements Track.
|
overridevirtual |
Ignore a stick event.
The body is empty.
| pPlayer | The player. |
| event | The event. |
Implements Track.
|
overridevirtual |
Ignore a stick event.
The body is empty.
| pPlayer | The player. |
| event | The event. |
Implements Track.
|
inlineoverridevirtual |
Ignore a button event.
The body is empty.
| pPlayer | The player. |
| event | The event. |
Implements Track.
|
inlineoverridevirtual |
Report the song ticks in one bar.
Implements TrackReactor.
|
inlineoverridevirtual |
Report the player of the side the track belongs to.
Implements TrackReactor.
|
overridevirtual |
Report that the phrase of every bar can be played.
| nBar | The bar. |
Implements TrackReactor.
|
overridevirtual |
Play the riff of a caught gem and show the catch.
The gem counts towards the catch when it lies in the phrase to catch, and catching the last gem of the phrase ends the catch as made.
| nTick | The song tick of the press. |
| cursor | The gem. |
| bRemote | Whether the catch came from another console. |
Implements TrackReactor.
|
overridevirtual |
End the catch as missed when a gem of the phrase to catch passes without a press.
Only a player on this console misses a gem this way.
| nTick | The song tick the gem was judged at. |
| cursor | The gem. |
| bRemote | Whether the miss came from another console. |
Implements TrackReactor.
|
overridevirtual |
Report a cursor at the first gem the player catches.
Implements TrackReactor.
| void DuelTrack::ShowPhrase | ( | int | nMode, |
| int | nStartBar, | ||
| int | nEndBar ) |
Show the bars of the next phrase.
| nMode | One of Mode. kModePitch also shows the steps the duel pattern allows. |
| nStartBar | The first bar of the phrase. |
| nEndBar | The bar after the phrase. |
| void DuelTrack::SetMode | ( | int | nMode, |
| int | nBar ) |
Change what the player does on the track.
Catching a phrase with no gems ends the catch as made at once.
| nMode | One of Mode. |
| nBar | The bar the change takes effect at. |
| void DuelTrack::CountGem | ( | ) |
Count one more gem in the phrase to catch.
| void DuelTrack::DropBars | ( | int | nStartBar, |
| int | nEndBar ) |
Disable a range of bars the song has passed and remove the gems the range has.
| nStartBar | The first bar of the range. |
| nEndBar | The bar after the range. |
| void DuelTrack::Rewind | ( | ) |
Move the playback of the track to the current song position.
| void DuelTrack::CancelPhrase | ( | ) |
Withdraw the command that runs once per phrase.
| void DuelTrack::MissCatch | ( | ) |
End the current catch as missed.
In an online duel, the miss is sent to the other console first.
| void DuelTrack::MakeCatch | ( | int | nBar | ) |
End the current catch as made.
In an online duel, the catch is sent to the other console.
| nBar | The bar the catch ended in. |
| void DuelTrack::SetRiffData | ( | PitchTrackRiffData * | pRiffData | ) |
Change the riffs the gems the player places play.
| pRiffData | The riffs. |