diff --git a/assets/games/liminal/prefabs/EthPrefab.xml b/assets/games/liminal/prefabs/EthPrefab.xml
index e9ed3012..afcc99b2 100644
--- a/assets/games/liminal/prefabs/EthPrefab.xml
+++ b/assets/games/liminal/prefabs/EthPrefab.xml
@@ -1,22 +1,39 @@
-
+
+
-
-
-
-
+
+
+
+
+
+
- TilesetGrid grid;
+ TilesetGrid gridFace;
+ TilesetGrid gridBody;
- this->grid = TilesetGrid(
- 1, 13,
- 741, 10270,
+ this->gridFace = TilesetGrid(
+ 1, 9,
+ faceTexture->texture.getWidth(), faceTexture->texture.getHeight(),
0, 0,
0, 0
);
- tiledSprite->tileset = &grid;
+ faceSprite->tileset = &gridFace;
+
+ this->gridBody = TilesetGrid(
+ 1, 9,
+ bodyTexture->texture.getWidth(), bodyTexture->texture.getHeight(),
+ 0, 0,
+ 0, 0
+ );
+ //bodySprite->tileset = &gridBody;
\ No newline at end of file
diff --git a/assets/games/liminal/scenes/SceneBase.xml b/assets/games/liminal/scenes/SceneBase.xml
index 857c3d84..fa781177 100644
--- a/assets/games/liminal/scenes/SceneBase.xml
+++ b/assets/games/liminal/scenes/SceneBase.xml
@@ -1,20 +1,22 @@
-
-
+
+
-
-
+
+
-
-
+
- -
+
-
state = 0x04;
- this->texture.setSize(this->width, this->height, this->format);
+ this->texture.setSize(this->width, this->height, this->format, TEXTURE_DATA_FORMAT_UNSIGNED_BYTE);
this->texture.buffer(this->colors);
this->texture.wrapModeX = this->wrapModeX;
@@ -57,7 +57,7 @@ void TextureAsset::updateAsync() {
switch(parseState) {
case TEXTURE_ASSET_HEADER_PARSE_STATE_VERSION: {
- auto compared = strcmp(integer, "DT_1.00");
+ auto compared = strcmp(integer, "DT_2.00");
assertTrue(compared == 0);
j = 0;
parseState = TEXTURE_ASSET_HEADER_PARSE_STATE_WIDTH;
@@ -120,7 +120,7 @@ void TextureAsset::updateAsync() {
}
}
- this->colors = (struct Color *)((void *)(this->buffer + i));
+ this->colors = (uint8_t*)((void *)(this->buffer + i));
this->state = 0x03;
}
diff --git a/src/dawn/asset/assets/TextureAsset.hpp b/src/dawn/asset/assets/TextureAsset.hpp
index 4c327879..ab5e45da 100644
--- a/src/dawn/asset/assets/TextureAsset.hpp
+++ b/src/dawn/asset/assets/TextureAsset.hpp
@@ -26,7 +26,7 @@ namespace Dawn {
AssetLoader loader;
uint8_t *buffer = nullptr;
int32_t width = -1, height = -1;
- struct Color *colors;
+ uint8_t *colors;
enum TextureFormat format;
enum TextureWrapMode wrapModeX;
enum TextureWrapMode wrapModeY;
diff --git a/src/dawn/display/_Texture.hpp b/src/dawn/display/_Texture.hpp
index b1f6e5ad..31a786ac 100644
--- a/src/dawn/display/_Texture.hpp
+++ b/src/dawn/display/_Texture.hpp
@@ -27,6 +27,11 @@ namespace Dawn {
TEXTURE_FILTER_MODE_LINEAR = 1
};
+ enum TextureDataFormat {
+ TEXTURE_DATA_FORMAT_UNSIGNED_BYTE = 0,
+ TEXTURE_DATA_FORMAT_FLOAT = 1
+ };
+
class ITexture : public StateOwner {
protected:
bool_t texturePropertiesNeedUpdating = true;
@@ -69,11 +74,13 @@ namespace Dawn {
* @param width Width of the texture (in pixels).
* @param height Height of the texture (in pixels).
* @param format Data format of the texture to use.
+ * @param dataFormat Data format of the texture to use.
*/
virtual void setSize(
int32_t width,
int32_t height,
- enum TextureFormat format
+ enum TextureFormat format,
+ enum TextureDataFormat dataFormat
) = 0;
/**
diff --git a/src/dawn/display/font/truetype/TrueTypeFaceTexture.cpp b/src/dawn/display/font/truetype/TrueTypeFaceTexture.cpp
index fb0dc514..eaf8cb4b 100644
--- a/src/dawn/display/font/truetype/TrueTypeFaceTexture.cpp
+++ b/src/dawn/display/font/truetype/TrueTypeFaceTexture.cpp
@@ -77,7 +77,7 @@ TrueTypeFaceTexture::TrueTypeFaceTexture(
y += face->glyph->bitmap.rows;
}
- this->texture.setSize(w, h, TEXTURE_FORMAT_R);
+ this->texture.setSize(w, h, TEXTURE_FORMAT_R, TEXTURE_DATA_FORMAT_UNSIGNED_BYTE);
this->texture.buffer(buffer);
memoryFree(buffer);
}
diff --git a/src/dawn/scene/components/display/Camera.cpp b/src/dawn/scene/components/display/Camera.cpp
index 54820199..7cf410fc 100644
--- a/src/dawn/scene/components/display/Camera.cpp
+++ b/src/dawn/scene/components/display/Camera.cpp
@@ -13,10 +13,10 @@ Camera::Camera(SceneItem *item) :
renderTarget(item->scene->game->renderManager.getBackBuffer()),
fov(0.785398f),// 45 degrees,
type(CAMERA_TYPE_PERSPECTIVE),
- orthoLeft(0.0f),
- orthoRight(1.0f),
- orthoBottom(0.0f),
- orthoTop(1.0f),
+ orthoLeft(-0.5f),
+ orthoRight(0.5f),
+ orthoBottom(-0.5f),
+ orthoTop(0.5f),
clipNear(0.001f),
clipFar(1000.0f)
{
diff --git a/src/dawn/scene/components/display/CameraTexture.cpp b/src/dawn/scene/components/display/CameraTexture.cpp
index 79e55cca..15a28d91 100644
--- a/src/dawn/scene/components/display/CameraTexture.cpp
+++ b/src/dawn/scene/components/display/CameraTexture.cpp
@@ -10,15 +10,34 @@ using namespace Dawn;
CameraTexture::CameraTexture(SceneItem *item) :
SceneItemComponent(item),
camera(nullptr),
- renderTarget(32.0f, 32.0f)
+ renderTarget(32.0f, 32.0f),
+ updateOrtho(true)
{
}
void CameraTexture::onStart() {
if(this->camera == nullptr) this->camera = item->getComponent();
- useEffect([&]{
- if(this->camera == nullptr) return;
+ auto effectCamera = [&]{
+ if(this->camera == nullptr) return teardown = [&]{};
this->camera->renderTarget = &this->renderTarget;
- }, this->camera)();
+
+ if(!this->updateOrtho) return teardown = [&]{};
+
+ this->updateOrthoValues();
+ return teardown = useEvent([&](float_t w, float_t h){
+ this->updateOrthoValues();
+ }, this->camera->eventRenderTargetResized);
+ };
+
+ useEffectWithTeardown(effectCamera, this->camera);
+ useEffectWithTeardown(effectCamera, this->updateOrtho)();
+}
+
+void CameraTexture::updateOrthoValues() {
+ assertNotNull(this->camera);
+ float_t wr = this->camera->renderTarget->getWidth() / this->camera->renderTarget->getHeight();
+ wr *= 0.5f;//TODO: allow this to be editable
+ this->camera->orthoLeft = -wr;
+ this->camera->orthoRight = wr;
}
\ No newline at end of file
diff --git a/src/dawn/scene/components/display/CameraTexture.hpp b/src/dawn/scene/components/display/CameraTexture.hpp
index a9f4b640..3a92ced0 100644
--- a/src/dawn/scene/components/display/CameraTexture.hpp
+++ b/src/dawn/scene/components/display/CameraTexture.hpp
@@ -10,9 +10,17 @@
namespace Dawn {
class CameraTexture : public SceneItemComponent {
protected:
+ std::function teardown;
+
+ void updateOrthoValues();
public:
+ // @optional
StateProperty camera;
+
+ // @optional
+ StateProperty updateOrtho;
+
TextureRenderTarget renderTarget;
CameraTexture(SceneItem *item);
diff --git a/src/dawn/scene/components/display/TiledSprite.cpp b/src/dawn/scene/components/display/TiledSprite.cpp
index c24db9e8..a6b73323 100644
--- a/src/dawn/scene/components/display/TiledSprite.cpp
+++ b/src/dawn/scene/components/display/TiledSprite.cpp
@@ -55,11 +55,11 @@ void TiledSprite::onStart() {
if(this->meshHost == nullptr || this->tileset == nullptr) return;
auto tile = this->tileset->getTile(this->tile);
- glm::vec2 size;
+ glm::vec2 quadSize;
switch(this->sizeType) {
case TILED_SPRITE_SIZE_TYPE_SCALE: {
- size = glm::vec2(
+ quadSize = glm::vec2(
this->tileset->getTileWidth(this->tile),
this->tileset->getTileHeight(this->tile)
) * (float_t)this->size;
@@ -68,15 +68,15 @@ void TiledSprite::onStart() {
case TILED_SPRITE_SIZE_TYPE_WIDTH_RATIO: {
float_t rw = this->tileset->getTileHeight(this->tile) / this->tileset->getTileWidth(this->tile);
- size.x = (float_t)this->size;
- size.y = size.x * rw;
+ quadSize.x = (float_t)this->size;
+ quadSize.y = quadSize.x * rw;
break;
}
case TILED_SPRITE_SIZE_TYPE_HEIGHT_RATIO: {
float_t rh = this->tileset->getTileWidth(this->tile) / this->tileset->getTileHeight(this->tile);
- size.y = (float_t)this->size;
- size.x = size.y * rh;
+ quadSize.y = (float_t)this->size;
+ quadSize.x = quadSize.y * rh;
break;
}
@@ -84,8 +84,8 @@ void TiledSprite::onStart() {
assertUnreachable();
}
- this->meshHost->xy0 = -size;
- this->meshHost->xy1 = size;
+ this->meshHost->xy0 = -quadSize;
+ this->meshHost->xy1 = quadSize;
}, {
&this->tile,
&this->meshHost,
diff --git a/src/dawnliminal/CMakeLists.txt b/src/dawnliminal/CMakeLists.txt
index 4d3f83c8..ea6f66a0 100644
--- a/src/dawnliminal/CMakeLists.txt
+++ b/src/dawnliminal/CMakeLists.txt
@@ -19,8 +19,20 @@ add_subdirectory(save)
# Assets
set(LIMINAL_ASSETS_DIR ${DAWN_ASSETS_DIR}/games/liminal)
-tool_texture(texture_eth FILE=${LIMINAL_ASSETS_DIR}/textures/eth.png)
-tool_texture(texture_border FILE=${LIMINAL_ASSETS_DIR}/textures/texture_test.png)
+tool_texture(texture_eth_faces_day
+ FILE="${LIMINAL_ASSETS_DIR}/textures/eth/faces_day.png"
+)
+tool_texture(texture_eth_faces_night
+ FILE="${LIMINAL_ASSETS_DIR}/textures/eth/faces_night.png"
+)
+tool_texture(texture_eth_poses_day
+ FILE="${LIMINAL_ASSETS_DIR}/textures/eth/poses_day.png"
+)
+
+
+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
diff --git a/src/dawnopengl/display/Texture.cpp b/src/dawnopengl/display/Texture.cpp
index eed2788e..6530dd22 100644
--- a/src/dawnopengl/display/Texture.cpp
+++ b/src/dawnopengl/display/Texture.cpp
@@ -36,7 +36,12 @@ int32_t Texture::getHeight() {
return this->height;
}
-void Texture::setSize(int32_t width, int32_t height, enum TextureFormat format) {
+void Texture::setSize(
+ int32_t width,
+ int32_t height,
+ enum TextureFormat format,
+ enum TextureDataFormat dataFormat
+) {
if(this->id != -1) {
glDeleteTextures(1, &this->id);
this->id = -1;
@@ -45,6 +50,7 @@ void Texture::setSize(int32_t width, int32_t height, enum TextureFormat format)
this->width = width;
this->height = height;
this->format = format;
+ this->dataFormat = dataFormat;
glGenTextures(1, &this->id);
if(this->id <= 0) throw "Texture generation failed!";
@@ -151,7 +157,6 @@ void Texture::updateTextureProperties() {
void Texture::bufferRaw(void *data) {
assertTrue(this->isReady());
- glBindTexture(GL_TEXTURE_2D, this->id);
GLenum format;
switch(this->format) {
@@ -175,25 +180,43 @@ void Texture::bufferRaw(void *data) {
assertUnreachable();
}
+ GLenum dataFormat;
+ switch(this->dataFormat) {
+ case TEXTURE_DATA_FORMAT_UNSIGNED_BYTE:
+ dataFormat = GL_UNSIGNED_BYTE;
+ break;
+
+ case TEXTURE_DATA_FORMAT_FLOAT:
+ dataFormat = GL_FLOAT;
+ break;
+
+ default:
+ assertUnreachable();
+ }
+
+ glBindTexture(GL_TEXTURE_2D, this->id);
glTexImage2D(
GL_TEXTURE_2D, 0, format,
this->width, this->height,
- 0, format, GL_UNSIGNED_BYTE, data
+ 0, format, dataFormat, data
);
glGenerateMipmap(GL_TEXTURE_2D);
this->texturePropertiesNeedUpdating = true;
}
void Texture::buffer(struct ColorU8 pixels[]) {
+ assertTrue(this->dataFormat == TEXTURE_DATA_FORMAT_UNSIGNED_BYTE);
this->bufferRaw((void*)pixels);
}
void Texture::buffer(struct Color pixels[]) {
+ assertTrue(this->dataFormat == TEXTURE_DATA_FORMAT_FLOAT);
+ assertTrue(this->format == TEXTURE_FORMAT_RGBA);
this->bufferRaw((void*)pixels);
- // assertUnreachable();
}
void Texture::buffer(uint8_t pixels[]) {
+ assertTrue(this->dataFormat == TEXTURE_DATA_FORMAT_UNSIGNED_BYTE);
this->bufferRaw((void*)pixels);
}
diff --git a/src/dawnopengl/display/Texture.hpp b/src/dawnopengl/display/Texture.hpp
index ff898e84..7d74b5f2 100644
--- a/src/dawnopengl/display/Texture.hpp
+++ b/src/dawnopengl/display/Texture.hpp
@@ -20,6 +20,7 @@ namespace Dawn {
int32_t height = -1;
GLuint id = -1;
enum TextureFormat format;
+ enum TextureDataFormat dataFormat;
void updateTextureProperties();
void bufferRaw(void *data);
@@ -28,7 +29,12 @@ namespace Dawn {
Texture();
int32_t getWidth() override;
int32_t getHeight() override;
- void setSize(int32_t width, int32_t height, enum TextureFormat format) override;
+ void setSize(
+ int32_t width,
+ int32_t height,
+ enum TextureFormat format,
+ enum TextureDataFormat dataFormat
+ ) override;
void fill(struct Color) override;
void fill(uint8_t) override;
bool_t isReady() override;
diff --git a/src/dawnopengl/display/TextureRenderTarget.cpp b/src/dawnopengl/display/TextureRenderTarget.cpp
index 8b1d27ac..a535011a 100644
--- a/src/dawnopengl/display/TextureRenderTarget.cpp
+++ b/src/dawnopengl/display/TextureRenderTarget.cpp
@@ -26,7 +26,7 @@ void TextureRenderTarget::setSize(float_t width, float_t height) {
if(this->fboId != -1) glDeleteFramebuffers(1, &this->fboId);
// Resize texture
- this->texture.setSize((int32_t)width, (int32_t)height, TEXTURE_FORMAT_RGBA);
+ this->texture.setSize((int32_t)width, (int32_t)height, TEXTURE_FORMAT_RGBA, TEXTURE_DATA_FORMAT_FLOAT);
this->eventRenderTargetResized.invoke(this, width, height);
// Create Frame Buffer
diff --git a/src/dawnopengl/display/shader/shaders/SimpleBillboardedShader.cpp b/src/dawnopengl/display/shader/shaders/SimpleBillboardedShader.cpp
index 02e1d2c7..c9e60437 100644
--- a/src/dawnopengl/display/shader/shaders/SimpleBillboardedShader.cpp
+++ b/src/dawnopengl/display/shader/shaders/SimpleBillboardedShader.cpp
@@ -17,10 +17,10 @@ void SimpleBillboardedShader::compile() {
// Vertex Shader
"#version 330 core\n"
"layout (location = 0) in vec3 aPos;\n"
- "layout (location = 1) in vec2 aTexCoord;\n"
+ "layout (location = 1) in vec2 aTexCoord;\n" +
+
+ RenderPipelineShaderBuffer::getShaderUniform() + ""
- "uniform mat4 u_Proj;\n"
- "uniform mat4 u_View;\n"
"uniform mat4 u_Model;\n"
"out vec2 o_TextCoord;\n"
@@ -31,7 +31,7 @@ void SimpleBillboardedShader::compile() {
"vec3 right = normalize(cross(up, viewDirection));\n"
"up = normalize(cross(viewDirection, right));\n"
"vec3 billboardPosCam = vec3(u_View * vec4(billboardPos, 1.0));\n"
- "gl_Position = u_Proj * vec4(billboardPosCam + (right * aPos.x + up * aPos.y), 1.0);\n"
+ "gl_Position = u_Projection * vec4(billboardPosCam + (right * aPos.x + up * aPos.y), 1.0);\n"
"o_TextCoord = vec2(aTexCoord.x, aTexCoord.y);\n"
"}",
@@ -53,10 +53,10 @@ void SimpleBillboardedShader::compile() {
);
#endif
- this->paramProjection = this->getParameterByName("u_Proj");
- this->paramView = this->getParameterByName("u_View");
this->paramModel = this->getParameterByName("u_Model");
this->paramColor = this->getParameterByName("u_Color");
this->paramTexture = this->getParameterByName("u_Text");
this->paramHasTexture = this->getParameterByName("u_HasTexture");
+
+ this->bufferRenderPipeline = this->getBufferLocationByName(RenderPipelineShaderBuffer::getShaderUniformName());
}
\ No newline at end of file
diff --git a/src/dawnopengl/display/shader/shaders/SimpleBillboardedShader.hpp b/src/dawnopengl/display/shader/shaders/SimpleBillboardedShader.hpp
index 648f48cb..4da443e9 100644
--- a/src/dawnopengl/display/shader/shaders/SimpleBillboardedShader.hpp
+++ b/src/dawnopengl/display/shader/shaders/SimpleBillboardedShader.hpp
@@ -5,12 +5,12 @@
#pragma once
#include "display/shader/Shader.hpp"
+#include "display/shader/buffers/RenderPipelineShaderBuffer.hpp"
namespace Dawn {
class SimpleBillboardedShader : public Shader {
public:
- shaderparameter_t paramProjection;
- shaderparameter_t paramView;
+ shaderbufferlocation_t bufferRenderPipeline;
shaderparameter_t paramModel;
shaderparameter_t paramColor;
shaderparameter_t paramTexture;
diff --git a/src/dawnopengl/scene/components/display/material/SimpleBillboardedMaterial.cpp b/src/dawnopengl/scene/components/display/material/SimpleBillboardedMaterial.cpp
index a2ab71a4..fecc984c 100644
--- a/src/dawnopengl/scene/components/display/material/SimpleBillboardedMaterial.cpp
+++ b/src/dawnopengl/scene/components/display/material/SimpleBillboardedMaterial.cpp
@@ -23,7 +23,32 @@ void SimpleBillboardedMaterial::onDispose() {
}
std::vector SimpleBillboardedMaterial::getRenderPasses(IRenderableContext &context) {
- return {
+ auto mesh = this->item->getComponent();
+ auto shader = this->getGame()->renderManager.getShaderManager()->getShader(this->shaderLock);
- };
+ assertNotNull(mesh);
+ assertNotNull(mesh->mesh);
+ assertNotNull(shader);
+
+ struct ShaderPassItem onlyPass;
+ onlyPass.mesh = mesh->mesh;
+ onlyPass.shader = shader;
+ onlyPass.colorValues[shader->paramColor] = this->color;
+ onlyPass.matrixValues[shader->paramModel] = this->transform->getWorldTransform();
+ onlyPass.parameterBuffers[shader->bufferRenderPipeline] = &context.renderPipeline->shaderBuffer;
+
+ onlyPass.renderFlags = (
+ RENDER_MANAGER_RENDER_FLAG_BLEND |
+ RENDER_MANAGER_RENDER_FLAG_DEPTH_TEST
+ );
+
+ if(this->texture != nullptr) {
+ onlyPass.boolValues[shader->paramHasTexture] = true;
+ onlyPass.textureSlots[0] = this->texture;
+ onlyPass.textureValues[shader->paramTexture] = 0;
+ } else {
+ onlyPass.boolValues[shader->paramHasTexture] = false;
+ }
+
+ return { onlyPass };
}
\ No newline at end of file
diff --git a/src/dawnopengl/scene/components/display/material/SimpleBillboardedMaterial.hpp b/src/dawnopengl/scene/components/display/material/SimpleBillboardedMaterial.hpp
index 2a752027..95d58a5e 100644
--- a/src/dawnopengl/scene/components/display/material/SimpleBillboardedMaterial.hpp
+++ b/src/dawnopengl/scene/components/display/material/SimpleBillboardedMaterial.hpp
@@ -5,6 +5,7 @@
#pragma once
#include "scene/components/display/Material.hpp"
+#include "scene/components/display/mesh/MeshRenderer.hpp"
namespace Dawn {
class SimpleBillboardedMaterial : public Material {
diff --git a/src/dawntools/texturetool/TextureTool.cpp b/src/dawntools/texturetool/TextureTool.cpp
index c930107c..9d78dd86 100644
--- a/src/dawntools/texturetool/TextureTool.cpp
+++ b/src/dawntools/texturetool/TextureTool.cpp
@@ -71,7 +71,7 @@ int32_t TextureTool::start() {
// Write info
char headerBuffer[256];
- size_t headerBufferLength = sprintf((char *)headerBuffer, "DT_1.00|%i|%i|%i|%i|%i|%i|%i|",
+ size_t headerBufferLength = sprintf((char *)headerBuffer, "DT_2.00|%i|%i|%i|%i|%i|%i|%i|",
w,
h,
4, // RGBA,
diff --git a/src/dawntools/util/generator/SceneAssetGenerator.cpp b/src/dawntools/util/generator/SceneAssetGenerator.cpp
index 98c6d5e6..f8b47005 100644
--- a/src/dawntools/util/generator/SceneAssetGenerator.cpp
+++ b/src/dawntools/util/generator/SceneAssetGenerator.cpp
@@ -16,17 +16,24 @@ void SceneAssetGenerator::generate(
std::string tabs
) {
std::string assetType = "";
- asset->usageName = "asset" + std::to_string(assetNumber++);
+
+ if(asset->ref.empty()) {
+ asset->usageName = "asset" + std::to_string(assetNumber++);
+ } else {
+ asset->usageName = asset->ref;
+ }
switch(asset->type) {
case SCENE_ASSET_TYPE_TEXTURE:
assetType = "TextureAsset";
assetMap[asset->fileName] = "&" + asset->usageName + "->texture";
+ assetMap[asset->usageName] = "&" + asset->usageName + "->texture";
break;
case SCENE_ASSET_TYPE_TRUETYPE_FONT:
assetType = "TrueTypeAsset";
assetMap[asset->fileName] = "&" + asset->usageName + "->font";
+ assetMap[asset->usageName] = "&" + asset->usageName + "->font";
break;
default:
diff --git a/src/dawntools/util/parser/SceneAssetParser.cpp b/src/dawntools/util/parser/SceneAssetParser.cpp
index fb38c976..434edf76 100644
--- a/src/dawntools/util/parser/SceneAssetParser.cpp
+++ b/src/dawntools/util/parser/SceneAssetParser.cpp
@@ -12,7 +12,9 @@ std::vector SceneAssetParser::getRequiredAttributes() {
}
std::map SceneAssetParser::getOptionalAttributes() {
- return { };
+ return {
+ { "ref", "" }
+ };
}
int32_t SceneAssetParser::onParse(
@@ -31,6 +33,8 @@ int32_t SceneAssetParser::onParse(
*error = "Unknown asset type '" + values["type"] + "'";
return 1;
}
+
+ out->ref = values["ref"];
return 0;
}
\ No newline at end of file
diff --git a/src/dawntools/util/parser/SceneAssetParser.hpp b/src/dawntools/util/parser/SceneAssetParser.hpp
index 07cfeea6..0528ae49 100644
--- a/src/dawntools/util/parser/SceneAssetParser.hpp
+++ b/src/dawntools/util/parser/SceneAssetParser.hpp
@@ -16,6 +16,7 @@ namespace Dawn {
SceneAssetType type;
std::string fileName;
std::string usageName;
+ std::string ref;
};
class SceneAssetParser : public XmlParser {