summaryrefslogtreecommitdiffstats
path: root/src/game/shared/world/voxel_registry.hh
blob: a1e0eee67cdaf75286036517a2333e6f975e9146 (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
#pragma once

#include "shared/world/voxel.hh"

namespace world::voxel_registry
{
extern emhash8::HashMap<std::string, voxel_id> names;
extern std::vector<std::unique_ptr<Voxel>> voxels;
} // namespace world::voxel_registry

namespace world::voxel_registry
{
Voxel* register_voxel(const VoxelBuilder& builder);
Voxel* find(std::string_view name);
Voxel* find(voxel_id id);
} // namespace world::voxel_registry

namespace world::voxel_registry
{
void purge(void);
} // namespace world::voxel_registry

namespace world::voxel_registry
{
std::uint64_t get_checksum(void);
} // namespace world::voxel_registry