wavelength 1.0.0
Loading...
Searching...
No Matches
GameOptions Class Reference

The settings of the game options screen, which are saved apart from the players to the settings file of the Freq directory. More...

#include <gameoptions.h>

Public Types

enum  FreqSize { kFreqSizeLarge = 0 , kFreqSizeSmall = 1 , kFreqSizeHidden = 2 }
 Values of mFreqSize. More...
enum  OutputMode { kOutputMono = 0 , kOutputStereo = 1 , kOutputSurround = 2 }
 Values of mOutputMode. More...

Public Member Functions

 GameOptions ()
 Construct the default settings, unmodified.
void SetFreqSize (int nFreqSize)
 Set the size of the display of the tracks.
void SetOutputMode (int nOutputMode)
 Set the speaker output mode.
void SetHelpText (int nHelpText)
 Show or hide the hints.
void SetForceFeedback (int nForceFeedback)
 Turn controller vibration on or off.
void ApplyOutputMode ()
 Apply the speaker output mode to the synthesiser.
void RecordUpload ()
 Record today as the day of the last remix upload, and mark the settings modified.
bool UploadedToday () const
 Report whether the last remix upload was today.
void Save (BinStream &stream) const
 Write the settings after version byte 3.
void Load (BinStream &stream)
 Read the settings Save() wrote, or an older version of them.
int GetOutputMode () const
int GetModified () const
void SetModified (int nModified)
int GetHelpText () const
int GetFreqSize () const
int GetForceFeedback () const

Detailed Description

The settings of the game options screen, which are saved apart from the players to the settings file of the Freq directory.

The class is not polymorphic and has no RTTI. The name is inferred from the screen that sets the members. The object is 0x1c bytes. Every setter marks the settings modified.

Member Enumeration Documentation

◆ FreqSize

Values of mFreqSize.

Enumerator
kFreqSizeLarge 

The large display.

kFreqSizeSmall 

The small display.

kFreqSizeHidden 

No display.

◆ OutputMode

Values of mOutputMode.

Enumerator
kOutputMono 

Mono output.

kOutputStereo 

Stereo output.

kOutputSurround 

Stereo output that surround decoders may invert.

Constructor & Destructor Documentation

◆ GameOptions()

GameOptions::GameOptions ( )

Construct the default settings, unmodified.

Ghidra address:
NTSC-U/C: 0x0027c9b8
Ghidra address:
PAL: 0x00286328

Member Function Documentation

◆ SetFreqSize()

void GameOptions::SetFreqSize ( int nFreqSize)

Set the size of the display of the tracks.

Parameters
nFreqSizeOne of FreqSize.
Ghidra address:
NTSC-U/C: 0x0027ca10
Ghidra address:
PAL: 0x00286380

◆ SetOutputMode()

void GameOptions::SetOutputMode ( int nOutputMode)

Set the speaker output mode.

Parameters
nOutputModeThe mode.
Ghidra address:
NTSC-U/C: 0x0027ca20
Ghidra address:
PAL: 0x00286390

◆ SetHelpText()

void GameOptions::SetHelpText ( int nHelpText)

Show or hide the hints.

Parameters
nHelpText1 to show the hints, 0 to hide them.
Ghidra address:
NTSC-U/C: 0x0027ca30
Ghidra address:
PAL: 0x002863a0

◆ SetForceFeedback()

void GameOptions::SetForceFeedback ( int nForceFeedback)

Turn controller vibration on or off.

Parameters
nForceFeedback1 for on, 0 for off.
Ghidra address:
NTSC-U/C: 0x0027ca40
Ghidra address:
PAL: 0x002863b0

◆ ApplyOutputMode()

void GameOptions::ApplyOutputMode ( )

Apply the speaker output mode to the synthesiser.

An unknown mode is reported and changes nothing.

Ghidra address:
NTSC-U/C: 0x0027caf0
Ghidra address:
PAL: 0x00286460

◆ RecordUpload()

void GameOptions::RecordUpload ( )

Record today as the day of the last remix upload, and mark the settings modified.

The name is inferred.

Ghidra address:
NTSC-U/C: 0x0027ca50
Ghidra address:
PAL: 0x002863c0

◆ UploadedToday()

bool GameOptions::UploadedToday ( ) const

Report whether the last remix upload was today.

The name is inferred.

Returns
Whether the day, month, and year of mDate match the clock.
Ghidra address:
NTSC-U/C: 0x0027ca80
Ghidra address:
PAL: 0x002863f0

◆ Save()

void GameOptions::Save ( BinStream & stream) const

Write the settings after version byte 3.

Parameters
streamThe stream.
Ghidra address:
NTSC-U/C: 0x0027cbe0
Ghidra address:
PAL: 0x00286550

◆ Load()

void GameOptions::Load ( BinStream & stream)

Read the settings Save() wrote, or an older version of them.

Before version 3 the output mode is a byte that is ignored, and the mode becomes stereo. Version 0 records only the output mode, and versions before 2 record no date.

Parameters
streamThe stream.
Ghidra address:
NTSC-U/C: 0x0027ccb8
Ghidra address:
PAL: 0x00286608

◆ GetOutputMode()

int GameOptions::GetOutputMode ( ) const
inline
Returns
The speaker output mode.

◆ GetModified()

int GameOptions::GetModified ( ) const
inline
Returns
Whether the settings changed since they were saved.

◆ SetModified()

void GameOptions::SetModified ( int nModified)
inline
Parameters
nModifiedWhether the settings changed since they were saved.

◆ GetHelpText()

int GameOptions::GetHelpText ( ) const
inline
Returns
Whether hints are shown, as a word of 0 or 1.

◆ GetFreqSize()

int GameOptions::GetFreqSize ( ) const
inline
Returns
The size of the display of the tracks, one of FreqSize.

◆ GetForceFeedback()

int GameOptions::GetForceFeedback ( ) const
inline
Returns
Whether controller vibration is on.

The documentation for this class was generated from the following file: