13#define BLOCK_PROPERTY_NONE 0U
14#define BLOCK_PROPERTY_SOLID 1U
15#define BLOCK_PROPERTY_OPAQUE 1U << 1
16#define BLOCK_PROPERTY_CUBE 1U << 2
17#define BLOCK_PROPERTY_LIGHT 1U << 3
18#define BLOCK_PROPERTY_FLUID 1U << 4
21#define BLOCK_FACE_TOP 0
22#define BLOCK_FACE_BOTTOM 1
23#define BLOCK_FACE_RIGHT 2
24#define BLOCK_FACE_LEFT 3
25#define BLOCK_FACE_FRONT 4
26#define BLOCK_FACE_BACK 5
56 "assets/textures/block/grass_top.png",
57 "assets/textures/block/grass_top.png",
58 "assets/textures/block/grass_side.png",
59 "assets/textures/block/dirt.png",
60 "assets/textures/block/stone.png",
61 "assets/textures/block/water.png",
62 "assets/textures/block/glass_clear.png",
63 "assets/textures/block/light.png",
64 "assets/textures/block/wood_top.png",
65 "assets/textures/block/wood.png",
66 "assets/textures/block/oak_leaves.png",
67 "assets/textures/block/sand.png"
92 return m_infos[
static_cast<size_t>(id)];
97 return (
get(
id).properties & properties) == properties;
102 return (
get(
id).properties & (properties | not_properties)) == properties;
107 std::vector<BlockInfo> m_infos;
BlockInfo::Type BlockType
Definition: Block.hpp:78
uint64_t BlockProperties
Definition: Block.hpp:9
BlocksInfo & g_blocks_info
Definition: Block.cpp:3
uint32_t TextureID
Definition: Block.hpp:10
const HitBox hitbox
Definition: Block.hpp:50
static const std::vector< std::string > texture_names
Definition: Block.hpp:55
Type
Definition: Block.hpp:33
const uint8_t emit_light
Definition: Block.hpp:51
const BlockProperties properties
Definition: Block.hpp:49
const TextureID texture[6]
Definition: Block.hpp:48
const uint8_t absorb_light
Definition: Block.hpp:52
static BlocksInfo & getInstance()
Definition: Block.hpp:84
bool hasProperty(const BlockInfo::Type id, const BlockProperties properties, const BlockProperties not_properties)
Definition: Block.hpp:100
const BlockInfo & get(const BlockInfo::Type id)
Definition: Block.hpp:90
bool hasProperty(const BlockInfo::Type id, const BlockProperties properties)
Definition: Block.hpp:95
Definition: HitBox.hpp:11