Added ave and craig

This commit is contained in:
2023-08-01 23:06:47 -07:00
parent 440b753d2a
commit 5ea312bc34
83 changed files with 531 additions and 18 deletions

View File

@ -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

View File

@ -0,0 +1,13 @@
<prefab name="AvePrefab" type="">
<item>
<MeshRenderer />
<QuadMeshHost xy0="-0.35310734463276836158, 0.5201" xy1="0.35310734463276836158, 0" />
<SimpleTexturedMaterial ref="poseMaterial" opaque="false" />
</item>
<item>
<MeshRenderer />
<QuadMeshHost xy0="-0.35310734463276836158, 1" xy1="0.35310734463276836158, 0.5201" />
<SimpleTexturedMaterial ref="faceMaterial" opaque="false" />
</item>
</prefab>

View File

@ -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)

View File

@ -0,0 +1,27 @@
<prefab name="CraigPrefab" type="">
<!--
4779
1361/4779 = 0.2849
1 - 0.2849 = 0.7151
3375/4779 = 0.7061/2=0.35305
-->
<item>
<MeshRenderer />
<QuadMeshHost xy0="-0.35305, 0.7151" xy1="0.35305, 0" />
<SimpleTexturedMaterial ref="bodyMaterial" opaque="false" />
</item>
<item>
<MeshRenderer />
<QuadMeshHost xy0="-0.35305, 1" xy1="0.35305, 0.7151" />
<SimpleTexturedMaterial ref="faceMaterial" opaque="false" />
</item>
<item>
<MeshRenderer />
<QuadMeshHost xy0="-0.35305, 1" xy1="0.35305, 0" />
<SimpleTexturedMaterial ref="poseMaterial" opaque="false" />
</item>
</prefab>

View File

@ -1,13 +1,13 @@
<prefab name="RoninPrefab" type="" scale="2, 2, 2">
<item>
<MeshRenderer />
<QuadMeshHost xy0="-0.37383385162150155487, 1" xy1="0.37383385162150155487, 0" />
<QuadMeshHost xy0="-0.37383385162150155487, 0.63894826849080803762" xy1="0.37383385162150155487, 0" />
<SimpleTexturedMaterial ref="bodyMaterial" opaque="false" />
</item>
<item>
<MeshRenderer />
<QuadMeshHost xy0="-0.37383385162150155487, 1" xy1="0.37383385162150155487, 0" />
<QuadMeshHost xy0="-0.37383385162150155487, 1" xy1="0.37383385162150155487, 0.63894826849080803762" />
<SimpleTexturedMaterial ref="faceMaterial" opaque="false" />
</item>

View File

@ -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")

View File

@ -1,5 +1,6 @@
<vnscene name="SceneInitial" extend="scenes/SceneMonologue">
<events>
<scene-change scene="vnscenes/ScenePrologue5" />
<!-- <scene-change scene="vnscenes/ScenePrologue5" /> -->
<scene-change scene="vnscenes/TestCraig" />
</events>
</vnscene>

View File

@ -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)

View File

@ -0,0 +1,16 @@
<vnscene name="TestAve" extend="scenes/SceneStandard">
<item ref="ave" prefab="prefabs/AvePrefab" />
<asset type="texture" name="texture_ave_face_day_anger" ref="aveFaceNeutral" />
<asset type="texture" name="texture_ave_pose_day_cross" ref="avePoseCross" />
<events>
<set-font font="font_main" style="italics" size="32" />
<set property="ave->faceMaterial->texture" type="Texture*" value="&aveFaceNeutral->texture" />
<set property="ave->poseMaterial->texture" type="Texture*" value="&avePoseCross->texture" />
<text>
<string lang="en"><font style="italics">TEST SCENE.</font></string>
</text>
</events>
</vnscene>

View File

@ -0,0 +1,18 @@
<vnscene name="TestCraig" extend="scenes/SceneStandard">
<item ref="craig" prefab="prefabs/CraigPrefab" />
<asset type="texture" name="texture_craig_face_day_neutral" ref="craigFaceNeutral" />
<asset type="texture" name="texture_craig_pose_day_cross" ref="craigPoseCross" />
<asset type="texture" name="texture_craig_pose_day_body" ref="craigBody" />
<events>
<set-font font="font_main" style="italics" size="32" />
<set property="craig->faceMaterial->texture" type="Texture*" value="&craigFaceNeutral->texture" />
<set property="craig->poseMaterial->texture" type="Texture*" value="&craigPoseCross->texture" />
<set property="craig->bodyMaterial->texture" type="Texture*" value="&craigBody->texture" />
<text>
<string lang="en"><font style="italics">TEST SCENE.</font></string>
</text>
</events>
</vnscene>

View File

@ -0,0 +1,16 @@
<vnscene name="TestEth" extend="scenes/SceneStandard">
<item ref="eth" prefab="prefabs/EthPrefab" />
<asset type="texture" name="texture_eth_face_day_anger" ref="ethFaceNeutral" />
<asset type="texture" name="texture_eth_pose_day_cross" ref="ethPoseCross" />
<events>
<set-font font="font_main" style="italics" size="32" />
<set property="eth->faceMaterial->texture" type="Texture*" value="&ethFaceNeutral->texture" />
<set property="eth->poseMaterial->texture" type="Texture*" value="&ethPoseCross->texture" />
<text>
<string lang="en"><font style="italics">TEST SCENE.</font></string>
</text>
</events>
</vnscene>

View File

@ -0,0 +1,18 @@
<vnscene name="TestRonin" extend="scenes/SceneStandard">
<item ref="ronin" prefab="prefabs/RoninPrefab" />
<asset type="texture" name="texture_ronin_face_day_furious" ref="roninFaceNeutral" />
<asset type="texture" name="texture_ronin_pose_day_cross" ref="roninPoseCross" />
<asset type="texture" name="texture_ronin_pose_day_body" ref="roninBody" />
<events>
<set-font font="font_main" style="italics" size="32" />
<set property="ronin->faceMaterial->texture" type="Texture*" value="&roninFaceNeutral->texture" />
<set property="ronin->poseMaterial->texture" type="Texture*" value="&roninPoseCross->texture" />
<set property="ronin->bodyMaterial->texture" type="Texture*" value="&roninBody->texture" />
<text>
<string lang="en"><font style="italics">TEST SCENE.</font></string>
</text>
</events>
</vnscene>

View File

@ -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")

View File

@ -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")

View File

@ -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)

View File

@ -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}
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

View File

@ -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}
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

View File

@ -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)

View File

@ -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}
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 MiB

View File

@ -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}
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 MiB

View File

@ -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")

View File

@ -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)

View File

@ -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}
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -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}
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

View File

@ -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")

View File

@ -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}
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 MiB

View File

@ -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}
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 MiB

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

2
ci/install-linux-toolchain.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
sudo apt install build-essential

View File

@ -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() {

View File

@ -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();
}

View File

@ -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 {};

View File

@ -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<std::string(std::string, std::string*)> parserFromTypeName(std::string type) {

View File

@ -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}
)

View File

@ -25,7 +25,8 @@ std::map<std::string, std::string> 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;