diff --git a/TiledCollisionEditor/Tiles/Basic Tileset - Copy.tsx b/TiledCollisionEditor/Tiles/Basic Tileset - Copy.tsx new file mode 100644 index 0000000..9fb636f --- /dev/null +++ b/TiledCollisionEditor/Tiles/Basic Tileset - Copy.tsx @@ -0,0 +1,824 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TiledCollisionEditor/Tiles/Basic Tileset.tsx b/TiledCollisionEditor/Tiles/Basic Tileset.tsx index 6720585..9fb636f 100644 --- a/TiledCollisionEditor/Tiles/Basic Tileset.tsx +++ b/TiledCollisionEditor/Tiles/Basic Tileset.tsx @@ -16,6 +16,14 @@ + + + + + + + + diff --git a/TiledCollisionEditor/XMLTag.cpp b/TiledCollisionEditor/XMLTag.cpp index c653ff1..288470c 100644 --- a/TiledCollisionEditor/XMLTag.cpp +++ b/TiledCollisionEditor/XMLTag.cpp @@ -71,4 +71,14 @@ bool XMLTag::GetBool(std::string dataTag){ std::string XMLTag::GetString(std::string dataTag){ return data[dataTag]; +} + +std::string XMLTag::OutputTag(std::string ending){ + std::string finalStr{"<"}; + finalStr+=tag+" "; + for(auto&[name,value]:data){ + finalStr+=name+"=\""+value+"\""; + } + finalStr+=ending; + return finalStr; } \ No newline at end of file diff --git a/TiledCollisionEditor/XMLTag.h b/TiledCollisionEditor/XMLTag.h index da96f22..ab80f33 100644 --- a/TiledCollisionEditor/XMLTag.h +++ b/TiledCollisionEditor/XMLTag.h @@ -50,4 +50,5 @@ struct XMLTag{ double GetDouble(std::string dataTag); bool GetBool(std::string dataTag); std::string GetString(std::string dataTag); + std::string OutputTag(std::string ending=">"); }; \ No newline at end of file diff --git a/TiledCollisionEditor/main.cpp b/TiledCollisionEditor/main.cpp index a5059d6..5e35112 100644 --- a/TiledCollisionEditor/main.cpp +++ b/TiledCollisionEditor/main.cpp @@ -77,6 +77,15 @@ public: return true; } + void SaveFile(){ + std::ofstream file{activeTileset}; + if(file.good()){ + + }else{ + std::cout<<"WARNING! File not available for saving! Failed to save!"<