Fixed / Finished Go To event
This commit is contained in:
10
cmake/targets/target-liminal-win64-glfw/CMakeLists.txt
Normal file
10
cmake/targets/target-liminal-win64-glfw/CMakeLists.txt
Normal file
@ -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})
|
@ -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();
|
||||
|
@ -13,4 +13,5 @@ target_sources(vnscenetool
|
||||
VNSetEventParser.cpp
|
||||
VNWaitEventParser.cpp
|
||||
VNParallelEventParser.cpp
|
||||
VNGoToMarkerEventParser.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;
|
||||
|
@ -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<struct VNSceneEventList> {
|
||||
|
Reference in New Issue
Block a user