7namespace core {
class GameDatabase; }
9#define GAMEDIRECTORY core::Game::instance().folder()
10#define GAMEDATABASE core::Game::instance().database()
24 static Game s_instance;
29 void init(std::unique_ptr<core::GameFolder>
folder, std::unique_ptr<core::GameDatabase> db);
35 void addCustomFiles(
const std::string& path,
bool bypassOriginalFiles);
51 std::unique_ptr<core::GameDatabase>
m_db;
Abstract base for game data folder backends (CASC, loose files, etc.).
Singleton entry point for the game data layer.
std::unique_ptr< core::GameFolder > m_folder
std::string m_configFolder
static Game & instance()
Access the singleton instance (Meyers singleton).
Game(const Game &)=delete
std::unique_ptr< core::GameDatabase > m_db
Game & operator=(const Game &)=delete
core::GameFolder & folder()
bool initDone()
True once both the folder and database have been set.
void init(std::unique_ptr< core::GameFolder > folder, std::unique_ptr< core::GameDatabase > db)
Initialise with the given folder and database backends.
core::GameDatabase & database()
void setConfigFolder(const std::string &folder)
std::string configFolder()
void addCustomFiles(const std::string &path, bool bypassOriginalFiles)
Overlay custom loose files on top of the game archive.
Common string utility functions (split, case-insensitive search, etc.).