OSDN Git Service

#37324 (2.2.0.28) obj-desc.spo の出力内容に、にアイテム生成chance値を追加。 / Add chance values to info...
[hengband/hengband.git] / src / save.c
index 998fabb..d0b2328 100644 (file)
@@ -1,15 +1,16 @@
-/* File: save.c */
-
-/*
+/*!
+ * @file save.c
+ * @brief セーブファイル書き込み処理 / Purpose: interact with savefiles
+ * @date 2014/07/12
+ * @author
+ * <pre>
  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
- *
  * This software may be copied and distributed for educational, research,
  * and not for profit purposes provided that this copyright and statement
  * are included in all such copies.  Other copyrights may also apply.
+ * </pre>
  */
 
-/* Purpose: interact with savefiles */
-
 #include "angband.h"
 
 
@@ -27,10 +28,11 @@ static u32b     x_stamp = 0L;   /* A simple "checksum" on the encoded bytes */
 
 
 
-/*
- * These functions place information into a savefile a byte at a time
+/*!
+ * @brief 1バイトをファイルに書き込む / These functions place information into a savefile a byte at a time
+ * @param v 書き込むバイト値
+ * @return なし
  */
-
 static void sf_put(byte v)
 {
        /* Encode the value, write a character */
@@ -42,22 +44,42 @@ static void sf_put(byte v)
        x_stamp += xor_byte;
 }
 
+/*!
+ * @brief 1バイトをファイルに書き込む(sf_put()の糖衣)
+ * @param v 書き込むバイト
+ * @return なし
+ */
 static void wr_byte(byte v)
 {
        sf_put(v);
 }
 
+/*!
+ * @brief 符号なし16ビットをファイルに書き込む
+ * @param v 書き込む符号なし16bit値
+ * @return なし
+ */
 static void wr_u16b(u16b v)
 {
        sf_put((byte)(v & 0xFF));
        sf_put((byte)((v >> 8) & 0xFF));
 }
 
+/*!
+ * @brief 符号あり16ビットをファイルに書き込む
+ * @param v 書き込む符号あり16bit値
+ * @return なし
+ */
 static void wr_s16b(s16b v)
 {
        wr_u16b((u16b)v);
 }
 
+/*!
+ * @brief 符号なし32ビットをファイルに書き込む
+ * @param v 書き込む符号なし32bit値
+ * @return なし
+ */
 static void wr_u32b(u32b v)
 {
        sf_put((byte)(v & 0xFF));
@@ -66,11 +88,21 @@ static void wr_u32b(u32b v)
        sf_put((byte)((v >> 24) & 0xFF));
 }
 
+/*!
+ * @brief 符号あり32ビットをファイルに書き込む
+ * @param v 書き込む符号あり32bit値
+ * @return なし
+ */
 static void wr_s32b(s32b v)
 {
        wr_u32b((u32b)v);
 }
 
+/*!
+ * @brief 文字列をファイルに書き込む
+ * @param str 書き込む文字列
+ * @return なし
+ */
 static void wr_string(cptr str)
 {
        while (*str)
@@ -87,8 +119,10 @@ static void wr_string(cptr str)
  */
 
 
-/*
- * Write an "item" record
+/*!
+ * @brief アイテムオブジェクトを書き込む / Write an "item" record
+ * @param o_ptr アイテムオブジェクト保存元ポインタ
+ * @return なし
  */
 static void wr_item(object_type *o_ptr)
 {
@@ -112,6 +146,7 @@ static void wr_item(object_type *o_ptr)
        if (o_ptr->art_flags[1]) flags |= SAVE_ITEM_ART_FLAGS1;
        if (o_ptr->art_flags[2]) flags |= SAVE_ITEM_ART_FLAGS2;
        if (o_ptr->art_flags[3]) flags |= SAVE_ITEM_ART_FLAGS3;
+       if (o_ptr->art_flags[4]) flags |= SAVE_ITEM_ART_FLAGS4;
        if (o_ptr->curse_flags) flags |= SAVE_ITEM_CURSE_FLAGS;
        if (o_ptr->held_m_idx) flags |= SAVE_ITEM_HELD_M_IDX;
        if (o_ptr->xtra1) flags |= SAVE_ITEM_XTRA1;
@@ -159,6 +194,7 @@ static void wr_item(object_type *o_ptr)
        if (flags & SAVE_ITEM_ART_FLAGS1) wr_u32b(o_ptr->art_flags[1]);
        if (flags & SAVE_ITEM_ART_FLAGS2) wr_u32b(o_ptr->art_flags[2]);
        if (flags & SAVE_ITEM_ART_FLAGS3) wr_u32b(o_ptr->art_flags[3]);
+       if (flags & SAVE_ITEM_ART_FLAGS4) wr_u32b(o_ptr->art_flags[4]);
 
        if (flags & SAVE_ITEM_CURSE_FLAGS) wr_u32b(o_ptr->curse_flags);
 
@@ -180,8 +216,10 @@ static void wr_item(object_type *o_ptr)
 }
 
 
-/*
- * Write a "monster" record
+/*!
+ * @brief モンスター情報を書き込む / Write a "monster" record
+ * @param m_ptr モンスター情報保存元ポインタ
+ * @return なし
  */
 static void wr_monster(monster_type *m_ptr)
 {
@@ -215,6 +253,8 @@ static void wr_monster(monster_type *m_ptr)
        wr_s16b(m_ptr->hp);
        wr_s16b(m_ptr->maxhp);
        wr_s16b(m_ptr->max_maxhp);
+       wr_u32b(m_ptr->dealt_damage);
+       
 
        /* Monster race index of its appearance */
        if (flags & SAVE_MON_AP_R_IDX) wr_s16b(m_ptr->ap_r_idx);
@@ -265,8 +305,10 @@ static void wr_monster(monster_type *m_ptr)
 }
 
 
-/*
- * Write a "lore" record
+/*!
+ * @brief モンスターの思い出を書き込む / Write a "lore" record
+ * @param r_idx モンスター種族ID
+ * @return なし
  */
 static void wr_lore(int r_idx)
 {
@@ -321,9 +363,10 @@ static void wr_lore(int r_idx)
        wr_byte(0);
 }
 
-
-/*
- * Write an "xtra" record
+/*!
+ * @brief その他のゲーム情報を書き込む(実質はアイテムの鑑定情報のみ) / Write an "xtra" record
+ * @param k_idx ベースアイテムのID
+ * @return なし
  */
 static void wr_xtra(int k_idx)
 {
@@ -338,8 +381,10 @@ static void wr_xtra(int k_idx)
 }
 
 
-/*
- * Write a "store" record
+/*!
+ * @brief 店舗情報を書き込む / Write a "store" record
+ * @param st_ptr 店舗情報の参照ポインタ
+ * @return なし
  */
 static void wr_store(store_type *st_ptr)
 {
@@ -372,8 +417,9 @@ static void wr_store(store_type *st_ptr)
 }
 
 
-/*
- * Write RNG state
+/*!
+ * @brief 乱数情報を書き込む / Write RNG state
+ * @return なし
  */
 static errr wr_randomizer(void)
 {
@@ -396,8 +442,9 @@ static errr wr_randomizer(void)
 }
 
 
-/*
- * Write the "options"
+/*!
+ * @brief ゲームオプション情報を書き込む / Write the "options"
+ * @return なし
  */
 static void wr_options(void)
 {
@@ -491,28 +538,25 @@ static void wr_options(void)
 }
 
 
-/*
- * Hack -- Write the "ghost" info
+/*!
+ * @brief ダミー情報スキップを書き込む / Hack -- Write the "ghost" info
+ * @return なし
  */
 static void wr_ghost(void)
 {
        int i;
 
        /* Name */
-#ifdef JP
-       wr_string("ÉÔÀµ¤Ê¥´¡¼¥¹¥È");
-#else
-       wr_string("Broken Ghost");
-#endif
-
+       wr_string(_("不正なゴースト", "Broken Ghost"));
 
        /* Hack -- stupid data */
        for (i = 0; i < 60; i++) wr_byte(0);
 }
 
 
-/*
- * Save quick start data
+/*!
+ * @brief クイック・スタート情報を書き込む / Save quick start data
+ * @return なし
  */
 static void save_quick_start(void)
 {
@@ -551,15 +595,17 @@ static void save_quick_start(void)
        wr_byte((byte)previous_char.quick_ok);
 }
 
-/*
- * Write some "extra" info
+
+/*!
+ * @brief その他の情報を書き込む / Write some "extra" info
+ * @return なし
  */
 static void wr_extra(void)
 {
        int i,j;
        byte tmp8u;
 
-       wr_string(player_name);
+       wr_string(p_ptr->name);
 
        wr_string(p_ptr->died_from);
 
@@ -606,7 +652,7 @@ static void wr_extra(void)
 
        for (i = 0; i < 64; i++) wr_s16b(p_ptr->spell_exp[i]);
        for (i = 0; i < 5; i++) for (j = 0; j < 64; j++) wr_s16b(p_ptr->weapon_exp[i][j]);
-       for (i = 0; i < 10; i++) wr_s16b(p_ptr->skill_exp[i]);
+       for (i = 0; i < GINOU_MAX; i++) wr_s16b(p_ptr->skill_exp[i]);
        for (i = 0; i < 108; i++) wr_s32b(p_ptr->magic_num1[i]);
        for (i = 0; i < 108; i++) wr_byte(p_ptr->magic_num2[i]);
 
@@ -810,9 +856,13 @@ static void wr_extra(void)
 }
 
 
-
-/*
- * hook function to sort monsters by level
+/*!
+ * @brief フロア保存時のcave情報テンプレートをソートするための比較処理
+ * @param u caveテンプレートの参照ポインタ
+ * @param v 未使用
+ * @param a スワップするモンスター種族のID1
+ * @param b スワップするモンスター種族のID2
+ * @return aの方が大きければtrue
  */
 static bool ang_sort_comp_cave_temp(vptr u, vptr v, int a, int b)
 {
@@ -828,8 +878,13 @@ static bool ang_sort_comp_cave_temp(vptr u, vptr v, int a, int b)
 }
 
 
-/*
- * Sorting hook -- Swap function
+/*!
+ * @brief フロア保存時のcave情報テンプレートをソートするためのスワップ処理 / Sorting hook -- Swap function
+ * @param u caveテンプレートの参照ポインタ
+ * @param v 未使用
+ * @param a スワップするモンスター種族のID1
+ * @param b スワップするモンスター種族のID2
+ * @return なし
  */
 static void ang_sort_swap_cave_temp(vptr u, vptr v, int a, int b)
 {
@@ -847,13 +902,14 @@ static void ang_sort_swap_cave_temp(vptr u, vptr v, int a, int b)
 }
 
 
-/*
- * Actually write a saved floor data
- * using effectively compressed format.
+/*!
+ * @brief 保存フロアの書き込み / Actually write a saved floor data using effectively compressed format.
+ * @param sf_ptr 保存したいフロアの参照ポインタ
+ * @return なし
  */
 static void wr_saved_floor(saved_floor_type *sf_ptr)
 {
-       cave_template_type *template;
+       cave_template_type *templates;
        u16b max_num_temp;
        u16b num_temp = 0;
        int dummy_why;
@@ -891,8 +947,8 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
 
        wr_u16b(base_level);
        wr_u16b(num_repro);
-       wr_u16b((u16b)py);
-       wr_u16b((u16b)px);
+       wr_u16b((u16b)p_ptr->y);
+       wr_u16b((u16b)p_ptr->x);
        wr_u16b(cur_hgt);
        wr_u16b(cur_wid);
        wr_byte(p_ptr->feeling);
@@ -916,7 +972,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
        max_num_temp = 255;
 
        /* Allocate the "template" array */
-       C_MAKE(template, max_num_temp, cave_template_type);
+       C_MAKE(templates, max_num_temp, cave_template_type);
 
        /* Extract template array */
        for (y = 0; y < cur_hgt; y++)
@@ -927,13 +983,13 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
 
                        for (i = 0; i < num_temp; i++)
                        {
-                               if (template[i].info == c_ptr->info &&
-                                   template[i].feat == c_ptr->feat &&
-                                   template[i].mimic == c_ptr->mimic &&
-                                   template[i].special == c_ptr->special)
+                               if (templates[i].info == c_ptr->info &&
+                                   templates[i].feat == c_ptr->feat &&
+                                   templates[i].mimic == c_ptr->mimic &&
+                                   templates[i].special == c_ptr->special)
                                {
                                        /* Same terrain is exist */
-                                       template[i].occurrence++;
+                                       templates[i].occurrence++;
                                        break;
                                }
                        }
@@ -944,21 +1000,21 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
                        /* If the max_num_temp is too small, increase it. */
                        if (num_temp >= max_num_temp)
                        {
-                               cave_template_type *old_template = template;
+                               cave_template_type *old_template = templates;
 
                                /* Re-allocate the "template" array */
-                               C_MAKE(template, max_num_temp + 255, cave_template_type);
-                               (void)C_COPY(template, old_template, max_num_temp, cave_template_type);
+                               C_MAKE(templates, max_num_temp + 255, cave_template_type);
+                               (void)C_COPY(templates, old_template, max_num_temp, cave_template_type);
                                C_KILL(old_template, max_num_temp, cave_template_type);
                                max_num_temp += 255;
                        }
 
                        /* Add new template */
-                       template[num_temp].info = c_ptr->info;
-                       template[num_temp].feat = c_ptr->feat;
-                       template[num_temp].mimic = c_ptr->mimic;
-                       template[num_temp].special = c_ptr->special;
-                       template[num_temp].occurrence = 1;
+                       templates[num_temp].info = c_ptr->info;
+                       templates[num_temp].feat = c_ptr->feat;
+                       templates[num_temp].mimic = c_ptr->mimic;
+                       templates[num_temp].special = c_ptr->special;
+                       templates[num_temp].occurrence = 1;
 
                        /* Increase number of template */
                        num_temp++;
@@ -970,7 +1026,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
        ang_sort_swap = ang_sort_swap_cave_temp;
 
        /* Sort by occurrence */
-       ang_sort(template, &dummy_why, num_temp);
+       ang_sort(templates, &dummy_why, num_temp);
 
 
        /*** Dump templates ***/
@@ -981,7 +1037,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
        /* Dump the templates */
        for (i = 0; i < num_temp; i++)
        {
-               cave_template_type *ct_ptr = &template[i];
+               cave_template_type *ct_ptr = &templates[i];
 
                /* Dump it */
                wr_u16b(ct_ptr->info);
@@ -1007,10 +1063,10 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
 
                        for (i = 0; i < num_temp; i++)
                        {
-                               if (template[i].info == c_ptr->info &&
-                                   template[i].feat == c_ptr->feat &&
-                                   template[i].mimic == c_ptr->mimic &&
-                                   template[i].special == c_ptr->special)
+                               if (templates[i].info == c_ptr->info &&
+                                   templates[i].feat == c_ptr->feat &&
+                                   templates[i].mimic == c_ptr->mimic &&
+                                   templates[i].special == c_ptr->special)
                                        break;
                        }
 
@@ -1058,7 +1114,7 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
 
 
        /* Free the "template" array */
-       C_KILL(template, max_num_temp, cave_template_type);
+       C_KILL(templates, max_num_temp, cave_template_type);
 
 
        /*** Dump objects ***/
@@ -1092,8 +1148,10 @@ static void wr_saved_floor(saved_floor_type *sf_ptr)
 }
 
 
-/*
+/*!
+ * @brief 現在フロアの書き込み /
  * Write the current dungeon (new method)
+ * @return なし
  */
 static bool wr_dungeon(void)
 {
@@ -1196,9 +1254,10 @@ static bool wr_dungeon(void)
 }
 
 
-
-/*
+/*!
+ * @brief セーブデータの書き込み /
  * Actually write a save-file
+ * @return 成功すればtrue
  */
 static bool wr_savefile_new(void)
 {
@@ -1241,7 +1300,7 @@ static bool wr_savefile_new(void)
        xor_byte = 0;
 
        /* Initial value of xor_byte */
-       tmp8u = (byte)randint0(256);
+       tmp8u = (byte)Rand_external(256);
        wr_byte(tmp8u);
 
 
@@ -1333,25 +1392,28 @@ static bool wr_savefile_new(void)
 
        for (i = 0; i < max_quests; i++)
        {
+               quest_type* const q_ptr = &quest[i];
+
                /* Save status for every quest */
-               wr_s16b(quest[i].status);
+               wr_s16b(q_ptr->status);
 
                /* And the dungeon level too */
                /* (prevents problems with multi-level quests) */
-               wr_s16b(quest[i].level);
+               wr_s16b(q_ptr->level);
 
-               wr_byte(quest[i].complev);
+               wr_byte(q_ptr->complev);
+               wr_u32b(q_ptr->comptime);
 
                /* Save quest status if quest is running */
-               if (quest[i].status == QUEST_STATUS_TAKEN || quest[i].status == QUEST_STATUS_COMPLETED || !is_fixed_quest_idx(i))
+               if (q_ptr->status == QUEST_STATUS_TAKEN || q_ptr->status == QUEST_STATUS_COMPLETED || !is_fixed_quest_idx(i))
                {
-                       wr_s16b(quest[i].cur_num);
-                       wr_s16b(quest[i].max_num);
-                       wr_s16b(quest[i].type);
-                       wr_s16b(quest[i].r_idx);
-                       wr_s16b(quest[i].k_idx);
-                       wr_byte(quest[i].flags);
-                       wr_byte(quest[i].dungeon);
+                       wr_s16b(q_ptr->cur_num);
+                       wr_s16b(q_ptr->max_num);
+                       wr_s16b(q_ptr->type);
+                       wr_s16b(q_ptr->r_idx);
+                       wr_s16b(q_ptr->k_idx);
+                       wr_byte(q_ptr->flags);
+                       wr_byte(q_ptr->dungeon);
                }
        }
 
@@ -1494,9 +1556,11 @@ static bool wr_savefile_new(void)
 }
 
 
-/*
+/*!
+ * @brief セーブデータ書き込みのサブルーチン /
  * Medium level player saver
- *
+ * @return 成功すればtrue
+ * @details
  * XXX XXX XXX Angband 2.8.0 will use "fd" instead of "fff" if possible
  */
 static bool save_player_aux(char *name)
@@ -1575,8 +1639,10 @@ static bool save_player_aux(char *name)
 
 
 
-/*
+/*!
+ * @brief セーブデータ書き込みのメインルーチン /
  * Attempt to save the player in a savefile
+ * @return 成功すればtrue
  */
 bool save_player(void)
 {
@@ -1601,12 +1667,6 @@ bool save_player(void)
        strcpy(safe, savefile);
        strcat(safe, ".new");
 
-#ifdef VM
-       /* Hack -- support "flat directory" usage on VM/ESA */
-       strcpy(safe, savefile);
-       strcat(safe, "n");
-#endif /* VM */
-
        /* Grab permissions */
        safe_setuid_grab();
 
@@ -1627,12 +1687,6 @@ bool save_player(void)
                strcpy(temp, savefile);
                strcat(temp, ".old");
 
-#ifdef VM
-               /* Hack -- support "flat directory" usage on VM/ESA */
-               strcpy(temp, savefile);
-               strcat(temp, "o");
-#endif /* VM */
-
                /* Grab permissions */
                safe_setuid_grab();
 
@@ -1692,10 +1746,12 @@ bool save_player(void)
 }
 
 
-
-/*
+/*!
+ * @brief セーブデータ読み込みのメインルーチン /
  * Attempt to Load a "savefile"
- *
+ * @return 成功すればtrue
+ * @details
+ * <pre>
  * Version 2.7.0 introduced a slightly different "savefile" format from
  * older versions, requiring a completely different parsing method.
  *
@@ -1715,6 +1771,7 @@ bool save_player(void)
  *
  * Note that we always try to load the "current" savefile, even if
  * there is no such file, so we must check for "empty" savefile names.
+ * </pre>
  */
 bool load_player(void)
 {
@@ -1742,7 +1799,7 @@ bool load_player(void)
        if (!savefile[0]) return (TRUE);
 
 
-#if !defined(MACINTOSH) && !defined(WINDOWS) && !defined(VM)
+#if !defined(MACINTOSH) && !defined(WINDOWS)
 
        /* XXX XXX XXX Fix this */
 
@@ -1750,11 +1807,7 @@ bool load_player(void)
        if (access(savefile, 0) < 0)
        {
                /* Give a message */
-#ifdef JP
-               msg_print("¥»¡¼¥Ö¥Õ¥¡¥¤¥ë¤¬¤¢¤ê¤Þ¤»¤ó¡£");
-#else
-               msg_print("Savefile does not exist.");
-#endif
+               msg_print(_("セーブファイルがありません。", "Savefile does not exist."));
 
                msg_print(NULL);
 
@@ -1788,12 +1841,7 @@ bool load_player(void)
                        my_fclose(fkk);
 
                        /* Message */
-#ifdef JP
-                       msg_print("¥»¡¼¥Ö¥Õ¥¡¥¤¥ë¤Ï¸½ºß»ÈÍÑÃæ¤Ç¤¹¡£");
-#else
-                       msg_print("Savefile is currently in use.");
-#endif
-
+                       msg_print(_("セーブファイルは現在使用中です。", "Savefile is currently in use."));
                        msg_print(NULL);
 
                        /* Oops */
@@ -1823,12 +1871,7 @@ bool load_player(void)
                if (fd < 0) err = -1;
 
                /* Message (below) */
-#ifdef JP
-               if (err) what = "¥»¡¼¥Ö¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó¡£";
-#else
-               if (err) what = "Cannot open savefile";
-#endif
-
+               if (err) what = _("セーブファイルを開けません。", "Cannot open savefile");
        }
 
        /* Process file */
@@ -1844,12 +1887,7 @@ bool load_player(void)
                if (fd_read(fd, (char*)(vvv), 4)) err = -1;
 
                /* What */
-#ifdef JP
-               if (err) what = "¥»¡¼¥Ö¥Õ¥¡¥¤¥ë¤òÆɤá¤Þ¤»¤ó¡£";
-#else
-               if (err) what = "Cannot read savefile";
-#endif
-
+               if (err) what = _("セーブファイルを読めません。", "Cannot read savefile");
 
                /* Close the file */
                (void)fd_close(fd);
@@ -1873,12 +1911,7 @@ bool load_player(void)
                err = rd_savefile_new();
 
                /* Message (below) */
-#ifdef JP
-               if (err) what = "¥»¡¼¥Ö¥Õ¥¡¥¤¥ë¤ò²òÀϽÐÍè¤Þ¤»¤ó¡£";
-#else
-               if (err) what = "Cannot parse savefile";
-#endif
-
+               if (err) what = _("セーブファイルを解析出来ません。", "Cannot parse savefile");
        }
 
        /* Paranoia */
@@ -1888,12 +1921,7 @@ bool load_player(void)
                if (!turn) err = -1;
 
                /* Message (below) */
-#ifdef JP
-               if (err) what = "¥»¡¼¥Ö¥Õ¥¡¥¤¥ë¤¬²õ¤ì¤Æ¤¤¤Þ¤¹";
-#else
-               if (err) what = "Broken savefile";
-#endif
-
+               if (err) what = _("セーブファイルが壊れています", "Broken savefile");
        }
 
 #ifdef VERIFY_TIMESTAMP
@@ -1905,12 +1933,7 @@ bool load_player(void)
                    sf_when < (statbuf.st_ctime - 100))
                {
                        /* Message */
-#ifdef JP
-                       what = "̵¸ú¤Ê¥¿¥¤¥à¡¦¥¹¥¿¥ó¥×¤Ç¤¹";
-#else
-                       what = "Invalid timestamp";
-#endif
-
+                       what = _("無効なタイム・スタンプです", "Invalid timestamp");
 
                        /* Oops */
                        err = -1;
@@ -1929,18 +1952,13 @@ bool load_player(void)
                {
                        if (z_major == 2 && z_minor == 0 && z_patch == 6)
                        {
-#ifdef JP
-                               msg_print("¥Ð¡¼¥¸¥ç¥ó 2.0.* ÍѤΥ»¡¼¥Ö¥Õ¥¡¥¤¥ë¤òÊÑ´¹¤·¤Þ¤·¤¿¡£");
-#else
-                               msg_print("Converted a 2.0.* savefile.");
-#endif
-
+                               msg_print(_("バージョン 2.0.* 用のセーブファイルを変換しました。", "Converted a 2.0.* savefile."));
                        }
                        else
                        {
                                /* Message */
 #ifdef JP
-                               msg_format("¥Ð¡¼¥¸¥ç¥ó %d.%d.%d ÍѤΥ»¡¼¥Ö¡¦¥Õ¥¡¥¤¥ë¤òÊÑ´¹¤·¤Þ¤·¤¿¡£",
+                               msg_format("バージョン %d.%d.%d 用のセーブ・ファイルを変換しました。",
                                    (z_major > 9) ? z_major-10 : z_major , z_minor, z_patch);
 #else
                                msg_format("Converted a %d.%d.%d savefile.",
@@ -2010,7 +2028,7 @@ bool load_player(void)
 
        /* Message */
 #ifdef JP
-       msg_format("¥¨¥é¡¼(%s)¤¬¥Ð¡¼¥¸¥ç¥ó%d.%d.%d ÍÑ¥»¡¼¥Ö¥Õ¥¡¥¤¥ëÆɤ߹þÃæ¤ËȯÀ¸¡£",
+       msg_format("エラー(%s)がバージョン%d.%d.%d 用セーブファイル読み込中に発生。",
                   what, (z_major>9) ? z_major - 10 : z_major, z_minor, z_patch);
 #else
        msg_format("Error (%s) reading %d.%d.%d savefile.",
@@ -2022,7 +2040,10 @@ bool load_player(void)
        return (FALSE);
 }
 
-
+/*!
+ * @brief ファイルロック処理
+ * @return なし
+ */
 void remove_loc(void)
 {
 #ifdef VERIFY_SAVEFILE
@@ -2061,8 +2082,10 @@ void remove_loc(void)
 }
 
 
-/*
- * Actually write a temporal saved floor file
+/*!
+ * @brief ゲームプレイ中のフロア一時保存出力処理サブルーチン / Actually write a temporal saved floor file
+ * @param sf_ptr 保存フロア参照ポインタ
+ * @return なし
  */
 static bool save_floor_aux(saved_floor_type *sf_ptr)
 {
@@ -2108,8 +2131,11 @@ static bool save_floor_aux(saved_floor_type *sf_ptr)
 }
 
 
-/*
- * Attempt to save the temporally saved-floor data
+/*!
+ * @brief ゲームプレイ中のフロア一時保存出力処理メインルーチン / Attempt to save the temporally saved-floor data
+ * @param sf_ptr 保存フロア参照ポインタ
+ * @param mode 保存オプション
+ * @return なし
  */
 bool save_floor(saved_floor_type *sf_ptr, u32b mode)
 {