Track the player plays freely with the analog sticks rather than by hitting gems.
More...
#include <freestyletrack.h>
|
| | FreestyleTrack (const SectionBoundaries *pSections, PlayMap *pPlayMap, const float *pfMsPerTick, int nIndex, int nNumBars, int nTicksPerBar) |
| | Construct a track.
|
| | ~FreestyleTrack () override |
| | Release the track.
|
| void | Stop () override |
| | Stop the track with the song.
|
| void | SetPlayer (Player *pPlayer) override |
| | Commit the points of the player that leaves, assign the player, and start the bars of the player that arrives.
|
| void | HandleInput (Player *pPlayer, const PlayNoteEvent &event) override |
| | Send a note the track's player played, and start or stop the scoring of the time it sounds.
|
| void | HandleInput (Player *pPlayer, const BtnEvent< 8 > &event) override |
| | Ignore the event.
|
| void | HandleInput (Player *pPlayer, const StickEvent< 2 > &event) override |
| | Pass a stick position of the track's player to the graphics and the other consoles.
|
| void | HandleInput (Player *pPlayer, const StickEvent< 6 > &event) override |
| | Pass a stick position of the track's player to the graphics.
|
| virtual bool | IsActive ()=0 |
| | Report whether the track has an active note.
|
| virtual void | Refresh ()=0 |
| | Rebuild what the track plays from the song position.
|
| 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) |
| virtual void | HandleInput (Player *pPlayer, const BtnEvent< 10 > &event)=0 |
| | Act on a button event of a player on this track.
|
| | Track (int nIndex) |
| | Construct a track with no player.
|
| virtual | ~Track () |
| | Release the track.
|
| virtual void | Start ()=0 |
| | Start the track with the song.
|
| int | GetIndex () const |
| Player * | GetPlayer () const |
Track the player plays freely with the analog sticks rather than by hitting gems.
The RTTI records the class as deriving from Track. AxeTrack and ScratchTrack derive from it. In a game the player earns pending points for the time an active note sounds in each bar, and the points are committed at the end of the bar. Online, the button and the stick positions are sent to the other consoles.
◆ FreestyleTrack()
| FreestyleTrack::FreestyleTrack |
( |
const SectionBoundaries * | pSections, |
|
|
PlayMap * | pPlayMap, |
|
|
const float * | pfMsPerTick, |
|
|
int | nIndex, |
|
|
int | nNumBars, |
|
|
int | nTicksPerBar ) |
Construct a track.
- Parameters
-
| 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. |
| nNumBars | The length of the song, in bars. |
| nTicksPerBar | The length of a bar, in ticks. |
- Ghidra address:
- NTSC-U/C: 0x0014ef80
- Ghidra address:
- PAL: 0x001508e0
◆ ~FreestyleTrack()
| FreestyleTrack::~FreestyleTrack |
( |
| ) |
|
|
override |
Release the track.
- Ghidra address:
- NTSC-U/C: 0x0014f078
- Ghidra address:
- PAL: 0x001509d8
◆ Stop()
| void FreestyleTrack::Stop |
( |
| ) |
|
|
overridevirtual |
Stop the track with the song.
The member does nothing in this class.
- Ghidra address:
- NTSC-U/C: 0x0014f0e8
- Ghidra address:
- PAL: 0x00150a48
Implements Track.
Reimplemented in ScratchTrack.
◆ SetPlayer()
| void FreestyleTrack::SetPlayer |
( |
Player * | pPlayer | ) |
|
|
overridevirtual |
Commit the points of the player that leaves, assign the player, and start the bars of the player that arrives.
- Parameters
-
| pPlayer | The player, or null. |
- Ghidra address:
- NTSC-U/C: 0x0014f0f0
- Ghidra address:
- PAL: 0x00150a50
Reimplemented from Track.
Reimplemented in ScratchTrack.
◆ HandleInput() [1/5]
Send a note the track's player played, and start or stop the scoring of the time it sounds.
- Parameters
-
| pPlayer | The player. |
| event | The event. |
- Ghidra address:
- NTSC-U/C: 0x0014f258
- Ghidra address:
- PAL: 0x00150bb8
Implements Track.
Reimplemented in ScratchTrack.
◆ HandleInput() [2/5]
| void FreestyleTrack::HandleInput |
( |
Player * | pPlayer, |
|
|
const BtnEvent< 8 > & | event ) |
|
inlineoverridevirtual |
Ignore the event.
- Parameters
-
| pPlayer | The player. |
| event | The event. |
- Ghidra address:
- NTSC-U/C: 0x0034b6d8
- Ghidra address:
- PAL: 0x003b8b08
Implements Track.
Reimplemented in ScratchTrack.
◆ HandleInput() [3/5]
| void FreestyleTrack::HandleInput |
( |
Player * | pPlayer, |
|
|
const StickEvent< 2 > & | event ) |
|
overridevirtual |
Pass a stick position of the track's player to the graphics and the other consoles.
- Parameters
-
| pPlayer | The player. |
| event | The event. |
- Ghidra address:
- NTSC-U/C: 0x0014f330
- Ghidra address:
- PAL: 0x00150c90
Implements Track.
Reimplemented in ScratchTrack.
◆ HandleInput() [4/5]
| void FreestyleTrack::HandleInput |
( |
Player * | pPlayer, |
|
|
const StickEvent< 6 > & | event ) |
|
overridevirtual |
Pass a stick position of the track's player to the graphics.
- Parameters
-
| pPlayer | The player. |
| event | The event. |
- Ghidra address:
- NTSC-U/C: 0x0014f3b8
- Ghidra address:
- PAL: 0x00150d18
Implements Track.
Reimplemented in ScratchTrack.
◆ IsActive()
| virtual bool FreestyleTrack::IsActive |
( |
| ) |
|
|
pure virtual |
Report whether the track has an active note.
- Returns
- True while a note sounds.
Implemented in AxeTrack, and ScratchTrack.
◆ Refresh()
| virtual void FreestyleTrack::Refresh |
( |
| ) |
|
|
pure virtual |
◆ WrapTick()
| int FreestyleTrack::WrapTick |
( |
int | nTick | ) |
|
Wrap a tick into the repeat period of the track.
- Parameters
-
- Returns
- The tick within the period.
- Ghidra address:
- NTSC-U/C: 0x0014f930
- Ghidra address:
- PAL: 0x00151290
◆ SpanEnd()
| int FreestyleTrack::SpanEnd |
( |
int | nTick, |
|
|
int | nStart, |
|
|
int | nEnd ) |
Report the tick at which the span that starts at a tick ends.
- Parameters
-
| nTick | The tick. |
| nStart | The first tick of the span. |
| nEnd | The tick after the span, or -1 when the span has no end. |
- Returns
- The end tick.
- Ghidra address:
- NTSC-U/C: 0x0014f980
- Ghidra address:
- PAL: 0x001512e0
◆ UpdatePoints()
| void FreestyleTrack::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.
The name is inferred.
- Ghidra address:
- NTSC-U/C: 0x0014f400
- Ghidra address:
- PAL: 0x00150d60
◆ StartBar()
| void FreestyleTrack::StartBar |
( |
bool | bSchedule | ) |
|
Commit the pending points of the bar that ends and restart the timing of the active note.
The name is inferred.
- Parameters
-
| bSchedule | Whether to run again at the end of the next bar. |
- Ghidra address:
- NTSC-U/C: 0x0014f610
- Ghidra address:
- PAL: 0x00150f70
◆ SendUpdate()
| void FreestyleTrack::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.
The name is inferred.
- Parameters
-
| pPlayer | The player. |
| fX | The horizontal stick position. |
| fY | The vertical stick position. |
- Ghidra address:
- NTSC-U/C: 0x0014f7c8
- Ghidra address:
- PAL: 0x00151128
◆ GetTickOffset()
| int FreestyleTrack::GetTickOffset |
( |
| ) |
const |
|
inline |
- Returns
- The offset of the game tick from the song tick.
◆ SetTickOffset()
| void FreestyleTrack::SetTickOffset |
( |
int | nTickOffset | ) |
|
|
inline |
- Parameters
-
| nTickOffset | The offset of the game tick from the song tick. |
◆ HandleInput() [5/5]
Act on a button event of a player on this track.
- Parameters
-
| pPlayer | The player. |
| event | The event. |
Implements Track.
Reimplemented in ScratchTrack.
◆ mTickOffset
| int FreestyleTrack::mTickOffset |
|
protected |
The offset of the game tick from the song tick.
The documentation for this class was generated from the following file: