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

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

#include <seekermsg.h>

Inheritance diagram for SeekerMsg:
Collaboration diagram for SeekerMsg:

Public Member Functions

 SeekerMsg ()
 Construct a message with the player unset and the position at kTickInfinity.
 SeekerMsg (Player *pPlayer)
 Report that a player's seeker is off.
 SeekerMsg (Player *pPlayer, int nFirstBar, int nBarCount, int nTrack, int nEnabled, Sch::Tick when)
 Report a player's seeker over a range of bars on a track.
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 the player's colour name and then either (off) or the bar range, the track, and the bar of the position 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

Player * mPlayer = nullptr
int mFirstBar
int mBarCount
int mTrack
int mEnabled

Detailed Description

Event the game passes between a MsgSource and a MsgSink.

Its RTTI descriptor is at 0x008ef800. It has Message as its one base. The object is 0x1c bytes and its vtable is at 0x00812cd8. 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(), and PrintExtra() labels most of it. It writes the colour name of the player at +0x04, then either (off) when the word at +0x14 is zero, or a range of bars from +0x08 spanning +0x0c bars, the track at +0x10, and the bar of the position at +0x18. New() sets the player to null and the position to kTickInfinity.

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

Constructor & Destructor Documentation

◆ SeekerMsg() [1/3]

SeekerMsg::SeekerMsg ( )
inline

Construct a message with the player unset and the position at kTickInfinity.

Inline. New() expands it. A declaration is required because the class declares further constructors.

◆ SeekerMsg() [2/3]

SeekerMsg::SeekerMsg ( Player * pPlayer)
inlineexplicit

Report that a player's seeker is off.

Inline, with no address of its own. Catcher::PostSeekerMsg() at 0x001ad4e0 expands it on its stack, storing the player, a clear mEnabled, and kTickInfinity. The bar range and the track are left unset.

Parameters
pPlayerThe player whose seeker is off.

◆ SeekerMsg() [3/3]

SeekerMsg::SeekerMsg ( Player * pPlayer,
int nFirstBar,
int nBarCount,
int nTrack,
int nEnabled,
Sch::Tick when )
inline

Report a player's seeker over a range of bars on a track.

Inline, with no address of its own. Catcher::PostSeekerRangeMsg() at 0x001ad560 expands it on its stack with an mEnabled of 1 and a position of Sch::Tick(0).

Parameters
pPlayerThe player the seeker belongs to.
nFirstBarThe first bar of the range.
nBarCountThe number of bars in the range.
nTrackThe track.
nEnabledNon-zero for a seeker that is on.
whenThe position of the seeker.

Member Function Documentation

◆ New()

Message * SeekerMsg::New ( )
static

Produce a default-constructed message on the heap.

The translation unit at 0x003d9818 registers this factory.

Returns
The message.
Ghidra address:
NTSC-U/C: 0x003d6f10
Ghidra address:
PAL: 0x0040ee00

◆ Clone()

virtual Message * SeekerMsg::Clone ( )
virtual

Produce a heap copy of this message.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x003dcce0
Ghidra address:
PAL: 0x00415118

Implements Message.

◆ Type()

virtual int SeekerMsg::Type ( )
virtual

Report this message's registered identity.

Returns
g_nSeekerMsgType.
Ghidra address:
NTSC-U/C: 0x003dcd50
Ghidra address:
PAL: 0x00415188

Implements Message.

◆ GetName()

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

Report this message's class name.

Returns
The literal SeekerMsg.
Ghidra address:
NTSC-U/C: 0x003dcd60
Ghidra address:
PAL: 0x00415198

Implements Message.

◆ PrintExtra()

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

Write the player's colour name and then either (off) or the bar range, the track, and the bar of the position to a diagnostic stream.

The bar of the position is its tick divided by 1920, so an unset position prints the bar of kTickInfinity.

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

Reimplemented from Message.

Member Data Documentation

◆ mPlayer

Player* SeekerMsg::mPlayer = nullptr

The player the seeker belongs to. +0x04

◆ mFirstBar

int SeekerMsg::mFirstBar

The first bar, labelled bars[. +0x08

◆ mBarCount

int SeekerMsg::mBarCount

The number of bars in the range. +0x0c

◆ mTrack

int SeekerMsg::mTrack

The track, labelled tr#. +0x10

◆ mEnabled

int SeekerMsg::mEnabled

Zero for a seeker that is off. +0x14


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