Renamed path to dir where appropriate

This commit is contained in:
korenkonder
2024-05-05 14:59:38 +03:00
parent 09eea1b4e5
commit 91a4b76be1
76 changed files with 444 additions and 265 deletions
+4 -5
View File
@@ -216,19 +216,18 @@ void sprite_database_file::write(void** data, size_t* size) {
s.copy(data, size);
}
bool sprite_database_file::load_file(void* data, const char* path, const char* file, uint32_t hash) {
bool sprite_database_file::load_file(void* data, const char* dir, const char* file, uint32_t hash) {
size_t file_len = utf8_length(file);
const char* t = strrchr(file, '.');
if (t)
file_len = t - file;
std::string s;
s.assign(path);
s.append(file, file_len);
std::string path(dir);
path.append(file, file_len);
sprite_database_file* spr_db = (sprite_database_file*)data;
spr_db->read(s.c_str(), spr_db->modern);
spr_db->read(path.c_str(), spr_db->modern);
return spr_db->ready;
}