From: deskull Date: Fri, 27 Sep 2019 00:31:00 +0000 (+0900) Subject: [Refactor] #38997 create_cata_tunnel() に floor_type * 引数を追加. / Add floor_type * argum... X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ef1101752f0b6e2cd1cf5d45bd5ee58813cf7d85;p=hengband%2Fhengband.git [Refactor] #38997 create_cata_tunnel() に floor_type * 引数を追加. / Add floor_type * argument to create_cata_tunnel(). --- diff --git a/src/floor-generate.c b/src/floor-generate.c index 434c9cff4..6f398ac95 100644 --- a/src/floor-generate.c +++ b/src/floor-generate.c @@ -1861,26 +1861,26 @@ static bool set_tunnel(floor_type *floor_ptr, POSITION *x, POSITION *y, bool aff * Note that this routine is only called on "even" squares - so it gives * a natural checkerboard pattern. */ -static void create_cata_tunnel(POSITION x, POSITION y) +static void create_cata_tunnel(floor_type *floor_ptr, POSITION x, POSITION y) { POSITION x1, y1; /* Build tunnel */ x1 = x - 1; y1 = y; - set_tunnel(p_ptr->current_floor_ptr, &x1, &y1, FALSE); + set_tunnel(floor_ptr, &x1, &y1, FALSE); x1 = x + 1; y1 = y; - set_tunnel(p_ptr->current_floor_ptr, &x1, &y1, FALSE); + set_tunnel(floor_ptr, &x1, &y1, FALSE); x1 = x; y1 = y - 1; - set_tunnel(p_ptr->current_floor_ptr, &x1, &y1, FALSE); + set_tunnel(floor_ptr, &x1, &y1, FALSE); x1 = x; y1 = y + 1; - set_tunnel(p_ptr->current_floor_ptr, &x1, &y1, FALSE); + set_tunnel(floor_ptr, &x1, &y1, FALSE); } @@ -1957,7 +1957,7 @@ static void short_seg_hack(floor_type *floor_ptr, POSITION x1, POSITION y1, POSI } if ((type == 3) && ((x + y) % 2)) { - create_cata_tunnel(i, y1); + create_cata_tunnel(floor_ptr, i, y1); } } } @@ -1975,7 +1975,7 @@ static void short_seg_hack(floor_type *floor_ptr, POSITION x1, POSITION y1, POSI } if ((type == 3) && ((x + y) % 2)) { - create_cata_tunnel(i, y1); + create_cata_tunnel(floor_ptr, i, y1); } } @@ -1994,7 +1994,7 @@ static void short_seg_hack(floor_type *floor_ptr, POSITION x1, POSITION y1, POSI } if ((type == 3) && ((x + y) % 2)) { - create_cata_tunnel(x2, i); + create_cata_tunnel(floor_ptr, x2, i); } } } @@ -2012,7 +2012,7 @@ static void short_seg_hack(floor_type *floor_ptr, POSITION x1, POSITION y1, POSI } if ((type == 3) && ((x + y) % 2)) { - create_cata_tunnel(x2, i); + create_cata_tunnel(floor_ptr, x2, i); } } }