diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-11 04:07:58 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-11 04:07:58 +0100 |
commit | be5ca3208891a8d45cbb7f9c25905f46332572a0 (patch) | |
tree | 04d89404a2aecb26f0dc2299bffdfba4f5eb8df3 /src | |
parent | eaa6c76bd92e292ac59dcfa0a7aa70cd1e2f50fb (diff) |
w
Diffstat (limited to 'src')
-rw-r--r-- | src/chunk-collision.cpp | 2 | ||||
-rw-r--r-- | src/tile-atlas.hpp | 2 | ||||
-rw-r--r-- | src/wall-atlas.cpp | 2 | ||||
-rw-r--r-- | src/wall-atlas.hpp | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/src/chunk-collision.cpp b/src/chunk-collision.cpp index 611754bc..ed6a23d2 100644 --- a/src/chunk-collision.cpp +++ b/src/chunk-collision.cpp @@ -44,7 +44,7 @@ void chunk::ensure_passability() noexcept if (const auto* atlas = ground_atlas_at(i)) { auto [min, max] = whole_tile(i); - auto id = make_id(collision_type::geometry, atlas->pass_mode(pass_mode::pass), i+1); + auto id = make_id(collision_type::geometry, atlas->pass_mode(), i+1); _rtree.Insert(min.data(), max.data(), id); } } diff --git a/src/tile-atlas.hpp b/src/tile-atlas.hpp index 347da166..4f837cf1 100644 --- a/src/tile-atlas.hpp +++ b/src/tile-atlas.hpp @@ -37,6 +37,8 @@ public: GL::Texture2D& texture() { return tex_; } StringView name() const { return name_; } enum pass_mode pass_mode() const; + + static constexpr enum pass_mode default_pass_mode = pass_mode::pass; }; diff --git a/src/wall-atlas.cpp b/src/wall-atlas.cpp index 8e6bd13c..3ee14f1e 100644 --- a/src/wall-atlas.cpp +++ b/src/wall-atlas.cpp @@ -58,7 +58,7 @@ wall_atlas::wall_atlas(wall_atlas_def def, String path, const ImageView2D& img) _image_size{get_image_size(img)}, _direction_map{def.direction_map} { - fm_soft_assert(!def.frames.empty()); + fm_soft_assert(!_frame_array.empty()); { bool found = false; diff --git a/src/wall-atlas.hpp b/src/wall-atlas.hpp index b73704fe..c2da82f9 100644 --- a/src/wall-atlas.hpp +++ b/src/wall-atlas.hpp @@ -114,7 +114,7 @@ class wall_atlas final Info _info; String _path; Vector2ui _image_size; - GL::Texture2D _texture{NoCreate}; + GL::Texture2D _texture; std::array<DirArrayIndex, Wall::Direction_COUNT> _direction_map; Direction* get_Direction(Direction_ num) const; |