halsafar/libtmx-parser added to project

This commit is contained in:
2022-03-21 15:26:13 -04:00
parent 66b8de6f40
commit dc43e59ff6
16 changed files with 422 additions and 16 deletions

View File

@ -33,7 +33,7 @@ void Map::LoadMap(std::string path, int sizeX, int sizeY, int scale)
std::fstream mapFile;
mapFile.open(path);
int srcX, srcY;
width = tSize*scale*sizeX;
height = tSize*scale*sizeY;
@ -45,7 +45,6 @@ void Map::LoadMap(std::string path, int sizeX, int sizeY, int scale)
srcY = atoi(&c) * tileSize;
mapFile.get(c);
srcX = atoi(&c) * tileSize;
AddTile(srcX, srcY, x*scaledSize, y*scaledSize);
mapFile.ignore(2,',');
}
}