3 #include "system/angband.h"
4 #include "util/bit-flags-calculator.h"
7 #include <unordered_map>
10 * Size of memory reserved for initialization of some arrays
12 extern int error_idx; //!< エラーが発生したinfo ID
13 extern int error_line; //!< エラーが発生した行
15 enum class RandomArtActType : short;
16 RandomArtActType grab_one_activation_flag(concptr what);
19 void append_english_text(std::string &text, std::string_view add);
23 * @brief infoフラグ文字列をフラグビットに変換する
24 * @param flags ビットフラグ変数
25 * @param names フラグ文字列変換表
30 bool info_grab_one_flag(uint32_t &flags, const std::unordered_map<std::string_view, T> &names, std::string_view what)
32 if (auto it = names.find(what); it != names.end()) {
33 set_bits(flags, it->second);
40 * @brief infoパラメータに値をセットする
45 void info_set_value(T &arg, const std::string &val, int base = 10)
47 arg = static_cast<T>(std::stoi(val, nullptr, base));