wavelength 1.0.0
Loading...
Searching...
No Matches
PitchTrackPlayGems Class Reference

The gems of a pitch track, addressed by the bars and ticks the song plays. More...

#include <pitchtrackplaygems.h>

Public Member Functions

 PitchTrackPlayGems (PitchTrackGems *pGems, PlayMap *pPlayMap, SectionBoundaries *pSections, SlotGrid *pPatterns, int nNumBars, int nTicksPerBar)
 Construct a view of gems.
 ~PitchTrackPlayGems ()
 Release the view.
bool ToggleGem (signed char nSlot, int nTick, signed char nOwner, bool bRepeat)
 Place or remove the gem at a tick, and on request at the same tick of every other bar of the section.
int GetOwner (int nBar)
 Report the owner of the section a bar lies in.
void ClearBar (int nBar, bool bRepeat)
 Remove every gem of a bar, and on request of every other bar of the section.
void ClearSection (int nBar)
 Remove every gem of the section a bar lies in.
void CopyBars (PitchTrackPlayGems *pSource, int nStartBar, int nEndBar)
 Copy the gems of a range of bars of other gems.
void ApplyPatterns ()
 Copy the gems of each section's pattern into the section.
GemSlice GetBar (int nBar)
 Report the gems of a bar the song plays.
void Save (BinStream &stream)
 Write the gems.
void Load (BinStream &stream)
 Read the gems.

Detailed Description

The gems of a pitch track, addressed by the bars and ticks the song plays.

The RTTI includes the class name. The class is not polymorphic. The member names are inferred.

Constructor & Destructor Documentation

◆ PitchTrackPlayGems()

PitchTrackPlayGems::PitchTrackPlayGems ( PitchTrackGems * pGems,
PlayMap * pPlayMap,
SectionBoundaries * pSections,
SlotGrid * pPatterns,
int nNumBars,
int nTicksPerBar )

Construct a view of gems.

Parameters
pGemsThe gems.
pPlayMapThe map of the song positions.
pSectionsThe sections of the song.
pPatternsThe pattern each section repeats, or null.
nNumBarsThe length of the song in bars. It is unused.
nTicksPerBarThe song ticks in one bar.
Ghidra address:
NTSC-U/C: 0x0012c688
Ghidra address:
PAL: 0x0012de60

◆ ~PitchTrackPlayGems()

PitchTrackPlayGems::~PitchTrackPlayGems ( )

Release the view.

The body is empty.

Ghidra address:
NTSC-U/C: 0x0012c6a8
Ghidra address:
PAL: 0x0012de80

Member Function Documentation

◆ ToggleGem()

bool PitchTrackPlayGems::ToggleGem ( signed char nSlot,
int nTick,
signed char nOwner,
bool bRepeat )

Place or remove the gem at a tick, and on request at the same tick of every other bar of the section.

Parameters
nSlotThe gem button.
nTickThe tick the song plays at.
nOwnerThe player who edits the gem.
bRepeatWhether the edit repeats on every other bar of the section.
Returns
Whether a gem lies at the tick afterwards.
Ghidra address:
NTSC-U/C: 0x0012c6d0
Ghidra address:
PAL: 0x0012dea8

◆ GetOwner()

int PitchTrackPlayGems::GetOwner ( int nBar)

Report the owner of the section a bar lies in.

Parameters
nBarThe bar the song plays.
Returns
The player, or -1.
Ghidra address:
NTSC-U/C: 0x0012c830
Ghidra address:
PAL: 0x0012e008

◆ ClearBar()

void PitchTrackPlayGems::ClearBar ( int nBar,
bool bRepeat )

Remove every gem of a bar, and on request of every other bar of the section.

Parameters
nBarThe bar the song plays.
bRepeatWhether every other bar of the section is cleared.
Ghidra address:
NTSC-U/C: 0x0012c868
Ghidra address:
PAL: 0x0012e040

◆ ClearSection()

void PitchTrackPlayGems::ClearSection ( int nBar)

Remove every gem of the section a bar lies in.

Parameters
nBarThe bar the song plays.
Ghidra address:
NTSC-U/C: 0x0012c938
Ghidra address:
PAL: 0x0012e110

◆ CopyBars()

void PitchTrackPlayGems::CopyBars ( PitchTrackPlayGems * pSource,
int nStartBar,
int nEndBar )

Copy the gems of a range of bars of other gems.

Parameters
pSourceThe gems copied.
nStartBarThe first bar of the range.
nEndBarThe bar after the range.
Ghidra address:
NTSC-U/C: 0x0012c980
Ghidra address:
PAL: 0x0012e158

◆ ApplyPatterns()

void PitchTrackPlayGems::ApplyPatterns ( )

Copy the gems of each section's pattern into the section.

Ghidra address:
NTSC-U/C: 0x0012c9b0
Ghidra address:
PAL: 0x0012e188

◆ GetBar()

GemSlice PitchTrackPlayGems::GetBar ( int nBar)

Report the gems of a bar the song plays.

Parameters
nBarThe bar the song plays.
Returns
The gems, or a view of no gems inside a stretch of silence.
Ghidra address:
NTSC-U/C: 0x0012c9d0
Ghidra address:
PAL: 0x0012e1a8

◆ Save()

void PitchTrackPlayGems::Save ( BinStream & stream)

Write the gems.

Parameters
streamThe stream.
Ghidra address:
NTSC-U/C: 0x0012ca58
Ghidra address:
PAL: 0x0012e230

◆ Load()

void PitchTrackPlayGems::Load ( BinStream & stream)

Read the gems.

Parameters
streamThe stream.
Ghidra address:
NTSC-U/C: 0x0012ca78
Ghidra address:
PAL: 0x0012e250

The documentation for this class was generated from the following file: