diff --git a/assets/games/liminal/scenes/Scene1Prologue.xml b/assets/games/liminal/scenes/Scene1Prologue.xml
new file mode 100644
index 00000000..c6862dfe
--- /dev/null
+++ b/assets/games/liminal/scenes/Scene1Prologue.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/assets/games/liminal/scenes/SceneBase.xml b/assets/games/liminal/scenes/SceneBase.xml
index ec05af31..583e4c19 100644
--- a/assets/games/liminal/scenes/SceneBase.xml
+++ b/assets/games/liminal/scenes/SceneBase.xml
@@ -4,9 +4,6 @@
-
-
diff --git a/assets/games/liminal/scenes/VNSceneTest.xml b/assets/games/liminal/scenes/VNSceneTest.xml
deleted file mode 100644
index 3432205a..00000000
--- a/assets/games/liminal/scenes/VNSceneTest.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
- Hi, I'm Ethereality.
-
-
-
\ No newline at end of file
diff --git a/src/dawnliminal/CMakeLists.txt b/src/dawnliminal/CMakeLists.txt
index 5fe93e20..6da8524a 100644
--- a/src/dawnliminal/CMakeLists.txt
+++ b/src/dawnliminal/CMakeLists.txt
@@ -24,7 +24,7 @@ tool_texture(texture_eth ${LIMINAL_ASSETS_DIR}/textures/eth.png)
tool_texture(texture_border ${LIMINAL_ASSETS_DIR}/textures/texture_test.png)
tool_scene(${LIMINAL_ASSETS_DIR}/scenes/SceneBase.xml)
-tool_vnscene(${LIMINAL_ASSETS_DIR}/scenes/VNSceneTest.xml)
+tool_vnscene(${LIMINAL_ASSETS_DIR}/scenes/Scene1Prologue.xml)
tool_prefab(${LIMINAL_ASSETS_DIR}/prefabs/EthPrefab.xml)
tool_prefab(${LIMINAL_ASSETS_DIR}/prefabs/VNTextbox.xml)
\ No newline at end of file
diff --git a/src/dawnliminal/game/LiminalGame.cpp b/src/dawnliminal/game/LiminalGame.cpp
index 482819a5..8b7e40c6 100644
--- a/src/dawnliminal/game/LiminalGame.cpp
+++ b/src/dawnliminal/game/LiminalGame.cpp
@@ -4,12 +4,10 @@
// https://opensource.org/licenses/MIT
#include "game/DawnGame.hpp"
-#include "scenes/HelloWorldScene.hpp"
-#include "vnscenes/VNSceneTest.hpp"
+#include "vnscenes/Scene1Prologue.hpp"
using namespace Dawn;
Scene * Dawn::dawnGameGetInitialScene(DawnGame *game) {
- // return new HelloWorldScene(game);
- return new VNSceneTest(game);
+ return new Scene1Prologue(game);
}
\ No newline at end of file
diff --git a/src/dawnliminal/scenes/HelloWorldScene.hpp b/src/dawnliminal/scenes/HelloWorldScene.hpp
deleted file mode 100644
index 64636e8b..00000000
--- a/src/dawnliminal/scenes/HelloWorldScene.hpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2023 Dominic Masters
-//
-// This software is released under the MIT License.
-// https://opensource.org/licenses/MIT
-
-#pragma once
-#include "scene/Scene.hpp"
-#include "scene/components/display/CameraTexture.hpp"
-#include "prefabs/SimpleSpinningCubePrefab.hpp"
-#include "prefabs/VNTextbox.hpp"
-#include "display/TextureRenderTarget.hpp"
-#include "scene/components/ui/UIImage.hpp"
-#include "prefabs/EthPrefab.hpp"
-
-namespace Dawn {
- class HelloWorldScene : public Scene {
- protected:
- Camera *camera;
- Camera *camNew;
- UICanvas *canvas;
- TextureRenderTarget *renderTarget;
- Texture text;
- TilesetGrid grid;
- CameraTexture *camTexture;
- UIImage *image;
-
- int32_t test = 0;
-
- void stage() override {
- canvas = UICanvas::create(this);
-
- camera = Camera::create(this);
- glm::vec3 off = glm::vec3(0, 0, 0);
- camera->transform->lookAt(glm::vec3(10, 10, 10) + off, glm::vec3(0, 0, 0) + off);
-
- auto textbox = VNTextbox::create(this);
- textbox->transform.setParent(canvas->transform);
-
- camNew = Camera::create(this);
- camTexture = camNew->item->addComponent();
- camNew->fov = 0.436332f;
- camNew->transform->lookAt(glm::vec3(0, 0, 5), glm::vec3(0, 0, 0));
- camTexture->renderTarget.setSize(1, 1);
-
- auto uiTest = this->createSceneItem();
- uiTest->transform.setParent(canvas->transform);
- image = uiTest->addComponent();
- image->texture = camTexture->renderTarget.getTexture();
- image->alignment = glm::vec4(0, 0, 50, 0);
- image->alignX = UI_COMPONENT_ALIGN_START;
- image->alignUnitRight = UI_COMPONENT_ALIGN_UNIT_PERCENT;
- image->alignY = UI_COMPONENT_ALIGN_STRETCH;
-
- this->grid = TilesetGrid(
- 1, 13,
- 741, 10270,
- 0, 0,
- 0, 0
- );
- auto eth = EthPrefab::create(this);
- eth->tiledSprite->tileset = &grid;
-
- useEvent([&]{
- assertNotNull(camTexture);
- assertNotNull(image);
- std::cout << "Size Update" << std::endl;
- camTexture->renderTarget.setSize(image->getWidth(), image->getHeight());
- }, image->eventAlignmentUpdated);
- }
-
- std::vector getRequiredAssets() override {
- auto assMan = &this->game->assetManager;
- std::vector assets;
- vectorAppend(&assets, VNTextbox::prefabAssets(assMan));
- vectorAppend(&assets, EthPrefab::prefabAssets(assMan));
- return assets;
- }
-
- public:
- HelloWorldScene(DawnGame *game) : Scene(game) {}
- };
-}
\ No newline at end of file
diff --git a/src/dawnshared/util/Xml.cpp b/src/dawnshared/util/Xml.cpp
index df9b341e..5626bf58 100644
--- a/src/dawnshared/util/Xml.cpp
+++ b/src/dawnshared/util/Xml.cpp
@@ -40,11 +40,16 @@ void Xml::load(Xml *xml, std::string data, size_t *j) {
doing = XML_PARSE_STATE_PARSING_COMMENT;
i += 3;
} else if(insideTag) {
- i -= 1;
- auto child = new Xml();
- Xml::load(child, data, &i);
- xml->children.push_back(child);
- doing = XML_PARSE_STATE_PARSING_CHILD;
+ if(data[i] == '/') {
+ i -= 1;
+ doing = XML_PARSE_STATE_PARSING_CHILD;
+ } else {
+ i -= 1;
+ auto child = new Xml();
+ Xml::load(child, data, &i);
+ xml->children.push_back(child);
+ doing = XML_PARSE_STATE_PARSING_CHILD;
+ }
} else {
doing = XML_PARSE_STATE_PARSING_TAG_NAME;
level++;
diff --git a/src/dawntools/scenetool/CMakeLists.txt b/src/dawntools/scenetool/CMakeLists.txt
index 8a6c47b3..8ae02b56 100644
--- a/src/dawntools/scenetool/CMakeLists.txt
+++ b/src/dawntools/scenetool/CMakeLists.txt
@@ -50,7 +50,7 @@ function(tool_scene in)
STRING(REGEX REPLACE "[\.|\\|\/]" "-" scene_name ${in})
add_custom_target(scene_${scene_name}
COMMAND scenetool --input="${DAWN_ASSETS_SOURCE_DIR}/${in}" --output="${DAWN_GENERATED_DIR}/generatedscenes" --sources="${DAWN_SOURCES_DIR}"
- COMMENT "Generating prefab from ${in}"
+ COMMENT "Generating scene from ${in}"
DEPENDS ${DEPS}
)
target_include_directories(${DAWN_TARGET_NAME}
diff --git a/src/dawntools/vnscenetool/CMakeLists.txt b/src/dawntools/vnscenetool/CMakeLists.txt
index 028c7b4b..c0c43fe3 100644
--- a/src/dawntools/vnscenetool/CMakeLists.txt
+++ b/src/dawntools/vnscenetool/CMakeLists.txt
@@ -53,7 +53,7 @@ function(tool_vnscene in)
STRING(REGEX REPLACE "[\.|\\|\/]" "-" scene_name ${in})
add_custom_target(scene_${scene_name}
COMMAND vnscenetool --input="${DAWN_ASSETS_SOURCE_DIR}/${in}" --output="${DAWN_GENERATED_DIR}/generatedscenes"
- COMMENT "Generating prefab from ${in}"
+ COMMENT "Generating vnscene from ${in}"
DEPENDS ${DEPS}
)
target_include_directories(${DAWN_TARGET_NAME}
diff --git a/src/dawntools/vnscenetool/events/VNSceneEventsParser.cpp b/src/dawntools/vnscenetool/events/VNSceneEventsParser.cpp
index 383144dc..0f7ef58a 100644
--- a/src/dawntools/vnscenetool/events/VNSceneEventsParser.cpp
+++ b/src/dawntools/vnscenetool/events/VNSceneEventsParser.cpp
@@ -29,6 +29,8 @@ int32_t VNSceneEventsParser::onParse(
Xml *child = *itChildren;
struct VNSceneEvent event;
+ std::cout << "CHILD: " << child->node << std::endl;
+
// Parse event(s)
if(child->node == "text") {
event.type = VN_SCENE_EVENT_TYPE_TEXT;