diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-01 16:35:03 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-01 16:35:03 +0100 |
commit | 704e9bd3ac58484a5209e186798076f1cbd432ef (patch) | |
tree | 511479ebd088d5c9524803c6f3fe4641009b58bc /src/tile.hpp | |
parent | 7ff1f0911e0b0c314d6e639887b705d6fc0d78aa (diff) |
wip
Diffstat (limited to 'src/tile.hpp')
-rw-r--r-- | src/tile.hpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/tile.hpp b/src/tile.hpp index 4bfeb84a..8061035f 100644 --- a/src/tile.hpp +++ b/src/tile.hpp @@ -6,7 +6,8 @@ namespace floormat { struct chunk; -enum pass_mode : std::uint8_t { pass_ok, pass_blocked, pass_shoot_through, }; +// zero is the default, see bitset in chunk.hpp +enum pass_mode : std::uint8_t { pass_shoot_through, pass_ok, pass_blocked, }; struct pass_mode_ref final { @@ -26,6 +27,10 @@ struct tile_proto final std::uint16_t ground_variant = 0xffff, wall_north_variant = 0xffff, wall_west_variant = 0xffff; pass_mode pass_mode = pass_mode::pass_shoot_through; + tile_image_proto ground_image() const noexcept; + tile_image_proto wall_north_image() const noexcept; + tile_image_proto wall_west_image() const noexcept; + friend bool operator==(const tile_proto& a, const tile_proto& b) noexcept; }; @@ -41,6 +46,14 @@ struct tile_ref final tile_image_proto wall_north() const noexcept; tile_image_proto wall_west() const noexcept; + std::shared_ptr<tile_atlas> ground_atlas() noexcept; + std::shared_ptr<tile_atlas> wall_north_atlas() noexcept; + std::shared_ptr<tile_atlas> wall_west_atlas() noexcept; + + std::shared_ptr<const tile_atlas> ground_atlas() const noexcept; + std::shared_ptr<const tile_atlas> wall_north_atlas() const noexcept; + std::shared_ptr<const tile_atlas> wall_west_atlas() const noexcept; + pass_mode_ref pass_mode() noexcept; enum pass_mode pass_mode() const noexcept; |