From 2a0a007ce22097fd5a251e8691f53d761edfa679 Mon Sep 17 00:00:00 2001 From: deskull Date: Fri, 18 Oct 2019 19:15:30 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#38997=20build=5Ftype9()=20?= =?utf8?q?=E3=81=AB=20floor=5Ftype=20*=20=E5=BC=95=E6=95=B0=E3=82=92?= =?utf8?q?=E8=BF=BD=E5=8A=A0=EF=BC=8E=20/=20Add=20floor=5Ftype=20*=20argum?= =?utf8?q?ent=20to=20build=5Ftype9().?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/rooms-fractal.c | 10 +++++----- src/rooms.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rooms-fractal.c b/src/rooms-fractal.c index 88fea80d2..f414ae0cc 100644 --- a/src/rooms-fractal.c +++ b/src/rooms-fractal.c @@ -10,7 +10,7 @@ * @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal p_ptr->current_floor_ptr->grid_array system * @return なし */ -bool build_type9(void) +bool build_type9(floor_type *floor_ptr) { int grd, roug, cutoff; POSITION xsize, ysize, y0, x0; @@ -35,14 +35,14 @@ bool build_type9(void) * Still no space?! * Try normal room */ - return build_type1(p_ptr->current_floor_ptr); + return build_type1(floor_ptr); } } light = done = FALSE; room = TRUE; - if ((p_ptr->current_floor_ptr->dun_level <= randint1(25)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) light = TRUE; + if ((floor_ptr->dun_level <= randint1(25)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) light = TRUE; while (!done) { @@ -60,10 +60,10 @@ bool build_type9(void) randint1(xsize / 4) + randint1(ysize / 4); /* make it */ - generate_hmap(p_ptr->current_floor_ptr, y0, x0, xsize, ysize, grd, roug, cutoff); + generate_hmap(floor_ptr, y0, x0, xsize, ysize, grd, roug, cutoff); /* Convert to normal format + clean up */ - done = generate_fracave(p_ptr->current_floor_ptr, y0, x0, xsize, ysize, cutoff, light, room); + done = generate_fracave(floor_ptr, y0, x0, xsize, ysize, cutoff, light, room); } return TRUE; diff --git a/src/rooms.c b/src/rooms.c index f7b6797c7..0925994a0 100644 --- a/src/rooms.c +++ b/src/rooms.c @@ -1604,7 +1604,7 @@ void build_room(floor_type *floor_ptr, POSITION x1, POSITION x2, POSITION y1, PO * is the randint0(3) below; it governs the relative density of * twists and turns in the labyrinth: smaller number, more twists. */ -void r_visit(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited) +void r_visit(POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited) { int i, j, m, n, temp, x, y, adj[4]; -- 2.11.0