• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision373815c5c549dffe237998e2c2c71e78315c18d7 (tree)
Zeit2019-10-18 19:26:50
Autordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Ändern Zusammenfassung

Diff

--- a/src/rooms-vault.c
+++ b/src/rooms-vault.c
@@ -1146,7 +1146,7 @@ static void build_mini_c_vault(floor_type *floor_ptr, POSITION x0, POSITION y0,
11461146 *
11471147 *This makes a vault that looks like a castle/ city in the dungeon.
11481148 */
1149-static void build_castle_vault(POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
1149+static void build_castle_vault(floor_type *floor_ptr, POSITION x0, POSITION y0, POSITION xsize, POSITION ysize)
11501150 {
11511151 POSITION dy, dx;
11521152 POSITION y1, x1, y2, x2;
@@ -1168,7 +1168,7 @@ static void build_castle_vault(POSITION x0, POSITION y0, POSITION xsize, POSITIO
11681168 {
11691169 for (x = x1 - 1; x <= x2 + 1; x++)
11701170 {
1171- p_ptr->current_floor_ptr->grid_array[y][x].info |= (CAVE_ROOM | CAVE_ICKY);
1171+ floor_ptr->grid_array[y][x].info |= (CAVE_ROOM | CAVE_ICKY);
11721172 /* Make everything a floor */
11731173 place_floor_bold(y, x);
11741174 }
@@ -1178,7 +1178,7 @@ static void build_castle_vault(POSITION x0, POSITION y0, POSITION xsize, POSITIO
11781178 build_recursive_room(x1, y1, x2, y2, randint1(5));
11791179
11801180 /* Fill with monsters and treasure, low difficulty */
1181- fill_treasure(p_ptr->current_floor_ptr, x1, x2, y1, y2, randint1(3));
1181+ fill_treasure(floor_ptr, x1, x2, y1, y2, randint1(3));
11821182 }
11831183
11841184
@@ -1221,7 +1221,7 @@ bool build_type10(void)
12211221 case 3: case 11: build_cave_vault(x0, y0, xsize, ysize); break;
12221222 case 4: case 12: build_maze_vault(x0, y0, xsize, ysize, TRUE); break;
12231223 case 5: case 13: build_mini_c_vault(p_ptr->current_floor_ptr, x0, y0, xsize, ysize); break;
1224- case 6: case 14: build_castle_vault(x0, y0, xsize, ysize); break;
1224+ case 6: case 14: build_castle_vault(p_ptr->current_floor_ptr, x0, y0, xsize, ysize); break;
12251225 case 7: case 15: build_target_vault(p_ptr->current_floor_ptr, x0, y0, xsize, ysize); break;
12261226 #ifdef ALLOW_CAVERNS_AND_LAKES
12271227 case 8: build_elemental_vault(p_ptr->current_floor_ptr, x0, y0, xsize, ysize); break;
Show on old repository browser