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

Packet that describes one player of the session. More...

#include <clientinfopkt.h>

Inheritance diagram for ClientInfoPkt:
Collaboration diagram for ClientInfoPkt:

Public Member Functions

 ClientInfoPkt ()=default
 Construct a packet with a default LobbyPlayer.
 ClientInfoPkt (const NetLaunchpadPlayer &player, int nReceiver)
 Construct a packet for one peer, ordered and guaranteed.
void * operator new (size_t nSize)
 Allocate a packet, billed to the class name.
void operator delete (void *pBlock)
 Release a packet.
Message * Clone () override
 Produce a heap copy of this packet.
int Type () override
 Report this packet's registered identity.
const char * GetName () const override
 Report this packet's class name.
void PrintExtra (PrnStream &stream) const override
 Write the sender, the receiver, and the player.
void saveGuts (BinStream &stream) const override
 Write the player.
void restoreGuts (BinStream &stream) override
 Read the player.
const NetLaunchpadPlayer & GetPlayer () const
Public Member Functions inherited from InternalPacket
int Route () override
 Report that a received packet goes to the online session.
Public Member Functions inherited from Packet
void PrintExtra (PrnStream &stream) const override
 Write the sender and the receiver that are set, as from: and to:.
unsigned char GetFlags () const
int GetReceiver () const
int GetSender () const
void SetSender (int nSender)
Public Member Functions inherited from Message
virtual ~Message ()
 Vtable slot 1.
virtual ~Message ()
virtual void Unused1 ()
 Not called by the control.

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

Public Types inherited from Packet
enum  RouteFlag { kRouteTransport = 1 , kRouteLaunchpad = 2 }
 Bits of Route(). More...
Static Public Attributes inherited from Packet
static constexpr int kUnset = -2
 Value of mSender and mReceiver that marks the member as unset.
static constexpr int kAllPeers = -1
 Value of mReceiver that addresses every peer.
static constexpr unsigned char kFlagOrdered = 1
 Bit of mFlags that LaunchpadRT::Send() turns into the second delivery bit of the session library.
static constexpr unsigned char kFlagGuaranteed = 2
 Bit of mFlags that NetTransport::Send() turns into its guaranteed delivery bit.
Protected Member Functions inherited from InternalPacket
 InternalPacket (unsigned char nFlags=0, int nReceiver=kUnset)
 Construct a packet from an unset sender.
Protected Member Functions inherited from Packet
 Packet (unsigned char nFlags, int nReceiver)
 Construct a packet from an unset sender.

Detailed Description

Packet that describes one player of the session.

The RTTI records the class as deriving from InternalPacket. The members Clone(), Type(), and GetName() are inline. The member names are inferred.

Constructor & Destructor Documentation

◆ ClientInfoPkt() [1/2]

ClientInfoPkt::ClientInfoPkt ( )
default

Construct a packet with a default LobbyPlayer.

The rest of mPlayer is left unset.

Inline. New() expands it.

◆ ClientInfoPkt() [2/2]

ClientInfoPkt::ClientInfoPkt ( const NetLaunchpadPlayer & player,
int nReceiver )
inline

Construct a packet for one peer, ordered and guaranteed.

Inline.

Parameters
playerThe player.
nReceiverThe peer the packet is for.

Member Function Documentation

◆ New()

Message * ClientInfoPkt::New ( )
static

Produce a default-constructed packet on the heap.

Returns
The packet.
Ghidra address:
NTSC-U/C: 0x00267538
Ghidra address:
PAL: 0x00271210

◆ operator new()

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

Allocate a packet, billed to the class name.

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

◆ operator delete()

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

Release a packet.

Parameters
pBlockThe block.

◆ Clone()

Message * ClientInfoPkt::Clone ( )
inlineoverridevirtual

Produce a heap copy of this packet.

Returns
The copy.

Implements Message.

◆ Type()

int ClientInfoPkt::Type ( )
inlineoverridevirtual

Report this packet's registered identity.

Returns
g_nClientInfoPktType.

Implements Message.

◆ GetName()

const char * ClientInfoPkt::GetName ( ) const
inlineoverridevirtual

Report this packet's class name.

Returns
The literal ClientInfoPkt.

Implements Message.

◆ PrintExtra()

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

Write the sender, the receiver, and the player.

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

Reimplemented from Message.

◆ saveGuts()

void ClientInfoPkt::saveGuts ( BinStream & stream) const
overridevirtual

Write the player.

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

Reimplemented from Message.

◆ restoreGuts()

void ClientInfoPkt::restoreGuts ( BinStream & stream)
overridevirtual

Read the player.

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

Reimplemented from Message.

◆ GetPlayer()

const NetLaunchpadPlayer & ClientInfoPkt::GetPlayer ( ) const
inline
Returns
The player.

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