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

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

#include <sectioncapturedmsg.h>

Inheritance diagram for SectionCapturedMsg:
Collaboration diagram for SectionCapturedMsg:

Public Member Functions

 SectionCapturedMsg ()
 Construct a message with the payload unset.
 SectionCapturedMsg (int nFirstBar, int nEndBar, int nTrack, Player *pPlayer, int nAutoCatch)
 Report a captured section.
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, 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 mEndBar
int mTrack
Player * mPlayer
int mAutoCatch

Detailed Description

Event the game passes between a MsgSource and a MsgSink.

Its RTTI descriptor is at 0x008efcf0. It has Message as its one base. The object is 0x18 bytes and its vtable is at 0x008126a8. 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 a bar range at +0x04 and +0x08 and the track at +0x0c, and it writes the colour name of the player at +0x10. The word at +0x14 is not printed. The last four members are public because AppTunnel's section handler at 0x00448530 reads them directly with no accessor in the image. It scales mEndBar by the 1920 ticks of a bar.

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

Constructor & Destructor Documentation

◆ SectionCapturedMsg() [1/2]

SectionCapturedMsg::SectionCapturedMsg ( )
inline

Construct a message with the payload unset.

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

◆ SectionCapturedMsg() [2/2]

SectionCapturedMsg::SectionCapturedMsg ( int nFirstBar,
int nEndBar,
int nTrack,
Player * pPlayer,
int nAutoCatch )
inline

Report a captured section.

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

Parameters
nFirstBarThe first bar of the section.
nEndBarThe end of the section.
nTrackThe track.
pPlayerThe capturing player.
nAutoCatchNon-zero when the section was caught automatically.

Member Function Documentation

◆ New()

Message * SectionCapturedMsg::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: 0x003d7408
Ghidra address:
PAL: 0x0040f308

◆ Clone()

virtual Message * SectionCapturedMsg::Clone ( )
virtual

Produce a heap copy of this message.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x003dee18
Ghidra address:
PAL: 0x00417270

Implements Message.

◆ Type()

virtual int SectionCapturedMsg::Type ( )
virtual

Report this message's registered identity.

Returns
g_nSectionCapturedMsgType.
Ghidra address:
NTSC-U/C: 0x003dee80
Ghidra address:
PAL: 0x004172d8

Implements Message.

◆ GetName()

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

Report this message's class name.

Returns
The literal SectionCapturedMsg.
Ghidra address:
NTSC-U/C: 0x003dee90
Ghidra address:
PAL: 0x004172e8

Implements Message.

◆ PrintExtra()

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

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

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

Reimplemented from Message.

Member Data Documentation

◆ mEndBar

int SectionCapturedMsg::mEndBar

The end of the bar range. +0x08

◆ mTrack

int SectionCapturedMsg::mTrack

The track. +0x0c

◆ mPlayer

Player* SectionCapturedMsg::mPlayer

The capturing player. +0x10

◆ mAutoCatch

int SectionCapturedMsg::mAutoCatch

Non-zero for an automatic catch. AppTunnel reduces it to 0 or 1. +0x14


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