wavelength 1.0.0
Loading...
Searching...
No Matches
rotateevent.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/binstream.h"
4
12public:
18
24 RotateEvent() = default;
25
33 explicit RotateEvent(BinStream &stream);
34
42 void Save(BinStream &stream) const;
43
51 void Load(BinStream &stream);
52
54 unsigned char GetPlayer() const {
55 return mPlayer;
56 }
57
59 void SetPlayer(unsigned char nPlayer) {
60 mPlayer = nPlayer;
61 }
62
64 int GetDirection() const {
65 return mDirection;
66 }
67
69 void SetDirection(int nDirection) {
70 mDirection = nDirection;
71 }
72
73private:
74 unsigned char mPlayer;
75 int mDirection;
76};
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
unsigned char GetPlayer() const
Definition rotateevent.h:54
RotateEvent()=default
Construct an event with unset members.
void Save(BinStream &stream) const
Record the player in one byte and the direction in four bytes of the console's byte order.
void SetDirection(int nDirection)
Definition rotateevent.h:69
int GetDirection() const
Definition rotateevent.h:64
RotateEvent(BinStream &stream)
Construct the event from a recording.
void Load(BinStream &stream)
Read the event Save() records.
Direction
Values of mDirection.
Definition rotateevent.h:14
@ kDirectionNext
Definition rotateevent.h:16
@ kDirectionPrevious
Definition rotateevent.h:15
void SetPlayer(unsigned char nPlayer)
Definition rotateevent.h:59