OSDN Git Service

Merge branch 'master' of git.osdn.net:/gitroot/hengband/hengband
[hengband/hengband.git] / src / autopick / autopick-initializer.c
1 #include "autopick/autopick-initializer.h"
2 #include "autopick/autopick-entry.h"
3 #include "autopick/autopick-util.h"
4 #include "system/angband.h"
5
6 /*
7  * Initialize the autopick
8  */
9 void init_autopick(void)
10 {
11         static const char easy_autopick_inscription[] = "(:=g";
12         autopick_type entry;
13         int i;
14
15         if (!autopick_list)
16         {
17                 max_max_autopick = MAX_AUTOPICK_DEFAULT;
18                 C_MAKE(autopick_list, max_max_autopick, autopick_type);
19                 max_autopick = 0;
20         }
21
22         for (i = 0; i < max_autopick; i++)
23                 autopick_free_entry(&autopick_list[i]);
24
25         max_autopick = 0;
26         autopick_new_entry(&entry, easy_autopick_inscription, TRUE);
27         autopick_list[max_autopick++] = entry;
28 }