summaryrefslogtreecommitdiff
path: root/editor/editor-io.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor-io.cpp')
-rw-r--r--editor/editor-io.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/editor/editor-io.cpp b/editor/editor-io.cpp
index ae928e1..27d84fb 100644
--- a/editor/editor-io.cpp
+++ b/editor/editor-io.cpp
@@ -2,7 +2,6 @@
#include "editor-io.hpp"
#include "game-settings.hpp"
-#include "scene.hpp"
#include "serialization.hpp"
#include <fstream>
@@ -51,18 +50,13 @@ void pke_editor_scene_save(const char *file_path) {
pke_serialize_teardown(helper);
}
-void pke_editor_scene_load(const char *file_path) {
+void pke_editor_scene_load(pke_level *level, const char *file_path) {
std::ifstream f(file_path);
if (!f.is_open()) {
fprintf(stderr, "Failed to load requested scene file: '%s'\n", file_path);
return;
}
- srlztn_deserialize_helper *helper = pke_deserialize_init(pkeSettings.mem_bkt.game_transient);
- // TODO scene name is in the file?
- helper->scene = pke_scene_get_by_name(file_path);
- if (helper->scene == nullptr) {
- helper->scene = pke_scene_create(file_path);
- }
+ srlztn_deserialize_helper *helper = pke_deserialize_init(level, pkeSettings.mem_bkt.game_transient);
pke_deserialize_scene_from_stream(f, helper);
pke_deserialize_scene(helper);