summaryrefslogtreecommitdiffhomepage
path: root/src/tile.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tile.hpp')
-rw-r--r--src/tile.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tile.hpp b/src/tile.hpp
index b7bacc8d..6fad4b30 100644
--- a/src/tile.hpp
+++ b/src/tile.hpp
@@ -1,10 +1,12 @@
#pragma once
#include "compat/defs.hpp"
#include "tile-image.hpp"
+#include "scenery.hpp"
namespace floormat {
struct chunk;
+struct anim_atlas;
// zero is the default, see bitset in chunk.hpp
enum pass_mode : std::uint8_t { pass_shoot_through, pass_ok, pass_blocked, };
@@ -24,12 +26,15 @@ private:
struct tile_proto final
{
std::shared_ptr<tile_atlas> ground_atlas, wall_north_atlas, wall_west_atlas;
+ std::shared_ptr<anim_atlas> scenery_atlas;
variant_t ground_variant = 0, wall_north_variant = 0, wall_west_variant = 0;
+ scenery scenery_frame;
enum 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;
+ scenery_proto scenery_image() const noexcept;
friend bool operator==(const tile_proto& a, const tile_proto& b) noexcept;
};
@@ -41,18 +46,22 @@ struct tile_ref final
tile_image_ref ground() noexcept;
tile_image_ref wall_north() noexcept;
tile_image_ref wall_west() noexcept;
+ scenery_ref scenery() noexcept;
tile_image_proto ground() const noexcept;
tile_image_proto wall_north() const noexcept;
tile_image_proto wall_west() const noexcept;
+ scenery_proto scenery() 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<anim_atlas> scenery_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;
+ std::shared_ptr<const anim_atlas> scenery_atlas() const noexcept;
pass_mode_ref pass_mode() noexcept;
enum pass_mode pass_mode() const noexcept;