mirror of
https://github.com/edo9300/edopro
synced 2026-08-23 22:26:05 -04:00
Slightly cleaner code and fixes an issue when using sdl mixer audio backend and sdl device in irrlicht, where irrlicht's device was being terminated before the audio backend, thus calling SDL_Quit before the audio backend could do its cleanup
41 lines
932 B
C++
41 lines
932 B
C++
#ifndef DATA_LOADER_H
|
|
#define DATA_LOADER_H
|
|
#include <memory>
|
|
#include "image_downloader.h"
|
|
#include "repo_manager.h"
|
|
#include "game_config.h"
|
|
#include "sound_manager.h"
|
|
#include "data_manager.h"
|
|
#include "deck_manager.h"
|
|
|
|
namespace irr {
|
|
class IrrlichtDevice;
|
|
namespace io {
|
|
class IFileSystem;
|
|
}
|
|
}
|
|
|
|
namespace ygo {
|
|
|
|
class DataHandler {
|
|
irr::io::IFileSystem* filesystem{ nullptr };
|
|
void LoadDatabases();
|
|
void LoadZipArchives();
|
|
void LoadArchivesDB();
|
|
void LoadPicUrls();
|
|
|
|
public:
|
|
DataHandler();
|
|
~DataHandler();
|
|
std::shared_ptr<irr::IrrlichtDevice> tmp_device{ nullptr };
|
|
std::unique_ptr<DeckManager> deckManager{ nullptr };
|
|
std::unique_ptr<RepoManager> gitManager{ nullptr };
|
|
std::unique_ptr<GameConfig> configs{ nullptr };
|
|
std::unique_ptr<SoundManager> sounds{ nullptr };
|
|
std::unique_ptr<DataManager> dataManager{ nullptr };
|
|
std::unique_ptr<ImageDownloader> imageDownloader{ nullptr };
|
|
};
|
|
}
|
|
|
|
|
|
#endif // DATA_LOADER_H
|