MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SkipOutsideMap

Method SkipOutsideMap

src/tilearea.cpp:348–351  ·  view source on GitHub ↗

* Advance the internal state until it reaches a valid tile or the end. */

Source from the content-addressed store, hash-verified

346 * Advance the internal state until it reaches a valid tile or the end.
347 */
348void SpiralTileIterator::SkipOutsideMap()
349{
350 while (!this->IsEnd() && (this->x >= Map::SizeX() || this->y >= Map::SizeY())) this->Increment();
351}
352
353/**
354 * Initialise "position" after "dir" was changed.

Callers 2

SpiralTileIteratorMethod · 0.95
SpiralTileIteratorClass · 0.95

Calls 2

IsEndMethod · 0.95
IncrementMethod · 0.95

Tested by

no test coverage detected