summaryrefslogtreecommitdiffstats
path: root/scene/resources/resource_format_text.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/resource_format_text.h')
-rw-r--r--scene/resources/resource_format_text.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/scene/resources/resource_format_text.h b/scene/resources/resource_format_text.h
index 02898ce984..41363fd975 100644
--- a/scene/resources/resource_format_text.h
+++ b/scene/resources/resource_format_text.h
@@ -54,6 +54,7 @@ class ResourceLoaderText {
};
bool is_scene = false;
+ int format_version;
String res_type;
bool ignore_resource_parsing = false;
@@ -139,17 +140,17 @@ public:
class ResourceFormatLoaderText : public ResourceFormatLoader {
public:
static ResourceFormatLoaderText *singleton;
- virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE);
- virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
- virtual void get_recognized_extensions(List<String> *p_extensions) const;
- virtual bool handles_type(const String &p_type) const;
- virtual void get_classes_used(const String &p_path, HashSet<StringName> *r_classes);
-
- virtual String get_resource_type(const String &p_path) const;
- virtual String get_resource_script_class(const String &p_path) const;
- virtual ResourceUID::ID get_resource_uid(const String &p_path) const;
- virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false);
- virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map);
+ virtual Ref<Resource> load(const String &p_path, const String &p_original_path = "", Error *r_error = nullptr, bool p_use_sub_threads = false, float *r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE) override;
+ virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const override;
+ virtual void get_recognized_extensions(List<String> *p_extensions) const override;
+ virtual bool handles_type(const String &p_type) const override;
+ virtual void get_classes_used(const String &p_path, HashSet<StringName> *r_classes) override;
+
+ virtual String get_resource_type(const String &p_path) const override;
+ virtual String get_resource_script_class(const String &p_path) const override;
+ virtual ResourceUID::ID get_resource_uid(const String &p_path) const override;
+ virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false) override;
+ virtual Error rename_dependencies(const String &p_path, const HashMap<String, String> &p_map) override;
static Error convert_file_to_binary(const String &p_src_path, const String &p_dst_path);
@@ -178,6 +179,7 @@ class ResourceFormatSaverTextInstance {
List<Ref<Resource>> saved_resources;
HashMap<Ref<Resource>, String> external_resources;
HashMap<Ref<Resource>, String> internal_resources;
+ bool use_compat = true;
struct ResourceSort {
Ref<Resource> resource;
@@ -199,10 +201,10 @@ public:
class ResourceFormatSaverText : public ResourceFormatSaver {
public:
static ResourceFormatSaverText *singleton;
- virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0);
- virtual Error set_uid(const String &p_path, ResourceUID::ID p_uid);
- virtual bool recognize(const Ref<Resource> &p_resource) const;
- virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const;
+ virtual Error save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags = 0) override;
+ virtual Error set_uid(const String &p_path, ResourceUID::ID p_uid) override;
+ virtual bool recognize(const Ref<Resource> &p_resource) const override;
+ virtual void get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const override;
ResourceFormatSaverText();
};