wavelength 1.0.0
Loading...
Searching...
No Matches
gameoptions.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/binstream.h"
4#include "os/datetime.h"
5
14public:
21
28
36
44 void SetFreqSize(int nFreqSize);
45
53 void SetOutputMode(int nOutputMode);
54
62 void SetHelpText(int nHelpText);
63
71 void SetForceFeedback(int nForceFeedback);
72
82
92
102 bool UploadedToday() const;
103
111 void Save(BinStream &stream) const;
112
113#ifdef VIDEO_STANDARD_PAL
122 static int SavedSize();
123#endif
124
135 void Load(BinStream &stream);
136
138 int GetOutputMode() const {
139 return mOutputMode;
140 }
141
143 int GetModified() const {
144 return mModified;
145 }
146
148 void SetModified(int nModified) {
149 mModified = nModified;
150 }
151
153 int GetHelpText() const {
154 return mHelpText;
155 }
156
158 int GetFreqSize() const {
159 return mFreqSize;
160 }
161
163 int GetForceFeedback() const {
164 return mForceFeedback;
165 }
166
167private:
168 int mFreqSize;
169 int mOutputMode;
170 int mHelpText;
171 int mForceFeedback;
172 DateTime mDate;
173 int mModified;
174};
175
185BinStream &operator<<(BinStream &stream, const GameOptions &options);
186
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
Local date and time of the console clock.
Definition datetime.h:14
The settings of the game options screen, which are saved apart from the players to the settings file ...
Definition gameoptions.h:13
int GetModified() const
Definition gameoptions.h:143
void SetForceFeedback(int nForceFeedback)
Turn controller vibration on or off.
int GetFreqSize() const
Definition gameoptions.h:158
void ApplyOutputMode()
Apply the speaker output mode to the synthesiser.
int GetHelpText() const
Definition gameoptions.h:153
int GetOutputMode() const
Definition gameoptions.h:138
bool UploadedToday() const
Report whether the last remix upload was today.
int GetForceFeedback() const
Definition gameoptions.h:163
void SetHelpText(int nHelpText)
Show or hide the hints.
void SetModified(int nModified)
Definition gameoptions.h:148
OutputMode
Values of mOutputMode.
Definition gameoptions.h:23
@ kOutputSurround
Definition gameoptions.h:26
@ kOutputMono
Definition gameoptions.h:24
@ kOutputStereo
Definition gameoptions.h:25
void RecordUpload()
Record today as the day of the last remix upload, and mark the settings modified.
void SetFreqSize(int nFreqSize)
Set the size of the display of the tracks.
void SetOutputMode(int nOutputMode)
Set the speaker output mode.
GameOptions()
Construct the default settings, unmodified.
void Save(BinStream &stream) const
Write the settings after version byte 3.
FreqSize
Values of mFreqSize.
Definition gameoptions.h:16
@ kFreqSizeHidden
Definition gameoptions.h:19
@ kFreqSizeSmall
Definition gameoptions.h:18
@ kFreqSizeLarge
Definition gameoptions.h:17
void Load(BinStream &stream)
Read the settings Save() wrote, or an older version of them.
BinStream & operator>>(BinStream &stream, GameOptions &options)
Read settings from a stream.
BinStream & operator<<(BinStream &stream, const GameOptions &options)
Write settings to a stream, after a version byte.