Soundux/src/core/global/globals.hpp

24 lines
723 B
C++
Raw Normal View History

2021-01-27 12:38:03 +01:00
#pragma once
#include "../../helper/audio/audio.hpp"
2021-01-28 18:16:23 +01:00
#include "../../helper/events/eventhandler.hpp"
2021-01-27 12:38:03 +01:00
#include "../../ui/ui.hpp"
#include "../config/config.hpp"
2021-01-28 18:16:23 +01:00
#include "objects.hpp"
2021-01-27 12:38:03 +01:00
#include <memory>
namespace Soundux
{
namespace Globals
{
inline Objects::Data gData;
inline Objects::Audio gAudio;
2021-01-27 12:38:03 +01:00
inline Objects::Config gConfig;
inline Objects::Settings gSettings;
2021-01-28 18:16:23 +01:00
inline Objects::EventHandler gEvents;
2021-01-27 12:38:03 +01:00
inline std::shared_ptr<Objects::Window> gGui;
/* Allows for fast & easy sound access, is populated on start up */
inline std::map<std::uint32_t, std::reference_wrapper<Objects::Sound>> gSounds;
} // namespace Globals
} // namespace Soundux