refactor: switch cutscene camera to viewport/UV-based system

This commit is contained in:
vottozi committed 2026-04-16 01:29:01 +06:00
1 parent ceebb13719
commit 2494a44e4a
10 files changed
+407 -100

No files matched your search

+12 -2
View File
@@ -42,6 +42,15 @@ EasingType DialogueDatabase::parseEasingType(const std::string& value) {
return EasingType::Linear;
}
CutsceneAnchor DialogueDatabase::parseCutsceneAnchor(const std::string& value) {
if (value == "TopLeft") return CutsceneAnchor::TopLeft;
if (value == "TopRight") return CutsceneAnchor::TopRight;
if (value == "BottomRight") return CutsceneAnchor::BottomRight;
if (value == "BottomLeft") return CutsceneAnchor::BottomLeft;
if (value == "Custom") return CutsceneAnchor::Custom;
return CutsceneAnchor::Center;
}
Condition DialogueDatabase::parseCondition(const json& j) {
Condition c;
c.flag = j.value("flag", "");
@@ -141,8 +150,9 @@ CutsceneLine DialogueDatabase::parseCutsceneLine(const json& j) {
CutsceneCameraPose DialogueDatabase::parseCutsceneCameraPose(const json& j) {
CutsceneCameraPose pose;
pose.focusX = j.value("focusX", 0.5f);
pose.focusY = j.value("focusY", 0.5f);
pose.anchor = parseCutsceneAnchor(j.value("anchor", "Center"));
pose.centerX = j.value("centerX", 0.5f);
pose.centerY = j.value("centerY", 0.5f);
pose.zoom = j.value("zoom", 1.0f);
pose.rotationDeg = j.value("rotationDeg", 0.0f);
return pose;