#pragma once #include "cutscene/CutsceneTypes.h" #include "external/nlohmann/json.hpp" #include #include namespace ZL::Cutscene { class CutsceneDatabase { public: using json = nlohmann::json; bool loadFromFile(const std::string& path); const StaticCutsceneDefinition* findCutscene(const std::string& id) const; private: std::unordered_map cutscenes; static EasingType parseEasingType(const std::string& value); static CutsceneLine parseCutsceneLine(const json& j); static CutsceneImagePose parseCutsceneImagePose(const json& j); static CutsceneImageSegment parseCutsceneImageSegment(const json& j); static StaticCutsceneDefinition parseCutscene(const json& j); }; } // namespace ZL::Cutscene