OSDN Git Service

#37353 歌領域処理を cmd-spell.c から realm-song.c/h へ分離。
[hengband/hengband.git] / src / generate.c
index cfa476f..c7b4bb7 100644 (file)
@@ -1,6 +1,6 @@
-/*!
+/*!
  * @file generate.c
- * @brief ¥À¥ó¥¸¥ç¥ó¤ÎÀ¸À® / Dungeon generation
+ * @brief ダンジョンの生成 / Dungeon generation
  * @date 2014/01/04
  * @author
  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
 #include "rooms.h"
 #include "streams.h"
 
-int dun_tun_rnd;
+int dun_tun_rnd; 
 int dun_tun_chg;
 int dun_tun_con;
 int dun_tun_pen;
@@ -116,10 +116,10 @@ dun_data *dun;
 
 
 /*!
- * @brief ¾å²¼º¸±¦¤Î³°ÊÉ¿ô¤ò¥«¥¦¥ó¥È¤¹¤ë / Count the number of walls adjacent to the given grid.
- * @param y ´ð½à¤ÎyºÂɸ
- * @param x ´ð½à¤ÎxºÂɸ
- * @return ÎÙÀܤ¹¤ë³°Êɤοô
+ * @brief 上下左右の外壁数をカウントする / Count the number of walls adjacent to the given grid.
+ * @param y 基準のy座標
+ * @param x 基準のx座標
+ * @return 隣接する外壁の数
  * @note Assumes "in_bounds(y, x)"
  * @details We count only granite walls and permanent walls.
  */
@@ -136,11 +136,11 @@ static int next_to_walls(int y, int x)
 }
 
 /*!
- * @brief alloc_stairs()¤ÎÊä½õ¤È¤·¤Æ»ØÄê¤Î°ÌÃ֤˳¬ÃʤòÀ¸À®¤Ç¤­¤ë¤«¤ÎȽÄê¤ò¹Ô¤¦ / Helper function for alloc_stairs(). Is this a good location for stairs?
- * @param y ´ð½à¤ÎyºÂɸ
- * @param x ´ð½à¤ÎxºÂɸ
- * @param walls ºÇÄ㸺ÎÙÀܤµ¤»¤¿¤¤³°Êɤοô
- * @return ³¬ÃʤòÀ¸À®¤·¤ÆÌäÂ꤬¤Ê¤¤¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
+ * @brief alloc_stairs()の補助として指定の位置に階段を生成できるかの判定を行う / Helper function for alloc_stairs(). Is this a good location for stairs?
+ * @param y 基準のy座標
+ * @param x 基準のx座標
+ * @param walls 最低減隣接させたい外壁の数
+ * @return 階段を生成して問題がないならばTRUEを返す。
  */
 static bool alloc_stairs_aux(int y, int x, int walls)
 {
@@ -160,13 +160,13 @@ static bool alloc_stairs_aux(int y, int x, int walls)
 
 
 /*!
- * @brief ³°ÊɤËÎÙÀܤµ¤»¤Æ³¬ÃʤòÀ¸À®¤¹¤ë / Places some staircases near walls
- * @param feat ÇÛÃÖ¤·¤¿¤¤ÃÏ·ÁID
- * @param num ÇÛÃÖ¤·¤¿¤¤³¬Ãʤοô
- * @param walls ºÇÄ㸺ÎÙÀܤµ¤»¤¿¤¤³°Êɤοô
- * @return µ¬Äê¿ôÄ̤ê¤ËÀ¸À®¤ËÀ®¸ù¤·¤¿¤éTRUE¤òÊÖ¤¹¡£
+ * @brief 外壁に隣接させて階段を生成する / Places some staircases near walls
+ * @param feat 配置したい地形ID
+ * @param num 配置したい階段の数
+ * @param walls 最低減隣接させたい外壁の数
+ * @return 規定数通りに生成に成功したらTRUEを返す。
  */
-static bool alloc_stairs(int feat, int num, int walls)
+static bool alloc_stairs(IDX feat, int num, int walls)
 {
        int i;
        int shaft_num = 0;
@@ -279,11 +279,11 @@ static bool alloc_stairs(int feat, int num, int walls)
 }
 
 /*!
- * @brief ¥Õ¥í¥¢¾å¤Î¥é¥ó¥À¥à°ÌÃ֤˳Ƽ索¥Ö¥¸¥§¥¯¥È¤òÇÛÃÖ¤¹¤ë / Allocates some objects (using "place" and "type")
- * @param set ÇÛÃÖ¤·¤¿¤¤ÃÏ·Á¤Î¼ïÎà
- * @param typ ÇÛÃÖ¤·¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¤Î¼ïÎà
- * @param num ÇÛÃÖ¤·¤¿¤¤¿ô
- * @return µ¬Äê¿ôÄ̤ê¤ËÀ¸À®¤ËÀ®¸ù¤·¤¿¤éTRUE¤òÊÖ¤¹¡£
+ * @brief フロア上のランダム位置に各種オブジェクトを配置する / Allocates some objects (using "place" and "type")
+ * @param set 配置したい地形の種類
+ * @param typ 配置したいオブジェクトの種類
+ * @param num 配置したい数
+ * @return 規定数通りに生成に成功したらTRUEを返す。
  */
 static void alloc_object(int set, int typ, int num)
 {
@@ -331,15 +331,7 @@ static void alloc_object(int set, int typ, int num)
 
                if (dummy >= SAFE_MAX_ATTEMPTS)
                {
-                       if (cheat_room)
-                       {
-#ifdef JP
-msg_print("·Ù¹ð¡ª¥¢¥¤¥Æ¥à¤òÇÛÃ֤Ǥ­¤Þ¤»¤ó¡ª");
-#else
-                               msg_print("Warning! Could not place object!");
-#endif
-
-                       }
+                       msg_print_wizard(CHEAT_DUNGEON, _("アイテムの配置に失敗しました。", "Failed to place object."));
                        return;
                }
 
@@ -377,10 +369,10 @@ msg_print("
 }
 
 /*!
- * @brief ÎÙÀÜ4¥Þ¥¹¤Ë¸ºß¤¹¤ëÄÌÏ©¤Î¿ô¤òÊÖ¤¹ / Count the number of "corridor" grids adjacent to the given grid.
- * @param y1 ´ð½à¤È¤Ê¤ë¥Þ¥¹¤ÎYºÂɸ
- * @param x1 ´ð½à¤È¤Ê¤ë¥Þ¥¹¤ÎXºÂɸ
- * @return ÄÌÏ©¤Î¿ô
+ * @brief 隣接4マスに存在する通路の数を返す / Count the number of "corridor" grids adjacent to the given grid.
+ * @param y1 基準となるマスのY座標
+ * @param x1 基準となるマスのX座標
+ * @return 通路の数
  * @note Assumes "in_bounds(y1, x1)"
  * @details
  * XXX XXX This routine currently only counts actual "empty floor"\n
@@ -423,10 +415,10 @@ static int next_to_corr(int y1, int x1)
 
 
 /*!
- * @brief ¥É¥¢¤òÀßÃÖ²Äǽ¤ÊÃÏ·Á¤«¤òÊÖ¤¹ / Determine if the given location is "between" two walls, and "next to" two corridor spaces.
- * @param y È½Äê¤ò¹Ô¤¤¤¿¤¤¥Þ¥¹¤ÎYºÂɸ
- * @param x È½Äê¤ò¹Ô¤¤¤¿¤¤¥Þ¥¹¤ÎXºÂɸ
- * @return ¥É¥¢¤òÀßÃÖ²Äǽ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ * @brief ドアを設置可能な地形かを返す / Determine if the given location is "between" two walls, and "next to" two corridor spaces.
+ * @param y 判定を行いたいマスのY座標
+ * @param x 判定を行いたいマスのX座標
+ * @return ドアを設置可能ならばTRUEを返す
  * @note Assumes "in_bounds(y1, x1)"
  * @details
  * XXX XXX XXX\n
@@ -457,10 +449,10 @@ static bool possible_doorway(int y, int x)
 }
 
 /*!
- * @brief ¥É¥¢¤ÎÀßÃÖ¤ò»î¤ß¤ë / Places door at y, x position if at least 2 walls found
- * @param y ÀßÃÖ¤ò¹Ô¤¤¤¿¤¤¥Þ¥¹¤ÎYºÂɸ
- * @param x ÀßÃÖ¤ò¹Ô¤¤¤¿¤¤¥Þ¥¹¤ÎXºÂɸ
- * @return ¤Ê¤·
+ * @brief ドアの設置を試みる / Places door at y, x position if at least 2 walls found
+ * @param y 設置を行いたいマスのY座標
+ * @param x 設置を行いたいマスのX座標
+ * @return なし
  */
 static void try_door(int y, int x)
 {
@@ -483,18 +475,18 @@ static void try_door(int y, int x)
 
 
 /*!
- * @brief ¥¯¥¨¥¹¥È¤Ë´Ø¤ï¤ë¥â¥ó¥¹¥¿¡¼¤ÎÇÛÃÖ¤ò¹Ô¤¦ / Place quest monsters
- * @return À®¸ù¤·¤¿¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ * @brief クエストに関わるモンスターの配置を行う / Place quest monsters
+ * @return 成功したならばTRUEを返す
  */
 bool place_quest_monsters(void)
 {
        int i;
 
        /* Handle the quest monster placements */
-       for (i = 0; i < max_quests; i++)
+       for (i = 0; i < max_q_idx; i++)
        {
                monster_race *r_ptr;
-               u32b mode;
+               BIT_FLAGS mode;
                int j;
 
                if (quest[i].status != QUEST_STATUS_TAKEN ||
@@ -525,7 +517,7 @@ bool place_quest_monsters(void)
 
                        for (k = 0; k < SAFE_MAX_ATTEMPTS; k++)
                        {
-                               int x, y;
+                               int x = 0, y = 0;
                                int l;
 
                                /* Find an empty grid */
@@ -542,7 +534,7 @@ bool place_quest_monsters(void)
 
                                        if (!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY)) continue;
                                        if (!monster_can_enter(y, x, r_ptr, 0)) continue;
-                                       if (distance(y, x, py, px) < 10) continue;
+                                       if (distance(y, x, p_ptr->y, p_ptr->x) < 10) continue;
                                        if (c_ptr->info & CAVE_ICKY) continue;
                                        else break;
                                }
@@ -573,9 +565,9 @@ bool place_quest_monsters(void)
 
 
 /*!
- * @brief ¥Þ¥¹¤Ë¥Õ¥í¥¢Ã¼ÍѤαʵ×ÊɤòÇÛÃÖ¤¹¤ë / Set boundary mimic and add "solid" perma-wall
- * @param c_ptr ±Êµ×ÊɤòÇѻߤ·¤¿¤¤¥Þ¥¹¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
- * @return ¤Ê¤·
+ * @brief マスにフロア端用の永久壁を配置する / Set boundary mimic and add "solid" perma-wall
+ * @param c_ptr æ°¸ä¹\85å£\81ã\82\92å»\83æ­¢ã\81\97ã\81\9fã\81\84ã\83\9eã\82¹æ§\8bé\80 ä½\93ã\81®å\8f\82ç\85§ã\83\9dã\82¤ã\83³ã\82¿
+ * @return なし
  */
 static void set_bound_perm_wall(cave_type *c_ptr)
 {
@@ -602,9 +594,9 @@ static void set_bound_perm_wall(cave_type *c_ptr)
 }
 
 /*!
- * @brief ¥Õ¥í¥¢¤Ëƶ·¢¤ä¸Ð¤òÇÛÃÖ¤¹¤ë / Generate various caverns and lakes
+ * @brief フロアに洞窟や湖を配置する / Generate various caverns and lakes
  * @details There were moved from cave_gen().
- * @return ¤Ê¤·
+ * @return なし
  */
 static void gen_caverns_and_lakes(void)
 {
@@ -666,13 +658,7 @@ static void gen_caverns_and_lakes(void)
 
                if (dun->laketype)
                {
-                       if (cheat_room)
-#ifdef JP
-                               msg_print("¸Ð¤òÀ¸À®¡£");
-#else
-                               msg_print("Lake on the level.");
-#endif
-
+                       msg_print_wizard(CHEAT_DUNGEON, _("湖を生成します。", "Lake on the level."));
                        build_lake(dun->laketype);
                }
        }
@@ -685,13 +671,7 @@ static void gen_caverns_and_lakes(void)
 
                /* make a large fractal cave in the middle of the dungeon */
 
-               if (cheat_room)
-#ifdef JP
-                       msg_print("ƶ·¢¤òÀ¸À®¡£");
-#else
-                       msg_print("Cavern on level.");
-#endif
-
+               msg_print_wizard(CHEAT_DUNGEON, _("洞窟を生成。", "Cavern on level."));
                build_cavern();
        }
 #endif /* ALLOW_CAVERNS_AND_LAKES */
@@ -702,9 +682,9 @@ static void gen_caverns_and_lakes(void)
 
 
 /*!
- * @brief ¥À¥ó¥¸¥ç¥óÀ¸À®¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó / Generate a new dungeon level
+ * @brief ダンジョン生成のメインルーチン / Generate a new dungeon level
  * @details Note that "dun_body" adds about 4000 bytes of memory to the stack.
- * @return ¥À¥ó¥¸¥ç¥óÀ¸À®¤¬Á´¤Æ̵»ö¤ËÀ®¸ù¤·¤¿¤éTRUE¤òÊÖ¤¹¡£
+ * @return ダンジョン生成が全て無事に成功したらTRUEを返す。
  */
 static bool cave_gen(void)
 {
@@ -720,8 +700,6 @@ static bool cave_gen(void)
        dun->cavern = FALSE;
        dun->laketype = 0;
 
-       music(MUSIC_TITLE);
-
        /* Fill the arrays of floors and walls in the good proportions */
        set_floor_and_wall(dungeon_type);
 
@@ -755,13 +733,7 @@ static bool cave_gen(void)
        if (ironman_empty_levels || ((d_info[dungeon_type].flags1 & DF1_ARENA) && (empty_levels && one_in_(EMPTY_LEVEL))))
        {
                dun->empty_level = TRUE;
-
-               if (cheat_room)
-#ifdef JP
-                       msg_print("¥¢¥ê¡¼¥Ê¥ì¥Ù¥ë");
-#else
-                       msg_print("Arena level.");
-#endif
+               msg_print_wizard(CHEAT_DUNGEON, _("アリーナレベルを生成。", "Arena level."));
        }
 
        if (dun->empty_level)
@@ -844,7 +816,7 @@ static bool cave_gen(void)
                /* Hack -- Add some rivers */
                if (one_in_(3) && (randint1(dun_level) > 5))
                {
-                       int feat1 = 0, feat2 = 0;
+                       IDX feat1 = 0, feat2 = 0;
 
                        /* Choose water or lava */
                        if ((randint1(MAX_DEPTH * 2) - 1 > dun_level) && (d_info[dungeon_type].flags1 & DF1_WATER_RIVER))
@@ -1051,15 +1023,9 @@ static bool cave_gen(void)
                i += 1;
 
                if (i > small_tester) i = small_tester;
-               else if (cheat_hear)
-               {
-#ifdef JP
-msg_format("¥â¥ó¥¹¥¿¡¼¿ô´ðËÜÃͤò %d ¤«¤é %d ¤Ë¸º¤é¤·¤Þ¤¹", small_tester, i);
-#else
-                       msg_format("Reduced monsters base from %d to %d", small_tester, i);
-#endif
+               else msg_format_wizard(CHEAT_DUNGEON,
+                       _("モンスター数基本値を %d から %d に減らします", "Reduced monsters base from %d to %d"), small_tester, i);
 
-               }
        }
 
        i += randint1(8);
@@ -1112,8 +1078,8 @@ msg_format("
 }
 
 /*!
- * @brief Æ®µ»¾ìÍѤΥ¢¥ê¡¼¥ÊÃÏ·Á¤òºîÀ®¤¹¤ë / Builds the arena after it is entered -KMW-
- * @return ¤Ê¤·
+ * @brief 闘技場用のアリーナ地形を作成する / Builds the arena after it is entered -KMW-
+ * @return なし
  */
 static void build_arena(void)
 {
@@ -1169,8 +1135,8 @@ static void build_arena(void)
 }
 
 /*!
- * @brief Æ®µ»¾ì¤Ø¤ÎÆþ¾ì½èÍý / Town logic flow for generation of arena -KMW-
- * @return ¤Ê¤·
+ * @brief 闘技場への入場処理 / Town logic flow for generation of arena -KMW-
+ * @return なし
  */
 static void arena_gen(void)
 {
@@ -1207,12 +1173,12 @@ static void arena_gen(void)
 
        build_arena();
 
-       if(!place_monster_aux(0, py + 5, px, arena_info[p_ptr->arena_number].r_idx, (PM_NO_KAGE | PM_NO_PET)))
+       if(!place_monster_aux(0, p_ptr->y + 5, p_ptr->x, arena_info[p_ptr->arena_number].r_idx, (PM_NO_KAGE | PM_NO_PET)))
        {
                p_ptr->exit_bldg = TRUE;
                p_ptr->arena_number++;
 #ifdef JP
-               msg_print("Áê¼ê¤Ï·ç¾ì¤·¤¿¡£¤¢¤Ê¤¿¤ÎÉÔÀᄀ¤À¡£");
+               msg_print("相手は欠場した。あなたの不戦勝だ。");
 #else
                msg_print("The enemy is unable appear. You won by default.");
 #endif
@@ -1221,8 +1187,8 @@ static void arena_gen(void)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼Æ®µ»¾ì¤Î¥Õ¥í¥¢À¸À® / Builds the arena after it is entered -KMW-
- * @return ¤Ê¤·
+ * @brief モンスター闘技場のフロア生成 / Builds the arena after it is entered -KMW-
+ * @return なし
  */
 static void build_battle(void)
 {
@@ -1284,12 +1250,13 @@ static void build_battle(void)
 }
 
 /*!
- * @brief ¥â¥ó¥¹¥¿¡¼Æ®µ»¾ì¤Ø¤ÎƳÆþ½èÍý / Town logic flow for generation of arena -KMW-
- * @return ¤Ê¤·
+ * @brief モンスター闘技場への導入処理 / Town logic flow for generation of arena -KMW-
+ * @return なし
  */
 static void battle_gen(void)
 {
-       int y, x, i;
+       int y, x;
+       MONSTER_IDX i;
        int qy = 0;
        int qx = 0;
 
@@ -1318,11 +1285,11 @@ static void battle_gen(void)
 
        build_battle();
 
-       for(i=0;i<4;i++)
+       for(i = 0; i < 4; i++)
        {
-               place_monster_aux(0, py + 8 + (i/2)*4, px - 2 + (i%2)*4, battle_mon[i],
+               place_monster_aux(0, p_ptr->y + 8 + (i/2)*4, p_ptr->x - 2 + (i%2)*4, battle_mon[i],
                                  (PM_NO_KAGE | PM_NO_PET));
-               set_friendly(&m_list[cave[py+8+(i/2)*4][px-2+(i%2)*4].m_idx]);
+               set_friendly(&m_list[cave[p_ptr->y+8+(i/2)*4][p_ptr->x-2+(i%2)*4].m_idx]);
        }
        for(i = 1; i < m_max; i++)
        {
@@ -1339,8 +1306,8 @@ static void battle_gen(void)
 }
 
 /*!
- * @brief ¸ÇÄê¥Þ¥Ã¥×¥¯¥¨¥¹¥È¤Î¥Õ¥í¥¢À¸À® / Generate a quest level
- * @return ¤Ê¤·
+ * @brief 固定マップクエストのフロア生成 / Generate a quest level
+ * @return なし
  */
 static void quest_gen(void)
 {
@@ -1373,8 +1340,8 @@ static void quest_gen(void)
 }
 
 /*!
- * @brief ¥À¥ó¥¸¥ç¥ó»þ¤Î¥é¥ó¥À¥à¥Õ¥í¥¢À¸À® / Make a real level
- * @return ¥Õ¥í¥¢¤ÎÀ¸À®¤ËÀ®¸ù¤·¤¿¤éTRUE
+ * @brief ダンジョン時のランダムフロア生成 / Make a real level
+ * @return フロアの生成に成功したらTRUE
  */
 static bool level_gen(cptr *why)
 {
@@ -1386,13 +1353,6 @@ static bool level_gen(cptr *why)
            (d_info[dungeon_type].flags1 & DF1_SMALLEST)) &&
            !(d_info[dungeon_type].flags1 & DF1_BIG))
        {
-               if (cheat_room)
-#ifdef JP
-                       msg_print("¾®¤µ¤Ê¥Õ¥í¥¢");
-#else
-                       msg_print("A 'small' dungeon level.");
-#endif
-
                if (d_info[dungeon_type].flags1 & DF1_SMALLEST)
                {
                        level_height = 1;
@@ -1421,8 +1381,9 @@ static bool level_gen(cptr *why)
                panel_row_min = cur_hgt;
                panel_col_min = cur_wid;
 
-               if (cheat_room)
-                 msg_format("X:%d, Y:%d.", cur_wid, cur_hgt);
+               msg_format_wizard(CHEAT_DUNGEON,
+                       _("小さなフロア: X:%d, Y:%d", "A 'small' dungeon level: X:%d, Y:%d."),
+                       cur_wid, cur_hgt);
        }
        else
        {
@@ -1439,7 +1400,7 @@ static bool level_gen(cptr *why)
        if (!cave_gen())
        {
 #ifdef JP
-*why = "¥À¥ó¥¸¥ç¥óÀ¸À®¤Ë¼ºÇÔ";
+*why = "ダンジョン生成に失敗";
 #else
                *why = "could not place player";
 #endif
@@ -1450,8 +1411,8 @@ static bool level_gen(cptr *why)
 }
 
 /*!
- * @brief ¥Õ¥í¥¢¤Ë¸ºß¤¹¤ëÁ´¥Þ¥¹¤Îµ­²±¾õÂÖ¤ò½é´ü²½¤¹¤ë / Wipe all unnecessary flags after cave generation
- * @return ¤Ê¤·
+ * @brief フロアに存在する全マスの記憶状態を初期化する / Wipe all unnecessary flags after cave generation
+ * @return なし
  */
 void wipe_generate_cave_flags(void)
 {
@@ -1480,8 +1441,8 @@ void wipe_generate_cave_flags(void)
 }
 
 /*!
- * @brief ¥Õ¥í¥¢¤ÎÁ´¾ðÊó¤ò½é´ü²½¤¹¤ë / Clear and empty the cave
- * @return ¤Ê¤·
+ * @brief フロアの全情報を初期化する / Clear and empty the cave
+ * @return なし
  */
 void clear_cave(void)
 {
@@ -1537,7 +1498,7 @@ void clear_cave(void)
        }
 
        /* Mega-Hack -- no player yet */
-       px = py = 0;
+       p_ptr->x = p_ptr->y = 0;
 
        /* Set the base level */
        base_level = dun_level;
@@ -1551,8 +1512,8 @@ void clear_cave(void)
 
 
 /*!
- * ¥À¥ó¥¸¥ç¥ó¤Î¥é¥ó¥À¥à¥Õ¥í¥¢¤òÀ¸À®¤¹¤ë / Generates a random dungeon level -RAK-
- * @return ¤Ê¤·
+ * ダンジョンのランダムフロアを生成する / Generates a random dungeon level -RAK-
+ * @return なし
  * @note Hack -- regenerate any "overflow" levels
  */
 void generate_cave(void)
@@ -1611,7 +1572,7 @@ void generate_cave(void)
                {
                        /* Message */
 #ifdef JP
-why = "¥¢¥¤¥Æ¥à¤¬Â¿¤¹¤®¤ë";
+why = "アイテムが多すぎる";
 #else
                        why = "too many objects";
 #endif
@@ -1625,7 +1586,7 @@ why = "
                {
                        /* Message */
 #ifdef JP
-why = "¥â¥ó¥¹¥¿¡¼¤¬Â¿¤¹¤®¤ë";
+why = "モンスターが多すぎる";
 #else
                        why = "too many monsters";
 #endif
@@ -1640,7 +1601,7 @@ why = "
 
                /* Message */
 #ifdef JP
-if (why) msg_format("À¸À®¤ä¤êľ¤·(%s)", why);
+if (why) msg_format("生成やり直し(%s)", why);
 #else
                if (why) msg_format("Generation restarted (%s)", why);
 #endif