mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
make chunk lightmap optional
This commit is contained in:
parent
64f7c19766
commit
5250c748be
12 changed files with 103 additions and 73 deletions
|
|
@ -27,7 +27,7 @@ public:
|
|||
int x, z;
|
||||
int bottom, top;
|
||||
voxel voxels[CHUNK_VOL] {};
|
||||
Lightmap lightmap;
|
||||
std::shared_ptr<Lightmap> lightmap;
|
||||
struct {
|
||||
bool modified : 1;
|
||||
bool ready : 1;
|
||||
|
|
@ -45,14 +45,11 @@ public:
|
|||
/// @brief Blocks metadata heap
|
||||
BlocksMetadata blocksMetadata;
|
||||
|
||||
Chunk(int x, int z);
|
||||
Chunk(int x, int z, std::shared_ptr<Lightmap> lightmap=nullptr);
|
||||
|
||||
/// @brief Refresh `bottom` and `top` values
|
||||
void updateHeights();
|
||||
|
||||
// unused
|
||||
std::unique_ptr<Chunk> clone() const;
|
||||
|
||||
/// @brief Creates new block inventory given size
|
||||
/// @return inventory id or 0 if block does not exists
|
||||
void addBlockInventory(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue