• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision2a0a007ce22097fd5a251e8691f53d761edfa679 (tree)
Zeit2019-10-18 19:15:30
Autordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 build_type9() に floor_type * 引数を追加. / Add floor_type * argument to build_type9().

Ändern Zusammenfassung

Diff

--- a/src/rooms-fractal.c
+++ b/src/rooms-fractal.c
@@ -10,7 +10,7 @@
1010 * @brief タイプ9の部屋…フラクタルカーブによる洞窟生成 / Type 9 -- Driver routine to create fractal p_ptr->current_floor_ptr->grid_array system
1111 * @return なし
1212 */
13-bool build_type9(void)
13+bool build_type9(floor_type *floor_ptr)
1414 {
1515 int grd, roug, cutoff;
1616 POSITION xsize, ysize, y0, x0;
@@ -35,14 +35,14 @@ bool build_type9(void)
3535 * Still no space?!
3636 * Try normal room
3737 */
38- return build_type1(p_ptr->current_floor_ptr);
38+ return build_type1(floor_ptr);
3939 }
4040 }
4141
4242 light = done = FALSE;
4343 room = TRUE;
4444
45- if ((p_ptr->current_floor_ptr->dun_level <= randint1(25)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) light = TRUE;
45+ if ((floor_ptr->dun_level <= randint1(25)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) light = TRUE;
4646
4747 while (!done)
4848 {
@@ -60,10 +60,10 @@ bool build_type9(void)
6060 randint1(xsize / 4) + randint1(ysize / 4);
6161
6262 /* make it */
63- generate_hmap(p_ptr->current_floor_ptr, y0, x0, xsize, ysize, grd, roug, cutoff);
63+ generate_hmap(floor_ptr, y0, x0, xsize, ysize, grd, roug, cutoff);
6464
6565 /* Convert to normal format + clean up */
66- done = generate_fracave(p_ptr->current_floor_ptr, y0, x0, xsize, ysize, cutoff, light, room);
66+ done = generate_fracave(floor_ptr, y0, x0, xsize, ysize, cutoff, light, room);
6767 }
6868
6969 return TRUE;
--- 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
16041604 * is the randint0(3) below; it governs the relative density of
16051605 * twists and turns in the labyrinth: smaller number, more twists.
16061606 */
1607-void r_visit(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited)
1607+void r_visit(POSITION y1, POSITION x1, POSITION y2, POSITION x2, int node, DIRECTION dir, int *visited)
16081608 {
16091609 int i, j, m, n, temp, x, y, adj[4];
16101610
Show on old repository browser