wavelength 1.0.0
Loading...
Searching...
No Matches
playnoteevent.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/binstream.h"
4
11public:
23 PlayNoteEvent(unsigned char nPlayer, unsigned char nButton, int nState, float fX, float fY);
24
32 explicit PlayNoteEvent(BinStream &stream);
33
44 void Save(BinStream &stream) const;
45
55 void Load(BinStream &stream);
56
58 float GetY() const {
59 return mY;
60 }
61
63 float GetX() const {
64 return mX;
65 }
66
68 int GetState() const {
69 return mState;
70 }
71
73 unsigned char GetPlayer() const {
74 return mPlayer;
75 }
76
78 unsigned char GetButton() const {
79 return mButton;
80 }
81
82private:
83 unsigned char mPlayer;
84 unsigned char mButton;
85 int mState;
86 float mX;
87 float mY;
88};
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
float GetY() const
Definition playnoteevent.h:58
int GetState() const
Definition playnoteevent.h:68
void Save(BinStream &stream) const
Record the event.
PlayNoteEvent(unsigned char nPlayer, unsigned char nButton, int nState, float fX, float fY)
Construct the event.
unsigned char GetPlayer() const
Definition playnoteevent.h:73
PlayNoteEvent(BinStream &stream)
Construct the event from a recording.
float GetX() const
Definition playnoteevent.h:63
unsigned char GetButton() const
Definition playnoteevent.h:78
void Load(BinStream &stream)
Read the event Save() records.