blob: 620fb51e4515c16a75c8ed25306a25bb8f637172 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "scenery.hpp"
namespace floormat {
scenery_proto::operator bool() const noexcept { return atlas != nullptr; }
scenery_ref::scenery_ref(std::shared_ptr<anim_atlas>& atlas, scenery& frame) noexcept : atlas{atlas}, frame{frame} {}
scenery_ref::scenery_ref(const scenery_ref&) noexcept = default;
scenery_ref::scenery_ref(scenery_ref&&) noexcept = default;
scenery_ref& scenery_ref::operator=(const scenery_proto& proto) noexcept
{
atlas = proto.atlas;
frame = proto.frame;
return *this;
}
scenery_ref::operator scenery_proto() const noexcept { return { atlas, frame }; }
scenery_ref::operator bool() const noexcept { return atlas != nullptr; };
} // namespace floormat
|