From e04ffd120c5960de04a09ecc84d530d89f9245f1 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 27 Sep 2021 04:08:19 +0300 Subject: [PATCH 14/15] Make it possible to use iterate_outward() recursively See osdn #42930 Signed-off-by: Marko Lindqvist --- common/map.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/map.h b/common/map.h index 38c1e88850..8b21007e9a 100644 --- a/common/map.h +++ b/common/map.h @@ -344,11 +344,12 @@ extern struct terrain_misc terrain_control; /* See iterate_outward_dxy() */ #define iterate_outward(start_tile, max_dist, itr_tile) \ - iterate_outward_dxy(start_tile, max_dist, itr_tile, _dx_itr, _dy_itr) + iterate_outward_dxy(start_tile, max_dist, itr_tile, \ + _dx_itr##itr_tile, _dy_itr##itr_tile) #define iterate_outward_end iterate_outward_dxy_end -/* +/* * Iterate through all tiles in a square with given center and radius. * The position (x_itr, y_itr) that is returned will be normalized; * unreal positions will be automatically discarded. (dx_itr, dy_itr) -- 2.33.0