mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-08 18:36:00 +03:00
27 lines
725 B
C++
27 lines
725 B
C++
#include "db/Db.hpp"
|
|
#include "db/WowClientDB_Base.hpp"
|
|
|
|
WowClientDB<AchievementRec> g_achievementDB;
|
|
WowClientDB<Cfg_CategoriesRec> g_cfg_CategoriesDB;
|
|
WowClientDB<Cfg_ConfigsRec> g_cfg_ConfigsDB;
|
|
WowClientDB<ChrRacesRec> g_chrRacesDB;
|
|
|
|
void LoadDB(WowClientDB_Base* db, const char* filename, int32_t linenumber) {
|
|
db->Load(filename, linenumber);
|
|
};
|
|
|
|
void StaticDBLoadAll(void (*loadFn)(WowClientDB_Base*, const char*, int32_t)) {
|
|
loadFn(&g_achievementDB, __FILE__, __LINE__);
|
|
loadFn(&g_cfg_CategoriesDB, __FILE__, __LINE__);
|
|
loadFn(&g_cfg_ConfigsDB, __FILE__, __LINE__);
|
|
loadFn(&g_chrRacesDB, __FILE__, __LINE__);
|
|
};
|
|
|
|
void ClientDBInitialize() {
|
|
// TODO
|
|
|
|
StaticDBLoadAll(LoadDB);
|
|
|
|
// TODO
|
|
}
|