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

Network packet the game sends between game systems. More...

#include <spjoinacceptpacket.h>

Inheritance diagram for SPJoinAcceptPacket:
Collaboration diagram for SPJoinAcceptPacket:

Public Member Functions

 SPJoinAcceptPacket ()
 Construct a packet with default settings, an empty colour, a fresh appearance, and no players.
virtual Message * Clone ()
 Produce a heap copy of this packet.
virtual int Type ()
 Report this packet's registered identity.
virtual const char * GetName () const
 Report this packet's class name.
virtual void PrintExtra (std::ostream &stream) const
 Write plid:, destid:, the settings, clr:, and thm: with their values to a diagnostic stream.
virtual void saveGuts (OBStream &stream) const
 Write the Packet words, both identifiers, the settings, the colour, the appearance, the record count, and every record to a stream.
virtual void restoreGuts (IBStream &stream)
 Read the fields back in the order saveGuts() wrote them, resizing the record vector to the count read.
HxStr GetUsername ()
 Report the username of the carried appearance.
GameParams GetParams ()
 Report the game settings.
HxStr GetColorName ()
 Report the colour name.
FreqAppearance GetAppearance ()
 Report the carried appearance.
void AddPlayer (const PlayerInfo &player)
 Append one player to the player list.
Public Member Functions inherited from ToSingleNetManagerPacket
 ToSingleNetManagerPacket ()
 Route the packet with the pair 1 and 0.
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.
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 packet 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.

Additional Inherited Members

Protected Member Functions inherited from Packet
 Packet (int nDestination, int nDestinationSystem)
 Set the two routing words and mark the remaining two as unset.
Protected Attributes inherited from Packet
int mDestination
int mDestinationSystem
int mClientId
 The client the packet concerns, or -1 until set.
int mTargetClientId
 A second client identifier, -1 until set.

Detailed Description

Network packet the game sends between game systems.

Its RTTI descriptor is at 0x008ef110. It has ToSingleNetManagerPacket as its one base. The object is 0x7c bytes and its vtable is at 0x00814890. The payload comes from the copy constructor at 0x003f2e48. Clone() delegates to it, and the payload accounts for the allocation exactly. The four words Packet provides are declared there rather than here.

PrintExtra() labels the words at +0x18 and +0x14 as plid and destid, the string at +0x54 as clr, and the appearance at +0x5c as thm. The vector at +0x70 stores PlayerInfo records. saveGuts() and restoreGuts() step through it 0x40 bytes at a time and dispatch each element's Save() and Load() through the PlayerInfo vtable pointer at the element's +0x3c, and restoreGuts() resizes it with a default-constructed PlayerInfo as the fill value.

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

Constructor & Destructor Documentation

◆ SPJoinAcceptPacket()

SPJoinAcceptPacket::SPJoinAcceptPacket ( )

Construct a packet with default settings, an empty colour, a fresh appearance, and no players.

The image lists no caller for the out-of-line body. New() expands the same stores in place.

Ghidra address:
NTSC-U/C: 0x003ef110
Ghidra address:
PAL: 0x00427660

Member Function Documentation

◆ New()

Message * SPJoinAcceptPacket::New ( )
static

Produce a default-constructed packet on the heap.

The registry the translation unit at 0x003ed2e0 builds stores this address against g_nSPJoinAcceptPacketType.

Returns
The packet.
Ghidra address:
NTSC-U/C: 0x003e4b40
Ghidra address:
PAL: 0x0041cd70

◆ Clone()

virtual Message * SPJoinAcceptPacket::Clone ( )
virtual

Produce a heap copy of this packet.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x003ef078
Ghidra address:
PAL: 0x004275c8

Implements Message.

◆ Type()

virtual int SPJoinAcceptPacket::Type ( )
virtual

Report this packet's registered identity.

Returns
g_nSPJoinAcceptPacketType.
Ghidra address:
NTSC-U/C: 0x003ef0f0
Ghidra address:
PAL: 0x00427640

Implements Message.

◆ GetName()

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

Report this packet's class name.

Returns
The literal SPJoinAcceptPacket.
Ghidra address:
NTSC-U/C: 0x003ef100
Ghidra address:
PAL: 0x00427650

Implements Message.

◆ PrintExtra()

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

Write plid:, destid:, the settings, clr:, and thm: with their values to a diagnostic stream.

The player records are not written.

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

Reimplemented from Message.

◆ saveGuts()

virtual void SPJoinAcceptPacket::saveGuts ( OBStream & stream) const
virtual

Write the Packet words, both identifiers, the settings, the colour, the appearance, the record count, and every record to a stream.

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

Reimplemented from Packet.

◆ restoreGuts()

virtual void SPJoinAcceptPacket::restoreGuts ( IBStream & stream)
virtual

Read the fields back in the order saveGuts() wrote them, resizing the record vector to the count read.

Parameters
streamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x003e5930
Ghidra address:
PAL: 0x0041dbd8

Reimplemented from Packet.

◆ GetUsername()

HxStr SPJoinAcceptPacket::GetUsername ( )

Report the username of the carried appearance.

The image lists no caller. The title is inferred.

Returns
A copy of the appearance's first string.
Ghidra address:
NTSC-U/C: 0x003ef390
Ghidra address:
PAL: 0x00427968

◆ GetParams()

GameParams SPJoinAcceptPacket::GetParams ( )

Report the game settings.

The image lists no caller. The title is inferred.

Returns
A copy of the settings.
Ghidra address:
NTSC-U/C: 0x003ef3c0
Ghidra address:
PAL: 0x00427998

◆ GetColorName()

HxStr SPJoinAcceptPacket::GetColorName ( )

Report the colour name.

The image lists no caller. The title is inferred.

Returns
A copy of mColorName.
Ghidra address:
NTSC-U/C: 0x003ef3f0
Ghidra address:
PAL: 0x004279c8

◆ GetAppearance()

FreqAppearance SPJoinAcceptPacket::GetAppearance ( )

Report the carried appearance.

The image lists no caller. The title is inferred.

Returns
A copy of the appearance.
Ghidra address:
NTSC-U/C: 0x003ef420
Ghidra address:
PAL: 0x004279f8

◆ AddPlayer()

void SPJoinAcceptPacket::AddPlayer ( const PlayerInfo & player)

Append one player to the player list.

The image lists no caller. The title is inferred.

Parameters
playerThe player to copy in.
Ghidra address:
NTSC-U/C: 0x003ef450
Ghidra address:
PAL: 0x00427a28

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