From 87e7c7d20246a45c725320d9def079ed573843a5 Mon Sep 17 00:00:00 2001 From: dpeter99 Date: Wed, 15 Jun 2022 16:31:15 +0200 Subject: [PATCH] [BUILD] Removed cpp20 modules. As no IDE supports them they will not be used. This should be re-evluated later when both VScode and Clion has support for them. --- .gitignore | 3 + Umbra.CPP.props | 9 +- projs/docs/diagrams/project-layout.plantuml | 16 ++ projs/shadow-entity/shadow-entity.vcxproj | 11 +- .../sff_writer_tests.cpp | 52 +------ .../shadow-file-format-test.vcxproj | 16 +- projs/shadow-file-format-test/test.cpp | 3 +- .../shadow-file-format.vcxproj | 41 +++-- .../shadow-file-format.vcxproj.filters | 38 +++-- .../shadow-file-format.vcxproj.user | 4 - projs/shadow-file-format/src/SFFElement.cpp | 42 ++++-- projs/shadow-file-format/src/SFFElement.h | 36 +++++ projs/shadow-file-format/src/SFFElement.ixx | 58 ------- projs/shadow-file-format/src/SFFParser.cpp | 135 +++++++++++++++-- projs/shadow-file-format/src/SFFParser.h | 22 +++ projs/shadow-file-format/src/SFFParser.ixx | 142 ------------------ .../src/{SFFVersion.ixx => SFFVersion.h} | 4 +- projs/shadow-file-format/src/SFFWriter.cpp | 48 ++++++ projs/shadow-file-format/src/SFFWriter.h | 26 ++++ projs/shadow-file-format/src/SFFWriter.ixx | 68 --------- projs/shadow-utility/shadow-utility.vcxproj | 30 ++-- .../shadow-utility.vcxproj.filters | 1 - .../{ => src}/string-helpers.cpp | 8 +- projs/shadow-utility/src/string-helpers.h | 4 + umbra.sln | 12 +- vendor/sdl2/sdl2.props | 1 + 26 files changed, 409 insertions(+), 421 deletions(-) create mode 100644 projs/docs/diagrams/project-layout.plantuml delete mode 100644 projs/shadow-file-format/shadow-file-format.vcxproj.user create mode 100644 projs/shadow-file-format/src/SFFElement.h delete mode 100644 projs/shadow-file-format/src/SFFElement.ixx create mode 100644 projs/shadow-file-format/src/SFFParser.h delete mode 100644 projs/shadow-file-format/src/SFFParser.ixx rename projs/shadow-file-format/src/{SFFVersion.ixx => SFFVersion.h} (80%) create mode 100644 projs/shadow-file-format/src/SFFWriter.cpp create mode 100644 projs/shadow-file-format/src/SFFWriter.h delete mode 100644 projs/shadow-file-format/src/SFFWriter.ixx rename projs/shadow-utility/{ => src}/string-helpers.cpp (64%) 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 +#include + + + namespace Shadow::SFF { + + class SFFElement + { + public: + SFFElement* parent; + + std::string name; + + bool isBlock; + + std::string value; + typedef std::map ChildrenMap; + + ChildrenMap children; + + std::string GetStringProperty(std::string name); + + SFFElement* GetFirstChild(); + + SFFElement* GetChildByIndex(int index); + + SFFElement* GetChildByName(std::string name); + + ~SFFElement(); + + }; + +} \ No newline at end of file diff --git a/projs/shadow-file-format/src/SFFElement.ixx b/projs/shadow-file-format/src/SFFElement.ixx deleted file mode 100644 index 9fdbebb..0000000 --- a/projs/shadow-file-format/src/SFFElement.ixx +++ /dev/null @@ -1,58 +0,0 @@ -module; - -export module Shadow.FileFormat:SFFElement; - -import ; -import ; -import ; - - namespace Shadow::SFF { - - export class SFFElement - { - public: - SFFElement* parent; - - std::string name; - - bool isBlock; - - std::string value; - typedef std::map ChildrenMap; - - ChildrenMap children; - - std::string GetStringProperty(std::string name); - - SFFElement* GetFirstChild() - { - return children.size() > 0 ? children.begin()->second : nullptr; - } - - SFFElement* GetChildByIndex(int index) - { - ChildrenMap::iterator it = children.begin(); - if (it == children.end()) - return nullptr; - - for (size_t i = 0; i < index; i++) - { - it++; - } - return it->second; - } - - SFFElement* GetChildByName(std::string name) - { - ChildrenMap::iterator it = children.find(name); - if (it != children.end()) { - return it->second; - } - return nullptr; - } - - ~SFFElement(); - - }; - -} \ No newline at end of file diff --git a/projs/shadow-file-format/src/SFFParser.cpp b/projs/shadow-file-format/src/SFFParser.cpp index a7bc6eb..4056721 100644 --- a/projs/shadow-file-format/src/SFFParser.cpp +++ b/projs/shadow-file-format/src/SFFParser.cpp @@ -1,18 +1,129 @@ -/* -module; -import ; -import ; -import ; +#include "SFFParser.h" -import shadow_utils; - -module Shadow.FileFormat:SFFParser; - -import :SFFElement; -import :SFFVersion; +#include +#include "string-helpers.h" namespace Shadow::SFF { + SFFElement* SFFParser::ReadFromStream(std::istream& stream) + { + auto version = ReadVersionFromHeader(stream); + if (version.invalid) { + //SH_CORE_WARN("Shadow File is invalid"); + return nullptr; + } + + + //The current node that we are building + auto* context = new SFFElement; + context->name = "root"; + + //Top level Element + SFFElement* base = context; + + //The new node that will be a child of the context + SFFElement* current = nullptr; + + + std::string buffer; + + char c; + while (!stream.eof()) + { + stream.get(c); + + switch (c) { + case ':': + //The stuff in the buffer is a parameter name + //std::cout << "Name: " << buffer; + current = new SFFElement; + current->name = buffer; + current->parent = context; + + buffer = ""; + break; + + case '{': + //Start of a new block + current->isBlock = true; + context = current; + + current = nullptr; + break; + + case ',': + // End of a property + if (!current->isBlock) { + //The stuff is the value + current->value = buffer; + current->parent = context; + current->isBlock = false; + } + buffer = ""; + + context->children[current->name] = current; + + current = nullptr; + break; + + case '}': + if (current != nullptr) { + // End of a block + current->parent = context; + context->children[current->name] = current; + } + current = context; + context = current->parent; + + break; + + default: + if (std::isspace(c) == 0) + { + buffer += c; + } + break; + } + + } + + //std::cout << "END" << std::endl; + + return base; + } + + SFFVersion SFFParser::ReadVersionFromHeader(std::istream& stream) { + std::string line; + std::getline(stream, line); + auto parts = explode(line, '_'); + if (parts[0] != "ShadowFileFormat") { + return SFFVersion(-1, -1, -1); + } + else { + int mayor = std::stoi(parts[1]); + int minor = std::stoi(parts[2]); + int patch = std::stoi(parts[3]); + return SFFVersion(mayor, minor, patch); + } + + } + + + + SFFElement* SFFParser::ReadFromFile(std::string path) + { + std::ifstream inputFileStream(path); + + if (errno) + { + //SH_CORE_ERROR("Error: {0} | File: {1}", strerror(errno), path); + //std::cerr << "Error: " << strerror(errno) << std::endl; + //std::cerr << "File: " << path << std::endl; + return nullptr; + } + + return ReadFromStream(inputFileStream); + } } -*/ \ No newline at end of file + diff --git a/projs/shadow-file-format/src/SFFParser.h b/projs/shadow-file-format/src/SFFParser.h new file mode 100644 index 0000000..d6aa8a3 --- /dev/null +++ b/projs/shadow-file-format/src/SFFParser.h @@ -0,0 +1,22 @@ +#pragma once + +#include +#include + +#include "SFFElement.h" +#include "SFFVersion.h" + +namespace Shadow::SFF { + + class SFFParser + { + public: + + static SFFElement* ReadFromStream(std::istream& stream); + + static SFFVersion ReadVersionFromHeader(std::istream& stream); + + static SFFElement* ReadFromFile(std::string path); + }; + +} diff --git a/projs/shadow-file-format/src/SFFParser.ixx b/projs/shadow-file-format/src/SFFParser.ixx deleted file mode 100644 index b71f74a..0000000 --- a/projs/shadow-file-format/src/SFFParser.ixx +++ /dev/null @@ -1,142 +0,0 @@ -module; - -export module Shadow.FileFormat:SFFParser; - -import ; -import ; -import ; -import ; -import shadow_utils; - -import :SFFElement; -import :SFFVersion; - -namespace Shadow::SFF { - - export class SFFParser - { - public: - - static SFFElement* ReadFromStream(std::istream& stream) - { - auto version = ReadVersionFromHeader(stream); - if (version.invalid) { - //SH_CORE_WARN("Shadow File is invalid"); - return nullptr; - } - - - //The current node that we are building - auto* context = new SFFElement; - context->name = "root"; - - //Top level Element - SFFElement* base = context; - - //The new node that will be a child of the context - SFFElement* current = nullptr; - - - std::string buffer; - - char c; - while (!stream.eof()) - { - stream.get(c); - - switch (c) { - case ':': - //The stuff in the buffer is a parameter name - //std::cout << "Name: " << buffer; - current = new SFFElement; - current->name = buffer; - current->parent = context; - - buffer = ""; - break; - - case '{': - //Start of a new block - current->isBlock = true; - context = current; - - current = nullptr; - break; - - case ',': - // End of a property - if (!current->isBlock) { - //The stuff is the value - current->value = buffer; - current->parent = context; - current->isBlock = false; - } - buffer = ""; - - context->children[current->name] = current; - - current = nullptr; - break; - - case '}': - if (current != nullptr) { - // End of a block - current->parent = context; - context->children[current->name] = current; - } - current = context; - context = current->parent; - - break; - - default: - if (std::isspace(c) == 0) - { - buffer += c; - } - break; - } - - } - - //std::cout << "END" << std::endl; - - return base; - } - - static SFFVersion ReadVersionFromHeader(std::istream& stream) { - std::string line; - std::getline(stream, line); - auto parts = explode(line, '_'); - if (parts[0] != "ShadowFileFormat") { - return SFFVersion(-1, -1, -1); - } - else { - int mayor = std::stoi(parts[1]); - int minor = std::stoi(parts[2]); - int patch = std::stoi(parts[3]); - return SFFVersion(mayor, minor, patch); - } - - } - - - - static SFFElement* ReadFromFile(std::string path) - { - std::ifstream inputFileStream(path); - - if (errno) - { - //SH_CORE_ERROR("Error: {0} | File: {1}", strerror(errno), path); - //std::cerr << "Error: " << strerror(errno) << std::endl; - //std::cerr << "File: " << path << std::endl; - return nullptr; - } - - return ReadFromStream(inputFileStream); - } - - }; - -} diff --git a/projs/shadow-file-format/src/SFFVersion.ixx b/projs/shadow-file-format/src/SFFVersion.h similarity index 80% rename from projs/shadow-file-format/src/SFFVersion.ixx rename to projs/shadow-file-format/src/SFFVersion.h index 44d5da7..136b0bf 100644 --- a/projs/shadow-file-format/src/SFFVersion.ixx +++ b/projs/shadow-file-format/src/SFFVersion.h @@ -1,6 +1,6 @@ -export module Shadow.FileFormat:SFFVersion; +#pragma once -export namespace Shadow::SFF { +namespace Shadow::SFF { struct SFFVersion { public: diff --git a/projs/shadow-file-format/src/SFFWriter.cpp b/projs/shadow-file-format/src/SFFWriter.cpp new file mode 100644 index 0000000..2205613 --- /dev/null +++ b/projs/shadow-file-format/src/SFFWriter.cpp @@ -0,0 +1,48 @@ +#include "SFFWriter.h" + + +namespace Shadow::SFF { + + void SFFWriter::WriteFile(SFFElement& root, std::string path) + { + std::ofstream writer(path); + writer << "ShadowFileFormat_1_0_0" << std::endl; + + int depth = 0; + WriteElement(writer, root, depth); + + writer.flush(); + } + + void SFFWriter::WriteElement(std::ostream& w, SFFElement& e, int &depth) + { + std::string head = (e.name + (e.isBlock ? ":{" : ":")); + //head = head.PadLeft(depth + head.Length, '\t'); + head.insert(head.begin(), depth, '\t'); + w << head << std::endl; + + if (e.isBlock) + { + depth += 1; + w << std::endl; + for(auto& prop : e.children) + { + WriteElement(w, *prop.second, depth); + } + + std::string close = "}"; + close.insert(head.begin(), depth, '\t'); + w << close; + depth -= 1; + } + else + { + w << e.value << ","; + } + + + } + +} + + diff --git a/projs/shadow-file-format/src/SFFWriter.h b/projs/shadow-file-format/src/SFFWriter.h new file mode 100644 index 0000000..2ee034a --- /dev/null +++ b/projs/shadow-file-format/src/SFFWriter.h @@ -0,0 +1,26 @@ +#pragma once + +#include +#include +#include + +#include "SFFElement.h" +#include "SFFVersion.h" + +namespace Shadow::SFF { + + class SFFWriter + { + public: + + static void WriteFile(SFFElement& root, std::string path); + + static void WriteElement(std::ostream& w, SFFElement& e, int &depth); + + + + }; + +} + + diff --git a/projs/shadow-file-format/src/SFFWriter.ixx b/projs/shadow-file-format/src/SFFWriter.ixx deleted file mode 100644 index 57b47c1..0000000 --- a/projs/shadow-file-format/src/SFFWriter.ixx +++ /dev/null @@ -1,68 +0,0 @@ -module; - -//#include ; -//#include ; - -export module Shadow.FileFormat:SFFWriter; - -import ; -import ; -import ; -import shadow_utils; - -import :SFFElement; -import :SFFVersion; - -namespace Shadow::SFF { - - export class SFFParser - { - public: - - static void WriteFile(SFFElement& root, std::string path) - { - std::ofstream writer(path); - writer << "ShadowFileFormat_1_0_0" << std::endl; - - int depth = 0; - WriteElement(writer, root, depth); - - writer.flush(); - } - - static void WriteElement(std::ostream& w, SFFElement& e, int &depth) - { - std::string head = (e.name + (e.isBlock ? ":{" : ":")); - //head = head.PadLeft(depth + head.Length, '\t'); - head.insert(head.begin(), depth, '\t'); - w << head << std::endl; - - if (e.isBlock) - { - depth += 1; - w << std::endl; - for(auto& prop : e.properties) - { - WriteElement(w, prop.Value, depth); - } - - std::string close = "}"; - close.insert(head.begin(), depth, '\t'); - w << close; - depth -= 1; - } - else - { - w << e.value << ","; - } - - - } - - - - }; - -} - - diff --git a/projs/shadow-utility/shadow-utility.vcxproj b/projs/shadow-utility/shadow-utility.vcxproj index 3d499d7..ff62eed 100644 --- a/projs/shadow-utility/shadow-utility.vcxproj +++ b/projs/shadow-utility/shadow-utility.vcxproj @@ -1,6 +1,8 @@ - + + + 15.0 {7B9E6056-E4FB-411B-9612-A2FD679C2B69} @@ -13,27 +15,21 @@ - - - - + + - - - CompileAsCppModule - - - - - CompileAsCppModule - - + - - + + + + + + {47591591-e091-4b88-8418-74d3cbec5712} + diff --git a/projs/shadow-utility/shadow-utility.vcxproj.filters b/projs/shadow-utility/shadow-utility.vcxproj.filters index 4247255..1f8d2a1 100644 --- a/projs/shadow-utility/shadow-utility.vcxproj.filters +++ b/projs/shadow-utility/shadow-utility.vcxproj.filters @@ -20,7 +20,6 @@ - Source Files diff --git a/projs/shadow-utility/string-helpers.cpp b/projs/shadow-utility/src/string-helpers.cpp similarity index 64% rename from projs/shadow-utility/string-helpers.cpp rename to projs/shadow-utility/src/string-helpers.cpp index a7ba77d..8c0ae0e 100644 --- a/projs/shadow-utility/string-helpers.cpp +++ b/projs/shadow-utility/src/string-helpers.cpp @@ -1,11 +1,7 @@ -module; -module shadow_utils; +#include "string-helpers.h" -import ; -import ; - -inline std::vector explode(const std::string& s, const char& c) +std::vector explode(const std::string& s, const char& c) { std::string buff; std::vector v; diff --git a/projs/shadow-utility/src/string-helpers.h b/projs/shadow-utility/src/string-helpers.h index 079a383..c5fb146 100644 --- a/projs/shadow-utility/src/string-helpers.h +++ b/projs/shadow-utility/src/string-helpers.h @@ -1,2 +1,6 @@ #pragma once +#include +#include + +std::vector explode(const std::string& s, const char& c); \ No newline at end of file diff --git a/umbra.sln b/umbra.sln index aab276c..a341198 100644 --- a/umbra.sln +++ b/umbra.sln @@ -9,12 +9,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shadow-entity", "projs\shad EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "vendor", "vendor", "{D53EF63D-47DE-4936-8707-CE5E59FC0F7A}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shadow-file-format", "projs\shadow-file-format\shadow-file-format.vcxproj", "{B2E3515C-3FE0-44B9-9ABE-8584A836230F}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shadow-file-format-test", "projs\shadow-file-format-test\shadow-file-format-test.vcxproj", "{3B7D6797-CC0C-43FA-8866-F438032E1C67}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shadow-utility", "projs\shadow-utility\shadow-utility.vcxproj", "{7B9E6056-E4FB-411B-9612-A2FD679C2B69}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shadow-file-format", "projs\shadow-file-format\shadow-file-format.vcxproj", "{B2E3515C-3FE0-44B9-9ABE-8584A836230F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -29,10 +29,6 @@ Global {47591591-E091-4B88-8418-74D3CBEC5712}.Debug|x64.Build.0 = Debug|x64 {47591591-E091-4B88-8418-74D3CBEC5712}.Release|x64.ActiveCfg = Release|x64 {47591591-E091-4B88-8418-74D3CBEC5712}.Release|x64.Build.0 = Release|x64 - {B2E3515C-3FE0-44B9-9ABE-8584A836230F}.Debug|x64.ActiveCfg = Debug|x64 - {B2E3515C-3FE0-44B9-9ABE-8584A836230F}.Debug|x64.Build.0 = Debug|x64 - {B2E3515C-3FE0-44B9-9ABE-8584A836230F}.Release|x64.ActiveCfg = Release|x64 - {B2E3515C-3FE0-44B9-9ABE-8584A836230F}.Release|x64.Build.0 = Release|x64 {3B7D6797-CC0C-43FA-8866-F438032E1C67}.Debug|x64.ActiveCfg = Debug|x64 {3B7D6797-CC0C-43FA-8866-F438032E1C67}.Debug|x64.Build.0 = Debug|x64 {3B7D6797-CC0C-43FA-8866-F438032E1C67}.Release|x64.ActiveCfg = Release|x64 @@ -41,6 +37,10 @@ Global {7B9E6056-E4FB-411B-9612-A2FD679C2B69}.Debug|x64.Build.0 = Debug|x64 {7B9E6056-E4FB-411B-9612-A2FD679C2B69}.Release|x64.ActiveCfg = Release|x64 {7B9E6056-E4FB-411B-9612-A2FD679C2B69}.Release|x64.Build.0 = Release|x64 + {B2E3515C-3FE0-44B9-9ABE-8584A836230F}.Debug|x64.ActiveCfg = Debug|x64 + {B2E3515C-3FE0-44B9-9ABE-8584A836230F}.Debug|x64.Build.0 = Debug|x64 + {B2E3515C-3FE0-44B9-9ABE-8584A836230F}.Release|x64.ActiveCfg = Release|x64 + {B2E3515C-3FE0-44B9-9ABE-8584A836230F}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/vendor/sdl2/sdl2.props b/vendor/sdl2/sdl2.props index bb6b2a6..37f9efa 100644 --- a/vendor/sdl2/sdl2.props +++ b/vendor/sdl2/sdl2.props @@ -8,6 +8,7 @@ $(SolutionDir)vendor/sdl2/SDL2-2.0.22/include/ + $(SolutionDir)vendor/sdl2/SDL2-2.0.22/include/; %(AdditionalIncludeDirectories)