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

The scratchers of a scratch track, one set of three for each span of the song. More...

#include <scratchtrackdata.h>

Classes

struct  ScratcherSet
 The scratchers that play from one tick on, deleted with the data. More...

Public Member Functions

 ScratchTrackData (int nEndTick)
 Construct empty data.
 ~ScratchTrackData ()
 Release every scratcher.
void SetScratcher (int nTick, int nIndex, Scratcher *pScratcher)
 Place a scratcher in the set that starts at a tick, creating the set when none starts there.
int GetScratchers (int nTick, Scratcher **ppFirst, Scratcher **ppSecond, Scratcher **ppThird) const
 Report the scratchers of the set that plays at a tick.
int GetEndTick () const

Static Public Attributes

static constexpr int kSetSize = 3
 The number of scratchers in a set.

Detailed Description

The scratchers of a scratch track, one set of three for each span of the song.

The class is not polymorphic. The RTTI of the nested ScratcherSet records the name. A set starts at its tick and lasts until the tick of the next set.

Constructor & Destructor Documentation

◆ ScratchTrackData()

ScratchTrackData::ScratchTrackData ( int nEndTick)
explicit

Construct empty data.

Parameters
nEndTickThe tick at and after which SetScratcher() discards a scratcher.
Ghidra address:
NTSC-U/C: 0x00138880
Ghidra address:
PAL: 0x0013a0e0

◆ ~ScratchTrackData()

ScratchTrackData::~ScratchTrackData ( )

Release every scratcher.

Ghidra address:
NTSC-U/C: 0x001388a0
Ghidra address:
PAL: 0x0013a100

Member Function Documentation

◆ SetScratcher()

void ScratchTrackData::SetScratcher ( int nTick,
int nIndex,
Scratcher * pScratcher )

Place a scratcher in the set that starts at a tick, creating the set when none starts there.

The data then manages the scratcher. A scratcher at or after the end tick is deleted.

Parameters
nTickThe tick.
nIndexThe position of the scratcher in the set.
pScratcherThe scratcher.
Ghidra address:
NTSC-U/C: 0x001389d0
Ghidra address:
PAL: 0x0013a230

◆ GetScratchers()

int ScratchTrackData::GetScratchers ( int nTick,
Scratcher ** ppFirst,
Scratcher ** ppSecond,
Scratcher ** ppThird ) const

Report the scratchers of the set that plays at a tick.

The set is the last that starts at or before the tick. The data must have one.

Parameters
nTickThe tick.
ppFirstReceives the first scratcher of the set.
ppSecondReceives the second scratcher of the set.
ppThirdReceives the third scratcher of the set.
Returns
The tick of the next set, or -1 when the set is the last.
Ghidra address:
NTSC-U/C: 0x00138ac8
Ghidra address:
PAL: 0x0013a328

◆ GetEndTick()

int ScratchTrackData::GetEndTick ( ) const
inline
Returns
The end tick SetScratcher() tests.

Member Data Documentation

◆ kSetSize

int ScratchTrackData::kSetSize = 3
staticconstexpr

The number of scratchers in a set.


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