• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionfdc2749350f5768855f9509ba8d15241870d1557 (tree)
Time2019-08-18 23:59:35
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 level_gen() に floor_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/floor-generate.c
+++ b/src/floor-generate.c
@@ -1241,7 +1241,7 @@ static void generate_fixed_floor(void)
12411241 * @brief ダンジョン時のランダムフロア生成 / Make a real level
12421242 * @return フロアの生成に成功したらTRUE
12431243 */
1244-static bool level_gen(concptr *why)
1244+static bool level_gen(floor_type *floor_ptr, concptr *why)
12451245 {
12461246 int level_height, level_width;
12471247
@@ -1271,30 +1271,30 @@ static bool level_gen(concptr *why)
12711271 while ((level_height == MAX_HGT/SCREEN_HGT) && (level_width == MAX_WID/SCREEN_WID));
12721272 }
12731273
1274- current_floor_ptr->height = level_height * SCREEN_HGT;
1275- current_floor_ptr->width = level_width * SCREEN_WID;
1274+ floor_ptr->height = level_height * SCREEN_HGT;
1275+ floor_ptr->width = level_width * SCREEN_WID;
12761276
12771277 /* Assume illegal panel */
1278- panel_row_min = current_floor_ptr->height;
1279- panel_col_min = current_floor_ptr->width;
1278+ panel_row_min = floor_ptr->height;
1279+ panel_col_min = floor_ptr->width;
12801280
12811281 msg_format_wizard(CHEAT_DUNGEON,
12821282 _("小さなフロア: X:%d, Y:%d", "A 'small' dungeon level: X:%d, Y:%d."),
1283- current_floor_ptr->width, current_floor_ptr->height);
1283+ floor_ptr->width, floor_ptr->height);
12841284 }
12851285 else
12861286 {
12871287 /* Big dungeon */
1288- current_floor_ptr->height = MAX_HGT;
1289- current_floor_ptr->width = MAX_WID;
1288+ floor_ptr->height = MAX_HGT;
1289+ floor_ptr->width = MAX_WID;
12901290
12911291 /* Assume illegal panel */
1292- panel_row_min = current_floor_ptr->height;
1293- panel_col_min = current_floor_ptr->width;
1292+ panel_row_min = floor_ptr->height;
1293+ panel_col_min = floor_ptr->width;
12941294 }
12951295
12961296 /* Make a dungeon */
1297- if (!cave_gen(current_floor_ptr))
1297+ if (!cave_gen(floor_ptr))
12981298 {
12991299 *why = _("ダンジョン生成に失敗", "could not place player");
13001300 return FALSE;
@@ -1442,7 +1442,7 @@ void generate_random_floor(void)
14421442 /* Build a real level */
14431443 else
14441444 {
1445- okay = level_gen(&why);
1445+ okay = level_gen(current_floor_ptr, &why);
14461446 }
14471447
14481448
Show on old repository browser