wavelength 1.0.0
Loading...
Searching...
No Matches
changesectionevent.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/binstream.h"
4
11public:
17 ChangeSectionEvent() = default;
18
26 explicit ChangeSectionEvent(BinStream &stream);
27
35 void Save(BinStream &stream) const;
36
44 void Load(BinStream &stream);
45
47 unsigned char GetPlayer() const {
48 return mPlayer;
49 }
50
52 void SetPlayer(unsigned char nPlayer) {
53 mPlayer = nPlayer;
54 }
55
57 int GetDirection() const {
58 return mDirection;
59 }
60
62 void SetDirection(int nDirection) {
63 mDirection = nDirection;
64 }
65
66private:
67 unsigned char mPlayer;
68 int mDirection;
69};
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
void Load(BinStream &stream)
Read the event Save() records.
void SetDirection(int nDirection)
Definition changesectionevent.h:62
void Save(BinStream &stream) const
Record the player in one byte and the direction in four bytes of the console's byte order.
void SetPlayer(unsigned char nPlayer)
Definition changesectionevent.h:52
ChangeSectionEvent()=default
Construct an event with unset members.
int GetDirection() const
Definition changesectionevent.h:57
ChangeSectionEvent(BinStream &stream)
Construct the event from a recording.
unsigned char GetPlayer() const
Definition changesectionevent.h:47