Input event that plays a note on one of the three gem buttons.
More...
#include <playnoteevent.h>
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.
◆ PlayNoteEvent() [1/2]
| PlayNoteEvent::PlayNoteEvent |
( |
unsigned char | nPlayer, |
|
|
unsigned char | nButton, |
|
|
int | nState, |
|
|
float | fX, |
|
|
float | fY ) |
Construct the event.
- Parameters
-
| nPlayer | The player index. |
| nButton | The gem button, 0 to 2. |
| nState | The state of the button the controller reported. |
| fX | The first coordinate the input router stores for the player. |
| fY | The 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
-
| stream | The stream to read from. |
- Ghidra address:
- NTSC-U/C: 0x001512a0
- Ghidra address:
- PAL: 0x00152b90
◆ 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
-
| stream | The 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
-
| stream | The 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 |
◆ 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: