resonance 1.0.1
Loading...
Searching...
No Matches
AutoRiffer Class Reference

Producer of the automatic riff a guitar track plays when it is not being played. More...

#include <autoriffer.h>

Inheritance diagram for AutoRiffer:
Collaboration diagram for AutoRiffer:

Public Member Functions

 AutoRiffer (Sch::TickClock *pClock, Quantizer *pQuantizer, const TrackData *pTrackData)
virtual ~AutoRiffer ()
virtual void DispatchPriv (Message *pMsg)
 Act on a message.
void OnCommand (int nTick)
 Repeat the current riff at a song position, or release the buttons.
void AddSink (MsgSink *pSink)
 Add a sink to mSource.
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the tagged heap under the tag "MsgSink".
void operator delete (void *pBlock)
 Release a sink to the tagged heap.
virtual ~MsgSink ()
virtual void Dispatch (Message *pMsg)
 Accept a message.

Public Attributes

MuseSynth * mSynth
 Synthesiser AxingSTG installs while it wires the stage up.
MsgSource mSource
 Sinks the riffer publishes to.
AxePhraseMaker * mPhraseMaker
 Phrase maker AxingSTG installs.

Detailed Description

Producer of the automatic riff a guitar track plays when it is not being played.

Its RTTI descriptor is at 0x008eef38. It derives from MsgSink at offset 0. The base vptr lands at +0x00, and this class's members start at +0x04. Its table is at 0x007dd488 with four entries. The object is 0x4c bytes, measured by AxingSTG's tagged allocation.

Slot 0 of the table at 0x007dd488 addresses the accessor at 0x0019a490. The accessor guards on the descriptor at 0x008eef38, and the descriptor settles the class name.

The source at +0x30 is a data member rather than a base. The constructor constructs it at that offset, and every caller calls MsgSource::AddSink() on it directly rather than through a vptr.

DispatchPriv() dispatches five identities. A PitchRiffMsg goes to OnPitchRiff(), an EraseMsg to OnErase(), a StopRiffMsg to OnStopRiff(), and a GameOverMsg to StopRiff() at position 0. A TrackSelectMsg runs the inline copy of OnTrackSelect().

The file-local command class Cmd, in the anonymous namespace of GsAutoRiffer.cpp, runs OnCommand() at the position PlayRiff() schedules.

Constructor & Destructor Documentation

◆ AutoRiffer()

AutoRiffer::AutoRiffer ( Sch::TickClock * pClock,
Quantizer * pQuantizer,
const TrackData * pTrackData )
Parameters
pClockThe clock the riffer schedules against.
pQuantizerThe quantiser for the track.
pTrackDataThe track description.
Ghidra address:
NTSC-U/C: 0x00199040
Ghidra address:
PAL: 0x0019eda8

◆ ~AutoRiffer()

virtual AutoRiffer::~AutoRiffer ( )
virtual
Ghidra address:
NTSC-U/C: 0x0019a3d0
Ghidra address:
PAL: 0x001a0138

Member Function Documentation

◆ DispatchPriv()

virtual void AutoRiffer::DispatchPriv ( Message * pMsg)
virtual

Act on a message.

Parameters
pMsgThe message.
Ghidra address:
NTSC-U/C: 0x00199910
Ghidra address:
PAL: 0x0019f678

Implements MsgSink.

◆ OnCommand()

void AutoRiffer::OnCommand ( int nTick)

Repeat the current riff at a song position, or release the buttons.

The file-local Cmd runs it. When AxePhraseMaker::IsBarPlayable() reports 1 for the bar of the position, it plays the current riff again through PlayRiff(). Otherwise it sends an AxeButtonMsg for mPlayer that releases every button.

Parameters
nTickThe song position the command was scheduled for.
Ghidra address:
NTSC-U/C: 0x00199688
Ghidra address:
PAL: 0x0019f3f0

◆ AddSink()

void AutoRiffer::AddSink ( MsgSink * pSink)

Add a sink to mSource.

The image has no caller. AxingSTG calls MsgSource::AddSink() on mSource directly.

Parameters
pSinkThe sink.
Ghidra address:
NTSC-U/C: 0x0019a508
Ghidra address:
PAL: 0x001a0270

Member Data Documentation

◆ mSynth

MuseSynth* AutoRiffer::mSynth

Synthesiser AxingSTG installs while it wires the stage up.

The constructor clears this member and the one below, and AxingSTG::ConnectInputs() writes both from outside the class. Those outside writes record them public. A friend declaration on AxingSTG fits the image equally well.

+0x2c

◆ mSource

MsgSource AutoRiffer::mSource

Sinks the riffer publishes to.

+0x30

◆ mPhraseMaker

AxePhraseMaker* AutoRiffer::mPhraseMaker

Phrase maker AxingSTG installs.

+0x44


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