diff --git a/Nuake/BaseClass.h b/Nuake/BaseClass.h new file mode 100644 index 00000000..15c3b600 --- /dev/null +++ b/Nuake/BaseClass.h @@ -0,0 +1,7 @@ +#pragma once +#include + +class BaseClass { +public: + std::string Name; +}; \ No newline at end of file diff --git a/Nuake/BrushClass.h b/Nuake/BrushClass.h new file mode 100644 index 00000000..e23bd102 --- /dev/null +++ b/Nuake/BrushClass.h @@ -0,0 +1,12 @@ +#pragma once +#include "BaseClass.h" +#include "ClassProperty.h" +#include +#include + + +class BrushClass : public BaseClass { + std::string name; + std::vector Props; + std::string Description; +}; \ No newline at end of file diff --git a/Nuake/ClassProperty.h b/Nuake/ClassProperty.h new file mode 100644 index 00000000..3ca73569 --- /dev/null +++ b/Nuake/ClassProperty.h @@ -0,0 +1,15 @@ +#pragma once +#include +enum class ClassPropertyType { + AABB, + Float, + String, + DropDown, + Color, + Int +}; + +struct ClassProperty { + std::string name; + ClassPropertyType type; +}; \ No newline at end of file diff --git a/Nuake/FDGSerializer.h b/Nuake/FDGSerializer.h new file mode 100644 index 00000000..07cc992c --- /dev/null +++ b/Nuake/FDGSerializer.h @@ -0,0 +1,11 @@ +#pragma once +#include +class FGDSerializer +{ +public: + static bool BeginFGDFile(const std::string path); + + static bool RegisterEntity(); + + static bool EndFGDFile(); +}; \ No newline at end of file diff --git a/Nuake/FGDSerializer.cpp b/Nuake/FGDSerializer.cpp new file mode 100644 index 00000000..27bb7a62 --- /dev/null +++ b/Nuake/FGDSerializer.cpp @@ -0,0 +1,8 @@ +#include "FDGSerializer.h" +#include + + +bool FGDSerializer::BeginFGDFile(const std::string path) +{ + FileSystem::BeginWriteFile(path + ".fgd"); +} \ No newline at end of file diff --git a/Nuake/PointClass.h b/Nuake/PointClass.h new file mode 100644 index 00000000..07bde658 --- /dev/null +++ b/Nuake/PointClass.h @@ -0,0 +1,6 @@ +#pragma once +#include "BaseClass.h" + +class PointClass : public BaseClass { + +}; \ No newline at end of file diff --git a/Nuake/src/Core/FileSystem.cpp b/Nuake/src/Core/FileSystem.cpp index 76de6e25..4b0caa57 100644 --- a/Nuake/src/Core/FileSystem.cpp +++ b/Nuake/src/Core/FileSystem.cpp @@ -12,6 +12,7 @@ namespace fs = std::filesystem; + std::string FileDialog::OpenFile(const char* filter) { @@ -132,6 +133,24 @@ std::string FileSystem::ReadFile(const std::string& path, bool absolute) return allFile; } +std::ofstream FileSystem::fileWriter; +bool FileSystem::BeginWriteFile(const std::string path) +{ + fileWriter = std::ofstream(); + fileWriter.open("example.txt"); + + return false; +} + +bool FileSystem::WriteLine(const std::string line) +{ + fileWriter << line.c_str(); +} + +void FileSystem::EndWriteFile() +{ + fileWriter.close(); +} Ref FileSystem::GetFileTree() { diff --git a/Nuake/src/Core/FileSystem.h b/Nuake/src/Core/FileSystem.h index 82990f65..513764c1 100644 --- a/Nuake/src/Core/FileSystem.h +++ b/Nuake/src/Core/FileSystem.h @@ -2,7 +2,8 @@ #include #include #include "Core.h" - +#include +#include class FileDialog { public: @@ -49,6 +50,8 @@ public: static std::string ReadFile(const std::string& path, bool absolute = false); - - + static std::ofstream fileWriter; + static bool BeginWriteFile(const std::string path); + static bool WriteLine(const std::string line); + static void EndWriteFile(); }; \ No newline at end of file