Cytopia  0.3
A city building simulation game
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AudioConfig.hxx
Go to the documentation of this file.
1 #ifndef AUDIO_CONFIG_HXX
2 #define AUDIO_CONFIG_HXX
3 
4 #include "Soundtrack.hxx"
5 
6 #include <unordered_map>
7 #include <vector>
8 #include <betterEnums.hxx>
9 #include <json.hxx>
10 
11 using nlohmann::json;
12 
13 template <typename Key, typename Value> using Mapping = std::unordered_map<Key, Value>;
14 using string = std::string;
15 template <typename Type> using Vector = std::vector<Type>;
16 
20 BETTER_ENUM(AudioTrigger, int, MainMenu, MainTheme, NatureSounds);
21 
23 {
25  {
27  string monoFilePath;
29  };
32 };
33 
34 void from_json(const json &j, AudioConfig &config);
36 
37 #endif
AudioConfig
Definition: AudioConfig.hxx:22
BETTER_ENUM
BETTER_ENUM(AudioTrigger, int, MainMenu, MainTheme, NatureSounds)
the types of triggers
AudioConfig::SoundtrackConfiguration::stereoFilePath
string stereoFilePath
Definition: AudioConfig.hxx:26
Vector
std::vector< Type > Vector
Definition: AudioConfig.hxx:15
Soundtrack.hxx
Mapping
std::unordered_map< Key, Value > Mapping
Definition: AudioConfig.hxx:13
AudioConfig::SoundtrackConfiguration::triggers
Vector< AudioTrigger > triggers
Definition: AudioConfig.hxx:28
from_json
void from_json(const json &j, AudioConfig &config)
Definition: AudioConfig.cxx:3
AudioConfig::SoundtrackConfiguration
Definition: AudioConfig.hxx:24
AudioConfig::Sound
Mapping< string, SoundtrackConfiguration > Sound
Definition: AudioConfig.hxx:31
json
nlohmann::json json
Definition: Settings.hxx:12
string
std::string string
Definition: AudioConfig.hxx:14
AudioConfig::Music
Mapping< string, SoundtrackConfiguration > Music
Definition: AudioConfig.hxx:30
AudioConfig::SoundtrackConfiguration::monoFilePath
string monoFilePath
Definition: AudioConfig.hxx:27