mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 21:41:50 +00:00
Refactor, world.bin file, BinaryWriter, BinaryReader
This commit is contained in:
parent
9bc236b71a
commit
6cd775c27d
14 changed files with 378 additions and 126 deletions
|
|
@ -13,6 +13,7 @@ class voxel;
|
|||
class WorldFiles;
|
||||
class LevelEvents;
|
||||
|
||||
/* Player-centred chunks matrix */
|
||||
class Chunks {
|
||||
public:
|
||||
std::shared_ptr<Chunk>* chunks;
|
||||
|
|
@ -25,7 +26,8 @@ public:
|
|||
WorldFiles* worldFiles;
|
||||
LevelEvents* events;
|
||||
|
||||
Chunks(int w, int d, int ox, int oz, WorldFiles* worldFiles, LevelEvents* events);
|
||||
Chunks(int w, int d, int ox, int oz,
|
||||
WorldFiles* worldFiles, LevelEvents* events);
|
||||
~Chunks();
|
||||
|
||||
bool putChunk(std::shared_ptr<Chunk> chunk);
|
||||
|
|
@ -36,7 +38,13 @@ public:
|
|||
light_t getLight(int x, int y, int z);
|
||||
ubyte getLight(int x, int y, int z, int channel);
|
||||
void set(int x, int y, int z, int id, uint8_t states);
|
||||
voxel* rayCast(glm::vec3 start, glm::vec3 dir, float maxLength, glm::vec3& end, glm::vec3& norm, glm::vec3& iend);
|
||||
|
||||
voxel* rayCast(glm::vec3 start,
|
||||
glm::vec3 dir,
|
||||
float maxLength,
|
||||
glm::vec3& end,
|
||||
glm::vec3& norm,
|
||||
glm::vec3& iend);
|
||||
|
||||
bool isObstacle(int x, int y, int z);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue