mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 22:41:49 +00:00
move Lighting instance to ChunksController
This commit is contained in:
parent
c5049d0e24
commit
b7664b4188
14 changed files with 60 additions and 61 deletions
|
|
@ -20,12 +20,11 @@ class Chunk;
|
|||
class WorldFiles;
|
||||
class LevelEvents;
|
||||
class Block;
|
||||
class Level;
|
||||
class VoxelsVolume;
|
||||
|
||||
/// Player-centred chunks matrix
|
||||
class Chunks {
|
||||
Level* level;
|
||||
LevelEvents* events;
|
||||
const ContentIndices* const indices;
|
||||
|
||||
void eraseSegments(const Block& def, blockstate state, int x, int y, int z);
|
||||
|
|
@ -40,15 +39,14 @@ class Chunks {
|
|||
);
|
||||
|
||||
util::AreaMap2D<std::shared_ptr<Chunk>, int32_t> areaMap;
|
||||
WorldFiles* worldFiles;
|
||||
public:
|
||||
Chunks(
|
||||
int32_t w,
|
||||
int32_t d,
|
||||
int32_t ox,
|
||||
int32_t oz,
|
||||
WorldFiles* worldFiles,
|
||||
Level* level
|
||||
LevelEvents* events,
|
||||
const ContentIndices* indices
|
||||
);
|
||||
~Chunks() = default;
|
||||
|
||||
|
|
@ -156,4 +154,8 @@ public:
|
|||
const ContentIndices& getContentIndices() const {
|
||||
return *indices;
|
||||
}
|
||||
|
||||
static inline constexpr unsigned matrixSize(int loadDistance, int padding) {
|
||||
return (loadDistance + padding) * 2;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue