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

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

#include <beginphrasecatchmsg.h>

Inheritance diagram for BeginPhraseCatchMsg:
Collaboration diagram for BeginPhraseCatchMsg:

Public Member Functions

 BeginPhraseCatchMsg ()
 Construct a message with the payload unset.
 BeginPhraseCatchMsg (Player *pPlayer, int nPoints, int nMultiplier)
 Report the start of a phrase catch.
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.
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 PrintExtra (std::ostream &stream) const
 Write this message's payload to a stream.
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
int mPoints
int mMultiplier

Detailed Description

Event the game passes between a MsgSource and a MsgSink.

Its RTTI descriptor is at 0x008f09b0. It has Message as its one base. The object is 0x10 bytes. New(), Clone(), and every stack build install the vtable at 0x007ddb08. An identical table at 0x007e0a70 has no reference in the image. The allocation in New() and the allocation in Clone() report the same size.

The destructor at 0x0019d738 is compiler-generated and has no declaration here. The routines at 0x001b0f40, 0x001d1b78, and 0x003de7a8 are further emissions of Clone() in other translation units, each allocating 0x10 bytes under the MSG tag and installing the same table.

The payload layout comes from the run of field copies in Clone(). Every member is public because Overlay::OnBeginPhraseCatch() at 0x004201c0 reads it directly with no accessor in the image. It compares mPlayer with HudTrack::mPlayer, formats a non-zero mPoints with d, and formats mMultiplier with xd.

Constructor & Destructor Documentation

◆ BeginPhraseCatchMsg() [1/2]

BeginPhraseCatchMsg::BeginPhraseCatchMsg ( )
inline

Construct a message with the payload unset.

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

◆ BeginPhraseCatchMsg() [2/2]

BeginPhraseCatchMsg::BeginPhraseCatchMsg ( Player * pPlayer,
int nPoints,
int nMultiplier )
inline

Report the start of a phrase catch.

Inline, with no address of its own. Catcher::CatchGem() at 0x001ac1c0 and the Scratcher member at 0x001d0530 expand it on their stacks. The three arguments are the three members in declaration order.

Parameters
pPlayerThe player starting the phrase.
nPointsThe points the phrase is worth.
nMultiplierThe multiplier the phrase is caught under.

Member Function Documentation

◆ New()

Message * BeginPhraseCatchMsg::New ( )
static

Produce a default-constructed message on the heap.

The translation unit at 0x003d9818 registers this factory against identity 320.

Returns
The message.
Ghidra address:
NTSC-U/C: 0x003d7328
Ghidra address:
PAL: 0x0040f228

◆ Clone()

virtual Message * BeginPhraseCatchMsg::Clone ( )
virtual

Produce a heap copy of this message.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x0019d7e8
Ghidra address:
PAL: 0x001a3550

Implements Message.

◆ Type()

virtual int BeginPhraseCatchMsg::Type ( )
virtual

Report this message's registered identity.

Returns
g_nBeginPhraseCatchMsgType.
Ghidra address:
NTSC-U/C: 0x0019d840
Ghidra address:
PAL: 0x001a35a8

Implements Message.

◆ GetName()

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

Report this message's class name.

Returns
The literal BeginPhraseCatchMsg.
Ghidra address:
NTSC-U/C: 0x0019d850
Ghidra address:
PAL: 0x001a35b8

Implements Message.

Member Data Documentation

◆ mPlayer

Player* BeginPhraseCatchMsg::mPlayer

The player starting the phrase. +0x04

◆ mPoints

int BeginPhraseCatchMsg::mPoints

The points the phrase is worth. +0x08

◆ mMultiplier

int BeginPhraseCatchMsg::mMultiplier

The multiplier the phrase is caught under. +0x0c


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