| 88 | |
| 89 | #ifdef _DEBUG |
| 90 | TileIndex TileAdd(TileIndex tile, TileIndexDiff offset) |
| 91 | { |
| 92 | int dx = offset & Map::MaxX(); |
| 93 | if (dx >= (int)Map::SizeX() / 2) dx -= Map::SizeX(); |
| 94 | int dy = (offset - dx) / (int)Map::SizeX(); |
| 95 | |
| 96 | uint32_t x = TileX(tile) + dx; |
| 97 | uint32_t y = TileY(tile) + dy; |
| 98 | |
| 99 | assert(x < Map::SizeX()); |
| 100 | assert(y < Map::SizeY()); |
| 101 | assert(TileXY(x, y) == Map::WrapToMap(tile + offset)); |
| 102 | |
| 103 | return TileXY(x, y); |
| 104 | } |
| 105 | #endif |
| 106 | |
| 107 | /** |
no test coverage detected