Add function to iterate (curved) circular tile area

This commit is contained in:
Jonathan G Rennison
2024-01-09 03:17:15 +00:00
parent 16b840d86e
commit 69f7c3e63b
2 changed files with 43 additions and 0 deletions

View File

@@ -440,6 +440,16 @@ bool CircularTileSearch(TileIndex *tile, uint radius, uint w, uint h, TestTileOn
bool EnoughContiguousTilesMatchingCondition(TileIndex tile, uint threshold, TestTileOnSearchProc proc, void *user_data);
/**
* A callback function type for iterating tiles.
*
* @param tile The tile to test
* @param user_data additional data for the callback function to use
*/
typedef void TileIteratorProc(TileIndex tile, void *user_data);
void IterateCurvedCircularTileArea(TileIndex centre_tile, uint diameter, TileIteratorProc proc, void *user_data);
/**
* Get a random tile out of a given seed.
* @param r the random 'seed'