diff --git a/assets/games/liminal/CMakeLists.txt b/assets/games/liminal/CMakeLists.txt
new file mode 100644
index 00000000..94d64003
--- /dev/null
+++ b/assets/games/liminal/CMakeLists.txt
@@ -0,0 +1,9 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+include("${CMAKE_CURRENT_LIST_DIR}/fonts/CMakeLists.txt")
+include("${CMAKE_CURRENT_LIST_DIR}/prefabs/CMakeLists.txt")
+include("${CMAKE_CURRENT_LIST_DIR}/scenes/CMakeLists.txt")
+include("${CMAKE_CURRENT_LIST_DIR}/textures/CMakeLists.txt")
\ No newline at end of file
diff --git a/assets/games/liminal/fonts/CMakeLists.txt b/assets/games/liminal/fonts/CMakeLists.txt
new file mode 100644
index 00000000..5cae8a2b
--- /dev/null
+++ b/assets/games/liminal/fonts/CMakeLists.txt
@@ -0,0 +1,11 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_truetype(font_main
+ REGULAR=${CMAKE_CURRENT_LIST_DIR}/Ysabeau-Medium.ttf
+ BOLD=${CMAKE_CURRENT_LIST_DIR}/Ysabeau-SemiBold.ttf
+ ITALICS=${CMAKE_CURRENT_LIST_DIR}/Ysabeau-MediumItalic.ttf
+ BOLD_ITALICS=${CMAKE_CURRENT_LIST_DIR}/Ysabeau-SemiBoldItalic.ttf
+)
\ No newline at end of file
diff --git a/assets/games/liminal/prefabs/CMakeLists.txt b/assets/games/liminal/prefabs/CMakeLists.txt
new file mode 100644
index 00000000..6445bbad
--- /dev/null
+++ b/assets/games/liminal/prefabs/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_prefab(${CMAKE_CURRENT_LIST_DIR}/EthPrefab.xml)
+tool_prefab(${CMAKE_CURRENT_LIST_DIR}/VNTextbox.xml)
\ No newline at end of file
diff --git a/assets/games/liminal/prefabs/EthPrefab.xml b/assets/games/liminal/prefabs/EthPrefab.xml
index f706c104..aaffb9e6 100644
--- a/assets/games/liminal/prefabs/EthPrefab.xml
+++ b/assets/games/liminal/prefabs/EthPrefab.xml
@@ -1,49 +1,43 @@
-
-
+
+
+
+
+
-
-
-
+
+
-
-
-
-
+
+
+
TilesetGrid gridFace;
TilesetGrid gridBody;
- StateProperty<float_t> alpha;
+ StateProperty<int32_t> faceTile;
- alpha = 0.0f;
-
- this->gridFace = TilesetGrid(
- 1, 9,
- faceTexture->texture.getWidth(), faceTexture->texture.getHeight(),
- 0, 0,
- 0, 0
- );
+ gridFace = TilesetGrid(faceDayHappy->texture, 1, 1);
faceSprite->tileset = &gridFace;
- this->gridBody = TilesetGrid(
- 1, 5,
- bodyTexture->texture.getWidth(), bodyTexture->texture.getHeight(),
- 0, 0,
- 0, 0
- );
+ gridBody = TilesetGrid(poseDayBack->texture, 1, 1);
bodySprite->tileset = &gridBody;
useEffect([&]{
- this->faceMaterial->color.a = alpha;
- this->bodyMaterial->color.a = alpha;
- }, alpha);
+ faceMaterial->texture = (
+ faceTile == 0 ? &faceDayHappy->texture :
+ faceTile == 1 ? &faceDayAnger->texture :
+ nullptr
+ );
+ }, faceTile)();
\ No newline at end of file
diff --git a/assets/games/liminal/scenes/CMakeLists.txt b/assets/games/liminal/scenes/CMakeLists.txt
new file mode 100644
index 00000000..2c80d7e9
--- /dev/null
+++ b/assets/games/liminal/scenes/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_scene(${CMAKE_CURRENT_LIST_DIR}/SceneBase.xml)
+tool_vnscene(${CMAKE_CURRENT_LIST_DIR}/Scene1Prologue0.xml)
\ No newline at end of file
diff --git a/assets/games/liminal/scenes/Scene1Prologue0.xml b/assets/games/liminal/scenes/Scene1Prologue0.xml
index 6188d913..15c156bc 100644
--- a/assets/games/liminal/scenes/Scene1Prologue0.xml
+++ b/assets/games/liminal/scenes/Scene1Prologue0.xml
@@ -4,20 +4,19 @@
There is a bucket.
-
+
It sways above your head like the mouth of a god. You are on Angelwood's best stage, and they are cheering for you, calling you their Queen, their Prom Queen.
-
+
And you are dead soon.
-
+
It's Prom Day. The metal bucket is swaying. Over you. Drenching your white pristine dress in guts and gore red. They aren't cheering anymore. They're gasping. But not screaming: oh, no, not in respectable Angelwood.
diff --git a/assets/games/liminal/scenes/SceneBase.xml b/assets/games/liminal/scenes/SceneBase.xml
index 51ae2f00..41d6745e 100644
--- a/assets/games/liminal/scenes/SceneBase.xml
+++ b/assets/games/liminal/scenes/SceneBase.xml
@@ -6,9 +6,8 @@
-
-
+
-
diff --git a/assets/games/liminal/textures/CMakeLists.txt b/assets/games/liminal/textures/CMakeLists.txt
new file mode 100644
index 00000000..e80f5ffa
--- /dev/null
+++ b/assets/games/liminal/textures/CMakeLists.txt
@@ -0,0 +1,12 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+set(LIMINIAL_CHARACTER_SCALE 1.0)
+
+include("${CMAKE_CURRENT_LIST_DIR}/eth/CMakeLists.txt")
+
+tool_texture(texture_border
+ FILE=${CMAKE_CURRENT_LIST_DIR}/texture_test.png
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/eth/CMakeLists.txt b/assets/games/liminal/textures/eth/CMakeLists.txt
new file mode 100644
index 00000000..a44f1334
--- /dev/null
+++ b/assets/games/liminal/textures/eth/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+include("${CMAKE_CURRENT_LIST_DIR}/faces/CMakeLists.txt")
+include("${CMAKE_CURRENT_LIST_DIR}/poses/CMakeLists.txt")
\ No newline at end of file
diff --git a/assets/games/liminal/textures/eth/faces/CMakeLists.txt b/assets/games/liminal/textures/eth/faces/CMakeLists.txt
new file mode 100644
index 00000000..a1310376
--- /dev/null
+++ b/assets/games/liminal/textures/eth/faces/CMakeLists.txt
@@ -0,0 +1,50 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+
+tool_texture(texture_eth_face_day_anger
+ FILE="${CMAKE_CURRENT_LIST_DIR}/anger.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
+
+tool_texture(texture_eth_face_day_confused
+ FILE="${CMAKE_CURRENT_LIST_DIR}/confused.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
+
+tool_texture(texture_eth_face_day_eyeroll
+ FILE="${CMAKE_CURRENT_LIST_DIR}/eyeroll.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
+
+tool_texture(texture_eth_face_day_fear
+ FILE="${CMAKE_CURRENT_LIST_DIR}/fear.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
+
+tool_texture(texture_eth_face_day_happy
+ FILE="${CMAKE_CURRENT_LIST_DIR}/happy.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
+
+tool_texture(texture_eth_face_day_haughty
+ FILE="${CMAKE_CURRENT_LIST_DIR}/haughty.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
+
+tool_texture(texture_eth_face_day_neutral
+ FILE="${CMAKE_CURRENT_LIST_DIR}/neutral.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
+
+tool_texture(texture_eth_face_day_sad
+ FILE="${CMAKE_CURRENT_LIST_DIR}/sad.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
+
+tool_texture(texture_eth_face_day_surprised
+ FILE="${CMAKE_CURRENT_LIST_DIR}/surprised.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/eth/faces/anger.png b/assets/games/liminal/textures/eth/faces/anger.png
new file mode 100644
index 00000000..8b494719
Binary files /dev/null and b/assets/games/liminal/textures/eth/faces/anger.png differ
diff --git a/assets/games/liminal/textures/eth/faces/confused.png b/assets/games/liminal/textures/eth/faces/confused.png
new file mode 100644
index 00000000..722e67ba
Binary files /dev/null and b/assets/games/liminal/textures/eth/faces/confused.png differ
diff --git a/assets/games/liminal/textures/eth/faces/eyeroll.png b/assets/games/liminal/textures/eth/faces/eyeroll.png
new file mode 100644
index 00000000..6c67b929
Binary files /dev/null and b/assets/games/liminal/textures/eth/faces/eyeroll.png differ
diff --git a/assets/games/liminal/textures/eth/faces/fear.png b/assets/games/liminal/textures/eth/faces/fear.png
new file mode 100644
index 00000000..bd767821
Binary files /dev/null and b/assets/games/liminal/textures/eth/faces/fear.png differ
diff --git a/assets/games/liminal/textures/eth/faces/happy.png b/assets/games/liminal/textures/eth/faces/happy.png
new file mode 100644
index 00000000..dff9735c
Binary files /dev/null and b/assets/games/liminal/textures/eth/faces/happy.png differ
diff --git a/assets/games/liminal/textures/eth/faces/haughty.png b/assets/games/liminal/textures/eth/faces/haughty.png
new file mode 100644
index 00000000..a9dbfebe
Binary files /dev/null and b/assets/games/liminal/textures/eth/faces/haughty.png differ
diff --git a/assets/games/liminal/textures/eth/faces/neutral.png b/assets/games/liminal/textures/eth/faces/neutral.png
new file mode 100644
index 00000000..a2267f7c
Binary files /dev/null and b/assets/games/liminal/textures/eth/faces/neutral.png differ
diff --git a/assets/games/liminal/textures/eth/faces/sad.png b/assets/games/liminal/textures/eth/faces/sad.png
new file mode 100644
index 00000000..debaf503
Binary files /dev/null and b/assets/games/liminal/textures/eth/faces/sad.png differ
diff --git a/assets/games/liminal/textures/eth/faces/surprised.png b/assets/games/liminal/textures/eth/faces/surprised.png
new file mode 100644
index 00000000..e34490ec
Binary files /dev/null and b/assets/games/liminal/textures/eth/faces/surprised.png differ
diff --git a/assets/games/liminal/textures/eth/faces_day.png b/assets/games/liminal/textures/eth/faces_day.png
deleted file mode 100644
index 60983fd8..00000000
Binary files a/assets/games/liminal/textures/eth/faces_day.png and /dev/null differ
diff --git a/assets/games/liminal/textures/eth/faces_day_alt.png b/assets/games/liminal/textures/eth/faces_day_alt.png
deleted file mode 100644
index 7b433a06..00000000
Binary files a/assets/games/liminal/textures/eth/faces_day_alt.png and /dev/null differ
diff --git a/assets/games/liminal/textures/eth/faces_night.png b/assets/games/liminal/textures/eth/faces_night.png
deleted file mode 100644
index ad3b4416..00000000
Binary files a/assets/games/liminal/textures/eth/faces_night.png and /dev/null differ
diff --git a/assets/games/liminal/textures/eth/faces_night_alt.png b/assets/games/liminal/textures/eth/faces_night_alt.png
deleted file mode 100644
index 3071a6aa..00000000
Binary files a/assets/games/liminal/textures/eth/faces_night_alt.png and /dev/null differ
diff --git a/assets/games/liminal/textures/eth/poses/CMakeLists.txt b/assets/games/liminal/textures/eth/poses/CMakeLists.txt
new file mode 100644
index 00000000..01b891ec
--- /dev/null
+++ b/assets/games/liminal/textures/eth/poses/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_texture(texture_eth_pose_day_front
+FILE="${CMAKE_CURRENT_LIST_DIR}/day_front.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
+tool_texture(texture_eth_pose_day_back
+ FILE="${CMAKE_CURRENT_LIST_DIR}/day_back.png"
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/eth/poses/day_back.png b/assets/games/liminal/textures/eth/poses/day_back.png
new file mode 100644
index 00000000..5628cb2b
Binary files /dev/null and b/assets/games/liminal/textures/eth/poses/day_back.png differ
diff --git a/assets/games/liminal/textures/eth/poses/day_cross.png b/assets/games/liminal/textures/eth/poses/day_cross.png
new file mode 100644
index 00000000..70506811
Binary files /dev/null and b/assets/games/liminal/textures/eth/poses/day_cross.png differ
diff --git a/assets/games/liminal/textures/eth/poses/day_front.png b/assets/games/liminal/textures/eth/poses/day_front.png
new file mode 100644
index 00000000..1b3648ca
Binary files /dev/null and b/assets/games/liminal/textures/eth/poses/day_front.png differ
diff --git a/assets/games/liminal/textures/eth/poses/day_hips.png b/assets/games/liminal/textures/eth/poses/day_hips.png
new file mode 100644
index 00000000..63b0479c
Binary files /dev/null and b/assets/games/liminal/textures/eth/poses/day_hips.png differ
diff --git a/assets/games/liminal/textures/eth/poses/day_neutral.png b/assets/games/liminal/textures/eth/poses/day_neutral.png
new file mode 100644
index 00000000..f224b3c9
Binary files /dev/null and b/assets/games/liminal/textures/eth/poses/day_neutral.png differ
diff --git a/assets/games/liminal/textures/eth/poses_day.png b/assets/games/liminal/textures/eth/poses_day.png
deleted file mode 100644
index 09f2fbb1..00000000
Binary files a/assets/games/liminal/textures/eth/poses_day.png and /dev/null differ
diff --git a/assets/games/liminal/textures/eth/poses_day_alt.png b/assets/games/liminal/textures/eth/poses_day_alt.png
deleted file mode 100644
index d2d0b847..00000000
Binary files a/assets/games/liminal/textures/eth/poses_day_alt.png and /dev/null differ
diff --git a/assets/games/liminal/textures/eth/poses_night.png b/assets/games/liminal/textures/eth/poses_night.png
deleted file mode 100644
index 3ab96855..00000000
Binary files a/assets/games/liminal/textures/eth/poses_night.png and /dev/null differ
diff --git a/assets/games/liminal/textures/eth/poses_night_alt.png b/assets/games/liminal/textures/eth/poses_night_alt.png
deleted file mode 100644
index 9abd1465..00000000
Binary files a/assets/games/liminal/textures/eth/poses_night_alt.png and /dev/null differ
diff --git a/assets/games/liminal/textures/eth/test.png b/assets/games/liminal/textures/eth/test.png
deleted file mode 100644
index 6b51cac4..00000000
Binary files a/assets/games/liminal/textures/eth/test.png and /dev/null differ
diff --git a/assets/prefabs/ui/debug/FPSLabel.xml b/assets/prefabs/ui/debug/FPSLabel.xml
deleted file mode 100644
index 923eccbb..00000000
--- a/assets/prefabs/ui/debug/FPSLabel.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/dawn/CMakeLists.txt b/src/dawn/CMakeLists.txt
index ca965749..5f90aa66 100644
--- a/src/dawn/CMakeLists.txt
+++ b/src/dawn/CMakeLists.txt
@@ -43,7 +43,4 @@ target_compile_definitions(${DAWN_TARGET_NAME}
PUBLIC
${DAWN_SHARED_DEFINITIONS}
DAWN_DEBUG_BUILD=${DAWN_DEBUG_BUILD}
-)
-
-# Common Prefabs
-tool_prefab("prefabs/ui/debug/FPSLabel.xml")
\ No newline at end of file
+)
\ No newline at end of file
diff --git a/src/dawn/display/Tileset.cpp b/src/dawn/display/Tileset.cpp
index e24f3d37..a9cc605f 100644
--- a/src/dawn/display/Tileset.cpp
+++ b/src/dawn/display/Tileset.cpp
@@ -18,6 +18,33 @@ TilesetGrid::TilesetGrid() {
}
+
+TilesetGrid::TilesetGrid(
+ Texture *texture,
+ int32_t columns,
+ int32_t rows
+) : TilesetGrid(
+ columns, rows,
+ texture->getWidth(), texture->getHeight(),
+ 0, 0,
+ 0, 0
+) {
+
+}
+
+TilesetGrid::TilesetGrid(
+ Texture &texture,
+ int32_t columns,
+ int32_t rows
+) : TilesetGrid(
+ columns, rows,
+ texture.getWidth(), texture.getHeight(),
+ 0, 0,
+ 0, 0
+) {
+
+}
+
TilesetGrid::TilesetGrid(
int32_t columns,
int32_t rows,
diff --git a/src/dawn/display/Tileset.hpp b/src/dawn/display/Tileset.hpp
index 4ffb33aa..34e69946 100644
--- a/src/dawn/display/Tileset.hpp
+++ b/src/dawn/display/Tileset.hpp
@@ -6,6 +6,7 @@
#pragma once
#include "dawnlibs.hpp"
#include "assert/assert.hpp"
+#include "display/Texture.hpp"
namespace Dawn {
struct Tile {
@@ -53,6 +54,24 @@ namespace Dawn {
* Constructs a new Tileset Grid.
*/
TilesetGrid();
+
+ /**
+ * Constructs a new Tileset Grid from a texture.
+ *
+ * @param texture Texture to use.
+ * @param columns Columns in the grid.
+ * @param rows Rows in the grid.
+ */
+ TilesetGrid(Texture *texture, int32_t columns, int32_t rows);
+
+ /**
+ * Constructs a new Tileset Grid from a texture.
+ *
+ * @param texture Texture to use.
+ * @param columns Columns in the grid.
+ * @param rows Rows in the grid.
+ */
+ TilesetGrid(Texture &texture, int32_t columns, int32_t rows);
/**
* Constructs a new Tileset Grid.
diff --git a/src/dawnliminal/CMakeLists.txt b/src/dawnliminal/CMakeLists.txt
index 8efb7dbe..704d7567 100644
--- a/src/dawnliminal/CMakeLists.txt
+++ b/src/dawnliminal/CMakeLists.txt
@@ -17,39 +17,5 @@ add_subdirectory(game)
add_subdirectory(save)
# Assets
-set(LIMINAL_ASSETS_DIR ${DAWN_ASSETS_DIR}/games/liminal)
-
-set(LIMINIAL_CHARACTER_SCALE 0.2)
-tool_texture(texture_eth_faces_day
- FILE="${LIMINAL_ASSETS_DIR}/textures/eth/faces_day.png"
- SCALE=${LIMINIAL_CHARACTER_SCALE}
-)
-tool_texture(texture_eth_faces_night
- FILE="${LIMINAL_ASSETS_DIR}/textures/eth/faces_night.png"
- SCALE=${LIMINIAL_CHARACTER_SCALE}
-)
-tool_texture(texture_eth_poses_day
- FILE="${LIMINAL_ASSETS_DIR}/textures/eth/poses_day.png"
- SCALE=${LIMINIAL_CHARACTER_SCALE}
-)
-tool_texture(texture_eth_poses_night
- FILE="${LIMINAL_ASSETS_DIR}/textures/eth/test.png"
- SCALE=${LIMINIAL_CHARACTER_SCALE}
-)
-
-
-tool_texture(texture_border
- FILE=${LIMINAL_ASSETS_DIR}/textures/texture_test.png
-)
-tool_truetype(font_main
- REGULAR=${LIMINAL_ASSETS_DIR}/fonts/Ysabeau-Medium.ttf
- BOLD=${LIMINAL_ASSETS_DIR}/fonts/Ysabeau-SemiBold.ttf
- ITALICS=${LIMINAL_ASSETS_DIR}/fonts/Ysabeau-MediumItalic.ttf
- BOLD_ITALICS=${LIMINAL_ASSETS_DIR}/fonts/Ysabeau-SemiBoldItalic.ttf
-)
-
-tool_scene(${LIMINAL_ASSETS_DIR}/scenes/SceneBase.xml)
-tool_vnscene(${LIMINAL_ASSETS_DIR}/scenes/Scene1Prologue0.xml)
-
-tool_prefab(${LIMINAL_ASSETS_DIR}/prefabs/EthPrefab.xml)
-tool_prefab(${LIMINAL_ASSETS_DIR}/prefabs/VNTextbox.xml)
\ No newline at end of file
+set(LIMINAL_ASSETS_DIR )
+include("${DAWN_ASSETS_SOURCE_DIR}/games/liminal/CMakeLists.txt")
\ No newline at end of file
diff --git a/src/dawnopengl/scene/components/display/material/SimpleTexturedMaterial.cpp b/src/dawnopengl/scene/components/display/material/SimpleTexturedMaterial.cpp
index 12dc52a1..801eeaa6 100644
--- a/src/dawnopengl/scene/components/display/material/SimpleTexturedMaterial.cpp
+++ b/src/dawnopengl/scene/components/display/material/SimpleTexturedMaterial.cpp
@@ -37,8 +37,8 @@ std::vector SimpleTexturedMaterial::getRenderPasses(IRend
onlyPass.parameterBuffers[shader->bufferRenderPipeline] = &context.renderPipeline->shaderBuffer;
onlyPass.renderFlags = (
- RENDER_MANAGER_RENDER_FLAG_BLEND |
- RENDER_MANAGER_RENDER_FLAG_DEPTH_TEST
+ RENDER_MANAGER_RENDER_FLAG_BLEND
+ // RENDER_MANAGER_RENDER_FLAG_DEPTH_TEST
);
if(this->texture != nullptr) {
diff --git a/src/dawnshared/util/Xml.cpp b/src/dawnshared/util/Xml.cpp
index cb5fa183..22d1dcc7 100644
--- a/src/dawnshared/util/Xml.cpp
+++ b/src/dawnshared/util/Xml.cpp
@@ -201,10 +201,17 @@ void Xml::load(Xml *xml, std::string data, size_t *j) {
buffer += '\'';
} else if(sc == "quot") {
buffer += '"';
+ } else if(sc == "nbsp") {
+ buffer += ' ';
} else {
- // Unknown special char?
- std::cout << "Unknown Special character: " << sc << std::endl;
- assertUnreachable();
+ // Try parse as integer
+ if(sc.size() > 1 && sc[0] == '#') {
+ int code = std::stoi(sc.substr(1));
+ buffer += (char)code;
+ } else {
+ std::cout << "Unknown Special character: " << sc << std::endl;
+ assertUnreachable();
+ }
}
} else {
buffer += c;
diff --git a/src/dawntools/prefabtool/CMakeLists.txt b/src/dawntools/prefabtool/CMakeLists.txt
index b1a0b818..b8115af4 100644
--- a/src/dawntools/prefabtool/CMakeLists.txt
+++ b/src/dawntools/prefabtool/CMakeLists.txt
@@ -48,7 +48,7 @@ function(tool_prefab in)
STRING(REGEX REPLACE "[\.|\\|\/]" "-" prefab_name ${in})
add_custom_target(prefab_${prefab_name}
- COMMAND prefabtool --input="${DAWN_ASSETS_SOURCE_DIR}/${in}" --output="${DAWN_GENERATED_DIR}/generatedprefabs" --sources="${DAWN_SOURCES_DIR}"
+ COMMAND prefabtool --input="${in}" --output="${DAWN_GENERATED_DIR}/generatedprefabs" --sources="${DAWN_SOURCES_DIR}"
COMMENT "Generating prefab from ${in}"
DEPENDS ${DEPS}
)
diff --git a/src/dawntools/scenetool/CMakeLists.txt b/src/dawntools/scenetool/CMakeLists.txt
index 8ae02b56..93cb94d7 100644
--- a/src/dawntools/scenetool/CMakeLists.txt
+++ b/src/dawntools/scenetool/CMakeLists.txt
@@ -49,7 +49,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}"
+ COMMAND scenetool --input="${in}" --output="${DAWN_GENERATED_DIR}/generatedscenes" --sources="${DAWN_SOURCES_DIR}"
COMMENT "Generating scene from ${in}"
DEPENDS ${DEPS}
)
diff --git a/src/dawntools/texturetool/CMakeLists.txt b/src/dawntools/texturetool/CMakeLists.txt
index 8c57f20e..4a598fa0 100644
--- a/src/dawntools/texturetool/CMakeLists.txt
+++ b/src/dawntools/texturetool/CMakeLists.txt
@@ -68,7 +68,7 @@ function(tool_texture target)
add_custom_target(${target}
COMMAND texturetool
- --input="${DAWN_ASSETS_SOURCE_DIR}/${FILE}"
+ --input="${FILE}"
--output="${DAWN_ASSETS_BUILD_DIR}/${target}"
--wrapX="${WRAP_X}"
--wrapY="${WRAP_Y}"
diff --git a/src/dawntools/truetypetool/CMakeLists.txt b/src/dawntools/truetypetool/CMakeLists.txt
index 960d3257..4a3bda50 100644
--- a/src/dawntools/truetypetool/CMakeLists.txt
+++ b/src/dawntools/truetypetool/CMakeLists.txt
@@ -53,19 +53,6 @@ function(tool_truetype target)
set(DEPS truetypetool)
endif()
- if(DEFINED REGULAR)
- set(REGULAR "${DAWN_ASSETS_SOURCE_DIR}/${REGULAR}")
- endif()
- if(DEFINED BOLD)
- set(BOLD "${DAWN_ASSETS_SOURCE_DIR}/${BOLD}")
- endif()
- if(DEFINED ITALICS)
- set(ITALICS "${DAWN_ASSETS_SOURCE_DIR}/${ITALICS}")
- endif()
- if(DEFINED BOLD_ITALICS)
- set(BOLD_ITALICS "${DAWN_ASSETS_SOURCE_DIR}/${BOLD_ITALICS}")
- endif()
-
add_custom_target(${target}
COMMAND truetypetool
--output="${DAWN_ASSETS_BUILD_DIR}/${target}.truetype"
diff --git a/src/dawntools/util/generator/SceneAssetGenerator.cpp b/src/dawntools/util/generator/SceneAssetGenerator.cpp
index f8b47005..35d40d5b 100644
--- a/src/dawntools/util/generator/SceneAssetGenerator.cpp
+++ b/src/dawntools/util/generator/SceneAssetGenerator.cpp
@@ -10,6 +10,7 @@ using namespace Dawn;
void SceneAssetGenerator::generate(
std::map &assetMap,
int32_t &assetNumber,
+ std::vector *publicProperties,
std::vector *initBody,
std::vector *assetsBody,
struct SceneAsset *asset,
@@ -17,6 +18,7 @@ void SceneAssetGenerator::generate(
) {
std::string assetType = "";
+ bool_t componentInit = true;
if(asset->ref.empty()) {
asset->usageName = "asset" + std::to_string(assetNumber++);
} else {
@@ -40,6 +42,12 @@ void SceneAssetGenerator::generate(
assertUnreachable();
}
- line(initBody, "auto " + asset->usageName + " = man->get<" + assetType + ">(\"" + asset->fileName + "\");", "");
+ if(!asset->ref.empty()) {
+ line(publicProperties, assetType + " *" + asset->usageName + " = nullptr;", "");
+ line(initBody, asset->usageName + " = man->get<" + assetType + ">(\"" + asset->fileName + "\");", "");
+ } else {
+ line(initBody, "auto " + asset->usageName + " = man->get<" + assetType + ">(\"" + asset->fileName + "\");", "");
+ }
+
line(assetsBody, "assets.push_back(man->get<" + assetType + ">(\"" + asset->fileName + "\"));", "");
}
\ No newline at end of file
diff --git a/src/dawntools/util/generator/SceneAssetGenerator.hpp b/src/dawntools/util/generator/SceneAssetGenerator.hpp
index 08eeb394..dbae2b27 100644
--- a/src/dawntools/util/generator/SceneAssetGenerator.hpp
+++ b/src/dawntools/util/generator/SceneAssetGenerator.hpp
@@ -13,6 +13,7 @@ namespace Dawn {
static void generate(
std::map &assetMap,
int32_t &assetNumber,
+ std::vector *publicProperties,
std::vector *initBody,
std::vector *assetsBody,
struct SceneAsset *asset,
diff --git a/src/dawntools/util/generator/SceneItemGenerator.cpp b/src/dawntools/util/generator/SceneItemGenerator.cpp
index 2679e5f6..54dce3fb 100644
--- a/src/dawntools/util/generator/SceneItemGenerator.cpp
+++ b/src/dawntools/util/generator/SceneItemGenerator.cpp
@@ -149,6 +149,7 @@ void SceneItemGenerator::generate(
SceneAssetGenerator::generate(
assetMap,
assetNumber,
+ publicProperties,
initBody,
assetBody,
&(*itAssets),
diff --git a/src/dawntools/vnscenetool/CMakeLists.txt b/src/dawntools/vnscenetool/CMakeLists.txt
index c0c43fe3..bf779c19 100644
--- a/src/dawntools/vnscenetool/CMakeLists.txt
+++ b/src/dawntools/vnscenetool/CMakeLists.txt
@@ -52,7 +52,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"
+ COMMAND vnscenetool --input="${in}" --output="${DAWN_GENERATED_DIR}/generatedscenes"
COMMENT "Generating vnscene from ${in}"
DEPENDS ${DEPS}
)