OSDN Git Service

Merge branch 'feature/english-correction' into develop
[hengband/hengband.git] / src / io / write-diary.c
index 191965d..a1daf85 100644 (file)
@@ -5,14 +5,17 @@
  */
 
 #include "io/write-diary.h"
-#include "floor/floor.h"
-#include "system/system-variables.h"
+#include "dungeon/dungeon.h"
 #include "dungeon/quest.h"
+#include "info-reader/fixed-map-parser.h"
 #include "io/files-util.h"
-#include "dungeon/dungeon.h"
-#include "dungeon/dungeon-file.h"
-#include "world/world.h"
 #include "market/arena-info-table.h"
+#include "monster-race/monster-race.h"
+#include "system/floor-type-definition.h"
+#include "system/system-variables.h"
+#include "util/angband-files.h"
+#include "view/display-messages.h"
+#include "world/world.h"
 
 // todo *抹殺* したい…
 bool write_level;
@@ -55,8 +58,7 @@ static bool open_diary_file(FILE **fff, bool *disable_diary)
        sprintf(file_name, _("playrecord-%s.txt", "playrec-%s.txt"), savefile_base);
        char buf[1024];
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, file_name);
-       FILE_TYPE(FILE_TYPE_TEXT);
-       *fff = my_fopen(buf, "a");
+       *fff = angband_fopen(buf, "a");
        if (*fff) return TRUE;
 
        msg_format(_("%s を開くことができませんでした。プレイ記録を一時停止します。", "Failed to open %s. Play-Record is disabled temporarily."), buf);
@@ -186,7 +188,7 @@ errr exe_write_diary(player_type *creature_ptr, int type, int num, concptr note)
                QUEST_IDX old_quest = creature_ptr->current_floor_ptr->inside_quest;
                creature_ptr->current_floor_ptr->inside_quest = (quest[num].type == QUEST_TYPE_RANDOM) ? 0 : num;
                init_flags = INIT_NAME_ONLY;
-               process_dungeon_file(creature_ptr, "q_info.txt", 0, 0, 0, 0);
+               parse_fixed_map(creature_ptr, "q_info.txt", 0, 0, 0, 0);
                creature_ptr->current_floor_ptr->inside_quest = old_quest;
        }
 
@@ -405,7 +407,7 @@ errr exe_write_diary(player_type *creature_ptr, int type, int num, concptr note)
                break;
        }
 
-       my_fclose(fff);
+       angband_fclose(fff);
        if (do_level) write_level = FALSE;
 
        return 0;