From 4c6517faf8ef589443eef9ce5c2f99f6f8764683 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 27 Sep 2021 04:19:20 +0300 Subject: [PATCH 39/39] 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 609a208aba..8f96883f94 100644 --- a/common/map.h +++ b/common/map.h @@ -356,11 +356,12 @@ extern struct terrain_misc terrain_control; /* See iterate_outward_dxy() */ #define iterate_outward(nmap, start_tile, max_dist, itr_tile) \ - iterate_outward_dxy(nmap, start_tile, max_dist, itr_tile, _dx_itr, _dy_itr) + iterate_outward_dxy(nmap, 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