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

Gameplay stage for a track whose gems are caught rather than played. More...

#include <catchingstg.h>

Inheritance diagram for CatchingSTG:
Collaboration diagram for CatchingSTG:

Public Member Functions

 CatchingSTG (TrackData *pTrackData)
 Build the neutraliser and the catcher, and set the phrase manager's export lead.
virtual ~CatchingSTG ()
 Stop the stage and release the catcher and the neutraliser.
virtual void Start ()
 Start the stage.
virtual void Stop ()
 Stop the stage.
virtual void ConnectInputs (MsgSource *pPrimary, MsgSource *pOptional, MsgSource *pSecondary)
 Wire the stage's objects to the sources that drive it.
virtual void ConnectGamer (MsgSource *pSource)
 Register the mixer with one source.
virtual void SetMixerOutput (MsgSink *pOutput)
 Attach the mixer to the synthesiser and give it its output sink.
virtual void ConnectToTunnel (MsgSink *pSink)
 Register one sink with every source the stage provides.
virtual void SetNetSink (MsgSink *pSink)
 Install the sink the phrase manager reports phrase changes to.
virtual int HasNothingPending ()
 Report whether the stage has nothing outstanding.
virtual void GivePhrases (int nTick, Player *pPlayer)
 Give every phrase of the track to one player.
virtual int CanGivePhrases ()
 Report that GivePhrases() acts on this stage.
virtual void CreatePowerbarMgr ()
 Rebuild the phrase manager's powerbar source.
Public Member Functions inherited from ScoreTrackGraph
 ScoreTrackGraph (TrackData *pTrackData)
 Build the stage's quantiser, phrase manager, phrase player, mixer, and synthesiser.
virtual ~ScoreTrackGraph ()
PhraseDatabase * GetPhraseDatabase ()
 Report the phrase database of this stage's phrase manager.
int StartMF ()
 Run Start() and report zero.
int StopMF ()
 Run Stop() and report zero.

Additional Inherited Members

Static Public Member Functions inherited from ScoreTrackGraph
static void Delete (ScoreTrackGraph *pGraph)
 Delete a stage, which may be null.
Public Attributes inherited from ScoreTrackGraph
TrackData * mTrackData
 The track description, the constructor's argument.
Protected Attributes inherited from ScoreTrackGraph
int mTrack
PhraseMgr * mPhraseMgr
PhrasePlayer * mPhrasePlayer
Quantizer * mQuantizer
MuseSynth * mMuseSynth
int mUnused
Mixer * mMixer
Application * mApplication
BarSequencer * mSequencer

Detailed Description

Gameplay stage for a track whose gems are caught rather than played.

Its RTTI descriptor is at 0x00902230. It has ScoreTrackGraph as its only base at offset 0. Its table is at 0x007de4a0 and runs thirteen entries, the same as the base's. The class introduces no virtual. It is the one stage that overrides every slot, and the five defaults the other three inherit are all replaced here. The object is 0x34 bytes.

The constructor builds a PhraseNeutralizer and then one catcher, a SingleCatcher in game mode 1 and a MultiCatcher in every other mode. The catch window it hands the catcher is configuration code 0x39c, in milliseconds, converted to MIDI ticks through the song clock's tempo map.

Constructor & Destructor Documentation

◆ CatchingSTG()

CatchingSTG::CatchingSTG ( TrackData * pTrackData)

Build the neutraliser and the catcher, and set the phrase manager's export lead.

The export lead is 120 ticks for each track index plus 120.

Parameters
pTrackDataThe track description the base retains.
Ghidra address:
NTSC-U/C: 0x0019fb80
Ghidra address:
PAL: 0x001a58e8

◆ ~CatchingSTG()

virtual CatchingSTG::~CatchingSTG ( )
virtual

Stop the stage and release the catcher and the neutraliser.

Slot 1.

Ghidra address:
NTSC-U/C: 0x001a0450
Ghidra address:
PAL: 0x001a61b8

Member Function Documentation

◆ Start()

virtual void CatchingSTG::Start ( )
virtual

Start the stage.

Slot 2. The routine starts the base and then schedules the catcher's commands through Catcher::Start().

Ghidra address:
NTSC-U/C: 0x001a04d8
Ghidra address:
PAL: 0x001a6240

Reimplemented from ScoreTrackGraph.

◆ Stop()

virtual void CatchingSTG::Stop ( )
virtual

Stop the stage.

Slot 3. The routine withdraws the catcher's commands through Catcher::Stop() and then stops the base.

Ghidra address:
NTSC-U/C: 0x001a0518
Ghidra address:
PAL: 0x001a6280

Reimplemented from ScoreTrackGraph.

◆ ConnectInputs()

virtual void CatchingSTG::ConnectInputs ( MsgSource * pPrimary,
MsgSource * pOptional,
MsgSource * pSecondary )
virtual

Wire the stage's objects to the sources that drive it.

Slot 4.

Parameters
pPrimaryThe source the stage registers five of its objects with.
pOptionalA further source, which receives the phrase manager and the catcher when it is supplied.
pSecondaryThe source that receives the phrase manager and the catcher.
Ghidra address:
NTSC-U/C: 0x0019fd88
Ghidra address:
PAL: 0x001a5af0

Implements ScoreTrackGraph.

◆ ConnectGamer()

virtual void CatchingSTG::ConnectGamer ( MsgSource * pSource)
virtual

Register the mixer with one source.

Slot 5. This class is the only one of the four that overrides the base's empty default.

Parameters
pSourceThe source to register with.
Ghidra address:
NTSC-U/C: 0x001a0558
Ghidra address:
PAL: 0x001a62c0

Reimplemented from ScoreTrackGraph.

◆ SetMixerOutput()

virtual void CatchingSTG::SetMixerOutput ( MsgSink * pOutput)
virtual

Attach the mixer to the synthesiser and give it its output sink.

Slot 6.

Parameters
pOutputThe sink the mixer sends to, stored in Mixer::mOutput.
Ghidra address:
NTSC-U/C: 0x001a0588
Ghidra address:
PAL: 0x001a62f0

Implements ScoreTrackGraph.

◆ ConnectToTunnel()

virtual void CatchingSTG::ConnectToTunnel ( MsgSink * pSink)
virtual

Register one sink with every source the stage provides.

Slot 7.

Parameters
pSinkThe sink to register.
Ghidra address:
NTSC-U/C: 0x001a05c8
Ghidra address:
PAL: 0x001a6330

Implements ScoreTrackGraph.

◆ SetNetSink()

virtual void CatchingSTG::SetNetSink ( MsgSink * pSink)
virtual

Install the sink the phrase manager reports phrase changes to.

Slot 8.

Parameters
pSinkThe sink to install, ignored when null.
Ghidra address:
NTSC-U/C: 0x001a0650
Ghidra address:
PAL: 0x001a63b8

Implements ScoreTrackGraph.

◆ HasNothingPending()

virtual int CatchingSTG::HasNothingPending ( )
virtual

Report whether the stage has nothing outstanding.

Slot 9. The routine forwards to Catcher::IsPhraseRunEmpty().

Returns
Non-zero when the catcher has nothing outstanding.
Ghidra address:
NTSC-U/C: 0x001a06f0
Ghidra address:
PAL: 0x001a6458

Reimplemented from ScoreTrackGraph.

◆ GivePhrases()

virtual void CatchingSTG::GivePhrases ( int nTick,
Player * pPlayer )
virtual

Give every phrase of the track to one player.

Slot 10. The routine casts the catcher to SingleCatcher with dynamic_cast and forwards both arguments to SingleCatcher::ResetOwners(). The cast is unguarded, so a MultiCatcher yields a null receiver and the forwarded call dereferences it.

The routine also calls the game-mode accessor on mApplication and discards the answer, which is what remains of an assertion the release build compiled away.

Parameters
nTickThe song position, forwarded unchanged.
pPlayerThe player the phrases go to.
Ghidra address:
NTSC-U/C: 0x001a0668
Ghidra address:
PAL: 0x001a63d0

Reimplemented from ScoreTrackGraph.

◆ CanGivePhrases()

virtual int CatchingSTG::CanGivePhrases ( )
virtual

Report that GivePhrases() acts on this stage.

Slot 11. Returns 1 where the base returns zero.

Returns
Always 1.
Ghidra address:
NTSC-U/C: 0x001a0428
Ghidra address:
PAL: 0x001a6190

Reimplemented from ScoreTrackGraph.

◆ CreatePowerbarMgr()

virtual void CatchingSTG::CreatePowerbarMgr ( )
virtual

Rebuild the phrase manager's powerbar source.

Slot 12. The whole body is PhraseMgr::CreatePowerbarMgr().

Ghidra address:
NTSC-U/C: 0x001a0720
Ghidra address:
PAL: 0x001a6488

Reimplemented from ScoreTrackGraph.


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