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

Message the controller poll sends when a controller is connected or disconnected. More...

#include <joypadconnectionmsg.h>

Inheritance diagram for JoypadConnectionMsg:
Collaboration diagram for JoypadConnectionMsg:

Public Member Functions

 JoypadConnectionMsg (int nPad, int nConnected)
 Construct the message of a controller.
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 and whether it is connected.
int GetConnected () const
int GetPad () 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 controller is connected or disconnected.

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

Constructor & Destructor Documentation

◆ JoypadConnectionMsg()

JoypadConnectionMsg::JoypadConnectionMsg ( int nPad,
int nConnected )
inline

Construct the message of a controller.

Inline in the controller poll.

Parameters
nPadThe controller.
nConnected1 when the controller was connected, 0 when it was disconnected.

Member Function Documentation

◆ operator new()

void * JoypadConnectionMsg::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 JoypadConnectionMsg::operator delete ( void * pBlock)
inline

Release a message.

Parameters
pBlockThe block.

◆ Clone()

Message * JoypadConnectionMsg::Clone ( )
inlineoverridevirtual

Produce a heap copy of this message.

Returns
The copy.
Ghidra address:
NTSC-U/C: 0x003a7370
Ghidra address:
PAL: 0x00416050

Implements Message.

◆ Type()

int JoypadConnectionMsg::Type ( )
inlineoverridevirtual

Report this message's registered identity.

Returns
g_nJoypadConnectionMsgType.
Ghidra address:
NTSC-U/C: 0x003a73c8
Ghidra address:
PAL: 0x004160a8

Implements Message.

◆ GetName()

const char * JoypadConnectionMsg::GetName ( ) const
inlineoverridevirtual

Report this message's class name.

Returns
The literal JoypadConnectionMsg.
Ghidra address:
NTSC-U/C: 0x003a73d8
Ghidra address:
PAL: 0x004160b8

Implements Message.

◆ PrintExtra()

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

Write the controller and whether it is connected.

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

Reimplemented from Message.

◆ GetConnected()

int JoypadConnectionMsg::GetConnected ( ) const
inline
Returns
1 when the controller was connected, 0 when it was disconnected.

◆ GetPad()

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

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