blob: c5889b04e12f7ded19fa8b4616d33efded8c74bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#pragma once
#include "scenery-type.hpp"
#include "object.hpp"
#include <variant>
namespace floormat {
struct generic_scenery_proto
{
bool active : 1 = false;
bool interactive : 1 = false;
bool operator==(const generic_scenery_proto& p) const;
static enum scenery_type scenery_type();
};
struct door_scenery_proto
{
bool active : 1 = false;
bool interactive : 1 = true;
bool closing : 1 = false;
bool operator==(const door_scenery_proto& p) const;
static enum scenery_type scenery_type();
};
using scenery_proto_variants = std::variant<std::monostate, generic_scenery_proto, door_scenery_proto>;
struct scenery_proto : object_proto
{
scenery_proto_variants subtype; // todo! add std::monostate
scenery_proto() noexcept;
~scenery_proto() noexcept override;
explicit operator bool() const;
bool operator==(const object_proto& proto) const override;
enum scenery_type scenery_type() const;
scenery_proto(const scenery_proto&) noexcept;
scenery_proto& operator=(const scenery_proto&) noexcept;
scenery_proto(scenery_proto&&) noexcept;
scenery_proto& operator=(scenery_proto&&) noexcept;
};
} // namespace floormat
|