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

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

#include <scallplayersinfopacket.h>

Inheritance diagram for SCAllPlayersInfoPacket:
Collaboration diagram for SCAllPlayersInfoPacket:

Classes

struct  PlayerInfoEntry
 One player's entry, from the 0x14-byte stride the copy constructor divides by. More...

Public Member Functions

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 every entry to a diagnostic stream as pid:, the identifier, tracks:, the track numbers in parentheses each followed by a space, and | .
virtual void saveGuts (OBStream &stream) const
 Write the Packet words, the entry count, and for every entry its two words, its track count, and its tracks to a stream.
virtual void restoreGuts (IBStream &stream)
 Read the fields back in the order saveGuts() wrote them, resizing both levels of vector to the counts read.
void AddPlayerInfo (const PlayerInfoEntry &entry)
 Append a copy of one entry.
Public Member Functions inherited from ToAllOtherNetManagersPacket
 ToAllOtherNetManagersPacket ()
 Route the packet with the pair 2 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 packet with no entries 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 0x008f2a80. It has ToAllOtherNetManagersPacket as its one base. The object is 0x20 bytes and its vtable is at 0x008146e0. The payload comes from the copy constructor at 0x003f34e8. Clone() delegates to it, and the payload accounts for the allocation exactly. The four words Packet provides are declared there rather than here.

The vector at +0x14 is deep-copied, so the class owns its elements. Each element is 0x14 bytes, a player identifier, an unlabelled word, and a vector of track numbers, which PrintExtra() labels pid: and tracks:.

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

Member Function Documentation

◆ New()

Message * SCAllPlayersInfoPacket::New ( )
static

Produce a packet with no entries on the heap.

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

Returns
The packet.
Ghidra address:
NTSC-U/C: 0x003e4ee8
Ghidra address:
PAL: 0x0041d180

◆ Clone()

virtual Message * SCAllPlayersInfoPacket::Clone ( )
virtual

Produce a heap copy of this packet.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x003eff60
Ghidra address:
PAL: 0x00428568

Implements Message.

◆ Type()

virtual int SCAllPlayersInfoPacket::Type ( )
virtual

Report this packet's registered identity.

Returns
g_nSCAllPlayersInfoPacketType.
Ghidra address:
NTSC-U/C: 0x003effd8
Ghidra address:
PAL: 0x004285e0

Implements Message.

◆ GetName()

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

Report this packet's class name.

Returns
The literal SCAllPlayersInfoPacket.
Ghidra address:
NTSC-U/C: 0x003effe8
Ghidra address:
PAL: 0x004285f0

Implements Message.

◆ PrintExtra()

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

Write every entry to a diagnostic stream as pid:, the identifier, tracks:, the track numbers in parentheses each followed by a space, and | .

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

Reimplemented from Message.

◆ saveGuts()

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

Write the Packet words, the entry count, and for every entry its two words, its track count, and its tracks to a stream.

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

Reimplemented from Packet.

◆ restoreGuts()

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

Read the fields back in the order saveGuts() wrote them, resizing both levels of vector to the counts read.

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

Reimplemented from Packet.

◆ AddPlayerInfo()

void SCAllPlayersInfoPacket::AddPlayerInfo ( const PlayerInfoEntry & entry)

Append a copy of one entry.

The image lists no caller for the out-of-line body.

Parameters
entryThe entry to append.
Ghidra address:
NTSC-U/C: 0x003f23a8
Ghidra address:
PAL: 0x0042a8f0

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