#pragma once
-#include "effect/attribute-types.h"
-#include "system/angband.h"
+#include <string>
#include <vector>
+enum class AttributeType;
struct named_num {
- concptr name; /* The name of this thing */
+ std::string name; /* The name of this thing */
AttributeType num; /* A number associated with it */
};
}
*(t++) = '\0';
- for (const auto &description : gf_descriptions) {
- if (!streq(description.name, buf + 2)) {
+ for (const auto &[name, num] : gf_descriptions) {
+ if (!streq(name.data(), buf + 2)) {
continue;
}
- gf_colors[description.num] = t;
+ gf_colors[num] = t;
return 0;
}
#include "util/enum-converter.h"
#include "util/flag-group.h"
#include "view/display-messages.h"
-
#include <string_view>
#include <vector>
for (auto i = 1; i <= 23; i++) {
prt("", i, 0);
}
+
for (auto i = 0U; i < std::size(gf_descriptions); ++i) {
- auto name = std::string_view(gf_descriptions[i].name).substr(3); // 先頭の"GF_"を取り除く
- auto num = enum2i(gf_descriptions[i].num);
+ const auto &gf_description = gf_descriptions[i];
+ auto name = std::string_view(gf_description.name).substr(3); // 先頭の"GF_"を取り除く
+ auto num = enum2i(gf_description.num);
put_str(format("%03d:%-.10s^", num, name.data()), 1 + i / 5, 1 + (i % 5) * 16);
}
+
if (!get_value("EffectID", 1, max - 1, &idx)) {
screen_load();
return;
}
+
screen_load();
}