Packet that reports a local player's track, score, and catching state to the other consoles.
More...
#include <playerupdatepacket.h>
|
| static Message * | New () |
| | Produce a default-constructed packet on the heap.
|
| static Message * | NewMessage (int nType) |
| | Produce a message of the identified class through the factory list.
|
Packet that reports a local player's track, score, and catching state to the other consoles.
The RTTI records the class as deriving from ExternalPacket. LocalPlayer::Broadcast() sends one in the game and duel rule sets, and each one includes the next value of LocalPlayer::sPlayerUpdateVersion. The members Clone(), Type(), and GetName() are inline.
◆ ~PlayerUpdatePacket()
| PlayerUpdatePacket::~PlayerUpdatePacket |
( |
| ) |
|
|
overridedefault |
Destroy the object.
- Ghidra address:
- NTSC-U/C: 0x0033dcd0
- Ghidra address:
- PAL: 0x003ab208
◆ PlayerUpdatePacket() [1/2]
| PlayerUpdatePacket::PlayerUpdatePacket |
( |
| ) |
|
|
inline |
Construct a packet with no track and no score.
Inline. New() expands it.
◆ PlayerUpdatePacket() [2/2]
| PlayerUpdatePacket::PlayerUpdatePacket |
( |
int | nTrack, |
|
|
int | nPoints, |
|
|
bool | bCatching, |
|
|
int | nVersion ) |
|
inline |
Construct a packet with every field set.
Inline. LocalPlayer::Broadcast() expands it on its stack.
- Parameters
-
| nTrack | The index of the player's track. |
| nPoints | The player's score. |
| bCatching | The player's catching state. |
| nVersion | The update's sequence number. |
◆ New()
| Message * PlayerUpdatePacket::New |
( |
| ) |
|
|
static |
Produce a default-constructed packet on the heap.
- Returns
- The packet.
- Ghidra address:
- NTSC-U/C: 0x00122eb8
- Ghidra address:
- PAL: 0x00124638
◆ operator new()
| void * PlayerUpdatePacket::operator new |
( |
size_t | nSize | ) |
|
|
inline |
Allocate a packet, billed to the class name.
- Parameters
-
| nSize | The object size the compiler supplies. |
- Returns
- The block.
◆ operator delete()
| void PlayerUpdatePacket::operator delete |
( |
void * | pBlock | ) |
|
|
inline |
Release a packet.
- Parameters
-
◆ Clone()
| Message * PlayerUpdatePacket::Clone |
( |
| ) |
|
|
inlineoverridevirtual |
Produce a heap copy of this packet.
- Returns
- The copy.
- Ghidra address:
- NTSC-U/C: 0x0033dd70
- Ghidra address:
- PAL: 0x003ab2a8
Implements Message.
◆ Type()
| int PlayerUpdatePacket::Type |
( |
| ) |
|
|
inlineoverridevirtual |
Report this packet's registered identity.
- Returns
- g_nPlayerUpdatePacketType.
- Ghidra address:
- NTSC-U/C: 0x0033ddf8
- Ghidra address:
- PAL: 0x003ab330
Implements Message.
◆ GetName()
| const char * PlayerUpdatePacket::GetName |
( |
| ) |
const |
|
inlineoverridevirtual |
Report this packet's class name.
- Returns
- The literal PlayerUpdatePacket.
- Ghidra address:
- NTSC-U/C: 0x0033de08
- Ghidra address:
- PAL: 0x003ab340
Implements Message.
◆ PrintExtra()
| void PlayerUpdatePacket::PrintExtra |
( |
PrnStream & | stream | ) |
const |
|
overridevirtual |
Print the track, the score, the catching state, and the version.
- Parameters
-
| stream | The stream to print to. |
- Ghidra address:
- NTSC-U/C: 0x0012e2c8
- Ghidra address:
- PAL: 0x0012faa0
Reimplemented from Packet.
◆ saveGuts()
| void PlayerUpdatePacket::saveGuts |
( |
BinStream & | stream | ) |
const |
|
overridevirtual |
Write the fields packed into one word.
The track takes the low three bits, the score the next fourteen, the catching state one bit, and the version the next fourteen.
- Parameters
-
| stream | The stream to write to. |
- Ghidra address:
- NTSC-U/C: 0x0012e1b0
- Ghidra address:
- PAL: 0x0012f988
Reimplemented from Message.
◆ restoreGuts()
| void PlayerUpdatePacket::restoreGuts |
( |
BinStream & | stream | ) |
|
|
overridevirtual |
Read the word saveGuts() writes back into the fields.
- Parameters
-
| stream | The stream to read from. |
- Ghidra address:
- NTSC-U/C: 0x0012e240
- Ghidra address:
- PAL: 0x0012fa18
Reimplemented from Message.
◆ GetCatching()
| int PlayerUpdatePacket::GetCatching |
( |
| ) |
const |
|
inline |
- Returns
- The player's catching state.
◆ GetPoints()
| int PlayerUpdatePacket::GetPoints |
( |
| ) |
const |
|
inline |
- Returns
- The player's score.
◆ GetTrack()
| int PlayerUpdatePacket::GetTrack |
( |
| ) |
const |
|
inline |
- Returns
- The index of the player's track.
◆ GetVersion()
| int PlayerUpdatePacket::GetVersion |
( |
| ) |
const |
|
inline |
- Returns
- The update's sequence number.
The documentation for this class was generated from the following file: