summaryrefslogtreecommitdiffhomepage
path: root/editor/save.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-12-03 10:10:09 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-12-03 10:59:44 +0100
commit15198214ef081e1d59d4f0e13ad9ef6c6463885d (patch)
treea012cd1824b64a43611680cd608131b0f4329558 /editor/save.cpp
parent65ce220d95c50b0006ab4282604ea782cc4d0e90 (diff)
editor: prepare for making a screencast
Diffstat (limited to 'editor/save.cpp')
-rw-r--r--editor/save.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/save.cpp b/editor/save.cpp
index e3d917fa..c05f3e5f 100644
--- a/editor/save.cpp
+++ b/editor/save.cpp
@@ -48,4 +48,11 @@ void app::do_quickload()
fputs("done\n", stderr); fflush(stderr);
}
+void app::do_new_file()
+{
+ auto& w = M->world();
+ w = world{};
+ maybe_initialize_chunk_(chunk_coords{}, w[chunk_coords{}]);
+}
+
} // namespace floormat