Packet that reports a freestyle player's button and stick to the other consoles.
More...
#include <freestylepacket.h>
|
| | ~FreestylePacket () override=default |
| | Destroy the object.
|
| | FreestylePacket () |
| | Construct an inactive packet.
|
| | FreestylePacket (bool bActive, int nButton, float fX, float fY) |
| | Construct a packet for a freestyle player.
|
| 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 | saveGuts (BinStream &stream) const override |
| | Write the state and the button, then each stick position in fixed point, in one half-word.
|
| void | restoreGuts (BinStream &stream) override |
| | Read the half-word saveGuts() writes back into the fields.
|
| void | PrintExtra (PrnStream &stream) const override |
| | Write the state, the button, and the stick position.
|
| int | GetActive () const |
| int | GetButton () const |
| float | GetX () const |
| float | GetY () const |
| | ExternalPacket (unsigned char nFlags=0, int nReceiver=kAllPeers) |
| | Construct a packet from an unset sender.
|
| int | Route () override |
| | Report that a received packet goes to the sink of TheNetTransport.
|
| 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) |
| virtual | ~Message () |
| | Vtable slot 1.
|
| virtual | ~Message () |
| virtual void | Unused1 () |
| | Not called by the control.
|
|
| static Message * | New () |
| | Produce a default-constructed packet on the heap.
|
| static int | Quantize (float fValue, int nBits) |
| | Convert a value from -1 to 1 to a signed fixed-point value.
|
| static float | Dequantize (int nValue, int nBits) |
| | Convert a signed fixed-point value back to a value from -1 to 1.
|
| static Message * | NewMessage (int nType) |
| | Produce a message of the identified class through the factory list.
|
Packet that reports a freestyle player's button and stick to the other consoles.
The RTTI records the class as deriving from ExternalPacket. The members Clone(), Type(), and GetName() are inline.
◆ ~FreestylePacket()
| FreestylePacket::~FreestylePacket |
( |
| ) |
|
|
overridedefault |
Destroy the object.
- Ghidra address:
- NTSC-U/C: 0x0034b8d0
- Ghidra address:
- PAL: 0x003b8d00
◆ FreestylePacket() [1/2]
| FreestylePacket::FreestylePacket |
( |
| ) |
|
|
inline |
Construct an inactive packet.
Inline. New() expands it.
◆ FreestylePacket() [2/2]
| FreestylePacket::FreestylePacket |
( |
bool | bActive, |
|
|
int | nButton, |
|
|
float | fX, |
|
|
float | fY ) |
|
inline |
Construct a packet for a freestyle player.
Inline. FreestyleTrack::SendUpdate() expands it on its stack.
- Parameters
-
| bActive | Whether the player is playing freestyle. |
| nButton | The button pressed. |
| fX | The stick's horizontal position. |
| fY | The stick's vertical position. |
◆ New()
Produce a default-constructed packet on the heap.
- Returns
- The packet.
- Ghidra address:
- NTSC-U/C: 0x00123140
- Ghidra address:
- PAL: 0x001248c0
◆ operator new()
| void * FreestylePacket::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 FreestylePacket::operator delete |
( |
void * | pBlock | ) |
|
|
inline |
Release a packet.
- Parameters
-
◆ Clone()
| Message * FreestylePacket::Clone |
( |
| ) |
|
|
inlineoverridevirtual |
Produce a heap copy of this packet.
- Returns
- The copy.
- Ghidra address:
- NTSC-U/C: 0x0034b970
- Ghidra address:
- PAL: 0x003b8da0
Implements Message.
◆ Type()
| int FreestylePacket::Type |
( |
| ) |
|
|
inlineoverridevirtual |
Report this packet's registered identity.
- Returns
- g_nFreestylePacketType.
- Ghidra address:
- NTSC-U/C: 0x0034b9f8
- Ghidra address:
- PAL: 0x003b8e28
Implements Message.
◆ GetName()
| const char * FreestylePacket::GetName |
( |
| ) |
const |
|
inlineoverridevirtual |
Report this packet's class name.
- Returns
- The literal FreestylePacket.
- Ghidra address:
- NTSC-U/C: 0x0034ba08
- Ghidra address:
- PAL: 0x003b8e38
Implements Message.
◆ saveGuts()
| void FreestylePacket::saveGuts |
( |
BinStream & | stream | ) |
const |
|
overridevirtual |
Write the state and the button, then each stick position in fixed point, in one half-word.
- Parameters
-
| stream | The stream to write to. |
- Ghidra address:
- NTSC-U/C: 0x0014faa0
- Ghidra address:
- PAL: 0x00151400
Reimplemented from Message.
◆ restoreGuts()
| void FreestylePacket::restoreGuts |
( |
BinStream & | stream | ) |
|
|
overridevirtual |
Read the half-word saveGuts() writes back into the fields.
- Parameters
-
| stream | The stream to read from. |
- Ghidra address:
- NTSC-U/C: 0x0014fb68
- Ghidra address:
- PAL: 0x001514c8
Reimplemented from Message.
◆ PrintExtra()
| void FreestylePacket::PrintExtra |
( |
PrnStream & | stream | ) |
const |
|
overridevirtual |
Write the state, the button, and the stick position.
- Parameters
-
| stream | The stream to write to. |
- Ghidra address:
- NTSC-U/C: 0x0014fc18
- Ghidra address:
- PAL: 0x00151578
Reimplemented from Message.
◆ Quantize()
| int FreestylePacket::Quantize |
( |
float | fValue, |
|
|
int | nBits ) |
|
static |
Convert a value from -1 to 1 to a signed fixed-point value.
The name is inferred.
- Parameters
-
| fValue | The value. |
| nBits | The width of the result, sign included. |
- Returns
- The fixed-point value, rounded.
- Ghidra address:
- NTSC-U/C: 0x0014fa28
- Ghidra address:
- PAL: 0x00151388
◆ Dequantize()
| float FreestylePacket::Dequantize |
( |
int | nValue, |
|
|
int | nBits ) |
|
static |
Convert a signed fixed-point value back to a value from -1 to 1.
The name is inferred.
- Parameters
-
| nValue | The fixed-point value. |
| nBits | The width of the value, sign included. |
- Returns
- The value.
- Ghidra address:
- NTSC-U/C: 0x0014fa68
- Ghidra address:
- PAL: 0x001513c8
◆ GetActive()
| int FreestylePacket::GetActive |
( |
| ) |
const |
|
inline |
- Returns
- Whether the player is playing freestyle.
◆ GetButton()
| int FreestylePacket::GetButton |
( |
| ) |
const |
|
inline |
- Returns
- The button pressed.
◆ GetX()
| float FreestylePacket::GetX |
( |
| ) |
const |
|
inline |
- Returns
- The stick's horizontal position.
◆ GetY()
| float FreestylePacket::GetY |
( |
| ) |
const |
|
inline |
- Returns
- The stick's vertical position.
The documentation for this class was generated from the following file: