#include "LocationState.h" namespace ZL { void LocationState::save(nlohmann::json& out) const { out["cameraAzimuth"] = cameraAzimuth; out["cameraInclination"] = cameraInclination; out["activeNavigationIndex"] = activeNavigationIndex; out["targetInteractiveObjectIndex"] = targetInteractiveObjectIndex; out["targetInteractNpcIndex"] = targetInteractNpcIndex; out["targetTeleportZoneIndex"] = targetTeleportZoneIndex; out["isDarklands"] = isDarklands; out["isNight"] = isNight; out["isDawn"] = isDawn; out["tutorialInteractiveObjectsLocked"] = tutorialInteractiveObjectsLocked; } void LocationState::load(const nlohmann::json& in) { cameraAzimuth = in.value("cameraAzimuth", cameraAzimuth); cameraInclination = in.value("cameraInclination", cameraInclination); activeNavigationIndex = in.value("activeNavigationIndex", activeNavigationIndex); targetInteractiveObjectIndex = in.value("targetInteractiveObjectIndex", -1); targetInteractNpcIndex = in.value("targetInteractNpcIndex", -1); targetTeleportZoneIndex = in.value("targetTeleportZoneIndex", -1); isDarklands = in.value("isDarklands", false); isNight = in.value("isNight", false); isDawn = in.value("isDawn", false); tutorialInteractiveObjectsLocked = in.value("tutorialInteractiveObjectsLocked", false); } } // namespace ZL