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

Input event that plays a note on one of the three gem buttons. More...

#include <playnoteevent.h>

Public Member Functions

 PlayNoteEvent (unsigned char nPlayer, unsigned char nButton, int nState, float fX, float fY)
 Construct the event.
 PlayNoteEvent (BinStream &stream)
 Construct the event from a recording.
void Save (BinStream &stream) const
 Record the event.
void Load (BinStream &stream)
 Read the event Save() records.
float GetY () const
float GetX () const
int GetState () const
unsigned char GetPlayer () const
unsigned char GetButton () const

Detailed Description

Input event that plays a note on one of the three gem buttons.

The RTTI includes the name as the argument of the input command template.

Constructor & Destructor Documentation

◆ PlayNoteEvent() [1/2]

PlayNoteEvent::PlayNoteEvent ( unsigned char nPlayer,
unsigned char nButton,
int nState,
float fX,
float fY )

Construct the event.

Parameters
nPlayerThe player index.
nButtonThe gem button, 0 to 2.
nStateThe state of the button the controller reported.
fXThe first coordinate the input router stores for the player.
fYThe second coordinate the input router stores for the player.
Ghidra address:
NTSC-U/C: 0x001512c8
Ghidra address:
PAL: 0x00152bb8

◆ PlayNoteEvent() [2/2]

PlayNoteEvent::PlayNoteEvent ( BinStream & stream)
explicit

Construct the event from a recording.

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

Member Function Documentation

◆ Save()

void PlayNoteEvent::Save ( BinStream & stream) const

Record the event.

The player, the button, and the low byte of the state take one byte each, and the coordinates four bytes each.

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

◆ Load()

void PlayNoteEvent::Load ( BinStream & stream)

Read the event Save() records.

The state becomes 1 when its byte is not zero.

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

◆ GetY()

float PlayNoteEvent::GetY ( ) const
inline
Returns
The second coordinate the input router stores for the player.

◆ GetX()

float PlayNoteEvent::GetX ( ) const
inline
Returns
The first coordinate the input router stores for the player.

◆ GetState()

int PlayNoteEvent::GetState ( ) const
inline
Returns
The state of the button the controller reported.

◆ GetPlayer()

unsigned char PlayNoteEvent::GetPlayer ( ) const
inline
Returns
The player index.

◆ GetButton()

unsigned char PlayNoteEvent::GetButton ( ) const
inline
Returns
The gem button, 0 to 2.

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