summaryrefslogtreecommitdiffstats
path: root/game/shared/world/voxel_registry.hh
blob: b9d9a3409bf3b31c49970c6188aabfec7e690251 (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::shared_ptr<Voxel>> voxels;
} // namespace world::voxel_registry

namespace world::voxel_registry
{
Voxel* register_voxel(const Voxel& voxel_template);
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