OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / init2.c
index c116089..ff4d1ce 100644 (file)
@@ -43,8 +43,7 @@
 #endif /* CHECK_MODIFICATION_TIME */
 #endif
 
-
-
+static void put_title(void);
 
 /*!
  * @brief 各データファイルを読み取るためのパスを取得する
@@ -1496,7 +1495,7 @@ static errr init_towns(void)
                        /* Scan the choices */
                        for (k = 0; k < STORE_CHOICES; k++)
                        {
-                               int k_idx;
+                               KIND_OBJECT_IDX k_idx;
 
                                /* Extract the tval/sval codes */
                                int tv = store_table[j][k][0];
@@ -1616,7 +1615,7 @@ s16b f_tag_to_index_in_init(cptr str)
  */
 static errr init_feat_variables(void)
 {
-       int i;
+       FEAT_IDX i;
 
        /* Nothing */
        feat_none = f_tag_to_index_in_init("NONE");
@@ -1782,7 +1781,7 @@ static errr init_other(void)
        }
 
        /* Allocate and Wipe the max dungeon level */
-       C_MAKE(max_dlv, max_d_idx, s16b);
+       C_MAKE(max_dlv, max_d_idx, DEPTH);
 
        /* Allocate and wipe each line of the cave */
        for (i = 0; i < MAX_HGT; i++)
@@ -1806,7 +1805,7 @@ static errr init_other(void)
        quark_init();
 
        /* Message variables */
-       C_MAKE(message__ptr, MESSAGE_MAX, u16b);
+       C_MAKE(message__ptr, MESSAGE_MAX, u32b);
        C_MAKE(message__buf, MESSAGE_BUF, char);
 
        /* Hack -- No messages yet */
@@ -1980,10 +1979,10 @@ static errr init_object_alloc(void)
 
                                /* Load the entry */
                                table[z].index = i;
-                               table[z].level = x;
-                               table[z].prob1 = p;
-                               table[z].prob2 = p;
-                               table[z].prob3 = p;
+                               table[z].level = (DEPTH)x;
+                               table[z].prob1 = (PROB)p;
+                               table[z].prob2 = (PROB)p;
+                               table[z].prob3 = (PROB)p;
 
                                /* Another entry complete for this locale */
                                aux[x]++;
@@ -2049,10 +2048,10 @@ static errr init_alloc(void)
 
                        /* Load the entry */
                        alloc_race_table[i].index = elements[i].index;
-                       alloc_race_table[i].level = x;
-                       alloc_race_table[i].prob1 = p;
-                       alloc_race_table[i].prob2 = p;
-                       alloc_race_table[i].prob3 = p;
+                       alloc_race_table[i].level = (DEPTH)x;
+                       alloc_race_table[i].prob1 = (PROB)p;
+                       alloc_race_table[i].prob2 = (PROB)p;
+                       alloc_race_table[i].prob3 = (PROB)p;
                }
        }
 
@@ -2368,6 +2367,7 @@ void init_angband(void)
        /* Close it */
        (void)fd_close(fd);
 
+       put_title();
 
        /*** Initialize some arrays ***/
 
@@ -2481,6 +2481,25 @@ void init_angband(void)
 }
 
 /*!
+ * @brief タイトル記述
+ * @return なし
+ */
+static void put_title(void)
+{
+       char title[120];
+       int col;
+#if H_VER_EXTRA > 0
+       sprintf(title, _("変愚蛮怒 %d.%d.%d.%d(%s)", "Hengband %d.%d.%d.%d(%s)"), H_VER_MAJOR, H_VER_MINOR, H_VER_PATCH, H_VER_EXTRA,
+#else
+       sprintf(title, _("変愚蛮怒 %d.%d.%d(%s)", "Hengband %d.%d.%d(%s)"), H_VER_MAJOR, H_VER_MINOR, H_VER_PATCH,
+#endif
+       IS_STABLE_VERSION ? _("安定版", "Stable") : _("開発版", "Developing"));
+       col = (80 - strlen(title)) / 2;
+       col = col < 0 ? 0 : col;
+       prt(title, VER_INFO_ROW, col);
+}
+
+/*!
  * @brief サムチェック情報を出力 / Get check sum in string form
  * @return サムチェック情報の文字列
  */