| 97 | } |
| 98 | const bool isTileInBounds(Vec3<int> pos) const { return isTileInBounds(pos.x, pos.y, pos.z); } |
| 99 | const Tile *getTile(int x, int y, int z) const |
| 100 | { |
| 101 | |
| 102 | if (!((x >= 0) && (x < size.x) && (y >= 0) && (y < size.y) && (z >= 0) && (z < size.z))) |
| 103 | { |
| 104 | LogError("Incorrect tile coordinates (const) %d,%d,%d", x, y, z); |
| 105 | return nullptr; |
| 106 | } |
| 107 | return &this->tiles[z * size.x * size.y + y * size.x + x]; |
| 108 | } |
| 109 | Tile *getTile(int x, int y, int z) |
| 110 | { |
| 111 | if (!((x >= 0) && (x < size.x) && (y >= 0) && (y < size.y) && (z >= 0) && (z < size.z))) |
no outgoing calls
no test coverage detected