move Lighting instance to ChunksController

This commit is contained in:
MihailRis
2024-12-17 05:13:49 +03:00
parent c5049d0e24
commit b7664b4188
14 changed files with 60 additions and 61 deletions
+7 -5
View File
@@ -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;
}
};