diff options
Diffstat (limited to 'loader/loader.hpp')
-rw-r--r-- | loader/loader.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/loader/loader.hpp b/loader/loader.hpp index 51a15b14..be132751 100644 --- a/loader/loader.hpp +++ b/loader/loader.hpp @@ -28,12 +28,17 @@ struct vobj_info final std::shared_ptr<anim_atlas> atlas; }; +enum class loader_policy : uint8_t +{ + error, warn, ignore, DEFAULT = error, +}; + struct loader_ { virtual StringView shader(StringView filename) noexcept = 0; virtual Trade::ImageData2D texture(StringView prefix, StringView filename) noexcept(false) = 0; virtual std::shared_ptr<class ground_atlas> get_ground_atlas(StringView name, Vector2ub size, pass_mode pass) noexcept(false) = 0; - virtual std::shared_ptr<class ground_atlas> ground_atlas(StringView filename, bool fail_ok = false) noexcept(false) = 0; + virtual std::shared_ptr<class ground_atlas> ground_atlas(StringView filename, loader_policy policy = loader_policy::DEFAULT) noexcept(false) = 0; virtual ArrayView<const String> anim_atlas_list() = 0; virtual std::shared_ptr<class anim_atlas> anim_atlas(StringView name, StringView dir = ANIM_PATH) noexcept(false) = 0; virtual std::shared_ptr<class wall_atlas> wall_atlas(StringView name, bool fail_ok = false) noexcept(false) = 0; |