45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
#pragma once
|
|
#include "external/nlohmann/json.hpp"
|
|
#include "ISaveable.h"
|
|
#include "NpcCar.h"
|
|
|
|
namespace FRG {
|
|
|
|
struct LocationState : public ISaveable {
|
|
// ---- 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;
|
|
|
|
|
|
NpcCar taxiCarInitialState;
|
|
NpcCar taxiCar;
|
|
bool taxiArrivedCallbackCalled = false;
|
|
Vector3f taxiCarTriggerPosition = Vector3f(0,0,0);
|
|
std::vector<Vector3f> taxiCarWaypoints;
|
|
|
|
// (trigger/teleport zone runtime flags are serialised by id directly in Location::save/load)
|
|
|
|
// ---- Serialisation ----
|
|
void save(nlohmann::json& out) const override;
|
|
void load(const nlohmann::json& in) override;
|
|
};
|
|
|
|
} // namespace FRG
|