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

Message the controller poll sends when a button is pressed or released. More...

#include <joypadinputmsg.h>

Inheritance diagram for JoypadInputMsg:
Collaboration diagram for JoypadInputMsg:

Public Member Functions

 ~JoypadInputMsg () override=default
 Destroy the object.
 JoypadInputMsg (int nPad, int nButton, int nPressed)
 Construct the message of a button.
void * operator new (size_t nSize)
 Allocate a message, billed to the class name.
void operator delete (void *pBlock)
 Release a message.
Message * Clone () override
 Produce a heap copy of this message.
int Type () override
 Report this message's registered identity.
const char * GetName () const override
 Report this message's class name.
void PrintExtra (PrnStream &stream) const override
 Write the controller, the button, and whether it went down.
int GetButton () const
int GetPad () const
int GetPressed () const
Public Member Functions inherited from Message
virtual ~Message ()
 Vtable slot 1.
virtual void saveGuts (BinStream &stream) const
 Write this message's payload to a stream.
virtual void restoreGuts (BinStream &stream)
 Read this message's payload from a stream.
virtual ~Message ()
virtual void Unused1 ()
 Not called by the control.

Additional Inherited Members

Static Public Member Functions inherited from Message
static Message * NewMessage (int nType)
 Produce a message of the identified class through the factory list.

Detailed Description

Message the controller poll sends when a button is pressed or released.

The RTTI includes the class name and records Message as the base. The object is 0x10 bytes, and its vtable is at 0x003d6a68.

Constructor & Destructor Documentation

◆ ~JoypadInputMsg()

JoypadInputMsg::~JoypadInputMsg ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x003a71a0
Ghidra address:
PAL: 0x00415e80

◆ JoypadInputMsg()

JoypadInputMsg::JoypadInputMsg ( int nPad,
int nButton,
int nPressed )
inline

Construct the message of a button.

Inline. UIManager::Poll() expands it on its stack to repeat a held directional button.

Parameters
nPadThe controller.
nButtonThe button, one of JoypadButton.
nPressed1 when the button went down, 0 when it went up.

Member Function Documentation

◆ operator new()

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

Allocate a message, billed to the class name.

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

◆ operator delete()

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

Release a message.

Parameters
pBlockThe block.

◆ Clone()

Message * JoypadInputMsg::Clone ( )
inlineoverridevirtual

Produce a heap copy of this message.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x003a7240
Ghidra address:
PAL: 0x00415f20

Implements Message.

◆ Type()

int JoypadInputMsg::Type ( )
inlineoverridevirtual

Report this message's registered identity.

Returns
g_nJoypadInputMsgType.
Ghidra address:
NTSC-U/C: 0x003a72a0
Ghidra address:
PAL: 0x00415f80

Implements Message.

◆ GetName()

const char * JoypadInputMsg::GetName ( ) const
inlineoverridevirtual

Report this message's class name.

Returns
The literal JoypadInputMsg.
Ghidra address:
NTSC-U/C: 0x003a72b0
Ghidra address:
PAL: 0x00415f90

Implements Message.

◆ PrintExtra()

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

Write the controller, the button, and whether it went down.

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

Reimplemented from Message.

◆ GetButton()

int JoypadInputMsg::GetButton ( ) const
inline
Returns
The button, one of JoypadButton.

◆ GetPad()

int JoypadInputMsg::GetPad ( ) const
inline
Returns
The controller.

◆ GetPressed()

int JoypadInputMsg::GetPressed ( ) const
inline
Returns
1 when the button went down, 0 when it went up.

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