Master volume init values depends on configfile.

This commit is contained in:
Stiffly
2015-10-15 14:03:06 +02:00
parent 00f804a5f3
commit e719a342f2
3 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ public:
m_FrameStack->Width = 675;
m_FrameStack->Height = 1080;
if (ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<int, 0>("Debug.SkipStory") == 1) {
if (ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<int>("Debug.SkipStory", 0) == 1) {
Events::GameStart e;
m_EventBroker->Publish(e);
auto hud = new GUI::HUD(m_FrameStack, "HUD");
+1
View File
@@ -8,6 +8,7 @@
#include "Core/World.h"
#include "Core/EventBroker.h"
#include "Core/ResourceManager.h"
#include "Core/ConfigFile.h"
#include "Sound.h"
#include "Sound/EPlaySound.h"
#include "Sound/EStopSound.h"
+3
View File
@@ -27,6 +27,9 @@ void dd::Systems::SoundSystem::Initialize()
EVENT_SUBSCRIBE_MEMBER(m_EStopSound, &SoundSystem::OnStopSound);
EVENT_SUBSCRIBE_MEMBER(m_EMasterVolume, &SoundSystem::OnMasterVolume);
m_SFXMasterVolume = ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<float>("Audio.SFXVolume", 1.f);
m_BGMMasterVolume = ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<float>("Audio.BGMVolume", 1.f);
//Todo: Move this
{
dd::Events::PlaySound e;