feat: add app.save_world() function and update documentation

This commit is contained in:
MihailRis
2024-12-25 15:15:11 +03:00
parent 96577ee041
commit ed7dc1f901
8 changed files with 48 additions and 7 deletions
+8
View File
@@ -8,6 +8,7 @@
#include "constants.hpp"
#include "lighting/Lightmap.hpp"
#include "util/SmallHeap.hpp"
#include "maths/aabb.hpp"
#include "voxel.hpp"
inline constexpr int CHUNK_DATA_LEN = CHUNK_VOL * 4;
@@ -75,4 +76,11 @@ public:
bool decode(const ubyte* data);
static void convert(ubyte* data, const ContentReport* report);
AABB getAABB() const {
return AABB(
glm::vec3(x * CHUNK_W, -INFINITY, z * CHUNK_D),
glm::vec3((x + 1) * CHUNK_W, INFINITY, (z + 1) * CHUNK_D)
);
}
};