OSDN Git Service

[Refactor] #40534 Separated object-flavor-types.h from object-flavor.h
[hengband/hengband.git] / src / knowledge / knowledge-quests.c
index 1b2690e..4fb7e96 100644 (file)
@@ -4,19 +4,26 @@
  * @author Hourier
  */
 
-#include "angband.h"
 #include "knowledge-quests.h"
-#include "cmd/dump-util.h"
-#include "quest.h"
-#include "core.h" // 暫定、init_flagsのため。後で消すかも.
-#include "artifact.h"
-#include "object-flavor.h"
-#include "dungeon.h"
-#include "dungeon-file.h"
-#include "sort.h"
-#include "world.h"
 #include "core/show-file.h"
-#include "english.h"
+#include "flavor/object-flavor-types.h"
+#include "util/sort.h"
+#include "dungeon/dungeon.h"
+#include "dungeon/quest.h"
+#include "floor/floor.h"
+#include "info-reader/fixed-map-parser.h"
+#include "io-dump/dump-util.h"
+#include "locale/english.h"
+#include "monster-race/monster-race.h"
+#include "object-enchant/artifact.h"
+#include "object-enchant/special-object-flags.h"
+#include "object/object-flavor.h"
+#include "object/object-generator.h"
+#include "object/object-kind-hook.h"
+#include "system/system-variables.h" // 暫定、init_flagsのため。後で消すかも.
+#include "term/screen-processor.h"
+#include "util/angband-files.h"
+#include "world/world.h"
 
  /*
   * Check on the status of an active quest
@@ -25,7 +32,6 @@
   */
 void do_cmd_checkquest(player_type *creature_ptr)
 {
-       FILE_TYPE(FILE_TYPE_TEXT);
        screen_save();
        do_cmd_knowledge_quests(creature_ptr);
        screen_load();
@@ -64,7 +70,7 @@ static void do_cmd_knowledge_quests_current(player_type *creature_ptr, FILE *fff
                quest_text_line = 0;
                creature_ptr->current_floor_ptr->inside_quest = i;
                init_flags = INIT_SHOW_TEXT;
-               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;
                if (quest[i].flags & QUEST_FLAG_SILENT) continue;
 
@@ -103,7 +109,7 @@ static void do_cmd_knowledge_quests_current(player_type *creature_ptr, FILE *fff
                                                object_type forge;
                                                object_type *q_ptr = &forge;
                                                KIND_OBJECT_IDX k_idx = lookup_kind(a_ptr->tval, a_ptr->sval);
-                                               object_prep(q_ptr, k_idx);
+                                               object_prep(creature_ptr, q_ptr, k_idx);
                                                q_ptr->name1 = quest[i].k_idx;
                                                q_ptr->ident = IDENT_STORE;
                                                object_desc(creature_ptr, name, q_ptr, OD_NAME_ONLY);
@@ -197,7 +203,7 @@ static bool do_cmd_knowledge_quests_aux(player_type *player_ptr, FILE *fff, IDX
                IDX old_quest = floor_ptr->inside_quest;
                floor_ptr->inside_quest = q_idx;
                init_flags = INIT_NAME_ONLY;
-               process_dungeon_file(player_ptr, "q_info.txt", 0, 0, 0, 0);
+               parse_fixed_map(player_ptr, "q_info.txt", 0, 0, 0, 0);
                floor_ptr->inside_quest = old_quest;
                if (q_ptr->flags & QUEST_FLAG_SILENT) return FALSE;
        }
@@ -333,7 +339,7 @@ void do_cmd_knowledge_quests(player_type *creature_ptr)
                quest_num[i] = i;
 
        int dummy;
-       ang_sort(quest_num, &dummy, max_q_idx, ang_sort_comp_quest_num, ang_sort_swap_quest_num);
+       ang_sort(creature_ptr, quest_num, &dummy, max_q_idx, ang_sort_comp_quest_num, ang_sort_swap_quest_num);
 
        do_cmd_knowledge_quests_current(creature_ptr, fff);
        fputc('\n', fff);
@@ -346,7 +352,7 @@ void do_cmd_knowledge_quests(player_type *creature_ptr)
                do_cmd_knowledge_quests_wiz_random(fff);
        }
 
-       my_fclose(fff);
+       angband_fclose(fff);
        (void)show_file(creature_ptr, TRUE, file_name, _("クエスト達成状況", "Quest status"), 0, 0);
        fd_kill(file_name);
        C_KILL(quest_num, max_q_idx, QUEST_IDX);