Working on state for location
This commit is contained in:
1 parent
e0968b5522
commit
b01e970554
13 files changed
+494
-101
No files matched your search
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include "external/nlohmann/json.hpp"
|
||||
|
||||
namespace ZL {
|
||||
|
||||
struct LocationState {
|
||||
// ---- Camera ----
|
||||
float cameraAzimuth = -2.35f;
|
||||
float cameraInclination = 1.1036f;
|
||||
|
||||
// ---- Navigation ----
|
||||
int activeNavigationIndex = 0;
|
||||
|
||||
// ---- Walk-to targets (-1 = none) ----
|
||||
// Mirrors CharacterState's kNoTarget convention; raw pointers are not serialisable.
|
||||
int targetInteractiveObjectIndex = -1;
|
||||
int targetInteractNpcIndex = -1;
|
||||
int targetTeleportZoneIndex = -1;
|
||||
|
||||
// ---- World-mode flags (synced from Game after each transition) ----
|
||||
bool isDarklands = false;
|
||||
bool isNight = false;
|
||||
bool isDawn = false;
|
||||
|
||||
// ---- 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;
|
||||
|
||||
// ---- Serialisation ----
|
||||
void save(nlohmann::json& out) const;
|
||||
void load(const nlohmann::json& in);
|
||||
};
|
||||
|
||||
} // namespace ZL
|
||||
Reference in new issue
Block a user