Config and save system almost there.

This commit is contained in:
Zed A. Shaw 2024-11-05 21:33:28 -05:00
parent 71bc97a016
commit da63f006c2
4 changed files with 31 additions and 26 deletions

View file

@ -19,6 +19,7 @@
#include "systems.hpp"
#include "events.hpp"
#include "render.hpp"
#include "save.hpp"
using std::string;
using namespace fmt;
@ -57,10 +58,8 @@ void GUI::resize_map(int new_size) {
}
void GUI::save_world() {
tser::BinaryArchive archive;
archive.save($world);
std::string_view archive_view = archive.get_buffer();
$log.log(format("Game saved! {} bytes.", archive_view.size()));
$log.log("Game saved!");
save::to_file("./savefile.world", $world);
}
void GUI::create_renderer() {