OSDN Git Service

[Refactor] #39970 Moved world.c/h to world/
[hengband/hengband.git] / src / init.c
index 87f9304..ed71e38 100644 (file)
 
 #include "angband.h"
 #include "util.h"
-#include "uid-checker.h"
+#include "io/uid-checker.h"
 #include "files.h"
 #include "core.h"
+#include "core/angband-version.h"
 #include "io/read-pref-file.h"
-#include "term.h"
+#include "gameterm.h"
 
 #include "artifact.h"
-#include "bldg.h"
+#include "market/building.h"
 #include "init.h"
 #include "quest.h"
 #include "trap.h"
 #include "rooms.h"
-#include "store.h"
+#include "market/store.h"
 #include "wild.h"
 #include "dungeon-file.h"
 #include "files.h"
 #include "rooms-vault.h"
 #include "player-skill.h"
 #include "player-class.h"
-#include "objectkind.h"
+#include "object/object-kind.h"
 #include "object-ego.h"
 #include "rooms-vault.h"
-#include "world.h"
+#include "world/world.h"
 #include "market/articles-on-sale.h"
 #include "market/store-util.h"
 
@@ -764,7 +765,7 @@ static errr init_towns(void)
                for (int j = 0; j < MAX_STORES; j++)
                {
                        /* Access the store */
-                       store_type *st_ptr = &town_info[i].store[j];
+                       store_type *store_ptr = &town_info[i].store[j];
 
                        if ((i > 1) && (j == STORE_MUSEUM || j == STORE_HOME)) continue;
 
@@ -776,28 +777,28 @@ static errr init_towns(void)
                         */
                        if (j == STORE_HOME)
                        {
-                               st_ptr->stock_size = (STORE_INVEN_MAX * 10);
+                               store_ptr->stock_size = (STORE_INVEN_MAX * 10);
                        }
                        else if (j == STORE_MUSEUM)
                        {
-                               st_ptr->stock_size = (STORE_INVEN_MAX * 50);
+                               store_ptr->stock_size = (STORE_INVEN_MAX * 50);
                        }
                        else
                        {
-                               st_ptr->stock_size = STORE_INVEN_MAX;
+                               store_ptr->stock_size = STORE_INVEN_MAX;
                        }
 
                        /* Allocate the stock */
-                       C_MAKE(st_ptr->stock, st_ptr->stock_size, object_type);
+                       C_MAKE(store_ptr->stock, store_ptr->stock_size, object_type);
 
                        /* No table for the black market or home */
                        if ((j == STORE_BLACK) || (j == STORE_HOME) || (j == STORE_MUSEUM)) continue;
 
                        /* Assume full table */
-                       st_ptr->table_size = STORE_CHOICES;
+                       store_ptr->table_size = STORE_CHOICES;
 
                        /* Allocate the stock */
-                       C_MAKE(st_ptr->table, st_ptr->table_size, s16b);
+                       C_MAKE(store_ptr->table, store_ptr->table_size, s16b);
 
                        /* Scan the choices */
                        for (int k = 0; k < STORE_CHOICES; k++)
@@ -821,7 +822,7 @@ static errr init_towns(void)
                                if (k_idx == max_k_idx) continue;
 
                                /* Add that item index to the table */
-                               st_ptr->table[st_ptr->table_num++] = k_idx;
+                               store_ptr->table[store_ptr->table_num++] = k_idx;
                        }
                }
        }
@@ -1433,7 +1434,7 @@ static void init_angband_aux(concptr why)
  * if needed, in the first (?) pass through "TERM_XTRA_REACT".
  * </pre>
  */
-void init_angband(player_type *player_ptr)
+void init_angband(player_type *player_ptr, void(*process_autopick_file_command)(char*))
 {
        /*** Verify the "news" file ***/
        char buf[1024];
@@ -1606,13 +1607,13 @@ void init_angband(player_type *player_ptr)
        strcpy(buf, "pref.prf");
 
        /* Process that file */
-       process_pref_file(player_ptr, buf);
+       process_pref_file(player_ptr, buf, process_autopick_file_command);
 
        /* Access the "basic" system pref file */
        sprintf(buf, "pref-%s.prf", ANGBAND_SYS);
 
        /* Process that file */
-       process_pref_file(player_ptr, buf);
+       process_pref_file(player_ptr, buf, process_autopick_file_command);
 
        note(_("[初期化終了]", "[Initialization complete]"));
 }