feat: saving entities (WIP)

This commit is contained in:
MihailRis
2024-07-05 05:16:31 +03:00
parent 019a88ef84
commit f0270d3391
24 changed files with 290 additions and 101 deletions
+1 -8
View File
@@ -51,14 +51,7 @@ void World::updateTimers(float delta) {
void World::write(Level* level) {
const Content* content = level->content;
Chunks* chunks = level->chunks.get();
auto& regions = wfile->getRegions();
for (size_t i = 0; i < chunks->volume; i++) {
if (auto chunk = chunks->chunks[i]) {
regions.put(chunk.get());
}
}
level->chunks->saveAll();
wfile->write(this, content);
auto playerFile = dynamic::Map();