wavelength 1.0.0
Loading...
Searching...
No Matches
GameEndedMsg Class Reference

Message that reports the end of an online session, with the final scores. More...

#include <gameendedmsg.h>

Inheritance diagram for GameEndedMsg:
Collaboration diagram for GameEndedMsg:

Public Types

enum  Result { kResultFinished = 1 , kResultHostAborted = 2 , kResultConnectionLost = 3 , kResultBooted = 4 }
 Values of mResult. More...

Public Member Functions

 ~GameEndedMsg () override=default
 Destroy the object.
 GameEndedMsg (int nResult)
 Construct a message with no scores.
 GameEndedMsg (int nResult, const std::vector< NetGameScore > &scores)
 Construct a message with the final scores.
void * operator new (size_t nSize)
 Allocate a message, billed to the class name.
void operator delete (void *pBlock)
 Release a message.
Message * Clone () override
 Produce a heap copy of this message.
int Type () override
 Report this message's registered identity.
const char * GetName () const override
 Report this message's class name.
void PrintExtra (PrnStream &stream) const override
 Write the result, and the scores when there are any.
 GameEndedMsg (const GameEndedMsg &other)=default
 Copy another message.
int GetResult () const
const std::vector< NetGameScore > & GetScores () const
Public Member Functions inherited from Message
virtual ~Message ()
 Vtable slot 1.
virtual void saveGuts (BinStream &stream) const
 Write this message's payload to a stream.
virtual void restoreGuts (BinStream &stream)
 Read this message's payload from a stream.
virtual ~Message ()
virtual void Unused1 ()
 Not called by the control.

Additional Inherited Members

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

Detailed Description

Message that reports the end of an online session, with the final scores.

The RTTI records the class as deriving from Message. The vtable is at 0x003d5e08. The members Clone(), Type(), and GetName() are inline.

Member Enumeration Documentation

◆ Result

Values of mResult.

Enumerator
kResultFinished 

The song ended normally.

kResultHostAborted 

The host left the session.

kResultConnectionLost 

The connection to the session was lost.

kResultBooted 

The host removed this console from the session.

Constructor & Destructor Documentation

◆ ~GameEndedMsg()

GameEndedMsg::~GameEndedMsg ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x0039ff40
Ghidra address:
PAL: 0x0040ec20

◆ GameEndedMsg() [1/3]

GameEndedMsg::GameEndedMsg ( int nResult)
inlineexplicit

Construct a message with no scores.

Inline.

Parameters
nResultOne of Result.

◆ GameEndedMsg() [2/3]

GameEndedMsg::GameEndedMsg ( int nResult,
const std::vector< NetGameScore > & scores )
inline

Construct a message with the final scores.

Inline.

Parameters
nResultOne of Result.
scoresThe final score of each player.

◆ GameEndedMsg() [3/3]

GameEndedMsg::GameEndedMsg ( const GameEndedMsg & other)
default

Copy another message.

Parameters
otherThe message.
Ghidra address:
NTSC-U/C: 0x003455e0
Ghidra address:
PAL: 0x003b2b18

Member Function Documentation

◆ operator new()

void * GameEndedMsg::operator new ( size_t nSize)
inline

Allocate a message, billed to the class name.

Parameters
nSizeThe object size the compiler supplies.
Returns
The block.

◆ operator delete()

void GameEndedMsg::operator delete ( void * pBlock)
inline

Release a message.

Parameters
pBlockThe block.

◆ Clone()

Message * GameEndedMsg::Clone ( )
inlineoverridevirtual

Produce a heap copy of this message.

Returns
The copy.

Implements Message.

◆ Type()

int GameEndedMsg::Type ( )
inlineoverridevirtual

Report this message's registered identity.

Returns
g_nGameEndedMsgType.

Implements Message.

◆ GetName()

const char * GameEndedMsg::GetName ( ) const
inlineoverridevirtual

Report this message's class name.

Returns
The literal GameEndedMsg.

Implements Message.

◆ PrintExtra()

void GameEndedMsg::PrintExtra ( PrnStream & stream) const
overridevirtual

Write the result, and the scores when there are any.

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

Reimplemented from Message.

◆ GetResult()

int GameEndedMsg::GetResult ( ) const
inline
Returns
One of Result.

◆ GetScores()

const std::vector< NetGameScore > & GameEndedMsg::GetScores ( ) const
inline
Returns
The final score of each player.

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