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

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

#include <bsloadlevelpacket.h>

Inheritance diagram for BSLoadLevelPacket:
Collaboration diagram for BSLoadLevelPacket:

Public Member Functions

 BSLoadLevelPacket ()
 Construct a packet with default settings.
 BSLoadLevelPacket (const GameParams &params)
 Construct a packet carrying a copy of some settings.
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 the settings to a diagnostic stream through GameParams::Print().
virtual void saveGuts (OBStream &stream) const
 Write the Packet words, the settings, and the Packet word at +0x0c again to a stream.
virtual void restoreGuts (IBStream &stream)
 Read the fields back in the order saveGuts() wrote them.
GameParams GetParams ()
 Report the game settings.
Public Member Functions inherited from ToHostPacket
 ToHostPacket ()
 Route the packet with the pair 0 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 default settings 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 0x008ef600. It has ToHostPacket as its one base. The object is 0x4c bytes and its vtable is at 0x00814458. The payload comes from the copy constructor at 0x003f3bc0. Clone() delegates to it, and the payload accounts for the allocation exactly. The four words Packet provides are declared there rather than here.

saveGuts() and restoreGuts() transfer the game settings through GameParams' own virtual Save() and Load() and then transfer the Packet word at +0x0c a second time.

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

Constructor & Destructor Documentation

◆ BSLoadLevelPacket() [1/2]

BSLoadLevelPacket::BSLoadLevelPacket ( )

Construct a packet with default settings.

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

Ghidra address:
NTSC-U/C: 0x003f11b0
Ghidra address:
PAL: 0x00429718

◆ BSLoadLevelPacket() [2/2]

BSLoadLevelPacket::BSLoadLevelPacket ( const GameParams & params)

Construct a packet carrying a copy of some settings.

After the copy the Packet word at +0x0c is set to zero rather than to the -1 every other construction leaves there. The image lists no caller for the out-of-line body.

Parameters
paramsThe settings to copy.
Ghidra address:
NTSC-U/C: 0x003f1220
Ghidra address:
PAL: 0x00429788

Member Function Documentation

◆ New()

Message * BSLoadLevelPacket::New ( )
static

Produce a packet with default settings on the heap.

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

Returns
The packet.
Ghidra address:
NTSC-U/C: 0x003e4f98
Ghidra address:
PAL: 0x0041d230

◆ Clone()

virtual Message * BSLoadLevelPacket::Clone ( )
virtual

Produce a heap copy of this packet.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x003f1118
Ghidra address:
PAL: 0x00429680

Implements Message.

◆ Type()

virtual int BSLoadLevelPacket::Type ( )
virtual

Report this packet's registered identity.

Returns
g_nBSLoadLevelPacketType.
Ghidra address:
NTSC-U/C: 0x003f1190
Ghidra address:
PAL: 0x004296f8

Implements Message.

◆ GetName()

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

Report this packet's class name.

Returns
The literal BSLoadLevelPacket.
Ghidra address:
NTSC-U/C: 0x003f11a0
Ghidra address:
PAL: 0x00429708

Implements Message.

◆ PrintExtra()

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

Write the settings to a diagnostic stream through GameParams::Print().

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

Reimplemented from Message.

◆ saveGuts()

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

Write the Packet words, the settings, and the Packet word at +0x0c again to a stream.

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

Reimplemented from Packet.

◆ restoreGuts()

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

Read the fields back in the order saveGuts() wrote them.

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

Reimplemented from Packet.

◆ GetParams()

GameParams BSLoadLevelPacket::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: 0x003f1290
Ghidra address:
PAL: 0x004297f8

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