diff options
author | Florian Kothmeier <floriankothmeier@web.de> | 2019-09-23 22:41:25 +0200 |
---|---|---|
committer | Florian Kothmeier <floriankothmeier@web.de> | 2019-09-25 15:29:59 +0200 |
commit | aae25abf3080283bbff29b8264f24d37f935922a (patch) | |
tree | dc1d35e5d2aa8d7816a8b4fb55bd05ad37d54c2b /core/io/file_access_pack.h | |
parent | 0ea54eeb0672c405d7ad0edf8444f0d86158f8b6 (diff) |
Add flag to control the replacement of files by ProjectSettings.load_resource_pack
Diffstat (limited to 'core/io/file_access_pack.h')
-rw-r--r-- | core/io/file_access_pack.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h index a21dd7d22d..8c34069f3a 100644 --- a/core/io/file_access_pack.h +++ b/core/io/file_access_pack.h @@ -102,13 +102,13 @@ private: public: void add_pack_source(PackSource *p_source); - void add_path(const String &pkg_path, const String &path, uint64_t ofs, uint64_t size, const uint8_t *p_md5, PackSource *p_src); // for PackSource + void add_path(const String &pkg_path, const String &path, uint64_t ofs, uint64_t size, const uint8_t *p_md5, PackSource *p_src, bool p_replace_files); // for PackSource void set_disabled(bool p_disabled) { disabled = p_disabled; } _FORCE_INLINE_ bool is_disabled() const { return disabled; } static PackedData *get_singleton() { return singleton; } - Error add_pack(const String &p_path); + Error add_pack(const String &p_path, bool p_replace_files); _FORCE_INLINE_ FileAccess *try_open_path(const String &p_path); _FORCE_INLINE_ bool has_path(const String &p_path); @@ -120,7 +120,7 @@ public: class PackSource { public: - virtual bool try_open_pack(const String &p_path) = 0; + virtual bool try_open_pack(const String &p_path, bool p_replace_files) = 0; virtual FileAccess *get_file(const String &p_path, PackedData::PackedFile *p_file) = 0; virtual ~PackSource() {} }; @@ -128,7 +128,7 @@ public: class PackedSourcePCK : public PackSource { public: - virtual bool try_open_pack(const String &p_path); + virtual bool try_open_pack(const String &p_path, bool p_replace_files); virtual FileAccess *get_file(const String &p_path, PackedData::PackedFile *p_file); }; |