Working on save-load system and UI

This commit is contained in:
Vladislav Khorev committed 2026-06-20 21:41:07 +03:00
1 parent 901142385d
commit d7db0faea3
29 files changed
+708 -180

No files matched your search

+5 -5
View File
@@ -15,6 +15,7 @@
#include "TeleportZone.h"
#include "LocationEditor.h"
#include "LocationState.h"
#include "ISaveable.h"
#include <functional>
#include <cstdint>
#include <unordered_map>
@@ -60,7 +61,7 @@ namespace ZL
Eigen::Vector3f playerPosition = Eigen::Vector3f::Zero();
};
class Location
class Location : public ISaveable
{
public:
Location(Renderer& iRenderer, Inventory& iInventory);
@@ -155,11 +156,10 @@ namespace ZL
// ---- Save / Load ----
// Serialises LocationState + all Character/InteractiveObject sub-states + Lua globals.
void saveFullState(nlohmann::json& out) const;
// Restores state from JSON written by saveFullState.
void save(nlohmann::json& out) const override;
// Restores state from JSON written by save.
// Navigation pointer and triggerZone.playerInside are re-synced automatically.
void loadFullState(const nlohmann::json& in);
void load(const nlohmann::json& in) override;
protected:
friend class LocationEditor;
Renderer& renderer;