diff --git a/.github/workflows/build-liminal-glfw-linux64.yml b/.github/workflows/build-liminal-glfw-linux64.yml
new file mode 100644
index 00000000..fadb2d6f
--- /dev/null
+++ b/.github/workflows/build-liminal-glfw-linux64.yml
@@ -0,0 +1,26 @@
+name: build-liminal-glfw-linux64
+on:
+ push:
+ branches: [ master ]
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Install Toolchain
+ run: ./ci/install-linux-toolchain.sh
+
+ - name: Install Libraries
+ run: ./ci/install-libraries.sh
+
+ - name: Build Tools
+ run: ./ci/build-tools.sh
+
+ - name: Build Game
+ run: |
+ mkdir build
+ cd build
+ cmake .. -DDAWN_BUILD_TARGET=target-liminial-linux64-glfw
+ make
\ No newline at end of file
diff --git a/assets/games/liminal/prefabs/AvePrefab.xml b/assets/games/liminal/prefabs/AvePrefab.xml
new file mode 100644
index 00000000..4a3d29a7
--- /dev/null
+++ b/assets/games/liminal/prefabs/AvePrefab.xml
@@ -0,0 +1,13 @@
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
diff --git a/assets/games/liminal/prefabs/CMakeLists.txt b/assets/games/liminal/prefabs/CMakeLists.txt
index 42cc0124..f1805405 100644
--- a/assets/games/liminal/prefabs/CMakeLists.txt
+++ b/assets/games/liminal/prefabs/CMakeLists.txt
@@ -3,7 +3,9 @@
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
+tool_prefab(${CMAKE_CURRENT_LIST_DIR}/AvePrefab.xml)
tool_prefab(${CMAKE_CURRENT_LIST_DIR}/EthPrefab.xml)
+tool_prefab(${CMAKE_CURRENT_LIST_DIR}/CraigPrefab.xml)
tool_prefab(${CMAKE_CURRENT_LIST_DIR}/RoninPrefab.xml)
tool_prefab(${CMAKE_CURRENT_LIST_DIR}/VNTextbox.xml)
tool_prefab(${CMAKE_CURRENT_LIST_DIR}/VNTextboxMonologue.xml)
\ No newline at end of file
diff --git a/assets/games/liminal/prefabs/CraigPrefab.xml b/assets/games/liminal/prefabs/CraigPrefab.xml
new file mode 100644
index 00000000..25ae3867
--- /dev/null
+++ b/assets/games/liminal/prefabs/CraigPrefab.xml
@@ -0,0 +1,27 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
diff --git a/assets/games/liminal/prefabs/RoninPrefab.xml b/assets/games/liminal/prefabs/RoninPrefab.xml
index 772b35ab..4519ac99 100644
--- a/assets/games/liminal/prefabs/RoninPrefab.xml
+++ b/assets/games/liminal/prefabs/RoninPrefab.xml
@@ -1,13 +1,13 @@
-
-
+
-
-
+
diff --git a/assets/games/liminal/scenes/CMakeLists.txt b/assets/games/liminal/scenes/CMakeLists.txt
index bc67d7cb..e302b637 100644
--- a/assets/games/liminal/scenes/CMakeLists.txt
+++ b/assets/games/liminal/scenes/CMakeLists.txt
@@ -7,4 +7,5 @@ tool_scene(${CMAKE_CURRENT_LIST_DIR}/SceneStandard.xml)
tool_scene(${CMAKE_CURRENT_LIST_DIR}/SceneMonologue.xml)
tool_vnscene(${CMAKE_CURRENT_LIST_DIR}/SceneInitial.xml)
+include("${CMAKE_CURRENT_LIST_DIR}/test/CMakeLists.txt")
include("${CMAKE_CURRENT_LIST_DIR}/prologue/CMakeLists.txt")
\ No newline at end of file
diff --git a/assets/games/liminal/scenes/SceneInitial.xml b/assets/games/liminal/scenes/SceneInitial.xml
index 0ad55bd4..7d1d5abc 100644
--- a/assets/games/liminal/scenes/SceneInitial.xml
+++ b/assets/games/liminal/scenes/SceneInitial.xml
@@ -1,5 +1,6 @@
-
+
+
\ No newline at end of file
diff --git a/assets/games/liminal/scenes/test/CMakeLists.txt b/assets/games/liminal/scenes/test/CMakeLists.txt
new file mode 100644
index 00000000..dbe46730
--- /dev/null
+++ b/assets/games/liminal/scenes/test/CMakeLists.txt
@@ -0,0 +1,9 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_vnscene(${CMAKE_CURRENT_LIST_DIR}/TestAve.xml)
+tool_vnscene(${CMAKE_CURRENT_LIST_DIR}/TestCraig.xml)
+tool_vnscene(${CMAKE_CURRENT_LIST_DIR}/TestEth.xml)
+tool_vnscene(${CMAKE_CURRENT_LIST_DIR}/TestRonin.xml)
\ No newline at end of file
diff --git a/assets/games/liminal/scenes/test/TestAve.xml b/assets/games/liminal/scenes/test/TestAve.xml
new file mode 100644
index 00000000..3f46235d
--- /dev/null
+++ b/assets/games/liminal/scenes/test/TestAve.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ TEST SCENE.
+
+
+
\ No newline at end of file
diff --git a/assets/games/liminal/scenes/test/TestCraig.xml b/assets/games/liminal/scenes/test/TestCraig.xml
new file mode 100644
index 00000000..fafee3bb
--- /dev/null
+++ b/assets/games/liminal/scenes/test/TestCraig.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TEST SCENE.
+
+
+
\ No newline at end of file
diff --git a/assets/games/liminal/scenes/test/TestEth.xml b/assets/games/liminal/scenes/test/TestEth.xml
new file mode 100644
index 00000000..59b4285d
--- /dev/null
+++ b/assets/games/liminal/scenes/test/TestEth.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ TEST SCENE.
+
+
+
\ No newline at end of file
diff --git a/assets/games/liminal/scenes/test/TestRonin.xml b/assets/games/liminal/scenes/test/TestRonin.xml
new file mode 100644
index 00000000..4788c14f
--- /dev/null
+++ b/assets/games/liminal/scenes/test/TestRonin.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TEST SCENE.
+
+
+
\ No newline at end of file
diff --git a/assets/games/liminal/textures/CMakeLists.txt b/assets/games/liminal/textures/CMakeLists.txt
index 5b5f24a6..4e80536b 100644
--- a/assets/games/liminal/textures/CMakeLists.txt
+++ b/assets/games/liminal/textures/CMakeLists.txt
@@ -5,6 +5,8 @@
set(LIMINIAL_CHARACTER_SCALE 0.2)
+include("${CMAKE_CURRENT_LIST_DIR}/ave/CMakeLists.txt")
+include("${CMAKE_CURRENT_LIST_DIR}/craig/CMakeLists.txt")
include("${CMAKE_CURRENT_LIST_DIR}/eth/CMakeLists.txt")
include("${CMAKE_CURRENT_LIST_DIR}/ronin/CMakeLists.txt")
diff --git a/assets/games/liminal/textures/ave/CMakeLists.txt b/assets/games/liminal/textures/ave/CMakeLists.txt
new file mode 100644
index 00000000..a44f1334
--- /dev/null
+++ b/assets/games/liminal/textures/ave/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/ave/faces/CMakeLists.txt b/assets/games/liminal/textures/ave/faces/CMakeLists.txt
new file mode 100644
index 00000000..1feee355
--- /dev/null
+++ b/assets/games/liminal/textures/ave/faces/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+set(AVE_FACE_TEXTURE_OPTIONS
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+ FILTER_MIN=nearest
+ FILTER_MAG=nearest
+ CROP_END_Y=2294
+)
+
+include(${CMAKE_CURRENT_LIST_DIR}/day/CMakeLists.txt)
+include(${CMAKE_CURRENT_LIST_DIR}/night/CMakeLists.txt)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/ave/faces/day/CMakeLists.txt b/assets/games/liminal/textures/ave/faces/day/CMakeLists.txt
new file mode 100644
index 00000000..ef2bd2d9
--- /dev/null
+++ b/assets/games/liminal/textures/ave/faces/day/CMakeLists.txt
@@ -0,0 +1,35 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+
+tool_texture(texture_ave_face_day_anger
+ FILE="${CMAKE_CURRENT_LIST_DIR}/anger.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_face_day_confused
+ FILE="${CMAKE_CURRENT_LIST_DIR}/confused.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_face_day_fear
+ FILE="${CMAKE_CURRENT_LIST_DIR}/fear.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_face_day_happy
+ FILE="${CMAKE_CURRENT_LIST_DIR}/happy.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_face_day_neutral
+ FILE="${CMAKE_CURRENT_LIST_DIR}/neutral.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_face_day_pensive
+ FILE="${CMAKE_CURRENT_LIST_DIR}/pensive.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/ave/faces/day/anger.png b/assets/games/liminal/textures/ave/faces/day/anger.png
new file mode 100644
index 00000000..435ec83f
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/day/anger.png differ
diff --git a/assets/games/liminal/textures/ave/faces/day/confused.png b/assets/games/liminal/textures/ave/faces/day/confused.png
new file mode 100644
index 00000000..399b2f88
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/day/confused.png differ
diff --git a/assets/games/liminal/textures/ave/faces/day/fear.png b/assets/games/liminal/textures/ave/faces/day/fear.png
new file mode 100644
index 00000000..b2810af0
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/day/fear.png differ
diff --git a/assets/games/liminal/textures/ave/faces/day/happy.png b/assets/games/liminal/textures/ave/faces/day/happy.png
new file mode 100644
index 00000000..0b119728
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/day/happy.png differ
diff --git a/assets/games/liminal/textures/ave/faces/day/neutral.png b/assets/games/liminal/textures/ave/faces/day/neutral.png
new file mode 100644
index 00000000..c4effa20
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/day/neutral.png differ
diff --git a/assets/games/liminal/textures/ave/faces/day/pensive.png b/assets/games/liminal/textures/ave/faces/day/pensive.png
new file mode 100644
index 00000000..9f244b8f
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/day/pensive.png differ
diff --git a/assets/games/liminal/textures/ave/faces/night/CMakeLists.txt b/assets/games/liminal/textures/ave/faces/night/CMakeLists.txt
new file mode 100644
index 00000000..8adc7f48
--- /dev/null
+++ b/assets/games/liminal/textures/ave/faces/night/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_texture(texture_ave_face_night_anger
+ FILE="${CMAKE_CURRENT_LIST_DIR}/anger.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_face_night_confused
+ FILE="${CMAKE_CURRENT_LIST_DIR}/confused.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_face_night_fear
+ FILE="${CMAKE_CURRENT_LIST_DIR}/fear.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_face_night_happy
+ FILE="${CMAKE_CURRENT_LIST_DIR}/happy.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_face_night_neutral
+ FILE="${CMAKE_CURRENT_LIST_DIR}/neutral.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_face_night_pensive
+ FILE="${CMAKE_CURRENT_LIST_DIR}/pensive.png"
+ ${AVE_FACE_TEXTURE_OPTIONS}
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/ave/faces/night/anger.png b/assets/games/liminal/textures/ave/faces/night/anger.png
new file mode 100644
index 00000000..cbc3152f
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/night/anger.png differ
diff --git a/assets/games/liminal/textures/ave/faces/night/confused.png b/assets/games/liminal/textures/ave/faces/night/confused.png
new file mode 100644
index 00000000..e5fd3b03
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/night/confused.png differ
diff --git a/assets/games/liminal/textures/ave/faces/night/fear.png b/assets/games/liminal/textures/ave/faces/night/fear.png
new file mode 100644
index 00000000..a24bd1a9
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/night/fear.png differ
diff --git a/assets/games/liminal/textures/ave/faces/night/happy.png b/assets/games/liminal/textures/ave/faces/night/happy.png
new file mode 100644
index 00000000..b689e733
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/night/happy.png differ
diff --git a/assets/games/liminal/textures/ave/faces/night/neutral.png b/assets/games/liminal/textures/ave/faces/night/neutral.png
new file mode 100644
index 00000000..1f683869
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/night/neutral.png differ
diff --git a/assets/games/liminal/textures/ave/faces/night/pensive.png b/assets/games/liminal/textures/ave/faces/night/pensive.png
new file mode 100644
index 00000000..bbae3366
Binary files /dev/null and b/assets/games/liminal/textures/ave/faces/night/pensive.png differ
diff --git a/assets/games/liminal/textures/ave/poses/CMakeLists.txt b/assets/games/liminal/textures/ave/poses/CMakeLists.txt
new file mode 100644
index 00000000..096ca33a
--- /dev/null
+++ b/assets/games/liminal/textures/ave/poses/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+set(AVE_POSE_TEXTURE_OPTIONS
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+ FILTER_MIN=nearest
+ FILTER_MAG=nearest
+ CROP_START_Y=2294
+)
+
+include(${CMAKE_CURRENT_LIST_DIR}/day/CMakeLists.txt)
+include(${CMAKE_CURRENT_LIST_DIR}/night/CMakeLists.txt)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/ave/poses/day/CMakeLists.txt b/assets/games/liminal/textures/ave/poses/day/CMakeLists.txt
new file mode 100644
index 00000000..8e2bd539
--- /dev/null
+++ b/assets/games/liminal/textures/ave/poses/day/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_texture(texture_ave_pose_day_cross
+ FILE="${CMAKE_CURRENT_LIST_DIR}/cross.png"
+ ${AVE_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_pose_day_front
+ FILE="${CMAKE_CURRENT_LIST_DIR}/pocket.png"
+ ${AVE_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_pose_day_hips
+ FILE="${CMAKE_CURRENT_LIST_DIR}/wrist.png"
+ ${AVE_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_pose_day_neutral
+ FILE="${CMAKE_CURRENT_LIST_DIR}/neutral.png"
+ ${AVE_POSE_TEXTURE_OPTIONS}
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/ave/poses/day/cross.png b/assets/games/liminal/textures/ave/poses/day/cross.png
new file mode 100644
index 00000000..4c9d5cbc
Binary files /dev/null and b/assets/games/liminal/textures/ave/poses/day/cross.png differ
diff --git a/assets/games/liminal/textures/ave/poses/day/neutral.png b/assets/games/liminal/textures/ave/poses/day/neutral.png
new file mode 100644
index 00000000..c601dd5c
Binary files /dev/null and b/assets/games/liminal/textures/ave/poses/day/neutral.png differ
diff --git a/assets/games/liminal/textures/ave/poses/day/pocket.png b/assets/games/liminal/textures/ave/poses/day/pocket.png
new file mode 100644
index 00000000..086d7b59
Binary files /dev/null and b/assets/games/liminal/textures/ave/poses/day/pocket.png differ
diff --git a/assets/games/liminal/textures/ave/poses/day/wrist.png b/assets/games/liminal/textures/ave/poses/day/wrist.png
new file mode 100644
index 00000000..d0b69ac5
Binary files /dev/null and b/assets/games/liminal/textures/ave/poses/day/wrist.png differ
diff --git a/assets/games/liminal/textures/ave/poses/night/CMakeLists.txt b/assets/games/liminal/textures/ave/poses/night/CMakeLists.txt
new file mode 100644
index 00000000..a7c8b4bc
--- /dev/null
+++ b/assets/games/liminal/textures/ave/poses/night/CMakeLists.txt
@@ -0,0 +1,24 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_texture(texture_ave_pose_night_cross
+ FILE="${CMAKE_CURRENT_LIST_DIR}/cross.png"
+ ${AVE_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_pose_night_front
+ FILE="${CMAKE_CURRENT_LIST_DIR}/pocket.png"
+ ${AVE_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_pose_night_hips
+ FILE="${CMAKE_CURRENT_LIST_DIR}/wrist.png"
+ ${AVE_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_ave_pose_night_neutral
+ FILE="${CMAKE_CURRENT_LIST_DIR}/neutral.png"
+ ${AVE_POSE_TEXTURE_OPTIONS}
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/ave/poses/night/cross.png b/assets/games/liminal/textures/ave/poses/night/cross.png
new file mode 100644
index 00000000..2d917c3a
Binary files /dev/null and b/assets/games/liminal/textures/ave/poses/night/cross.png differ
diff --git a/assets/games/liminal/textures/ave/poses/night/neutral.png b/assets/games/liminal/textures/ave/poses/night/neutral.png
new file mode 100644
index 00000000..9e6d7322
Binary files /dev/null and b/assets/games/liminal/textures/ave/poses/night/neutral.png differ
diff --git a/assets/games/liminal/textures/ave/poses/night/pocket.png b/assets/games/liminal/textures/ave/poses/night/pocket.png
new file mode 100644
index 00000000..586d81de
Binary files /dev/null and b/assets/games/liminal/textures/ave/poses/night/pocket.png differ
diff --git a/assets/games/liminal/textures/ave/poses/night/wrist.png b/assets/games/liminal/textures/ave/poses/night/wrist.png
new file mode 100644
index 00000000..30eddf00
Binary files /dev/null and b/assets/games/liminal/textures/ave/poses/night/wrist.png differ
diff --git a/assets/games/liminal/textures/craig/CMakeLists.txt b/assets/games/liminal/textures/craig/CMakeLists.txt
new file mode 100644
index 00000000..a44f1334
--- /dev/null
+++ b/assets/games/liminal/textures/craig/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/craig/faces/CMakeLists.txt b/assets/games/liminal/textures/craig/faces/CMakeLists.txt
new file mode 100644
index 00000000..42061842
--- /dev/null
+++ b/assets/games/liminal/textures/craig/faces/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+set(CRAIG_FACE_TEXTURE_OPTIONS
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+ FILTER_MIN=nearest
+ FILTER_MAG=nearest
+ CROP_END_Y=1361
+)
+
+include(${CMAKE_CURRENT_LIST_DIR}/day/CMakeLists.txt)
+include(${CMAKE_CURRENT_LIST_DIR}/night/CMakeLists.txt)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/craig/faces/day/CMakeLists.txt b/assets/games/liminal/textures/craig/faces/day/CMakeLists.txt
new file mode 100644
index 00000000..2bb81318
--- /dev/null
+++ b/assets/games/liminal/textures/craig/faces/day/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_texture(texture_craig_face_day_anger
+ FILE="${CMAKE_CURRENT_LIST_DIR}/anger.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_face_day_confused
+ FILE="${CMAKE_CURRENT_LIST_DIR}/confused.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_face_day_fear
+ FILE="${CMAKE_CURRENT_LIST_DIR}/fear.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_face_day_happy
+ FILE="${CMAKE_CURRENT_LIST_DIR}/happy.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_face_day_neutral
+ FILE="${CMAKE_CURRENT_LIST_DIR}/neutral.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_face_day_thinking
+ FILE="${CMAKE_CURRENT_LIST_DIR}/thinking.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/craig/faces/day/anger.png b/assets/games/liminal/textures/craig/faces/day/anger.png
new file mode 100644
index 00000000..c542f00f
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/day/anger.png differ
diff --git a/assets/games/liminal/textures/craig/faces/day/confused.png b/assets/games/liminal/textures/craig/faces/day/confused.png
new file mode 100644
index 00000000..da26c186
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/day/confused.png differ
diff --git a/assets/games/liminal/textures/craig/faces/day/fear.png b/assets/games/liminal/textures/craig/faces/day/fear.png
new file mode 100644
index 00000000..99f40c3b
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/day/fear.png differ
diff --git a/assets/games/liminal/textures/craig/faces/day/happy.png b/assets/games/liminal/textures/craig/faces/day/happy.png
new file mode 100644
index 00000000..1ee6d2de
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/day/happy.png differ
diff --git a/assets/games/liminal/textures/craig/faces/day/neutral.png b/assets/games/liminal/textures/craig/faces/day/neutral.png
new file mode 100644
index 00000000..042ad41e
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/day/neutral.png differ
diff --git a/assets/games/liminal/textures/craig/faces/day/thinking.png b/assets/games/liminal/textures/craig/faces/day/thinking.png
new file mode 100644
index 00000000..1b84fb1e
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/day/thinking.png differ
diff --git a/assets/games/liminal/textures/craig/faces/night/CMakeLists.txt b/assets/games/liminal/textures/craig/faces/night/CMakeLists.txt
new file mode 100644
index 00000000..1ed56659
--- /dev/null
+++ b/assets/games/liminal/textures/craig/faces/night/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_texture(texture_craig_face_night_anger
+ FILE="${CMAKE_CURRENT_LIST_DIR}/anger.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_face_night_confused
+ FILE="${CMAKE_CURRENT_LIST_DIR}/confused.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_face_night_fear
+ FILE="${CMAKE_CURRENT_LIST_DIR}/fear.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_face_night_happy
+ FILE="${CMAKE_CURRENT_LIST_DIR}/happy.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_face_night_neutral
+ FILE="${CMAKE_CURRENT_LIST_DIR}/neutral.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_face_night_thinking
+ FILE="${CMAKE_CURRENT_LIST_DIR}/thinking.png"
+ ${CRAIG_FACE_TEXTURE_OPTIONS}
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/craig/faces/night/anger.png b/assets/games/liminal/textures/craig/faces/night/anger.png
new file mode 100644
index 00000000..7ff3a7dd
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/night/anger.png differ
diff --git a/assets/games/liminal/textures/craig/faces/night/confused.png b/assets/games/liminal/textures/craig/faces/night/confused.png
new file mode 100644
index 00000000..643c193a
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/night/confused.png differ
diff --git a/assets/games/liminal/textures/craig/faces/night/fear.png b/assets/games/liminal/textures/craig/faces/night/fear.png
new file mode 100644
index 00000000..03296bc0
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/night/fear.png differ
diff --git a/assets/games/liminal/textures/craig/faces/night/happy.png b/assets/games/liminal/textures/craig/faces/night/happy.png
new file mode 100644
index 00000000..fc2cfada
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/night/happy.png differ
diff --git a/assets/games/liminal/textures/craig/faces/night/neutral.png b/assets/games/liminal/textures/craig/faces/night/neutral.png
new file mode 100644
index 00000000..43b275bf
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/night/neutral.png differ
diff --git a/assets/games/liminal/textures/craig/faces/night/thinking.png b/assets/games/liminal/textures/craig/faces/night/thinking.png
new file mode 100644
index 00000000..925c769c
Binary files /dev/null and b/assets/games/liminal/textures/craig/faces/night/thinking.png differ
diff --git a/assets/games/liminal/textures/craig/poses/CMakeLists.txt b/assets/games/liminal/textures/craig/poses/CMakeLists.txt
new file mode 100644
index 00000000..393cba3f
--- /dev/null
+++ b/assets/games/liminal/textures/craig/poses/CMakeLists.txt
@@ -0,0 +1,18 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+set(CRAIG_POSE_TEXTURE_OPTIONS
+ SCALE=${LIMINIAL_CHARACTER_SCALE}
+ FILTER_MIN=nearest
+ FILTER_MAG=nearest
+)
+
+set(CRAIG_BODY_TEXTURE_OPTIONS
+ ${CRAIG_POSE_TEXTURE_OPTIONS}
+ CROP_START_Y=1361
+)
+
+include("${CMAKE_CURRENT_LIST_DIR}/day/CMakeLists.txt")
+include("${CMAKE_CURRENT_LIST_DIR}/night/CMakeLists.txt")
\ No newline at end of file
diff --git a/assets/games/liminal/textures/craig/poses/day/CMakeLists.txt b/assets/games/liminal/textures/craig/poses/day/CMakeLists.txt
new file mode 100644
index 00000000..6548ff3d
--- /dev/null
+++ b/assets/games/liminal/textures/craig/poses/day/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_texture(texture_craig_pose_day_body
+ FILE="${CMAKE_CURRENT_LIST_DIR}/body.png"
+ ${CRAIG_BODY_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_pose_day_cross
+ FILE="${CMAKE_CURRENT_LIST_DIR}/cross.png"
+ ${CRAIG_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_pose_day_gun
+ FILE="${CMAKE_CURRENT_LIST_DIR}/fist.png"
+ ${CRAIG_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_pose_day_hair
+ FILE="${CMAKE_CURRENT_LIST_DIR}/hair.png"
+ ${CRAIG_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_pose_day_neck
+ FILE="${CMAKE_CURRENT_LIST_DIR}/pocket.png"
+ ${CRAIG_POSE_TEXTURE_OPTIONS}
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/craig/poses/day/body.png b/assets/games/liminal/textures/craig/poses/day/body.png
new file mode 100644
index 00000000..20f2a11f
Binary files /dev/null and b/assets/games/liminal/textures/craig/poses/day/body.png differ
diff --git a/assets/games/liminal/textures/craig/poses/day/cross.png b/assets/games/liminal/textures/craig/poses/day/cross.png
new file mode 100644
index 00000000..522670c6
Binary files /dev/null and b/assets/games/liminal/textures/craig/poses/day/cross.png differ
diff --git a/assets/games/liminal/textures/craig/poses/day/fist.png b/assets/games/liminal/textures/craig/poses/day/fist.png
new file mode 100644
index 00000000..adcba745
Binary files /dev/null and b/assets/games/liminal/textures/craig/poses/day/fist.png differ
diff --git a/assets/games/liminal/textures/craig/poses/day/hair.png b/assets/games/liminal/textures/craig/poses/day/hair.png
new file mode 100644
index 00000000..a9f88fb7
Binary files /dev/null and b/assets/games/liminal/textures/craig/poses/day/hair.png differ
diff --git a/assets/games/liminal/textures/craig/poses/day/pocket.png b/assets/games/liminal/textures/craig/poses/day/pocket.png
new file mode 100644
index 00000000..1ef6905d
Binary files /dev/null and b/assets/games/liminal/textures/craig/poses/day/pocket.png differ
diff --git a/assets/games/liminal/textures/craig/poses/night/CMakeLists.txt b/assets/games/liminal/textures/craig/poses/night/CMakeLists.txt
new file mode 100644
index 00000000..7b0a4060
--- /dev/null
+++ b/assets/games/liminal/textures/craig/poses/night/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Copyright (c) 2023 Dominic Masters
+#
+# This software is released under the MIT License.
+# https://opensource.org/licenses/MIT
+
+tool_texture(texture_craig_pose_night_body
+ FILE="${CMAKE_CURRENT_LIST_DIR}/body.png"
+ ${CRAIG_BODY_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_pose_night_cross
+ FILE="${CMAKE_CURRENT_LIST_DIR}/cross.png"
+ ${CRAIG_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_pose_night_gun
+ FILE="${CMAKE_CURRENT_LIST_DIR}/fist.png"
+ ${CRAIG_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_pose_night_hair
+ FILE="${CMAKE_CURRENT_LIST_DIR}/hair.png"
+ ${CRAIG_POSE_TEXTURE_OPTIONS}
+)
+
+tool_texture(texture_craig_pose_night_neck
+ FILE="${CMAKE_CURRENT_LIST_DIR}/pocket.png"
+ ${CRAIG_POSE_TEXTURE_OPTIONS}
+)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/craig/poses/night/body.png b/assets/games/liminal/textures/craig/poses/night/body.png
new file mode 100644
index 00000000..c57df471
Binary files /dev/null and b/assets/games/liminal/textures/craig/poses/night/body.png differ
diff --git a/assets/games/liminal/textures/craig/poses/night/cross.png b/assets/games/liminal/textures/craig/poses/night/cross.png
new file mode 100644
index 00000000..a2de7616
Binary files /dev/null and b/assets/games/liminal/textures/craig/poses/night/cross.png differ
diff --git a/assets/games/liminal/textures/craig/poses/night/fist.png b/assets/games/liminal/textures/craig/poses/night/fist.png
new file mode 100644
index 00000000..38279771
Binary files /dev/null and b/assets/games/liminal/textures/craig/poses/night/fist.png differ
diff --git a/assets/games/liminal/textures/craig/poses/night/hair.png b/assets/games/liminal/textures/craig/poses/night/hair.png
new file mode 100644
index 00000000..2918f233
Binary files /dev/null and b/assets/games/liminal/textures/craig/poses/night/hair.png differ
diff --git a/assets/games/liminal/textures/craig/poses/night/pocket.png b/assets/games/liminal/textures/craig/poses/night/pocket.png
new file mode 100644
index 00000000..d307c872
Binary files /dev/null and b/assets/games/liminal/textures/craig/poses/night/pocket.png differ
diff --git a/assets/games/liminal/textures/eth/faces/CMakeLists.txt b/assets/games/liminal/textures/eth/faces/CMakeLists.txt
index a1ee9ec9..b83b15f2 100644
--- a/assets/games/liminal/textures/eth/faces/CMakeLists.txt
+++ b/assets/games/liminal/textures/eth/faces/CMakeLists.txt
@@ -7,7 +7,7 @@ set(ETH_FACE_TEXTURE_OPTIONS
SCALE=${LIMINIAL_CHARACTER_SCALE}
FILTER_MIN=nearest
FILTER_MAG=nearest
- CROP_END_Y=2833
+ CROP_END_Y=1431
)
include(${CMAKE_CURRENT_LIST_DIR}/day/CMakeLists.txt)
diff --git a/assets/games/liminal/textures/ronin/faces/CMakeLists.txt b/assets/games/liminal/textures/ronin/faces/CMakeLists.txt
index ee0ddd3a..f9285cd2 100644
--- a/assets/games/liminal/textures/ronin/faces/CMakeLists.txt
+++ b/assets/games/liminal/textures/ronin/faces/CMakeLists.txt
@@ -7,6 +7,7 @@ set(RONIN_FACE_TEXTURE_OPTIONS
SCALE=${LIMINIAL_CHARACTER_SCALE}
FILTER_MIN=nearest
FILTER_MAG=nearest
+ CROP_END_Y=1689
)
include(${CMAKE_CURRENT_LIST_DIR}/day/CMakeLists.txt)
diff --git a/assets/games/liminal/textures/ronin/faces/day/CMakeLists.txt b/assets/games/liminal/textures/ronin/faces/day/CMakeLists.txt
index 5ec03038..5a13245c 100644
--- a/assets/games/liminal/textures/ronin/faces/day/CMakeLists.txt
+++ b/assets/games/liminal/textures/ronin/faces/day/CMakeLists.txt
@@ -10,12 +10,12 @@ tool_texture(texture_ronin_face_day_anger
tool_texture(texture_ronin_face_day_confused
FILE="${CMAKE_CURRENT_LIST_DIR}/confused.png"
- ${ETH_FACE_TEXTURE_OPTIONS}
+ ${RONIN_FACE_TEXTURE_OPTIONS}
)
tool_texture(texture_ronin_face_day_furious
FILE="${CMAKE_CURRENT_LIST_DIR}/furious.png"
- ${ETH_FACE_TEXTURE_OPTIONS}
+ ${RONIN_FACE_TEXTURE_OPTIONS}
)
tool_texture(texture_ronin_face_day_happy
diff --git a/assets/games/liminal/textures/ronin/faces/night/CMakeLists.txt b/assets/games/liminal/textures/ronin/faces/night/CMakeLists.txt
index 438751fb..2c238083 100644
--- a/assets/games/liminal/textures/ronin/faces/night/CMakeLists.txt
+++ b/assets/games/liminal/textures/ronin/faces/night/CMakeLists.txt
@@ -10,12 +10,12 @@ tool_texture(texture_ronin_face_night_anger
tool_texture(texture_ronin_face_night_confused
FILE="${CMAKE_CURRENT_LIST_DIR}/confused.png"
- ${ETH_FACE_TEXTURE_OPTIONS}
+ ${RONIN_FACE_TEXTURE_OPTIONS}
)
tool_texture(texture_ronin_face_night_furious
FILE="${CMAKE_CURRENT_LIST_DIR}/furious.png"
- ${ETH_FACE_TEXTURE_OPTIONS}
+ ${RONIN_FACE_TEXTURE_OPTIONS}
)
tool_texture(texture_ronin_face_night_happy
diff --git a/assets/games/liminal/textures/ronin/poses/CMakeLists.txt b/assets/games/liminal/textures/ronin/poses/CMakeLists.txt
index 34da5429..38b5510a 100644
--- a/assets/games/liminal/textures/ronin/poses/CMakeLists.txt
+++ b/assets/games/liminal/textures/ronin/poses/CMakeLists.txt
@@ -9,5 +9,10 @@ set(RONIN_POSE_TEXTURE_OPTIONS
FILTER_MAG=nearest
)
+set(RONIN_BODY_TEXTURE_OPTIONS
+ ${RONIN_POSE_TEXTURE_OPTIONS}
+ CROP_START_Y=1689
+)
+
include(${CMAKE_CURRENT_LIST_DIR}/day/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/night/CMakeLists.txt)
\ No newline at end of file
diff --git a/assets/games/liminal/textures/ronin/poses/day/CMakeLists.txt b/assets/games/liminal/textures/ronin/poses/day/CMakeLists.txt
index 515ef6e9..11d359a6 100644
--- a/assets/games/liminal/textures/ronin/poses/day/CMakeLists.txt
+++ b/assets/games/liminal/textures/ronin/poses/day/CMakeLists.txt
@@ -5,7 +5,7 @@
tool_texture(texture_ronin_pose_day_body
FILE="${CMAKE_CURRENT_LIST_DIR}/body.png"
- ${RONIN_POSE_TEXTURE_OPTIONS}
+ ${RONIN_BODY_TEXTURE_OPTIONS}
)
tool_texture(texture_ronin_pose_day_cross
diff --git a/assets/games/liminal/textures/ronin/poses/night/CMakeLists.txt b/assets/games/liminal/textures/ronin/poses/night/CMakeLists.txt
index 8bbed88e..efff97bb 100644
--- a/assets/games/liminal/textures/ronin/poses/night/CMakeLists.txt
+++ b/assets/games/liminal/textures/ronin/poses/night/CMakeLists.txt
@@ -5,7 +5,7 @@
tool_texture(texture_ronin_pose_night_body
FILE="${CMAKE_CURRENT_LIST_DIR}/body.png"
- ${RONIN_POSE_TEXTURE_OPTIONS}
+ ${RONIN_BODY_TEXTURE_OPTIONS}
)
tool_texture(texture_ronin_pose_night_cross
diff --git a/ci/install-linux-toolchain.sh b/ci/install-linux-toolchain.sh
new file mode 100755
index 00000000..0485dc71
--- /dev/null
+++ b/ci/install-linux-toolchain.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+sudo apt install build-essential
\ No newline at end of file
diff --git a/src/dawn/asset/AssetLoader.cpp b/src/dawn/asset/AssetLoader.cpp
index 41cce6c7..2772b13b 100644
--- a/src/dawn/asset/AssetLoader.cpp
+++ b/src/dawn/asset/AssetLoader.cpp
@@ -18,7 +18,7 @@ void AssetLoader::open() {
assertNull(this->handle, "AssetLoader::open: File is already open");
std::string pathFull = DAWN_ASSET_BUILD_PREFIX + this->fileName;
this->handle = fopen(pathFull.c_str(), "rb");
- assertNotNull(this->handle, "AssetLoader::open: Failed to open file");
+ assertNotNull(this->handle, "AssetLoader::open: Failed to open file " + pathFull);
}
int32_t AssetLoader::close() {
diff --git a/src/dawn/games/vn/events/VNSetEvent.hpp b/src/dawn/games/vn/events/VNSetEvent.hpp
index ea0d5a33..70acbeca 100644
--- a/src/dawn/games/vn/events/VNSetEvent.hpp
+++ b/src/dawn/games/vn/events/VNSetEvent.hpp
@@ -15,7 +15,7 @@ namespace Dawn {
protected:
void onStart() override {
- assertNotNull(this->modifies);
+ assertNotNull(this->modifies, "VNSetEvent::onStart() modifies is null!");
*modifies = value;
this->next();
}
diff --git a/src/dawnshared/display/Color.cpp b/src/dawnshared/display/Color.cpp
index 747e0c3e..e9caa202 100644
--- a/src/dawnshared/display/Color.cpp
+++ b/src/dawnshared/display/Color.cpp
@@ -34,6 +34,28 @@ struct Color Color::fromString(std::string str) {
return COLOR_BLUE;
}
+ // Hex code?
+
+ // Split by comma
+ auto splitByComma = stringSplit(str, ",");
+ if(splitByComma.size() == 3) {
+ // RGB
+ return {
+ (float_t)std::stof(splitByComma[0]),
+ (float_t)std::stof(splitByComma[1]),
+ (float_t)std::stof(splitByComma[2]),
+ 1.0f
+ };
+ } else if(splitByComma.size() == 4) {
+ // RGBA
+ return {
+ (float_t)std::stof(splitByComma[0]),
+ (float_t)std::stof(splitByComma[1]),
+ (float_t)std::stof(splitByComma[2]),
+ (float_t)std::stof(splitByComma[3])
+ };
+ }
+
// TODO: Parse other kinds of colors
assertUnreachable("Failed to find a color match for " + str);
return {};
diff --git a/src/dawnshared/util/parser/TypeParsers.hpp b/src/dawnshared/util/parser/TypeParsers.hpp
index cc612eec..b464b678 100644
--- a/src/dawnshared/util/parser/TypeParsers.hpp
+++ b/src/dawnshared/util/parser/TypeParsers.hpp
@@ -124,7 +124,7 @@ namespace Dawn {
};
static inline std::string colorParser(std::string v, std::string *error) {
- return rawParser(v, error);
+ return "Color::fromString(" + stringParser(v, error) + ")";
}
static inline std::function parserFromTypeName(std::string type) {
diff --git a/src/dawntools/texturetool/CMakeLists.txt b/src/dawntools/texturetool/CMakeLists.txt
index 3e6bc6bf..8dc5874b 100644
--- a/src/dawntools/texturetool/CMakeLists.txt
+++ b/src/dawntools/texturetool/CMakeLists.txt
@@ -83,6 +83,7 @@ function(tool_texture target)
--cropStartY="${CROP_START_Y}"
--cropEndX="${CROP_END_X}"
--cropEndY="${CROP_END_Y}"
+ --preview="${DAWN_BUILD_DIR}/preview/${target}"
COMMENT "Generating texture ${target} from ${FILE}"
DEPENDS ${DEPS}
)
diff --git a/src/dawntools/texturetool/TextureTool.cpp b/src/dawntools/texturetool/TextureTool.cpp
index 24f099d1..97c11567 100644
--- a/src/dawntools/texturetool/TextureTool.cpp
+++ b/src/dawntools/texturetool/TextureTool.cpp
@@ -25,7 +25,8 @@ std::map TextureTool::getOptionalFlags() {
{ "cropStartX", "" },
{ "cropStartY", "" },
{ "cropEndX", "" },
- { "cropEndY", "" }
+ { "cropEndY", "" },
+ { "preview", "" }
};
}
@@ -73,14 +74,14 @@ int32_t TextureTool::start() {
if(!flags["cropEndY"].empty()) cropEndY = std::stoi(flags["cropEndY"]);
if(cropStartX > 0 || cropStartY > 0 || cropEndX > 0 || cropEndY > 0) {
- int32_t cropWidth = originalWidth - cropStartX - cropEndX;
- int32_t cropHeight = originalHeight - cropStartY - cropEndY;
+ int32_t cropWidth = (cropEndX == 0 ? originalWidth : cropEndX) - cropStartX;
+ int32_t cropHeight = (cropEndY == 0 ? originalHeight : cropEndY) - cropStartY;
float_t s0, t0, s1, t1;
s0 = (float_t)cropStartX / (float_t)originalWidth;
t0 = (float_t)cropStartY / (float_t)originalHeight;
- s1 = 1.0f - ((float_t)cropEndX / (float_t)originalWidth);
- t1 = 1.0f - ((float_t)cropEndY / (float_t)originalHeight);
+ s1 = ((float_t)(cropEndX == 0 ? originalWidth : cropEndX) / (float_t)originalWidth);
+ t1 = ((float_t)(cropEndY == 0 ? originalHeight : cropEndY) / (float_t)originalHeight);
stbir_resize_region(
bufferCurrent, currentWidth, currentHeight, 0,
@@ -165,6 +166,21 @@ int32_t TextureTool::start() {
return 1;
}
+ // Write preview
+ File preview(flags["preview"] + ".png");
+ if(!preview.mkdirp()) {
+ std::cout << "Failed to make preview dir " << preview.filename << std::endl;
+ return 1;
+ }
+ stbi_write_png(
+ preview.filename.c_str(),
+ currentWidth,
+ currentHeight,
+ STBI_rgb_alpha,
+ bufferCurrent,
+ 0
+ );
+
// Write texture
if(!out.writeRaw((char*)bufferCurrent, sizeof(uint8_t) * len)) {
std::cout << "Failed to write texture data for " << out.filename << std::endl;