Auth 2D stuff

This commit is contained in:
korenkonder
2023-03-04 03:46:44 +03:00
parent bfc52a1729
commit cd53da270a
42 changed files with 7007 additions and 386 deletions
+13 -1
View File
@@ -60,6 +60,18 @@ void data_struct_load_db() {
data_struct* ds = &data_list[DATA_AFT];
data_ft* d = &ds->data_ft;
for (const std::string& i : mdata_manager_get()->GetPrefixes()) {
std::string file;
file.assign(i);
file.append("aet_db.bin");
aet_database_file aet_db_file;
aet_db_file.modern = false;
ds->load_file(&aet_db_file, "rom/2d/", file.c_str(),
aet_database_file::load_file);
d->aet_db.add(&aet_db_file);
}
for (const std::string& i : mdata_manager_get()->GetPrefixes()) {
std::string file;
file.assign(i);
@@ -563,7 +575,7 @@ bool data_struct::get_file(const char* dir, uint32_t hash, const char* ext, std:
}
bool data_struct::load_file(void* data, const char* path,
bool (*load_func)(void* data, const char* path, const char* file, uint32_t hash)) {
bool (*load_func)(void* data, const char* path, const char* file, uint32_t hash)) {
const char* t = strrchr(path, '/');
if (t) {
std::string dir = std::string(path, t - path + 1);