You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#define OLC_PGE_APPLICATION
|
|
|
|
#include "pixelGameEngine.h"
|
|
|
|
#include <strstream>
|
|
|
|
#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<<version<<": "<<width<<","<<height<<","<<isInfinite;
|
|
|
|
|
|
|
|
LayerTag layerTag = mData.LayerData[0];
|
|
|
|
|
|
|
|
XMLTag layer0Tag = layerTag.tag;
|
|
|
|
int layerID=layer0Tag.GetInteger("id");
|
|
|
|
|
|
|
|
std::cout<<"\n"<<layerID;
|
|
|
|
|
|
|
|
std::cout<<"\n"<<layerTag.tiles[8][6];
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
}
|