Config and save system almost there.
This commit is contained in:
parent
71bc97a016
commit
da63f006c2
4 changed files with 31 additions and 26 deletions
7
gui.cpp
7
gui.cpp
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue