summaryrefslogtreecommitdiffhomepage
path: root/src/collision.hpp
blob: 623ae79c0067fb0f5d0cb50917a210096cf145cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

namespace floormat {

enum class collision : unsigned char {
    view, shoot, move,
};

enum class collision_type : unsigned char {
    none, object, scenery, geometry,
};

constexpr inline size_t collision_data_BITS = 60;

struct collision_data final {
    uint64_t tag       : 2;
    uint64_t pass      : 2;
    uint64_t data      : collision_data_BITS;

    bool operator==(const collision_data&) const noexcept;
};

} // namespace floormat