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

Event the game passes between a MsgSource and a MsgSink. More...

#include <phrasecapturedmsg.h>

Inheritance diagram for PhraseCapturedMsg:
Collaboration diagram for PhraseCapturedMsg:

Public Member Functions

 PhraseCapturedMsg ()
 Construct a message with the payload unset.
 PhraseCapturedMsg (int nFirstBar, int nEndBar, int nRunFirstBar, int nRunEndBar, int nTrack, Player *pPlayer, int nScore, int nJuice, int bExtendsStreak)
 Report a captured phrase.
virtual Message * Clone ()
 Produce a heap copy of this message.
virtual int Type ()
 Report this message's registered identity.
virtual const char * GetName () const
 Report this message's class name.
virtual void PrintExtra (std::ostream &stream) const
 Write b , the bar range joined by --, tr# , the track, score , the score, juice , the juice, a space, and the player's colour name to a diagnostic stream.
Public Member Functions inherited from Message
void * operator new (size_t nSize)
 Allocate a message from the tagged heap under the tag MSG.
void operator delete (void *pBlock)
 Release a message to the tagged heap under the tag MSG.
virtual ~Message ()
 Vtable slot 1.
virtual void saveGuts (OBStream &stream) const
 Write this message's payload to an output stream.
virtual void restoreGuts (IBStream &stream)
 Read this message's payload from an input stream.
std::ostream & Print (std::ostream &stream) const
 Write this message to a diagnostic stream as {GetName() PrintExtra()}.

Static Public Member Functions

static Message * New ()
 Produce a default-constructed message on the heap.
Static Public Member Functions inherited from Message
static Message * NewMessage (int nType)
 Produce a message of the identified class through the factory list.

Public Attributes

int mFirstBar
 The first bar of the captured phrase, which PrintExtra() writes ahead of --.
int mRunFirstBar
int mRunEndBar
int mTrack
Player * mPlayer
int mScore
int mJuice
 The juice the capture earned, a value SingleCatcher reads from its TrackData.
int mExtendsStreak
 Non-zero when the capture extends the player's streak of consecutive captures.

Detailed Description

Event the game passes between a MsgSource and a MsgSink.

Its RTTI descriptor is at 0x008ef830. It has Message as its one base. The object is 0x28 bytes and its vtable is at 0x008126f0. The members below are the whole of the class. No other routine in the image refers to this type by anything but its vtable.

The payload layout comes from the run of field copies in Clone(). PrintExtra() labels five of the nine words: a bar range at +0x04 and +0x08, the track at +0x14, the score at +0x1c, and the juice at +0x20, and it writes the colour name of the player at +0x18. The words at +0x0c, +0x10, and +0x24 are not printed.

mTrack, mPlayer, and mScore are public because Overlay::OnPhraseCaptured() at 0x0042b068 reads them directly with no accessor in the image. It passes mTrack to script template 1005, compares mPlayer with HudTrack::mPlayer, and hands a non-zero mScore to the track display.

The destructor at 0x003deaf0 is compiler-generated and has no declaration here.

Constructor & Destructor Documentation

◆ PhraseCapturedMsg() [1/2]

PhraseCapturedMsg::PhraseCapturedMsg ( )
inline

Construct a message with the payload unset.

Inline. New() expands it. A declaration is required because the class declares a second constructor.

◆ PhraseCapturedMsg() [2/2]

PhraseCapturedMsg::PhraseCapturedMsg ( int nFirstBar,
int nEndBar,
int nRunFirstBar,
int nRunEndBar,
int nTrack,
Player * pPlayer,
int nScore,
int nJuice,
int bExtendsStreak )
inline

Report a captured phrase.

Inline, with no address of its own. SingleCatcher::CapturePhrase() expands it on its stack at 0x001ad750. The nine arguments are the nine members in declaration order.

Parameters
nFirstBarThe first bar of the phrase.
nEndBarThe end of the phrase.
nRunFirstBarThe first bar of the caught run.
nRunEndBarOne past the last bar of the run.
nTrackThe track.
pPlayerThe capturing player.
nScoreThe score the capture earned.
nJuiceThe value SingleCatcher reads from its TrackData.
bExtendsStreakNon-zero when the capture extends the streak.

Member Function Documentation

◆ New()

Message * PhraseCapturedMsg::New ( )
static

Produce a default-constructed message on the heap.

The translation unit at 0x003d9818 registers this factory. The payload is left unset.

Returns
The message.
Ghidra address:
NTSC-U/C: 0x003d73d0
Ghidra address:
PAL: 0x0040f2d0

◆ Clone()

virtual Message * PhraseCapturedMsg::Clone ( )
virtual

Produce a heap copy of this message.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x003debe0
Ghidra address:
PAL: 0x00417038

Implements Message.

◆ Type()

virtual int PhraseCapturedMsg::Type ( )
virtual

Report this message's registered identity.

Returns
g_nPhraseCapturedMsgType.
Ghidra address:
NTSC-U/C: 0x003dec68
Ghidra address:
PAL: 0x004170c0

Implements Message.

◆ GetName()

virtual const char * PhraseCapturedMsg::GetName ( ) const
virtual

Report this message's class name.

Returns
The literal PhraseCapturedMsg.
Ghidra address:
NTSC-U/C: 0x003dec78
Ghidra address:
PAL: 0x004170d0

Implements Message.

◆ PrintExtra()

virtual void PhraseCapturedMsg::PrintExtra ( std::ostream & stream) const
virtual

Write b , the bar range joined by --, tr# , the track, score , the score, juice , the juice, a space, and the player's colour name to a diagnostic stream.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x003d8448
Ghidra address:
PAL: 0x00410800

Reimplemented from Message.

Member Data Documentation

◆ mFirstBar

int PhraseCapturedMsg::mFirstBar

The first bar of the captured phrase, which PrintExtra() writes ahead of --.

+0x04

Public because Gamer's DispatchPriv() at 0x00112a80 reads it directly with no accessor in the image.

◆ mRunFirstBar

int PhraseCapturedMsg::mRunFirstBar

The first bar of the caught run. +0x0c

◆ mRunEndBar

int PhraseCapturedMsg::mRunEndBar

One past the last bar of the run. +0x10

◆ mTrack

int PhraseCapturedMsg::mTrack

The track the phrase lies on. +0x14

◆ mPlayer

Player* PhraseCapturedMsg::mPlayer

The capturing player. +0x18

◆ mScore

int PhraseCapturedMsg::mScore

The score the capture earned. +0x1c

◆ mJuice

int PhraseCapturedMsg::mJuice

The juice the capture earned, a value SingleCatcher reads from its TrackData.

Public because Player::OnMsg() reads it directly at 0x001331ec, and the image has no accessor. +0x20

◆ mExtendsStreak

int PhraseCapturedMsg::mExtendsStreak

Non-zero when the capture extends the player's streak of consecutive captures.

The inverse of SingleCatcher::CapturePhrase()'s automatic-catch argument. Public because LocalPlayer::DispatchPriv() reads it directly at 0x0011ee9c and lengthens the streak only when it is set, and the image has no accessor. +0x24


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