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 + ";", "");
|
line(&afterLines, "auto marker_" + event->marker.name + " = " + eventName + ";", "");
|
||||||
break;
|
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:
|
default:
|
||||||
std::cout << "Unknown event type: " << event->type << std::endl;
|
std::cout << "Unknown event type: " << event->type << std::endl;
|
||||||
assertUnreachable();
|
assertUnreachable();
|
||||||
|
@ -13,4 +13,5 @@ target_sources(vnscenetool
|
|||||||
VNSetEventParser.cpp
|
VNSetEventParser.cpp
|
||||||
VNWaitEventParser.cpp
|
VNWaitEventParser.cpp
|
||||||
VNParallelEventParser.cpp
|
VNParallelEventParser.cpp
|
||||||
|
VNGoToMarkerEventParser.cpp
|
||||||
)
|
)
|
@ -60,6 +60,11 @@ int32_t VNSceneEventsParser::onParse(
|
|||||||
ret = (VNMarkerParser()).parse(child, &event.marker, error);
|
ret = (VNMarkerParser()).parse(child, &event.marker, error);
|
||||||
if(ret != 0) return ret;
|
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 {
|
} else {
|
||||||
*error = "Unknown child node '" + child->node + "'";
|
*error = "Unknown child node '" + child->node + "'";
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "VNWaitEventParser.hpp"
|
#include "VNWaitEventParser.hpp"
|
||||||
#include "VNParallelEventParser.hpp"
|
#include "VNParallelEventParser.hpp"
|
||||||
#include "VNMarkerParser.hpp"
|
#include "VNMarkerParser.hpp"
|
||||||
|
#include "VNGoToMarkerEventParser.hpp"
|
||||||
|
|
||||||
namespace Dawn {
|
namespace Dawn {
|
||||||
struct VNSceneEvent;
|
struct VNSceneEvent;
|
||||||
@ -24,7 +25,8 @@ namespace Dawn {
|
|||||||
VN_SCENE_EVENT_TYPE_SET,
|
VN_SCENE_EVENT_TYPE_SET,
|
||||||
VN_SCENE_EVENT_TYPE_WAIT,
|
VN_SCENE_EVENT_TYPE_WAIT,
|
||||||
VN_SCENE_EVENT_TYPE_PARALLEL,
|
VN_SCENE_EVENT_TYPE_PARALLEL,
|
||||||
VN_SCENE_EVENT_TYPE_MARKER
|
VN_SCENE_EVENT_TYPE_MARKER,
|
||||||
|
VN_SCENE_EVENT_TYPE_GOTO_MARKER
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VNParallelEvent {
|
struct VNParallelEvent {
|
||||||
@ -40,6 +42,7 @@ namespace Dawn {
|
|||||||
struct VNWaitEvent wait;
|
struct VNWaitEvent wait;
|
||||||
struct VNParallelEvent parallel;
|
struct VNParallelEvent parallel;
|
||||||
struct VNMarker marker;
|
struct VNMarker marker;
|
||||||
|
struct VNGoToMarkerEvent gotoMarker;
|
||||||
};
|
};
|
||||||
|
|
||||||
class VNSceneEventsParser : public XmlParser<struct VNSceneEventList> {
|
class VNSceneEventsParser : public XmlParser<struct VNSceneEventList> {
|
||||||
|
Reference in New Issue
Block a user