Moving some assets around
9
assets/games/liminal/CMakeLists.txt
Normal file
@ -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")
|
11
assets/games/liminal/fonts/CMakeLists.txt
Normal file
@ -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
|
||||||
|
)
|
7
assets/games/liminal/prefabs/CMakeLists.txt
Normal file
@ -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)
|
@ -1,49 +1,43 @@
|
|||||||
<prefab name="EthPrefab" type="">
|
<prefab name="EthPrefab" type="">
|
||||||
<asset type="texture" name="texture_eth_faces_day" ref="faceTexture" />
|
<asset type="texture" name="texture_eth_face_day_happy" ref="faceDayHappy" />
|
||||||
<asset type="texture" name="texture_eth_poses_day" ref="bodyTexture" />
|
<asset type="texture" name="texture_eth_face_day_anger" ref="faceDayAnger" />
|
||||||
|
|
||||||
|
<asset type="texture" name="texture_eth_pose_day_front" ref="poseDayFront" />
|
||||||
|
<asset type="texture" name="texture_eth_pose_day_back" ref="poseDayBack" />
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<MeshRenderer />
|
<MeshRenderer />
|
||||||
<QuadMeshHost />
|
<QuadMeshHost />
|
||||||
<SimpleBillboardedMaterial texture="faceTexture" ref="faceMaterial" />
|
<SimpleTexturedMaterial texture="faceDayHappy" ref="faceMaterial" />
|
||||||
<TiledSprite tile="0" ref="faceSprite" sizeType="TILED_SPRITE_SIZE_TYPE_HEIGHT_RATIO" size="0.5" />
|
<TiledSprite ref="faceSprite" tile="0" size="0.5" sizeType="TILED_SPRITE_SIZE_TYPE_HEIGHT_RATIO" />
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<MeshRenderer />
|
<MeshRenderer />
|
||||||
<QuadMeshHost />
|
<QuadMeshHost ref="bodyMesh" />
|
||||||
<SimpleBillboardedMaterial texture="bodyTexture" ref="bodyMaterial" />
|
<SimpleTexturedMaterial texture="poseDayFront" ref="bodyMaterial" />
|
||||||
<TiledSprite tile="0" ref="bodySprite" sizeType="TILED_SPRITE_SIZE_TYPE_HEIGHT_RATIO" size="0.5" />
|
<TiledSprite ref="bodySprite" tile="0" size="0.5" sizeType="TILED_SPRITE_SIZE_TYPE_HEIGHT_RATIO" />
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<code type="properties">
|
<code type="properties">
|
||||||
TilesetGrid gridFace;
|
TilesetGrid gridFace;
|
||||||
TilesetGrid gridBody;
|
TilesetGrid gridBody;
|
||||||
StateProperty<float_t> alpha;
|
StateProperty<int32_t> faceTile;
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
<code type="init">
|
<code type="init">
|
||||||
alpha = 0.0f;
|
gridFace = TilesetGrid(faceDayHappy->texture, 1, 1);
|
||||||
|
|
||||||
this->gridFace = TilesetGrid(
|
|
||||||
1, 9,
|
|
||||||
faceTexture->texture.getWidth(), faceTexture->texture.getHeight(),
|
|
||||||
0, 0,
|
|
||||||
0, 0
|
|
||||||
);
|
|
||||||
faceSprite->tileset = &gridFace;
|
faceSprite->tileset = &gridFace;
|
||||||
|
|
||||||
this->gridBody = TilesetGrid(
|
gridBody = TilesetGrid(poseDayBack->texture, 1, 1);
|
||||||
1, 5,
|
|
||||||
bodyTexture->texture.getWidth(), bodyTexture->texture.getHeight(),
|
|
||||||
0, 0,
|
|
||||||
0, 0
|
|
||||||
);
|
|
||||||
bodySprite->tileset = &gridBody;
|
bodySprite->tileset = &gridBody;
|
||||||
|
|
||||||
useEffect([&]{
|
useEffect([&]{
|
||||||
this->faceMaterial->color.a = alpha;
|
faceMaterial->texture = (
|
||||||
this->bodyMaterial->color.a = alpha;
|
faceTile == 0 ? &faceDayHappy->texture :
|
||||||
}, alpha);
|
faceTile == 1 ? &faceDayAnger->texture :
|
||||||
|
nullptr
|
||||||
|
);
|
||||||
|
}, faceTile)();
|
||||||
</code>
|
</code>
|
||||||
</prefab>
|
</prefab>
|
7
assets/games/liminal/scenes/CMakeLists.txt
Normal file
@ -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)
|
@ -4,20 +4,19 @@
|
|||||||
<string lang="en"><font style="italics">There is a bucket.</font></string>
|
<string lang="en"><font style="italics">There is a bucket.</font></string>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
<set property="eth->color"
|
<set property="eth->faceTile" to="1" type="int32_t" />
|
||||||
<set property="eth->faceSprite->tile" to="1" type="int32_t" />
|
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<string lang="en">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.</string>
|
<string lang="en">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.</string>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
<set property="eth->faceSprite->tile" to="0" type="int32_t" />
|
<!-- <set property="eth->faceSprite->tile" to="0" type="int32_t" /> -->
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<string lang="en">And you are dead soon.</string>
|
<string lang="en">And you are dead soon.</string>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
<set property="eth->bodySprite->tile" to="3" type="int32_t" />
|
<!-- <set property="eth->bodySprite->tile" to="3" type="int32_t" /> -->
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<string lang="en">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.</string>
|
<string lang="en">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.</string>
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
<item ref="eth" prefab="prefabs/EthPrefab" />
|
<item ref="eth" prefab="prefabs/EthPrefab" />
|
||||||
|
|
||||||
<item lookAt="0, 0, 5, 0, 0, 0" >
|
<item lookAt="0, 0, 5, 0, 0, 0" >
|
||||||
<!-- <item lookAt="5, 5, 5, 0, 0, 0" > -->
|
<!-- <item lookAt="3, 3, 3, 0, 0, 0" > -->
|
||||||
<Camera ref="camera" type="CAMERA_TYPE_ORTHONOGRAPHIC" />
|
<Camera ref="camera" type="CAMERA_TYPE_ORTHONOGRAPHIC" />
|
||||||
<!-- <Camera ref="camera" /> -->
|
|
||||||
<CameraTexture ref="camTexture" />
|
<CameraTexture ref="camTexture" />
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
|
12
assets/games/liminal/textures/CMakeLists.txt
Normal file
@ -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
|
||||||
|
)
|
7
assets/games/liminal/textures/eth/CMakeLists.txt
Normal 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")
|
50
assets/games/liminal/textures/eth/faces/CMakeLists.txt
Normal file
@ -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}
|
||||||
|
)
|
BIN
assets/games/liminal/textures/eth/faces/anger.png
Normal file
After Width: | Height: | Size: 3.4 MiB |
BIN
assets/games/liminal/textures/eth/faces/confused.png
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
assets/games/liminal/textures/eth/faces/eyeroll.png
Normal file
After Width: | Height: | Size: 3.4 MiB |
BIN
assets/games/liminal/textures/eth/faces/fear.png
Normal file
After Width: | Height: | Size: 3.2 MiB |
BIN
assets/games/liminal/textures/eth/faces/happy.png
Normal file
After Width: | Height: | Size: 3.1 MiB |
BIN
assets/games/liminal/textures/eth/faces/haughty.png
Normal file
After Width: | Height: | Size: 3.5 MiB |
BIN
assets/games/liminal/textures/eth/faces/neutral.png
Normal file
After Width: | Height: | Size: 3.1 MiB |
BIN
assets/games/liminal/textures/eth/faces/sad.png
Normal file
After Width: | Height: | Size: 3.1 MiB |
BIN
assets/games/liminal/textures/eth/faces/surprised.png
Normal file
After Width: | Height: | Size: 3.3 MiB |
Before Width: | Height: | Size: 29 MiB |
Before Width: | Height: | Size: 30 MiB |
Before Width: | Height: | Size: 29 MiB |
Before Width: | Height: | Size: 31 MiB |
13
assets/games/liminal/textures/eth/poses/CMakeLists.txt
Normal file
@ -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}
|
||||||
|
)
|
BIN
assets/games/liminal/textures/eth/poses/day_back.png
Normal file
After Width: | Height: | Size: 12 MiB |
BIN
assets/games/liminal/textures/eth/poses/day_cross.png
Normal file
After Width: | Height: | Size: 12 MiB |
BIN
assets/games/liminal/textures/eth/poses/day_front.png
Normal file
After Width: | Height: | Size: 11 MiB |
BIN
assets/games/liminal/textures/eth/poses/day_hips.png
Normal file
After Width: | Height: | Size: 13 MiB |
BIN
assets/games/liminal/textures/eth/poses/day_neutral.png
Normal file
After Width: | Height: | Size: 12 MiB |
Before Width: | Height: | Size: 59 MiB |
Before Width: | Height: | Size: 61 MiB |
Before Width: | Height: | Size: 58 MiB |
Before Width: | Height: | Size: 57 MiB |
Before Width: | Height: | Size: 2.6 MiB |
@ -1,4 +0,0 @@
|
|||||||
<prefab name="FPSLabel" type="ui/debug">
|
|
||||||
<!-- <UILabel ref="label" text="Hello World" /> -->
|
|
||||||
<!-- <FPSLabelComponent label="label" /> -->
|
|
||||||
</prefab>
|
|
@ -43,7 +43,4 @@ target_compile_definitions(${DAWN_TARGET_NAME}
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${DAWN_SHARED_DEFINITIONS}
|
${DAWN_SHARED_DEFINITIONS}
|
||||||
DAWN_DEBUG_BUILD=${DAWN_DEBUG_BUILD}
|
DAWN_DEBUG_BUILD=${DAWN_DEBUG_BUILD}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Common Prefabs
|
|
||||||
tool_prefab("prefabs/ui/debug/FPSLabel.xml")
|
|
@ -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(
|
TilesetGrid::TilesetGrid(
|
||||||
int32_t columns,
|
int32_t columns,
|
||||||
int32_t rows,
|
int32_t rows,
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "dawnlibs.hpp"
|
#include "dawnlibs.hpp"
|
||||||
#include "assert/assert.hpp"
|
#include "assert/assert.hpp"
|
||||||
|
#include "display/Texture.hpp"
|
||||||
|
|
||||||
namespace Dawn {
|
namespace Dawn {
|
||||||
struct Tile {
|
struct Tile {
|
||||||
@ -53,6 +54,24 @@ namespace Dawn {
|
|||||||
* Constructs a new Tileset Grid.
|
* Constructs a new Tileset Grid.
|
||||||
*/
|
*/
|
||||||
TilesetGrid();
|
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.
|
* Constructs a new Tileset Grid.
|
||||||
|
@ -17,39 +17,5 @@ add_subdirectory(game)
|
|||||||
add_subdirectory(save)
|
add_subdirectory(save)
|
||||||
|
|
||||||
# Assets
|
# Assets
|
||||||
set(LIMINAL_ASSETS_DIR ${DAWN_ASSETS_DIR}/games/liminal)
|
set(LIMINAL_ASSETS_DIR )
|
||||||
|
include("${DAWN_ASSETS_SOURCE_DIR}/games/liminal/CMakeLists.txt")
|
||||||
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)
|
|
@ -37,8 +37,8 @@ std::vector<struct ShaderPassItem> SimpleTexturedMaterial::getRenderPasses(IRend
|
|||||||
onlyPass.parameterBuffers[shader->bufferRenderPipeline] = &context.renderPipeline->shaderBuffer;
|
onlyPass.parameterBuffers[shader->bufferRenderPipeline] = &context.renderPipeline->shaderBuffer;
|
||||||
|
|
||||||
onlyPass.renderFlags = (
|
onlyPass.renderFlags = (
|
||||||
RENDER_MANAGER_RENDER_FLAG_BLEND |
|
RENDER_MANAGER_RENDER_FLAG_BLEND
|
||||||
RENDER_MANAGER_RENDER_FLAG_DEPTH_TEST
|
// RENDER_MANAGER_RENDER_FLAG_DEPTH_TEST
|
||||||
);
|
);
|
||||||
|
|
||||||
if(this->texture != nullptr) {
|
if(this->texture != nullptr) {
|
||||||
|
@ -201,10 +201,17 @@ void Xml::load(Xml *xml, std::string data, size_t *j) {
|
|||||||
buffer += '\'';
|
buffer += '\'';
|
||||||
} else if(sc == "quot") {
|
} else if(sc == "quot") {
|
||||||
buffer += '"';
|
buffer += '"';
|
||||||
|
} else if(sc == "nbsp") {
|
||||||
|
buffer += ' ';
|
||||||
} else {
|
} else {
|
||||||
// Unknown special char?
|
// Try parse as integer
|
||||||
std::cout << "Unknown Special character: " << sc << std::endl;
|
if(sc.size() > 1 && sc[0] == '#') {
|
||||||
assertUnreachable();
|
int code = std::stoi(sc.substr(1));
|
||||||
|
buffer += (char)code;
|
||||||
|
} else {
|
||||||
|
std::cout << "Unknown Special character: " << sc << std::endl;
|
||||||
|
assertUnreachable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
buffer += c;
|
buffer += c;
|
||||||
|
@ -48,7 +48,7 @@ function(tool_prefab in)
|
|||||||
|
|
||||||
STRING(REGEX REPLACE "[\.|\\|\/]" "-" prefab_name ${in})
|
STRING(REGEX REPLACE "[\.|\\|\/]" "-" prefab_name ${in})
|
||||||
add_custom_target(prefab_${prefab_name}
|
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}"
|
COMMENT "Generating prefab from ${in}"
|
||||||
DEPENDS ${DEPS}
|
DEPENDS ${DEPS}
|
||||||
)
|
)
|
||||||
|
@ -49,7 +49,7 @@ function(tool_scene in)
|
|||||||
|
|
||||||
STRING(REGEX REPLACE "[\.|\\|\/]" "-" scene_name ${in})
|
STRING(REGEX REPLACE "[\.|\\|\/]" "-" scene_name ${in})
|
||||||
add_custom_target(scene_${scene_name}
|
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}"
|
COMMENT "Generating scene from ${in}"
|
||||||
DEPENDS ${DEPS}
|
DEPENDS ${DEPS}
|
||||||
)
|
)
|
||||||
|
@ -68,7 +68,7 @@ function(tool_texture target)
|
|||||||
|
|
||||||
add_custom_target(${target}
|
add_custom_target(${target}
|
||||||
COMMAND texturetool
|
COMMAND texturetool
|
||||||
--input="${DAWN_ASSETS_SOURCE_DIR}/${FILE}"
|
--input="${FILE}"
|
||||||
--output="${DAWN_ASSETS_BUILD_DIR}/${target}"
|
--output="${DAWN_ASSETS_BUILD_DIR}/${target}"
|
||||||
--wrapX="${WRAP_X}"
|
--wrapX="${WRAP_X}"
|
||||||
--wrapY="${WRAP_Y}"
|
--wrapY="${WRAP_Y}"
|
||||||
|
@ -53,19 +53,6 @@ function(tool_truetype target)
|
|||||||
set(DEPS truetypetool)
|
set(DEPS truetypetool)
|
||||||
endif()
|
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}
|
add_custom_target(${target}
|
||||||
COMMAND truetypetool
|
COMMAND truetypetool
|
||||||
--output="${DAWN_ASSETS_BUILD_DIR}/${target}.truetype"
|
--output="${DAWN_ASSETS_BUILD_DIR}/${target}.truetype"
|
||||||
|
@ -10,6 +10,7 @@ using namespace Dawn;
|
|||||||
void SceneAssetGenerator::generate(
|
void SceneAssetGenerator::generate(
|
||||||
std::map<std::string, std::string> &assetMap,
|
std::map<std::string, std::string> &assetMap,
|
||||||
int32_t &assetNumber,
|
int32_t &assetNumber,
|
||||||
|
std::vector<std::string> *publicProperties,
|
||||||
std::vector<std::string> *initBody,
|
std::vector<std::string> *initBody,
|
||||||
std::vector<std::string> *assetsBody,
|
std::vector<std::string> *assetsBody,
|
||||||
struct SceneAsset *asset,
|
struct SceneAsset *asset,
|
||||||
@ -17,6 +18,7 @@ void SceneAssetGenerator::generate(
|
|||||||
) {
|
) {
|
||||||
std::string assetType = "";
|
std::string assetType = "";
|
||||||
|
|
||||||
|
bool_t componentInit = true;
|
||||||
if(asset->ref.empty()) {
|
if(asset->ref.empty()) {
|
||||||
asset->usageName = "asset" + std::to_string(assetNumber++);
|
asset->usageName = "asset" + std::to_string(assetNumber++);
|
||||||
} else {
|
} else {
|
||||||
@ -40,6 +42,12 @@ void SceneAssetGenerator::generate(
|
|||||||
assertUnreachable();
|
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 + "\"));", "");
|
line(assetsBody, "assets.push_back(man->get<" + assetType + ">(\"" + asset->fileName + "\"));", "");
|
||||||
}
|
}
|
@ -13,6 +13,7 @@ namespace Dawn {
|
|||||||
static void generate(
|
static void generate(
|
||||||
std::map<std::string, std::string> &assetMap,
|
std::map<std::string, std::string> &assetMap,
|
||||||
int32_t &assetNumber,
|
int32_t &assetNumber,
|
||||||
|
std::vector<std::string> *publicProperties,
|
||||||
std::vector<std::string> *initBody,
|
std::vector<std::string> *initBody,
|
||||||
std::vector<std::string> *assetsBody,
|
std::vector<std::string> *assetsBody,
|
||||||
struct SceneAsset *asset,
|
struct SceneAsset *asset,
|
||||||
|
@ -149,6 +149,7 @@ void SceneItemGenerator::generate(
|
|||||||
SceneAssetGenerator::generate(
|
SceneAssetGenerator::generate(
|
||||||
assetMap,
|
assetMap,
|
||||||
assetNumber,
|
assetNumber,
|
||||||
|
publicProperties,
|
||||||
initBody,
|
initBody,
|
||||||
assetBody,
|
assetBody,
|
||||||
&(*itAssets),
|
&(*itAssets),
|
||||||
|
@ -52,7 +52,7 @@ function(tool_vnscene in)
|
|||||||
|
|
||||||
STRING(REGEX REPLACE "[\.|\\|\/]" "-" scene_name ${in})
|
STRING(REGEX REPLACE "[\.|\\|\/]" "-" scene_name ${in})
|
||||||
add_custom_target(scene_${scene_name}
|
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}"
|
COMMENT "Generating vnscene from ${in}"
|
||||||
DEPENDS ${DEPS}
|
DEPENDS ${DEPS}
|
||||||
)
|
)
|
||||||
|