* Converts coordinates into a unique index. * getTile() calls this every time, so should be inlined along with it. * @param pos The position to convert. * @return A unique index. */
| 124 | * @return A unique index. |
| 125 | */ |
| 126 | inline int getTileIndex(const Position& pos) const |
| 127 | { |
| 128 | return pos.z * _mapsize_y * _mapsize_x + pos.y * _mapsize_x + pos.x; |
| 129 | } |
| 130 | |
| 131 | /// Converts a tile index to its coordinates. |
| 132 | void getTileCoords(int index, int *x, int *y, int *z) const; |
no outgoing calls
no test coverage detected