continue;
}
- gf_colors[description.num] = quark_add(t);
+ gf_colors[description.num] = t;
return 0;
}
static void init_gf_colors()
{
- constexpr ushort default_gf_color = 0;
for (auto i = 0; i < enum2i(AttributeType::MAX); i++) {
- gf_colors.emplace(i2enum<AttributeType>(i), default_gf_color);
+ gf_colors.emplace(i2enum<AttributeType>(i), "");
}
}
TERM_COLOR tval_to_attr[128];
/*
- * Default spell color table (quark index)
+ * Default spell color table
*/
-std::map<AttributeType, ushort> gf_colors;
+std::map<AttributeType, std::string> gf_colors;
/*!
* @brief 万色表現用にランダムな色を選択する関数 /
TERM_COLOR a;
/* Lookup the default colors for this type */
- concptr s = quark_str(gf_colors[type]);
+ const auto &color = gf_colors[type];
- if (!s) {
+ if (color.empty()) {
return TERM_WHITE;
}
/* Pick a random color */
- auto c = s[randint0(strlen(s))];
+ auto c = color[randint0(color.size())];
/* Lookup this color */
a = angband_strchr(color_char, c) - color_char;
#include "system/angband.h"
#include <array>
#include <map>
+#include <string>
#include <utility>
extern const concptr color_names[16];
extern byte angband_color_table[256][4];
enum class AttributeType : int;
-extern std::map<AttributeType, ushort> gf_colors;
+extern std::map<AttributeType, std::string> gf_colors;
extern TERM_COLOR color_char_to_attr(char c);
std::pair<TERM_COLOR, char> bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, AttributeType typ);