1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

Add ability to export patch packs

Co-authored-by: Poq Xert <poqxert@poqxert.ru>
This commit is contained in:
Mikael Hermansson
2024-09-17 12:48:10 +02:00
parent 4254946de9
commit d3be030ea6
18 changed files with 619 additions and 20 deletions

View File

@@ -102,6 +102,22 @@ void PackedData::add_pack_source(PackSource *p_source) {
}
}
uint8_t *PackedData::get_file_hash(const String &p_path) {
PathMD5 pmd5(p_path.md5_buffer());
HashMap<PathMD5, PackedFile, PathMD5>::Iterator E = files.find(pmd5);
if (!E || E->value.offset == 0) {
return nullptr;
}
return E->value.md5;
}
void PackedData::clear() {
files.clear();
_free_packed_dirs(root);
root = memnew(PackedDir);
}
PackedData *PackedData::singleton = nullptr;
PackedData::PackedData() {