From f8bca3fd821b2813e49caed5284ee308a30eb231 Mon Sep 17 00:00:00 2001 From: Deskull Date: Thu, 4 Oct 2018 21:04:01 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37287=20#37353=20=E5=9E=8B?= =?utf8?q?=E3=81=AE=E7=BD=AE=E6=8F=9B=E3=80=82=20/=20Type=20replacement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/rooms.c | 15 ++++++++------- src/rooms.h | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/rooms.c b/src/rooms.c index fbc08ef4a..37b73301f 100644 --- a/src/rooms.c +++ b/src/rooms.c @@ -125,9 +125,9 @@ static byte room_build_order[ROOM_T_MAX] = { * Note - this should be used only on allocated regions * within another room. */ -void build_small_room(int x0, int y0) +void build_small_room(POSITION x0, POSITION y0) { - int x, y; + POSITION x, y; for (y = y0 - 1; y <= y0 + 1; y++) { @@ -167,9 +167,10 @@ void build_small_room(int x0, int y0) * @param y2 範囲の下端 * @return なし */ -static void check_room_boundary(int x1, int y1, int x2, int y2) +static void check_room_boundary(POSITION x1, POSITION y1, POSITION x2, POSITION y2) { - int count, x, y; + int count; + POSITION x, y; bool old_is_floor, new_is_floor; @@ -1660,10 +1661,10 @@ void r_visit(int y1, int x1, int y2, int x2, int node, int dir, int *visited) } -void build_maze_vault(int x0, int y0, int xsize, int ysize, bool is_vault) +void build_maze_vault(POSITION x0, POSITION y0, POSITION xsize, POSITION ysize, bool is_vault) { - int y, x, dy, dx; - int y1, x1, y2, x2; + POSITION y, x, dy, dx; + POSITION y1, x1, y2, x2; int m, n, num_vertices, *visited; bool light; cave_type *c_ptr; diff --git a/src/rooms.h b/src/rooms.h index 97d3b4361..34a1efcb2 100644 --- a/src/rooms.h +++ b/src/rooms.h @@ -81,9 +81,9 @@ extern void build_cavern(void); #endif /* ALLOW_CAVERNS_AND_LAKES */ extern bool generate_rooms(void); -extern void build_maze_vault(int x0, int y0, int xsize, int ysize, bool is_vault); +extern void build_maze_vault(POSITION x0, POSITION y0, POSITION xsize, POSITION ysize, bool is_vault); extern bool find_space(POSITION *y, POSITION *x, POSITION height, POSITION width); -extern void build_small_room(int x0, int y0); +extern void build_small_room(POSITION x0, POSITION y0); extern void add_outer_wall(int x, int y, int light, int x1, int y1, int x2, int y2); extern int dist2(int x1, int y1, int x2, int y2, int h1, int h2, int h3, int h4); extern void generate_room_floor(int y1, int x1, int y2, int x2, int light); -- 2.11.0