MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / write_v2_import_metadata

Method write_v2_import_metadata

compat/resource_compat_binary.cpp:3384–3404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3382}
3383//
3384Error ResourceFormatSaverCompatBinaryInstance::write_v2_import_metadata(Ref<FileAccess> f, Ref<ResourceImportMetadatav2> p_imd, HashMap<Ref<Resource>, int> &p_resource_map) {
3385 uint64_t md_pos = f->get_position();
3386 save_unicode_string(f, p_imd->get_editor());
3387 f->store_32(p_imd->get_source_count());
3388 for (int i = 0; i < p_imd->get_source_count(); i++) {
3389 save_unicode_string(f, p_imd->get_source_path(i));
3390 save_unicode_string(f, p_imd->get_source_md5(i));
3391 }
3392 List<String> options;
3393 p_imd->get_options(&options);
3394 f->store_32(options.size());
3395 for (List<String>::Element *E = options.front(); E; E = E->next()) {
3396 save_unicode_string(f, E->get());
3397 write_variant(f, p_imd->get_option(E->get()), p_resource_map, external_resources, string_map);
3398 }
3399
3400 f->seek(md_at);
3401 f->store_64(md_pos);
3402 f->seek_end();
3403 return OK;
3404}
3405
3406void ResourceLoaderCompatBinary::check_suspect_version() {
3407 // Redot switched to using the year as the major version

Callers 1

Calls 13

get_editorMethod · 0.80
get_source_countMethod · 0.80
get_optionsMethod · 0.80
frontMethod · 0.80
nextMethod · 0.80
get_optionMethod · 0.80
get_positionMethod · 0.45
get_source_pathMethod · 0.45
get_source_md5Method · 0.45
sizeMethod · 0.45
getMethod · 0.45
seekMethod · 0.45

Tested by

no test coverage detected