No, these characters would be mapped to an individual texture.
I ended up following the VertexArray tutorial from the docs, with the addition that it reads from my .txt file to make my map
https://www.sfml-dev.org/tutorials/2.5/graphics-vertex-array.php.
My issue at the moment is that, it only accepts my text file if it is composed of numbers
https://imgur.com/a/ipgZP73, rather than the aforementioned characters (#,*, . , O)
https://imgur.com/a/xUmnALQAt this point I am only left with turning those numerical values of the textures into chars, so map.txt can be read properly
This is a code snippet of how I process the text file which I suspect is part of the problem
```
bool load(const std::string& tileset, sf::Vector2u tileSize) {
if (!m_tileset.loadFromFile(tileset))
return false;
std::vector<std::vector<int> > tiles;
std::ifstream stream("map.txt");
stream.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); // ignore first line
for (std::string line; std::getline(stream, line);) {
tiles.push_back(std::vector<int>());
std::stringstream ss(line);
std::copy(std::istream_iterator<int>(ss), std::istream_iterator<int>(), std::back_inserter(tiles.back()));
........
}
.....
(this is from the sfml vertex array tutorial that I followed)
// define its 4 corners
quad[0].position = sf::Vector2f(i * tileSize.x, j * tileSize.y);
quad[1].position = sf::Vector2f((i + 1) * tileSize.x, j * tileSize.y);
quad[2].position = sf::Vector2f((i + 1) * tileSize.x, (j + 1) * tileSize.y);
quad[3].position = sf::Vector2f(i * tileSize.x, (j + 1) * tileSize.y);
// define its 4 texture coordinates
quad[0].texCoords = sf::Vector2f(tu * tileSize.x, tv * tileSize.y);
quad[1].texCoords = sf::Vector2f((tu + 1) * tileSize.x, tv * tileSize.y);
quad[2].texCoords = sf::Vector2f((tu + 1) * tileSize.x, (tv + 1) * tileSize.y);
quad[3].texCoords = sf::Vector2f(tu * tileSize.x, (tv + 1) * tileSize.y);
From what I've gathered, I need to somehow map these quad positions to the chars I want to use, which is where im at right now