diff --git a/.gitignore b/.gitignore
index 8233997..0413f94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,6 @@ obj/
/packages/
riderModule.iml
/_ReSharper.Caches/
+
+*.user
+projs/shadow-file-format/shadow-file-format.vcxproj.user
\ No newline at end of file
diff --git a/Umbra.CPP.props b/Umbra.CPP.props
index bd5cdc8..8eaa8c7 100644
--- a/Umbra.CPP.props
+++ b/Umbra.CPP.props
@@ -10,6 +10,13 @@
+
+ 15.0
+ {47591591-E091-4B88-8418-74D3CBEC5712}
+ Win32Proj
+ 10.0
+
+
x64
@@ -47,8 +54,6 @@
pch.h
stdcpp20
true
-
- %(AdditionalIncludes.Split(';'));asd;%(AdditionalIncludeDirectories)
Console
diff --git a/projs/docs/diagrams/project-layout.plantuml b/projs/docs/diagrams/project-layout.plantuml
new file mode 100644
index 0000000..c500d2f
--- /dev/null
+++ b/projs/docs/diagrams/project-layout.plantuml
@@ -0,0 +1,16 @@
+@startuml
+[shadow-engine] <> as engine
+[shadow-light] <> as editor
+[shadow-runner] <> as runner
+
+[test-game] <> as game
+
+engine <-editor
+runner -> engine
+
+game ..> engine
+
+runner --> game : loads
+editor --> game : loads
+
+@enduml
\ No newline at end of file
diff --git a/projs/shadow-entity/shadow-entity.vcxproj b/projs/shadow-entity/shadow-entity.vcxproj
index ea2e7c8..d5f8989 100644
--- a/projs/shadow-entity/shadow-entity.vcxproj
+++ b/projs/shadow-entity/shadow-entity.vcxproj
@@ -1,7 +1,9 @@
-
+
+
+
15.0
@@ -17,11 +19,8 @@
-
-
-
-
-
+
+
diff --git a/projs/shadow-file-format-test/sff_writer_tests.cpp b/projs/shadow-file-format-test/sff_writer_tests.cpp
index 1228f8c..6e2cc9c 100644
--- a/projs/shadow-file-format-test/sff_writer_tests.cpp
+++ b/projs/shadow-file-format-test/sff_writer_tests.cpp
@@ -1,47 +1,9 @@
#include "pch.h"
-import Shadow.FileFormat;
-
-std::string example_empty = "ShadowFileFormat_1_0_0";
-
-std::string example_simple = "ShadowFileFormat_1_0_0 \n\
-Assets:{ \
- 9:Content_9, \
- 10 : Content_10, \
- 11: Content_11, \
-}, \
-";
-
-std::string example_multi_root =
-"ShadowFileFormat_1_0_0 \n \
-Assets:{ \
- 9:Content_9, \
-}, \
-Texture:{ \
- texture:checker_board.png, \
-}, \
-";
-
-
-std::string example_multi_level = "ShadowFileFormat_1_0_0 \n\
-Assets:{ \
- 9: { \
- \
- }, \
-}, \
-";
-
-std::string example_multi_level_content = "ShadowFileFormat_1_0_0 \n\
-Assets:{ \
- a: { \
- 0: ContentContent0, \
- 1: ContentContent1, \
- 2: ContentContent2, \
- }, \
- b: ContentB, \
-}, \
-";
+//import Shadow.FileFormat;
+#include "SFFWriter.h"
+/*
std::stringstream streamFrom(std::string str) {
std::stringstream ss;
ss << str;
@@ -49,13 +11,15 @@ std::stringstream streamFrom(std::string str) {
return ss;
}
-TEST(EmptyFile, HasHeader) {
+TEST(Write_EmptyFile, HasHeader) {
- std::stringstream ss = streamFrom(example_empty);
+ //std::stringstream ss = streamFrom(example_empty);
//auto a = Shadow::SFF::SFFWriter::
//auto assets = a->GetChildByIndex(0);
//EXPECT_EQ(assets, nullptr);
-}
\ No newline at end of file
+}
+
+*/
\ No newline at end of file
diff --git a/projs/shadow-file-format-test/shadow-file-format-test.vcxproj b/projs/shadow-file-format-test/shadow-file-format-test.vcxproj
index 79d44f2..142a25d 100644
--- a/projs/shadow-file-format-test/shadow-file-format-test.vcxproj
+++ b/projs/shadow-file-format-test/shadow-file-format-test.vcxproj
@@ -1,7 +1,10 @@
-
+
+
+
+ 15.0
{3b7d6797-cc0c-43fa-8866-f438032e1c67}
Win32Proj
10.0.19041.0
@@ -14,8 +17,14 @@
-
+
+
+
+ $(SolutionDir)\projs\shadow-file-format\src\; %(AdditionalIncludeDirectories)
+
+
+
@@ -23,8 +32,7 @@
- Create
- Create
+ Create
diff --git a/projs/shadow-file-format-test/test.cpp b/projs/shadow-file-format-test/test.cpp
index 52d0fb9..a6f6a72 100644
--- a/projs/shadow-file-format-test/test.cpp
+++ b/projs/shadow-file-format-test/test.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
+#include "../shadow-file-format/src/SFFParser.h"
-import Shadow.FileFormat;
+//import Shadow.FileFormat;
std::string example_empty = "ShadowFileFormat_1_0_0";
diff --git a/projs/shadow-file-format/shadow-file-format.vcxproj b/projs/shadow-file-format/shadow-file-format.vcxproj
index 32eae02..bd8b1c2 100644
--- a/projs/shadow-file-format/shadow-file-format.vcxproj
+++ b/projs/shadow-file-format/shadow-file-format.vcxproj
@@ -1,50 +1,45 @@
-
-
+
-
- 15.0
{B2E3515C-3FE0-44B9-9ABE-8584A836230F}
- Win32Proj
shadow_file_format
- 10.0
+ shadow-file-format
StaticLibrary
-
-
-
-
+
+
- CompileAsCppModule
+ $(SolutionDir)\projs\shadow-utility\src\; %(AdditionalIncludeDirectories)
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
{7b9e6056-e4fb-411b-9612-a2fd679c2b69}
-
-
-
-
-
+
\ No newline at end of file
diff --git a/projs/shadow-file-format/shadow-file-format.vcxproj.filters b/projs/shadow-file-format/shadow-file-format.vcxproj.filters
index 16f1e99..9382977 100644
--- a/projs/shadow-file-format/shadow-file-format.vcxproj.filters
+++ b/projs/shadow-file-format/shadow-file-format.vcxproj.filters
@@ -15,35 +15,45 @@
-
- Source Files
-
Source Files
-
+
+ Source Files
+
+
Source Files
-
-
-
-
-
-
+
Header Files
-
+
Header Files
-
+
Header Files
-
+
Header Files
-
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
Header Files
diff --git a/projs/shadow-file-format/shadow-file-format.vcxproj.user b/projs/shadow-file-format/shadow-file-format.vcxproj.user
deleted file mode 100644
index 88a5509..0000000
--- a/projs/shadow-file-format/shadow-file-format.vcxproj.user
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/projs/shadow-file-format/src/SFFElement.cpp b/projs/shadow-file-format/src/SFFElement.cpp
index 05d0844..841d95b 100644
--- a/projs/shadow-file-format/src/SFFElement.cpp
+++ b/projs/shadow-file-format/src/SFFElement.cpp
@@ -1,15 +1,35 @@
-/*
-module;
-
-module Shadow.FileFormat:SFFElement;
-
-import ;
-import shadow_utils;
-
-namespace Shadow::SFF {
+#include "SFFElement.h"
+ namespace Shadow::SFF {
+ SFFElement* SFFElement::GetFirstChild()
+ {
+ return children.size() > 0 ? children.begin()->second : nullptr;
+ }
-}
-*/
\ No newline at end of file
+ SFFElement* SFFElement::GetChildByIndex(int index)
+ {
+ SFFElement::ChildrenMap::iterator it = children.begin();
+ if (it == children.end())
+ return nullptr;
+
+ for (size_t i = 0; i < index; i++)
+ {
+ it++;
+ }
+ return it->second;
+ }
+
+ SFFElement* SFFElement::GetChildByName(std::string name)
+ {
+ SFFElement::ChildrenMap::iterator it = children.find(name);
+ if (it != children.end()) {
+ return it->second;
+ }
+ return nullptr;
+ }
+
+ SFFElement::~SFFElement(){}
+
+}
\ No newline at end of file
diff --git a/projs/shadow-file-format/src/SFFElement.h b/projs/shadow-file-format/src/SFFElement.h
new file mode 100644
index 0000000..bf8946d
--- /dev/null
+++ b/projs/shadow-file-format/src/SFFElement.h
@@ -0,0 +1,36 @@
+#pragma once
+
+#include
+#include