OpenXcom  1.0
Open-source clone of the original X-Com
Public Member Functions | List of all members
OpenXcom::RuleMusic Class Reference

Public Member Functions

 RuleMusic (const std::string &type)
 initialize catpos as int_max to prevent trying to load files from cats that don't exist, but allow for optional music to be listed regardless for loading .ogg or .mp3 versions of said files, should they be present. More...
 
void load (const YAML::Node &node)
 Loads info about the music track. More...
 
int getCatPos () const
 Gets the track's index in the catalog file. More...
 
float getNormalization () const
 Gets the track's normalization level. More...
 

Constructor & Destructor Documentation

◆ RuleMusic()

OpenXcom::RuleMusic::RuleMusic ( const std::string &  type)

initialize catpos as int_max to prevent trying to load files from cats that don't exist, but allow for optional music to be listed regardless for loading .ogg or .mp3 versions of said files, should they be present.

default normalization value is 0.76, this only applies to the adlib mixer as far as i know. also, 0.76 is roughly optimal for all the TFTD tracks.

Parameters
typeString defining the type.

Member Function Documentation

◆ getCatPos()

int OpenXcom::RuleMusic::getCatPos ( ) const

Gets the track's index in the catalog file.

Returns
the track's index in the file.

◆ getNormalization()

float OpenXcom::RuleMusic::getNormalization ( ) const

Gets the track's normalization level.

Returns
the track's normalization value.

◆ load()

void OpenXcom::RuleMusic::load ( const YAML::Node &  node)

Loads info about the music track.

Parameters
nodeyaml node to read from.

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