diff --git a/cmake/targets/target-liminal-win64-glfw/CMakeLists.txt b/cmake/targets/target-liminal-win64-glfw/CMakeLists.txt new file mode 100644 index 00000000..5aacf219 --- /dev/null +++ b/cmake/targets/target-liminal-win64-glfw/CMakeLists.txt @@ -0,0 +1,10 @@ +# Copyright (c) 2023 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +set(DAWN_BUILDING dawnliminal CACHE INTERNAL ${DAWN_CACHE_TARGET}) +set(DAWN_TARGET_WIN32 true CACHE INTERNAL ${DAWN_CACHE_TARGET}) +set(DAWN_TARGET_GLFW true CACHE INTERNAL ${DAWN_CACHE_TARGET}) +set(DAWN_TARGET_NAME "Liminal" CACHE INTERNAL ${DAWN_CACHE_TARGET}) +set(DAWN_VISUAL_NOVEL true CACHE INTERNAL ${DAWN_CACHE_TARGET}) \ No newline at end of file diff --git a/src/dawntools/vnscenetool/VNSceneGen.cpp b/src/dawntools/vnscenetool/VNSceneGen.cpp index 0c70a001..e1327c40 100644 --- a/src/dawntools/vnscenetool/VNSceneGen.cpp +++ b/src/dawntools/vnscenetool/VNSceneGen.cpp @@ -77,6 +77,13 @@ void VNSceneGen::test( line(&afterLines, "auto marker_" + event->marker.name + " = " + eventName + ";", ""); break; + case VN_SCENE_EVENT_TYPE_GOTO_MARKER: + initType = "VNDummyEvent"; + toInclude = "games/vn/events/VNDummyEvent.hpp"; + line(&afterLines, eventName + "->then(marker_" + event->gotoMarker.name + ");", ""); + break; + + default: std::cout << "Unknown event type: " << event->type << std::endl; assertUnreachable(); diff --git a/src/dawntools/vnscenetool/events/CMakeLists.txt b/src/dawntools/vnscenetool/events/CMakeLists.txt index 42d57e61..6689ff35 100644 --- a/src/dawntools/vnscenetool/events/CMakeLists.txt +++ b/src/dawntools/vnscenetool/events/CMakeLists.txt @@ -13,4 +13,5 @@ target_sources(vnscenetool VNSetEventParser.cpp VNWaitEventParser.cpp VNParallelEventParser.cpp + VNGoToMarkerEventParser.cpp ) \ No newline at end of file diff --git a/src/dawntools/vnscenetool/events/VNSceneEventsParser.cpp b/src/dawntools/vnscenetool/events/VNSceneEventsParser.cpp index 51dd7532..ba3ebeb1 100644 --- a/src/dawntools/vnscenetool/events/VNSceneEventsParser.cpp +++ b/src/dawntools/vnscenetool/events/VNSceneEventsParser.cpp @@ -60,6 +60,11 @@ int32_t VNSceneEventsParser::onParse( ret = (VNMarkerParser()).parse(child, &event.marker, error); if(ret != 0) return ret; + } else if(child->node == "goto-marker") { + event.type = VN_SCENE_EVENT_TYPE_GOTO_MARKER; + ret = (VNGoToMarkerEventParser()).parse(child, &event.gotoMarker, error); + if(ret != 0) return ret; + } else { *error = "Unknown child node '" + child->node + "'"; return -1; diff --git a/src/dawntools/vnscenetool/events/VNSceneEventsParser.hpp b/src/dawntools/vnscenetool/events/VNSceneEventsParser.hpp index 49698b49..38e9d31f 100644 --- a/src/dawntools/vnscenetool/events/VNSceneEventsParser.hpp +++ b/src/dawntools/vnscenetool/events/VNSceneEventsParser.hpp @@ -10,6 +10,7 @@ #include "VNWaitEventParser.hpp" #include "VNParallelEventParser.hpp" #include "VNMarkerParser.hpp" +#include "VNGoToMarkerEventParser.hpp" namespace Dawn { struct VNSceneEvent; @@ -24,7 +25,8 @@ namespace Dawn { VN_SCENE_EVENT_TYPE_SET, VN_SCENE_EVENT_TYPE_WAIT, VN_SCENE_EVENT_TYPE_PARALLEL, - VN_SCENE_EVENT_TYPE_MARKER + VN_SCENE_EVENT_TYPE_MARKER, + VN_SCENE_EVENT_TYPE_GOTO_MARKER }; struct VNParallelEvent { @@ -40,6 +42,7 @@ namespace Dawn { struct VNWaitEvent wait; struct VNParallelEvent parallel; struct VNMarker marker; + struct VNGoToMarkerEvent gotoMarker; }; class VNSceneEventsParser : public XmlParser {