diff options
-rw-r--r-- | editor/app.hpp | 1 | ||||
-rw-r--r-- | src/wall-atlas.cpp | 8 | ||||
-rw-r--r-- | test/wall-atlas2.cpp | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/editor/app.hpp b/editor/app.hpp index e40f5f2d..0d056558 100644 --- a/editor/app.hpp +++ b/editor/app.hpp @@ -22,7 +22,6 @@ namespace floormat { struct chunk; struct floormat_main; class tile_atlas; -class tile_editor; struct fm_settings; class anim_atlas; struct critter; diff --git a/src/wall-atlas.cpp b/src/wall-atlas.cpp index 443ebd92..2a3cc07b 100644 --- a/src/wall-atlas.cpp +++ b/src/wall-atlas.cpp @@ -9,6 +9,8 @@ namespace floormat { +using namespace floormat::Wall; + namespace { Vector2ui get_image_size(const ImageView2D& img) @@ -136,7 +138,7 @@ auto wall_atlas::group(size_t dir, Group_ gr) const -> const Group* { return gro auto wall_atlas::group(size_t dir, size_t group) const -> const Group* { - fm_assert(group < (size_t)Group_::COUNT); + fm_assert(group < Group_COUNT); const auto* const set_ = direction(dir); if (!set_) return {}; @@ -222,8 +224,8 @@ Group& Direction::group(size_t i) bool Frame::operator==(const Frame&) const noexcept = default; bool Direction::operator==(const Direction&) const noexcept = default; -bool Info::operator==(const floormat::Wall::Info&) const noexcept = default; -bool DirArrayIndex::operator==(const floormat::Wall::DirArrayIndex&) const noexcept = default; +bool Info::operator==(const Info&) const noexcept = default; +bool DirArrayIndex::operator==(const DirArrayIndex&) const noexcept = default; #if 1 bool Group::operator==(const Group&) const noexcept = default; diff --git a/test/wall-atlas2.cpp b/test/wall-atlas2.cpp index c06bc496..b95b1761 100644 --- a/test/wall-atlas2.cpp +++ b/test/wall-atlas2.cpp @@ -1,5 +1,6 @@ #include "app.hpp" #include "compat/assert.hpp" +#include "src/tile-defs.hpp" #include "src/wall-atlas.hpp" #include "loader/loader.hpp" #include "loader/wall-info.hpp" @@ -22,6 +23,7 @@ void test_app::test_wall_atlas2() fm_assert(&a.calc_direction(N) == a.direction(N)); fm_assert(a.frames(N, Wall::Group_::wall).size() >= 3); fm_assert(a.group(N, Wall::Group_::top)->is_defined); + fm_assert(a.frames(N, Wall::Group_::wall)[0].size == Vector2ui(Vector2i{iTILE_SIZE.x(), iTILE_SIZE.z()})); Debug{} << "test_wall2: end"; } |