diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 7d8d1d9..6199ba0 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/TMXParser.h b/TMXParser.h index 842da34..35cba30 100644 --- a/TMXParser.h +++ b/TMXParser.h @@ -1,8 +1,9 @@ -#include "pixelGameEngine.h" -#include - -using namespace olc; +#include +#include +#include +#include +#include struct XMLTag{ std::string tag; @@ -39,6 +40,7 @@ struct XMLTag{ struct LayerTag{ XMLTag tag; + public: std::vector> tiles; std::string str() { std::string displayStr=tag.tag+"\n"+tag.FormatTagData(tag.data); diff --git a/main.cpp b/main.cpp index 1d0dced..e4f6ca7 100644 --- a/main.cpp +++ b/main.cpp @@ -1,28 +1,32 @@ -#define OLC_PGE_APPLICATION -#include "pixelGameEngine.h" + #include #include "TMXParser.h" -using namespace olc; - int main(){ TMXParser parser("00_test_room.tmx"); Map mData = parser.GetData(); XMLTag mapTag = mData.MapData; double version = mapTag.GetDouble("version"); - int width = mapTag.GetInteger("width"); - int height = mapTag.GetInteger("height"); bool isInfinite = mapTag.GetBool("infinite"); - std::cout<>> tileData; + for (int layer=0;layer> mapTileGrid; + for (int y=0;y row; + for (int x=0;x