Working on save-load system and UI
This commit is contained in:
1 parent
901142385d
commit
d7db0faea3
29 files changed
+708
-180
No files matched your search
+5
-9
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include "external/nlohmann/json.hpp"
|
||||
#include "ISaveable.h"
|
||||
|
||||
namespace ZL {
|
||||
|
||||
struct LocationState {
|
||||
struct LocationState : public ISaveable {
|
||||
// ---- Camera ----
|
||||
float cameraAzimuth = -2.35f;
|
||||
float cameraInclination = 1.1036f;
|
||||
@@ -26,15 +26,11 @@ struct LocationState {
|
||||
// ---- Tutorial ----
|
||||
bool tutorialInteractiveObjectsLocked = false;
|
||||
|
||||
// ---- Trigger-zone runtime flags ----
|
||||
// Indexed parallel to Location::triggerZones.
|
||||
// The zones themselves are static config reloaded from JSON;
|
||||
// only playerInside is live state that must be saved.
|
||||
std::vector<bool> triggerZonePlayerInside;
|
||||
// (trigger/teleport zone runtime flags are serialised by id directly in Location::save/load)
|
||||
|
||||
// ---- Serialisation ----
|
||||
void save(nlohmann::json& out) const;
|
||||
void load(const nlohmann::json& in);
|
||||
void save(nlohmann::json& out) const override;
|
||||
void load(const nlohmann::json& in) override;
|
||||
};
|
||||
|
||||
} // namespace ZL
|
||||
Reference in new issue
Block a user