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

Tuning values of the game, read from the "game" section of the configuration. More...

#include <gameconfig.h>

Public Member Functions

 GameConfig ()
 Start with every value unset, mAxeSoftFxVolume at 1, and an empty power-up table for each kind of power-up.
 ~GameConfig ()=default
 Release the tables.
void Init ()
 Read the "game" section of the configuration and register the cheat script commands.
void SetStrandBars (int nStrand, int nBars)
 Replace the bars of one strand in mStrandBars.
float GetPowerupWeight (int nPlayers, int nSection, int nSections, int nPowerup)
 Report the weight of a kind of power-up in a section, from the powerup_dist tables.
int GetZeroRandSeed () const
int GetStreaksEnabled () const
void SetStreaksEnabled (int nStreaksEnabled)
int GetStreakMultiplierMaxSolo () const
int GetStreakMultiplierMaxMulti () const
const std::vector< int > & GetStrandBars () const
std::vector< int > & GetStrandBars ()
int GetSlowdownStopTicks () const
int GetSlowdownStartTicks () const
float GetSlowdownSpeed () const
int GetSlowdownDurationBars () const
int GetSlopMs () const
int GetScratcherSampleQuantizationTicks () const
int GetScratcherQuantizationTicks () const
float GetRotationRepeatInitialDelayMs () const
float GetRotationRepeatDelayMs () const
float GetPowerupProbSolo () const
const std::vector< float > & GetPowerupProbMulti () const
std::vector< float > & GetPowerupProbMulti ()
int GetPlayAllGems () const
void SetPlayAllGems (int nPlayAllGems)
int GetPhraseScale () const
int GetNoDeactivate () const
void SetNoDeactivate (int nNoDeactivate)
int GetNoCapture () const
void SetNoCapture (int nNoCapture)
int GetMultiplierValue () const
int GetMultiplierDurationBars () const
float GetJuiceMeterMax () const
const std::vector< float > & GetInitialJuice () const
std::vector< float > & GetInitialJuice ()
int GetGuideTicks () const
void SetGuideTicks (int nGuideTicks)
const std::vector< GemPointValue > & GetGemPoints () const
const std::vector< int > & GetFreestylePoints () const
std::vector< int > & GetFreestylePoints ()
int GetFreestyleDurationBarsSolo () const
int GetFreestyleDurationBarsMultiNet () const
int GetForceFeedbackEnabled () const
int GetFakeInput () const
int GetCripplerDurationBars () const
int GetCheckpointBars () const
const std::vector< float > & GetCaptureJuice () const
std::vector< float > & GetCaptureJuice ()
int GetBeatLeadMs () const
int GetBeatDurationMs () const
const std::vector< float > & GetBarsPerCapture () const
std::vector< float > & GetBarsPerCapture ()
int GetBarCaptureThreshold () const
float GetAxeSoftFxVolume () const
const std::vector< int > & GetAutocatcherPoints () const
std::vector< int > & GetAutocatcherPoints ()
const char * GetPlayFromFile () const
const char * GetRecordToFile () const

Static Public Member Functions

static GameConfig * shared ()
 Report the single instance, constructing it on first use.

Detailed Description

Tuning values of the game, read from the "game" section of the configuration.

The class is not polymorphic and has no RTTI. The name is inferred from the section. The one instance is the function-local static of shared(), and TheGameConfig addresses it. Each value except mAxeSoftFxVolume starts unset (-1, null, or false) until Init() reads its key. The vectors with one entry for each skill level are indexed by GameDb::mSkillLevel.

Constructor & Destructor Documentation

◆ GameConfig()

GameConfig::GameConfig ( )

Start with every value unset, mAxeSoftFxVolume at 1, and an empty power-up table for each kind of power-up.

Ghidra address:
NTSC-U/C: 0x0010f5d0
Ghidra address:
PAL: 0x00110d68

◆ ~GameConfig()

GameConfig::~GameConfig ( )
default

Release the tables.

Ghidra address:
NTSC-U/C: 0x00336db8
Ghidra address:
PAL: 0x003a4368

Member Function Documentation

◆ Init()

void GameConfig::Init ( )

Read the "game" section of the configuration and register the cheat script commands.

Ghidra address:
NTSC-U/C: 0x0010f990
Ghidra address:
PAL: 0x00111128

◆ SetStrandBars()

void GameConfig::SetStrandBars ( int nStrand,
int nBars )

Replace the bars of one strand in mStrandBars.

Parameters
nStrandThe strand, counting from 1.
nBarsThe bars.
Ghidra address:
NTSC-U/C: 0x0010f978
Ghidra address:
PAL: 0x00111110

◆ GetPowerupWeight()

float GameConfig::GetPowerupWeight ( int nPlayers,
int nSection,
int nSections,
int nPowerup )

Report the weight of a kind of power-up in a section, from the powerup_dist tables.

Each of the last three sections has a column of its own, and the earlier sections share the first column.

Parameters
nPlayersThe number of players.
nSectionThe section.
nSectionsThe number of sections.
nPowerupThe kind of power-up, a GameLogic::Powerup.
Returns
The weight.
Ghidra address:
NTSC-U/C: 0x0010fa30
Ghidra address:
PAL: 0x001111c8

◆ shared()

GameConfig * GameConfig::shared ( )
static

Report the single instance, constructing it on first use.

The instance is destroyed at exit.

Returns
The instance.
Ghidra address:
NTSC-U/C: 0x00110200
Ghidra address:
PAL: 0x00111998

◆ GetZeroRandSeed()

int GameConfig::GetZeroRandSeed ( ) const
inline
Returns
zero_rand_seed.

◆ GetStreaksEnabled()

int GameConfig::GetStreaksEnabled ( ) const
inline
Returns
streaks_enabled.

◆ SetStreaksEnabled()

void GameConfig::SetStreaksEnabled ( int nStreaksEnabled)
inline
Parameters
nStreaksEnabledstreaks_enabled.

◆ GetStreakMultiplierMaxSolo()

int GameConfig::GetStreakMultiplierMaxSolo ( ) const
inline
Returns
streak_multiplier_max_solo.

◆ GetStreakMultiplierMaxMulti()

int GameConfig::GetStreakMultiplierMaxMulti ( ) const
inline
Returns
streak_multiplier_max_multi.

◆ GetStrandBars() [1/2]

const std::vector< int > & GameConfig::GetStrandBars ( ) const
inline
Returns
strand_bars.

◆ GetStrandBars() [2/2]

std::vector< int > & GameConfig::GetStrandBars ( )
inline
Returns
strand_bars.

◆ GetSlowdownStopTicks()

int GameConfig::GetSlowdownStopTicks ( ) const
inline
Returns
slowdown_stop_ticks.

◆ GetSlowdownStartTicks()

int GameConfig::GetSlowdownStartTicks ( ) const
inline
Returns
slowdown_start_ticks.

◆ GetSlowdownSpeed()

float GameConfig::GetSlowdownSpeed ( ) const
inline
Returns
slowdown_speed.

◆ GetSlowdownDurationBars()

int GameConfig::GetSlowdownDurationBars ( ) const
inline
Returns
slowdown_duration_bars.

◆ GetSlopMs()

int GameConfig::GetSlopMs ( ) const
inline
Returns
slop_ms.

◆ GetScratcherSampleQuantizationTicks()

int GameConfig::GetScratcherSampleQuantizationTicks ( ) const
inline
Returns
scratcher_sample_quantization_ticks.

◆ GetScratcherQuantizationTicks()

int GameConfig::GetScratcherQuantizationTicks ( ) const
inline
Returns
scratcher_quantization_ticks.

◆ GetRotationRepeatInitialDelayMs()

float GameConfig::GetRotationRepeatInitialDelayMs ( ) const
inline
Returns
rotation_repeat_initial_delay_ms.

◆ GetRotationRepeatDelayMs()

float GameConfig::GetRotationRepeatDelayMs ( ) const
inline
Returns
rotation_repeat_delay_ms.

◆ GetPowerupProbSolo()

float GameConfig::GetPowerupProbSolo ( ) const
inline
Returns
powerup_prob_solo.

◆ GetPowerupProbMulti() [1/2]

const std::vector< float > & GameConfig::GetPowerupProbMulti ( ) const
inline
Returns
powerup_prob_multi.

◆ GetPowerupProbMulti() [2/2]

std::vector< float > & GameConfig::GetPowerupProbMulti ( )
inline
Returns
powerup_prob_multi.

◆ GetPlayAllGems()

int GameConfig::GetPlayAllGems ( ) const
inline
Returns
play_all_gems.

◆ SetPlayAllGems()

void GameConfig::SetPlayAllGems ( int nPlayAllGems)
inline
Parameters
nPlayAllGemsplay_all_gems.

◆ GetPhraseScale()

int GameConfig::GetPhraseScale ( ) const
inline
Returns
phrase_scale of points.

◆ GetNoDeactivate()

int GameConfig::GetNoDeactivate ( ) const
inline
Returns
Set by the set_no_deactivate command.

◆ SetNoDeactivate()

void GameConfig::SetNoDeactivate ( int nNoDeactivate)
inline
Parameters
nNoDeactivateSet by the set_no_deactivate command.

◆ GetNoCapture()

int GameConfig::GetNoCapture ( ) const
inline
Returns
no_capture.

◆ SetNoCapture()

void GameConfig::SetNoCapture ( int nNoCapture)
inline
Parameters
nNoCaptureno_capture.

◆ GetMultiplierValue()

int GameConfig::GetMultiplierValue ( ) const
inline
Returns
multiplier_value.

◆ GetMultiplierDurationBars()

int GameConfig::GetMultiplierDurationBars ( ) const
inline
Returns
multiplier_duration_bars.

◆ GetJuiceMeterMax()

float GameConfig::GetJuiceMeterMax ( ) const
inline
Returns
juice_meter_max.

◆ GetInitialJuice() [1/2]

const std::vector< float > & GameConfig::GetInitialJuice ( ) const
inline
Returns
initial_juice, by skill level.

◆ GetInitialJuice() [2/2]

std::vector< float > & GameConfig::GetInitialJuice ( )
inline
Returns
initial_juice, by skill level.

◆ GetGuideTicks()

int GameConfig::GetGuideTicks ( ) const
inline
Returns
guide_ticks.

◆ SetGuideTicks()

void GameConfig::SetGuideTicks ( int nGuideTicks)
inline
Parameters
nGuideTicksguide_ticks.

◆ GetGemPoints()

const std::vector< GemPointValue > & GameConfig::GetGemPoints ( ) const
inline
Returns
gem of points, in order.

◆ GetFreestylePoints() [1/2]

const std::vector< int > & GameConfig::GetFreestylePoints ( ) const
inline
Returns
freestyle of points.

◆ GetFreestylePoints() [2/2]

std::vector< int > & GameConfig::GetFreestylePoints ( )
inline
Returns
freestyle of points.

◆ GetFreestyleDurationBarsSolo()

int GameConfig::GetFreestyleDurationBarsSolo ( ) const
inline
Returns
freestyle_duration_bars_solo.

◆ GetFreestyleDurationBarsMultiNet()

int GameConfig::GetFreestyleDurationBarsMultiNet ( ) const
inline
Returns
freestyle_duration_bars_multi_net.

◆ GetForceFeedbackEnabled()

int GameConfig::GetForceFeedbackEnabled ( ) const
inline
Returns
force_feedback_enabled.

◆ GetFakeInput()

int GameConfig::GetFakeInput ( ) const
inline
Returns
fake_input, toggled by the autopilot command.

◆ GetCripplerDurationBars()

int GameConfig::GetCripplerDurationBars ( ) const
inline
Returns
crippler_duration_bars.

◆ GetCheckpointBars()

int GameConfig::GetCheckpointBars ( ) const
inline
Returns
checkpoint_bars.

◆ GetCaptureJuice() [1/2]

const std::vector< float > & GameConfig::GetCaptureJuice ( ) const
inline
Returns
capture_juice, by skill level.

◆ GetCaptureJuice() [2/2]

std::vector< float > & GameConfig::GetCaptureJuice ( )
inline
Returns
capture_juice, by skill level.

◆ GetBeatLeadMs()

int GameConfig::GetBeatLeadMs ( ) const
inline
Returns
beat_lead_ms.

◆ GetBeatDurationMs()

int GameConfig::GetBeatDurationMs ( ) const
inline
Returns
beat_duration_ms.

◆ GetBarsPerCapture() [1/2]

const std::vector< float > & GameConfig::GetBarsPerCapture ( ) const
inline
Returns
bars_per_capture, by skill level.

◆ GetBarsPerCapture() [2/2]

std::vector< float > & GameConfig::GetBarsPerCapture ( )
inline
Returns
bars_per_capture, by skill level.

◆ GetBarCaptureThreshold()

int GameConfig::GetBarCaptureThreshold ( ) const
inline
Returns
bar_capture_threshold.

◆ GetAxeSoftFxVolume()

float GameConfig::GetAxeSoftFxVolume ( ) const
inline
Returns
axe_softfx_volume.

◆ GetAutocatcherPoints() [1/2]

const std::vector< int > & GameConfig::GetAutocatcherPoints ( ) const
inline
Returns
autocatcher of points.

◆ GetAutocatcherPoints() [2/2]

std::vector< int > & GameConfig::GetAutocatcherPoints ( )
inline
Returns
autocatcher of points.

◆ GetPlayFromFile()

const char * GameConfig::GetPlayFromFile ( ) const
inline
Returns
play_from_file, or null.

◆ GetRecordToFile()

const char * GameConfig::GetRecordToFile ( ) const
inline
Returns
record_to_file, or null.

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