OSDN Git Service

[Refactor] #39963 Separated spells-execution.c/h and spells-util.h from spells.h...
[hengband/hengband.git] / src / core.c
index 45aa909..84b2f8c 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include "angband.h"
-#include "signal-handlers.h"
+#include "io/signal-handlers.h"
 #include "util.h"
 #include "main/music-definitions-table.h"
 #include "main/sound-definitions-table.h"
@@ -26,6 +26,7 @@
 #include "market/building.h"
 #include "io/write-diary.h"
 #include "cmd/cmd-activate.h"
+#include "cmd/cmd-autopick.h"
 #include "cmd/cmd-diary.h"
 #include "cmd/cmd-draw.h"
 #include "cmd/cmd-dump.h"
@@ -34,6 +35,7 @@
 #include "cmd/cmd-help.h"
 #include "cmd/cmd-hissatsu.h"
 #include "cmd/cmd-item.h"
+#include "cmd/cmd-knowledge.h"
 #include "cmd/cmd-magiceat.h"
 #include "cmd/cmd-mane.h"
 #include "cmd/cmd-macro.h"
 #include "object-ego.h"
 #include "object-curse.h"
 #include "object-flavor.h"
+#include "knowledge/knowledge-autopick.h"
+#include "knowledge/knowledge-quests.h"
 #include "market/store.h"
-#include "spells.h"
+#include "spell/technic-info-table.h"
 #include "spells-summon.h"
 #include "spells-object.h"
 #include "spells-status.h"
@@ -83,8 +87,8 @@
 #include "player-damage.h"
 #include "player-effects.h"
 #include "cmd-spell.h"
-#include "realm-hex.h"
-#include "objectkind.h"
+#include "realm/realm-hex.h"
+#include "object/object-kind.h"
 #include "object-hook.h"
 #include "wild.h"
 #include "monster-process.h"
 #include "player-skill.h"
 #include "player-inventory.h"
 
-#include "view-mainwindow.h"
+#include "view/display-main-window.h"
 #include "dungeon-file.h"
-#include "uid-checker.h"
+#include "io/uid-checker.h"
 #include "player/process-death.h"
 #include "io/read-pref-file.h"
 #include "files.h"
 #include "scores.h"
-#include "autopick.h"
+#include "autopick/autopick.h"
+#include "autopick/autopick-pref-processor.h"
+#include "autopick/autopick-reader-writer.h"
 #include "save.h"
-#include "realm.h"
-#include "realm-song.h"
+#include "realm/realm.h"
+#include "realm/realm-song.h"
 #include "targeting.h"
+#include "spell/spells-util.h"
+#include "spell/spells-execution.h"
 
  /*!
   * コピーライト情報 /
@@ -3420,18 +3428,18 @@ static void process_command(player_type *creature_ptr)
        }
        case '@':
        {
-               do_cmd_macros(creature_ptr);
+               do_cmd_macros(creature_ptr, process_autopick_file_command);
                break;
        }
        case '%':
        {
-               do_cmd_visuals(creature_ptr);
+               do_cmd_visuals(creature_ptr, process_autopick_file_command);
                do_cmd_redraw(creature_ptr);
                break;
        }
        case '&':
        {
-               do_cmd_colors(creature_ptr);
+               do_cmd_colors(creature_ptr, process_autopick_file_command);
                do_cmd_redraw(creature_ptr);
                break;
        }
@@ -3516,7 +3524,7 @@ static void process_command(player_type *creature_ptr)
        }
        case ')':
        {
-               do_cmd_save_screen(creature_ptr);
+               do_cmd_save_screen(creature_ptr, handle_stuff, process_autopick_file_command);
                break;
        }
        case ']':
@@ -4222,25 +4230,25 @@ static void load_all_pref_files(player_type *player_ptr)
 {
        char buf[1024];
        sprintf(buf, "user.prf");
-       process_pref_file(player_ptr, buf);
+       process_pref_file(player_ptr, buf, process_autopick_file_command);
        sprintf(buf, "user-%s.prf", ANGBAND_SYS);
-       process_pref_file(player_ptr, buf);
+       process_pref_file(player_ptr, buf, process_autopick_file_command);
        sprintf(buf, "%s.prf", rp_ptr->title);
-       process_pref_file(player_ptr, buf);
+       process_pref_file(player_ptr, buf, process_autopick_file_command);
        sprintf(buf, "%s.prf", cp_ptr->title);
-       process_pref_file(player_ptr, buf);
+       process_pref_file(player_ptr, buf, process_autopick_file_command);
        sprintf(buf, "%s.prf", player_ptr->base_name);
-       process_pref_file(player_ptr, buf);
+       process_pref_file(player_ptr, buf, process_autopick_file_command);
        if (player_ptr->realm1 != REALM_NONE)
        {
                sprintf(buf, "%s.prf", realm_names[player_ptr->realm1]);
-               process_pref_file(player_ptr, buf);
+               process_pref_file(player_ptr, buf, process_autopick_file_command);
        }
 
        if (player_ptr->realm2 != REALM_NONE)
        {
                sprintf(buf, "%s.prf", realm_names[player_ptr->realm2]);
-               process_pref_file(player_ptr, buf);
+               process_pref_file(player_ptr, buf, process_autopick_file_command);
        }
 
        autopick_load_pref(player_ptr, FALSE);
@@ -4263,7 +4271,7 @@ void play_game(player_type *player_ptr, bool new_game)
 #ifdef CHUUKEI
        if (chuukei_client)
        {
-               reset_visuals();
+               reset_visuals(player_ptr, process_autopick_file_command);
                browse_chuukei();
                return;
        }
@@ -4276,7 +4284,7 @@ void play_game(player_type *player_ptr, bool new_game)
 
        if (browsing_movie)
        {
-               reset_visuals(player_ptr);
+               reset_visuals(player_ptr, process_autopick_file_command);
                browse_movie();
                return;
        }
@@ -4378,7 +4386,7 @@ void play_game(player_type *player_ptr, bool new_game)
                current_world_ptr->seed_flavor = randint0(0x10000000);
                current_world_ptr->seed_town = randint0(0x10000000);
 
-               player_birth(player_ptr);
+               player_birth(player_ptr, process_autopick_file_command);
                counts_write(player_ptr, 2, 0);
                player_ptr->count = 0;
                load = FALSE;
@@ -4490,7 +4498,7 @@ void play_game(player_type *player_ptr, bool new_game)
        }
 
        player_ptr->playing = TRUE;
-       reset_visuals(player_ptr);
+       reset_visuals(player_ptr, process_autopick_file_command);
        load_all_pref_files(player_ptr);
        if (new_game)
        {