1
Graphics / Re: Help understanding the Tile Map Example in SFML Tutorials 2.1
« on: October 25, 2014, 02:46:05 pm »
I have looked in the FAQ and I understand all of the basic concepts listed there and most of the advanced concepts like operator overloading or templates. I understand all the SFML tutorials so far except for this one particular example.
In particular, why the math equations are written the way they are. For example, why is tu set to tileNumber % (m_tileset.getSize().x / tileSize.x);? Why is it (i+j*width)*4?
In particular, why the math equations are written the way they are. For example, why is tu set to tileNumber % (m_tileset.getSize().x / tileSize.x);? Why is it (i+j*width)*4?