diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-11 04:17:02 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-11 04:17:02 +0100 |
commit | d4ab3ea68b47ecb0413c1d31a27d7cd57202ac28 (patch) | |
tree | 2f0e4845dcfd05df265627d5d3eb4e910549d6e2 | |
parent | be5ca3208891a8d45cbb7f9c25905f46332572a0 (diff) |
w
-rw-r--r-- | src/wall-atlas.hpp | 2 | ||||
-rw-r--r-- | test/json/wall-atlas-02_groups.json | 12 | ||||
-rw-r--r-- | test/main.cpp | 4 | ||||
-rw-r--r-- | test/wall-atlas.cpp | 17 |
4 files changed, 15 insertions, 20 deletions
diff --git a/src/wall-atlas.hpp b/src/wall-atlas.hpp index c2da82f9..0e2a6e1e 100644 --- a/src/wall-atlas.hpp +++ b/src/wall-atlas.hpp @@ -42,7 +42,7 @@ struct Direction using memfn_ptr = Group Direction::*; struct member_tuple { StringView name; memfn_ptr member; Group_ tag; }; - Group wall{}, overlay{}, side{}, top{}; + Group wall{}, side{}, top{}; Group corner_L{}, corner_R{}; const Group& group(Group_ i) const; diff --git a/test/json/wall-atlas-02_groups.json b/test/json/wall-atlas-02_groups.json index 738f9761..ae187167 100644 --- a/test/json/wall-atlas-02_groups.json +++ b/test/json/wall-atlas-02_groups.json @@ -27,7 +27,11 @@ "w": { "wall": { "offset": 0, - "count": 1 + "count": 1, + "pixel-size": "42 x 192", + "tint-mult": [ 0.125, 0.25, 0.5, 1 ], + "tint-add": [ 1, 2, 3 ], + "mirrored": true }, "side": { "pixel-size": "42 x 192" @@ -37,12 +41,6 @@ "offset": 1, "count": 2 }, - "overlay": { - "pixel-size": "42 x 192", - "tint-mult": [ 0.125, 0.25, 0.5, 1 ], - "tint-add": [ 1, 2, 3 ], - "mirrored": true - }, "corner-L": { "from-rotation": "n" } } } diff --git a/test/main.cpp b/test/main.cpp index 973609f6..93652102 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -28,13 +28,13 @@ int test_app::exec() test_entity(); test_loader(); test_bitmask(); + test_wall_atlas(); + test_wall_atlas2(); test_serializer_1(); test_serializer_2(); test_math(); test_hash(); - test_wall_atlas(); test_scenery(); - test_wall_atlas2(); test_path_search_node_pool(); test_path_search(); test_dijkstra(); diff --git a/test/wall-atlas.cpp b/test/wall-atlas.cpp index 14196b8c..a1c12d96 100644 --- a/test/wall-atlas.cpp +++ b/test/wall-atlas.cpp @@ -40,7 +40,6 @@ void test_read_header(StringView filename) void test_read_groups(StringView filename) { - constexpr Group group_defaults; const auto path = Path::join(json_path(), filename); const auto jroot = json_helper::from_json_(path); @@ -58,15 +57,13 @@ void test_read_groups(StringView filename) const auto dir = read_direction_metadata(jroot, Direction_::W); fm_assert(is_direction_defined(dir)); - fm_assert(dir.wall.pixel_size == Vector2ui{} ); - fm_assert(dir.overlay.default_tint == false ); - fm_assert(dir.wall.mirrored == false ); - fm_assert(dir.side.pixel_size == Vector2ui{42, 192} ); - fm_assert(dir.side.default_tint == true ); - fm_assert(dir.top.default_tint == true ); - fm_assert(dir.overlay.tint_mult == Vector4{0.125f, 0.25f, 0.5f, 1.f } ); - fm_assert(dir.overlay.tint_add == Vector3{1, 2, 3} ); - fm_assert(dir.overlay.mirrored == true ); + fm_assert(dir.wall.pixel_size == Vector2ui{42, 192} ); + fm_assert(dir.wall.tint_mult == Vector4{0.125f, 0.25f, 0.5f, 1.f } ); + fm_assert(dir.wall.tint_add == Vector3{1, 2, 3} ); + fm_assert(dir.wall.mirrored == true ); + fm_assert(dir.side.pixel_size == Vector2ui{42, 192} ); + fm_assert(dir.side.default_tint == true ); + fm_assert(dir.top.default_tint == true ); const auto atlas2 = wall_atlas_def::deserialize(path); fm_assert(atlas2.header == info); |