const auto tval = bi_key.tval();
if (PlayerRace(player_ptr).equals(PlayerRaceType::BALROG)) {
const auto r_idx = i2enum<MonsterRaceId>(o_ptr->pval);
- if (o_ptr->is_corpse() && angband_strchr("pht", monraces_info[r_idx].cc_def.character)) {
+ if (o_ptr->is_corpse() && angband_strchr("pht", monraces_info[r_idx].symbol_def.character)) {
return false;
}
} else if (pc.equals(PlayerClassType::ARCHER)) {
entry->add(FLG_UNIQUE);
}
- if (tval == ItemKindType::CORPSE && angband_strchr("pht", monraces_info[r_idx].cc_def.character)) {
+ if (tval == ItemKindType::CORPSE && angband_strchr("pht", monraces_info[r_idx].symbol_def.character)) {
entry->add(FLG_HUMAN);
}
return false;
}
- if (entry.has(FLG_HUMAN) && (tval != ItemKindType::CORPSE || !angband_strchr("pht", monraces_info[r_idx].cc_def.character))) {
+ if (entry.has(FLG_HUMAN) && (tval != ItemKindType::CORPSE || !angband_strchr("pht", monraces_info[r_idx].symbol_def.character))) {
return false;
}
monrace_ids.push_back(monrace_id);
}
- else if (all || (monrace.cc_def.character == symbol)) {
+ else if (all || (monrace.symbol_def.character == symbol)) {
monrace_ids.push_back(monrace_id);
}
}
/* Balrogs change humanoid corpses to energy */
const auto corpse_r_idx = i2enum<MonsterRaceId>(o_ptr->pval);
- const auto search = angband_strchr("pht", monraces_info[corpse_r_idx].cc_def.character);
+ const auto search = angband_strchr("pht", monraces_info[corpse_r_idx].symbol_def.character);
if (food_type == PlayerRaceFoodType::CORPSE && o_ptr->is_corpse() && (search != nullptr)) {
const auto item_name = describe_flavor(player_ptr, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
msg_format(_("%sは燃え上り灰になった。精力を吸収した気がする。", "%s^ is burnt to ashes. You absorb its vitality!"), item_name.data());
auto_dump_printf(auto_dump_stream, _("\n# モンスターの[色/文字]の設定\n\n", "\n# Monster attr/char definitions\n\n"));
for (const auto &[monrace_id, monrace] : monraces_info) {
auto_dump_printf(auto_dump_stream, "# %s\n", monrace.name.data());
- const auto &cc_config = monrace.cc_config;
- auto_dump_printf(auto_dump_stream, "R:%d:0x%02X/0x%02X\n\n", enum2i(monrace_id), cc_config.color, static_cast<uint8_t>(cc_config.character));
+ const auto &symbol_config = monrace.symbol_config;
+ auto_dump_printf(auto_dump_stream, "R:%d:0x%02X/0x%02X\n\n", enum2i(monrace_id), symbol_config.color, static_cast<uint8_t>(symbol_config.character));
}
close_auto_dump(&auto_dump_stream, mark);
}
auto_dump_printf(auto_dump_stream, "# %s\n", item_name.data());
- const auto &cc_config = baseitem.cc_config;
- auto_dump_printf(auto_dump_stream, "K:%d:0x%02X/0x%02X\n\n", (int)baseitem.idx, cc_config.color, static_cast<uint8_t>(cc_config.character));
+ const auto &symbol_config = baseitem.symbol_config;
+ auto_dump_printf(auto_dump_stream, "K:%d:0x%02X/0x%02X\n\n", (int)baseitem.idx, symbol_config.color, static_cast<uint8_t>(symbol_config.character));
}
close_auto_dump(&auto_dump_stream, mark);
}
auto_dump_printf(auto_dump_stream, "# %s\n", (terrain.name.data()));
- const auto &cc_standard = terrain.cc_configs.at(F_LIT_STANDARD);
- const auto &cc_lite = terrain.cc_configs.at(F_LIT_LITE);
- const auto &cc_dark = terrain.cc_configs.at(F_LIT_DARK);
- auto_dump_printf(auto_dump_stream, "F:%d:0x%02X/0x%02X:0x%02X/0x%02X:0x%02X/0x%02X\n\n", terrain.idx, cc_standard.color,
- static_cast<uint8_t>(cc_standard.character), cc_lite.color, static_cast<uint8_t>(cc_lite.character),
- cc_dark.color, static_cast<uint8_t>(cc_dark.character));
+ const auto &symbol_standard = terrain.symbol_configs.at(F_LIT_STANDARD);
+ const auto &symbol_lite = terrain.symbol_configs.at(F_LIT_LITE);
+ const auto &symbol_dark = terrain.symbol_configs.at(F_LIT_DARK);
+ auto_dump_printf(auto_dump_stream, "F:%d:0x%02X/0x%02X:0x%02X/0x%02X:0x%02X/0x%02X\n\n", terrain.idx, symbol_standard.color,
+ static_cast<uint8_t>(symbol_standard.character), symbol_lite.color, static_cast<uint8_t>(symbol_lite.character),
+ symbol_dark.color, static_cast<uint8_t>(symbol_dark.character));
}
close_auto_dump(&auto_dump_stream, mark);
while (true) {
auto &monrace = monraces_info[monrace_id];
int c;
- const auto &cc_def = monrace.cc_def;
- auto &cc_config = monrace.cc_config;
+ const auto &symbol_def = monrace.symbol_def;
+ auto &symbol_config = monrace.symbol_config;
term_putstr(5, 17, -1, TERM_WHITE, format(_("モンスター = %d, 名前 = %-40.40s", "Monster = %d, Name = %-40.40s"), enum2i(monrace_id), monrace.name.data()));
- term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3u / %3u", "Default attr/char = %3u / %3u"), cc_def.color, cc_def.character));
+ term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3u / %3u", "Default attr/char = %3u / %3u"), symbol_def.color, symbol_def.character));
term_putstr(40, 19, -1, TERM_WHITE, empty_symbol);
- term_queue_bigchar(43, 19, { cc_def, {} });
- term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3u / %3u", "Current attr/char = %3u / %3u"), cc_config.color, cc_config.character));
+ term_queue_bigchar(43, 19, { symbol_def, {} });
+ term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3u / %3u", "Current attr/char = %3u / %3u"), symbol_config.color, symbol_config.character));
term_putstr(40, 20, -1, TERM_WHITE, empty_symbol);
- term_queue_bigchar(43, 20, { cc_config, {} });
+ term_queue_bigchar(43, 20, { symbol_config, {} });
term_putstr(0, 22, -1, TERM_WHITE, _("コマンド (n/N/^N/a/A/^A/c/C/^C/v/V/^V): ", "Command (n/N/^N/a/A/^A/c/C/^C/v/V/^V): "));
const auto ch = inkey();
if (ch == ESCAPE) {
break;
}
case 'a': {
- const auto visual_id = input_new_visual_id(ch, cc_config.color, 256);
+ const auto visual_id = input_new_visual_id(ch, symbol_config.color, 256);
if (!visual_id) {
break;
}
- cc_config.color = *visual_id;
+ symbol_config.color = *visual_id;
need_redraw = true;
break;
}
case 'c': {
- const auto visual_id = input_new_visual_id(ch, cc_config.character, 256);
+ const auto visual_id = input_new_visual_id(ch, symbol_config.character, 256);
if (!visual_id) {
break;
}
- cc_config.character = *visual_id;
+ symbol_config.character = *visual_id;
need_redraw = true;
break;
}
while (true) {
auto &baseitem = baseitems.get_baseitem(bi_id);
int c;
- const auto &cc_def = baseitem.cc_def;
- auto &cc_config = baseitem.cc_config;
+ const auto &symbol_def = baseitem.symbol_def;
+ auto &symbol_config = baseitem.symbol_config;
term_putstr(5, 17, -1, TERM_WHITE,
format(
_("アイテム = %d, 名前 = %-40.40s", "Object = %d, Name = %-40.40s"), bi_id, (!baseitem.flavor ? baseitem.name : baseitem.flavor_name).data()));
- term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3d / %3d", "Default attr/char = %3d / %3d"), cc_def.color, cc_def.character));
+ term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3d / %3d", "Default attr/char = %3d / %3d"), symbol_def.color, symbol_def.character));
term_putstr(40, 19, -1, TERM_WHITE, empty_symbol);
- term_queue_bigchar(43, 19, { cc_def, {} });
- term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3d / %3d", "Current attr/char = %3d / %3d"), cc_config.color, cc_config.character));
+ term_queue_bigchar(43, 19, { symbol_def, {} });
+ term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3d / %3d", "Current attr/char = %3d / %3d"), symbol_config.color, symbol_config.character));
term_putstr(40, 20, -1, TERM_WHITE, empty_symbol);
- term_queue_bigchar(43, 20, { cc_config, {} });
+ term_queue_bigchar(43, 20, { symbol_config, {} });
term_putstr(0, 22, -1, TERM_WHITE, _("コマンド (n/N/^N/a/A/^A/c/C/^C/v/V/^V): ", "Command (n/N/^N/a/A/^A/c/C/^C/v/V/^V): "));
const auto ch = inkey();
break;
}
case 'a': {
- const auto visual_id = input_new_visual_id(ch, cc_config.color, 256);
+ const auto visual_id = input_new_visual_id(ch, symbol_config.color, 256);
if (!visual_id) {
break;
}
- baseitem.cc_config.color = *visual_id;
+ baseitem.symbol_config.color = *visual_id;
need_redraw = true;
break;
}
case 'c': {
- const auto visual_id = input_new_visual_id(ch, cc_config.character, 256);
+ const auto visual_id = input_new_visual_id(ch, symbol_config.character, 256);
if (!visual_id) {
break;
}
- baseitem.cc_config.character = *visual_id;
+ baseitem.symbol_config.character = *visual_id;
need_redraw = true;
break;
}
while (true) {
auto &terrain = terrains[terrain_id];
int c;
- const auto &cc_def = terrain.cc_defs[lighting_level];
- const auto &cc_config = terrain.cc_configs[lighting_level];
+ const auto &symbol_def = terrain.symbol_defs[lighting_level];
+ const auto &symbol_config = terrain.symbol_configs[lighting_level];
prt("", 17, 5);
term_putstr(5, 17, -1, TERM_WHITE,
format(_("地形 = %d, 名前 = %s, 明度 = %s", "Terrain = %d, Name = %s, Lighting = %s"), terrain_id, (terrain.name.data()),
lighting_level_str[lighting_level]));
- term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3d / %3d", "Default attr/char = %3d / %3d"), cc_def.color, cc_def.character));
+ term_putstr(10, 19, -1, TERM_WHITE, format(_("初期値 色 / 文字 = %3d / %3d", "Default attr/char = %3d / %3d"), symbol_def.color, symbol_def.character));
term_putstr(40, 19, -1, TERM_WHITE, empty_symbol);
- term_queue_bigchar(43, 19, { cc_def, {} });
- term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3d / %3d", "Current attr/char = %3d / %3d"), cc_config.color, cc_config.character));
+ term_queue_bigchar(43, 19, { symbol_def, {} });
+ term_putstr(10, 20, -1, TERM_WHITE, format(_("現在値 色 / 文字 = %3d / %3d", "Current attr/char = %3d / %3d"), symbol_config.color, symbol_config.character));
term_putstr(40, 20, -1, TERM_WHITE, empty_symbol);
- term_queue_bigchar(43, 20, { cc_config, {} });
+ term_queue_bigchar(43, 20, { symbol_config, {} });
term_putstr(0, 22, -1, TERM_WHITE,
_("コマンド (n/N/^N/a/A/^A/c/C/^C/l/L/^L/d/D/^D/v/V/^V): ", "Command (n/N/^N/a/A/^A/c/C/^C/l/L/^L/d/D/^D/v/V/^V): "));
break;
}
case 'a': {
- auto &color_config = terrain.cc_configs[lighting_level].color;
+ auto &color_config = terrain.symbol_configs[lighting_level].color;
const auto visual_id = input_new_visual_id(ch, color_config, 256);
if (!visual_id) {
break;
break;
}
case 'c': {
- auto &character_config = terrain.cc_configs[lighting_level].character;
+ auto &character_config = terrain.symbol_configs[lighting_level].character;
const auto visual_id = input_new_visual_id(ch, character_config, 256);
if (!visual_id) {
break;
{
for (auto &terrain : TerrainList::get_instance()) {
for (int j = 0; j < F_LIT_MAX; j++) {
- terrain.cc_configs[j] = terrain.cc_defs[j];
+ terrain.symbol_configs[j] = terrain.symbol_defs[j];
}
}
void lite_spot(PlayerType *player_ptr, POSITION y, POSITION x)
{
if (panel_contains(y, x) && in_bounds2(player_ptr->current_floor_ptr, y, x)) {
- auto ccp = map_info(player_ptr, { y, x });
- ccp.cc_foreground.color = get_monochrome_display_color(player_ptr).value_or(ccp.cc_foreground.color);
+ auto symbol_pair = map_info(player_ptr, { y, x });
+ symbol_pair.symbol_foreground.color = get_monochrome_display_color(player_ptr).value_or(symbol_pair.symbol_foreground.color);
- term_queue_bigchar(panel_col_of(x), y - panel_row_prt, ccp);
+ term_queue_bigchar(panel_col_of(x), y - panel_row_prt, symbol_pair);
static constexpr auto flags = {
SubWindowRedrawingFlag::OVERHEAD,
SubWindowRedrawingFlag::DUNGEON,
if (color->second > 127) {
return PARSE_ERROR_GENERIC;
}
- baseitem.cc_def = ColoredChar(color->second, character_obj.get<std::string>().front());
+ baseitem.symbol_def = DisplaySymbol(color->second, character_obj.get<std::string>().front());
return PARSE_ERROR_NONE;
}
}
auto &terrain = *terrains.rbegin();
- terrain.cc_defs[F_LIT_STANDARD] = { color, character };
+ terrain.symbol_defs[F_LIT_STANDARD] = { color, character };
if (tokens.size() == n) {
for (int j = F_LIT_NS_BEGIN; j < F_LIT_MAX; j++) {
- terrain.cc_defs[j] = { color, character };
+ terrain.symbol_defs[j] = { color, character };
}
return PARSE_ERROR_NONE;
continue;
}
- terrain.cc_defs[j].character = tokens[c_idx][0];
+ terrain.symbol_defs[j].character = tokens[c_idx][0];
if (tokens[a_idx] == "*") {
continue;
}
if (tokens[a_idx] == "-") {
- terrain.cc_defs[j].color = color;
+ terrain.symbol_defs[j].color = color;
continue;
}
- terrain.cc_defs[j].color = color_char_to_attr(tokens[a_idx][0]);
- if (terrain.cc_defs[j].color > 127) {
+ terrain.symbol_defs[j].color = color_char_to_attr(tokens[a_idx][0]);
+ if (terrain.symbol_defs[j].color > 127) {
return PARSE_ERROR_GENERIC;
}
}
return PARSE_ERROR_GENERIC;
}
- monrace.cc_def = { color->second, character_obj.get<std::string>().front() };
+ monrace.symbol_def = { color->second, character_obj.get<std::string>().front() };
return PARSE_ERROR_NONE;
}
#include "util/int-char-converter.h"
#include "view/display-messages.h"
-ColoredCharsClipboard ColoredCharsClipboard::instance{};
+DisplaySymbolsClipboard DisplaySymbolsClipboard::instance{};
-ColoredCharsClipboard::ColoredCharsClipboard()
- : cc()
- , cc_map(DEFAULT_CC_MAP)
+DisplaySymbolsClipboard::DisplaySymbolsClipboard()
+ : symbol()
+ , symbols(DEFAULT_SYMBOLS)
{
}
-ColoredCharsClipboard &ColoredCharsClipboard::get_instance()
+DisplaySymbolsClipboard &DisplaySymbolsClipboard::get_instance()
{
return instance;
}
-void ColoredCharsClipboard::reset_cc_map()
+void DisplaySymbolsClipboard::reset_symbols()
{
- this->cc_map = DEFAULT_CC_MAP;
+ this->symbols = DEFAULT_SYMBOLS;
}
-void ColoredCharsClipboard::set_cc_map(const std::map<int, ColoredChar> &cc_config)
+void DisplaySymbolsClipboard::set_symbol(const std::map<int, DisplaySymbol> &symbol_configs)
{
- this->cc_map = cc_config;
+ this->symbols = symbol_configs;
}
/*!
{
static TERM_COLOR attr_old = 0;
static char char_old = 0;
- auto &cc_cb = ColoredCharsClipboard::get_instance();
+ auto &symbols_cb = DisplaySymbolsClipboard::get_instance();
switch (ch) {
case ESCAPE: {
if (!*visual_list_ptr) {
}
case 'C':
case 'c':
- cc_cb.cc = { *cur_attr_ptr, *cur_char_ptr };
- cc_cb.reset_cc_map();
+ symbols_cb.symbol = { *cur_attr_ptr, *cur_char_ptr };
+ symbols_cb.reset_symbols();
return true;
case 'P':
case 'p': {
- const auto &cc = cc_cb.cc;
- const auto has_character = cc.has_character();
- if (cc.color || (!(cc.character & 0x80) && has_character)) {
- *cur_attr_ptr = cc.color;
+ const auto &symbols = symbols_cb.symbol;
+ const auto has_character = symbols.has_character();
+ if (symbols.color || (!(symbols.character & 0x80) && has_character)) {
+ *cur_attr_ptr = symbols.color;
*attr_top_ptr = std::max<int8_t>(0, (*cur_attr_ptr & 0x7f) - 5);
if (!*visual_list_ptr) {
*need_redraw = true;
if (has_character) {
/* Set the char */
- *cur_char_ptr = cc.character;
+ *cur_char_ptr = symbols.character;
*char_left_ptr = std::max<int8_t>(0, *cur_char_ptr - 10);
if (!*visual_list_ptr) {
*need_redraw = true;
#define FILE_NAME_SIZE 1024
-class ColoredChar;
-class ColoredCharsClipboard {
+class DisplaySymbol;
+class DisplaySymbolsClipboard {
public:
- ColoredCharsClipboard(const ColoredCharsClipboard &) = delete;
- ColoredCharsClipboard(ColoredCharsClipboard &&) = delete;
- ColoredCharsClipboard &operator=(const ColoredCharsClipboard &) = delete;
- ColoredCharsClipboard &operator=(ColoredCharsClipboard &&) = delete;
- ~ColoredCharsClipboard() = default;
+ DisplaySymbolsClipboard(const DisplaySymbolsClipboard &) = delete;
+ DisplaySymbolsClipboard(DisplaySymbolsClipboard &&) = delete;
+ DisplaySymbolsClipboard &operator=(const DisplaySymbolsClipboard &) = delete;
+ DisplaySymbolsClipboard &operator=(DisplaySymbolsClipboard &&) = delete;
+ ~DisplaySymbolsClipboard() = default;
- static ColoredCharsClipboard &get_instance();
+ static DisplaySymbolsClipboard &get_instance();
- ColoredChar cc;
- std::map<int, ColoredChar> cc_map;
+ DisplaySymbol symbol;
+ std::map<int, DisplaySymbol> symbols;
- void reset_cc_map();
- void set_cc_map(const std::map<int, ColoredChar> &cc_config);
+ void reset_symbols();
+ void set_symbol(const std::map<int, DisplaySymbol> &symbol_configs);
private:
- ColoredCharsClipboard();
- static ColoredCharsClipboard instance;
+ DisplaySymbolsClipboard();
+ static DisplaySymbolsClipboard instance;
};
bool visual_mode_command(char ch, bool *visual_list_ptr, int height, int width,
for (const auto &pos_path : path_g) {
auto *g_ptr = &floor_ptr->get_grid(pos_path);
if (panel_contains(pos_path.y, pos_path.x)) {
- ColoredCharPair ccp({ default_color, '\0' }, { default_color, '*' });
+ DisplaySymbolPair symbol_pair({ default_color, '\0' }, { default_color, '*' });
if (g_ptr->has_monster() && floor_ptr->m_list[g_ptr->m_idx].ml) {
- ccp = map_info(player_ptr, pos_path);
- auto &cc_foreground = ccp.cc_foreground;
- if (!is_ascii_graphics(cc_foreground.color)) {
- cc_foreground.color = default_color;
- } else if ((cc_foreground.character == '.') && ((cc_foreground.color == TERM_WHITE) || (cc_foreground.color == TERM_L_WHITE))) {
- cc_foreground.color = default_color;
- } else if (cc_foreground.color == default_color) {
- cc_foreground.color = TERM_WHITE;
+ symbol_pair = map_info(player_ptr, pos_path);
+ auto &symbol_foreground = symbol_pair.symbol_foreground;
+ if (!is_ascii_graphics(symbol_foreground.color)) {
+ symbol_foreground.color = default_color;
+ } else if ((symbol_foreground.character == '.') && ((symbol_foreground.color == TERM_WHITE) || (symbol_foreground.color == TERM_L_WHITE))) {
+ symbol_foreground.color = default_color;
+ } else if (symbol_foreground.color == default_color) {
+ symbol_foreground.color = TERM_WHITE;
}
}
- ccp.cc_foreground.color = get_monochrome_display_color(player_ptr).value_or(ccp.cc_foreground.color);
- ccp.cc_foreground.character = '*';
- term_queue_bigchar(panel_col_of(pos_path.x), pos_path.y - panel_row_prt, ccp);
+ symbol_pair.symbol_foreground.color = get_monochrome_display_color(player_ptr).value_or(symbol_pair.symbol_foreground.color);
+ symbol_pair.symbol_foreground.character = '*';
+ term_queue_bigchar(panel_col_of(pos_path.x), pos_path.y - panel_row_prt, symbol_pair);
}
if (g_ptr->is_mark() && !g_ptr->cave_has_flag(TerrainCharacteristics::PROJECT)) {
auto &monrace = monraces_info[i2enum<MonsterRaceId>(i)];
/* Allow TERM_DARK text */
if (n1 || (!(n2 & 0x80) && n2)) {
- monrace.cc_config.color = n1;
+ monrace.symbol_config.color = n1;
}
if (n2) {
- monrace.cc_config.character = n2;
+ monrace.symbol_config.character = n2;
}
return true;
/* Allow TERM_DARK text */
auto &baseitem = baseitems.get_baseitem(i);
if ((color > 0) || (((character & 0x80) == 0) && (character != '\0'))) {
- baseitem.cc_config.color = color;
+ baseitem.symbol_config.color = color;
}
if (character != '\0') {
- baseitem.cc_config.character = character;
+ baseitem.symbol_config.character = character;
}
return true;
/* Allow TERM_DARK text */
if ((color_token > 0) || (!(character_token & 0x80) && has_character_token)) {
- terrain.cc_configs[F_LIT_STANDARD].color = color_token;
+ terrain.symbol_configs[F_LIT_STANDARD].color = color_token;
}
if (has_character_token) {
- terrain.cc_configs[F_LIT_STANDARD].character = character_token;
+ terrain.symbol_configs[F_LIT_STANDARD].character = character_token;
}
switch (num) {
case 3: {
/* No lighting support */
- const auto &cc = terrain.cc_configs.at(F_LIT_STANDARD);
+ const auto &symbol = terrain.symbol_configs.at(F_LIT_STANDARD);
for (auto j = F_LIT_NS_BEGIN; j < F_LIT_MAX; j++) {
- terrain.cc_configs[j] = cc;
+ terrain.symbol_configs[j] = symbol;
}
return;
const auto color = static_cast<uint8_t>(std::stoi(zz[j * 2 + 1], nullptr, 0));
const auto character = static_cast<char>(std::stoi(zz[j * 2 + 2], nullptr, 0));
const auto has_character = character != '\0';
- auto &cc = terrain.cc_configs[j];
+ auto &symbol = terrain.symbol_configs[j];
/* Allow TERM_DARK text */
if ((color != 0) || (!(character & 0x80) && has_character)) {
- cc.color = color;
+ symbol.color = color;
}
if (has_character) {
- cc.character = character;
+ symbol.character = character;
}
}
for (auto &baseitem : BaseitemList::get_instance()) {
if (baseitem.is_valid() && (baseitem.bi_key.tval() == tval)) {
if (n1) {
- baseitem.cc_def.color = n1;
+ baseitem.symbol_def.color = n1;
}
if (n2) {
- baseitem.cc_def.character = n2;
+ baseitem.symbol_def.character = n2;
}
}
}
c_prt(attr, terrain.name.data(), row_i, col);
if (per_page == 1) {
c_prt(attr, format("(%s)", lighting_level_str[lighting_level]), row_i, col + 1 + terrain.name.size());
- const auto &cc_config = terrain.cc_configs.at(lighting_level);
- c_prt(attr, format("%02x/%02x", cc_config.color, static_cast<uint8_t>(cc_config.character)), row_i,
+ const auto &symbol_config = terrain.symbol_configs.at(lighting_level);
+ c_prt(attr, format("%02x/%02x", symbol_config.color, static_cast<uint8_t>(symbol_config.character)), row_i,
f_idx_col - ((w_ptr->wizard || visual_only) ? 6 : 2));
}
if (w_ptr->wizard || visual_only) {
c_prt(attr, format("%d", terrain_id), row_i, f_idx_col);
}
- const auto &cc_standard = terrain.cc_configs.at(F_LIT_STANDARD);
- term_queue_bigchar(lit_col[F_LIT_STANDARD], row_i, { cc_standard, {} });
+ const auto &symbol_standard = terrain.symbol_configs.at(F_LIT_STANDARD);
+ term_queue_bigchar(lit_col[F_LIT_STANDARD], row_i, { symbol_standard, {} });
term_putch(lit_col[F_LIT_NS_BEGIN], row_i, TERM_SLATE, '(');
for (int j = F_LIT_NS_BEGIN + 1; j < F_LIT_MAX; j++) {
term_putch(lit_col[j], row_i, TERM_SLATE, '/');
term_putch(lit_col[F_LIT_MAX - 1] + (use_bigtile ? 3 : 2), row_i, TERM_SLATE, ')');
for (int j = F_LIT_NS_BEGIN; j < F_LIT_MAX; j++) {
- const auto &cc_config = terrain.cc_configs.at(j);
- term_queue_bigchar(lit_col[j] + 1, row_i, { cc_config, {} });
+ const auto &symbol_config = terrain.symbol_configs.at(j);
+ term_queue_bigchar(lit_col[j] + 1, row_i, { symbol_config, {} });
}
}
void do_cmd_knowledge_features(bool *need_redraw, bool visual_only, IDX direct_f_idx, IDX *lighting_level)
{
TermCenteredOffsetSetter tcos(MAIN_TERM_MIN_COLS, std::nullopt);
- std::map<int, ColoredChar> cc_map;
+ std::map<int, DisplaySymbol> symbols;
const auto &[wid, hgt] = term_get_size();
std::vector<FEAT_IDX> feat_idx(TerrainList::get_instance().size());
feat_cnt = 0;
} else {
auto &terrain = TerrainList::get_instance()[direct_f_idx];
- auto &cc_config = terrain.cc_configs.at(*lighting_level);
+ auto &symbol_config = terrain.symbol_configs.at(*lighting_level);
feat_idx[0] = direct_f_idx;
feat_cnt = 1;
feat_idx[1] = -1;
- (void)visual_mode_command('v', &visual_list, browser_rows - 1, wid - (max + 3), &attr_top, &char_left, &cc_config.color,
- &cc_config.character, need_redraw);
+ (void)visual_mode_command('v', &visual_list, browser_rows - 1, wid - (max + 3), &attr_top, &char_left, &symbol_config.color,
+ &symbol_config.character, need_redraw);
for (FEAT_IDX i = 0; i < F_LIT_MAX; i++) {
- cc_map[i] = cc_config;
+ symbols[i] = symbol_config;
}
}
TERM_LEN column = 0;
bool flag = false;
bool redraw = true;
- ColoredChar cc_orig;
+ DisplaySymbol symbol_orig;
auto &terrains = TerrainList::get_instance();
- auto &cc_cb = ColoredCharsClipboard::get_instance();
+ auto &symbols_cb = DisplaySymbolsClipboard::get_instance();
while (!flag) {
char ch;
if (redraw) {
prt(format(_("<方向>%s, 'd'で標準光源効果%s, ESC", "<dir>%s, 'd' for default lighting%s, ESC"),
visual_list ? _(", ENTERで決定, 'a'で対象明度変更", ", ENTER to accept, 'a' for lighting level")
: _(", 'v'でシンボル変更", ", 'v' for visuals"),
- (cc_cb.cc != ColoredChar()) ? _(", 'c', 'p'でペースト", ", 'c', 'p' to paste") : _(", 'c'でコピー", ", 'c' to copy")),
+ (symbols_cb.symbol != DisplaySymbol()) ? _(", 'c', 'p'でペースト", ", 'c', 'p' to paste") : _(", 'c'でコピー", ", 'c' to copy")),
hgt - 1, 0);
auto &terrain = terrains[feat_idx[feat_cur]];
- cc_orig = terrain.cc_configs.at(*lighting_level);
+ symbol_orig = terrain.symbol_configs.at(*lighting_level);
if (visual_list) {
- place_visual_list_cursor(max + 3, 7, cc_orig.color, static_cast<uint8_t>(cc_orig.character), attr_top, char_left);
+ place_visual_list_cursor(max + 3, 7, symbol_orig.color, static_cast<uint8_t>(symbol_orig.character), attr_top, char_left);
} else if (!column) {
term_gotoxy(0, 6 + (grp_cur - grp_top));
} else {
}
}
- const auto &cc_previous = terrain.cc_configs.at(prev_lighting_level);
- const auto &cc_lightning = terrain.cc_configs.at(*lighting_level);
- if (cc_previous.color != cc_lightning.color) {
- attr_top = std::max<int8_t>(0, (cc_lightning.color & 0x7f) - 5);
+ const auto &symbol_previous = terrain.symbol_configs.at(prev_lighting_level);
+ const auto &symbol_lightning = terrain.symbol_configs.at(*lighting_level);
+ if (symbol_previous.color != symbol_lightning.color) {
+ attr_top = std::max<int8_t>(0, (symbol_lightning.color & 0x7f) - 5);
}
- if (cc_previous.character != cc_lightning.character) {
- char_left = std::max<int8_t>(0, cc_lightning.character - 10);
+ if (symbol_previous.character != symbol_lightning.character) {
+ char_left = std::max<int8_t>(0, symbol_lightning.character - 10);
}
continue;
}
if ((ch == 'D') || (ch == 'd')) {
- const auto &cc_previous = terrain.cc_configs.at(*lighting_level);
+ const auto &symbol_previous = terrain.symbol_configs.at(*lighting_level);
terrain.reset_lighting();
- const auto &cc_current = terrain.cc_configs.at(*lighting_level);
+ const auto &symbol_current = terrain.symbol_configs.at(*lighting_level);
if (visual_list) {
- if (cc_previous.color != cc_current.color) {
- attr_top = std::max<int8_t>(0, (cc_current.color & 0x7f) - 5);
+ if (symbol_previous.color != symbol_current.color) {
+ attr_top = std::max<int8_t>(0, (symbol_current.color & 0x7f) - 5);
}
- if (cc_previous.character != cc_current.character) {
- char_left = std::max<int8_t>(0, cc_current.character - 10);
+ if (symbol_previous.character != symbol_current.character) {
+ char_left = std::max<int8_t>(0, symbol_current.character - 10);
}
} else {
*need_redraw = true;
continue;
}
- if (visual_mode_command(ch, &visual_list, browser_rows - 1, wid - (max + 3), &attr_top, &char_left, &cc_orig.color, &cc_orig.character, need_redraw)) {
+ if (visual_mode_command(ch, &visual_list, browser_rows - 1, wid - (max + 3), &attr_top, &char_left, &symbol_orig.color, &symbol_orig.character, need_redraw)) {
switch (ch) {
case ESCAPE:
- terrain.cc_configs = cc_map;
+ terrain.symbol_configs = symbols;
[[fallthrough]];
case '\n':
break;
case 'V':
case 'v':
- cc_map = terrain.cc_configs;
+ symbols = terrain.symbol_configs;
*lighting_level = F_LIT_STANDARD;
break;
break;
}
- cc_cb.set_cc_map(terrain.cc_configs);
+ symbols_cb.set_symbol(terrain.symbol_configs);
break;
case 'P':
case 'p': {
break;
}
- auto &cc_cb_map = cc_cb.cc_map;
+ auto &symbols_cb_map = symbols_cb.symbols;
for (auto i = F_LIT_NS_BEGIN; i < F_LIT_MAX; i++) {
- auto &cc_config = terrain.cc_configs.at(i);
- auto &cc = cc_cb_map.at(i);
- const auto has_character = cc.has_character();
- if ((cc.color != 0) || (!(cc.character & 0x80) && has_character)) {
- cc_config.color = cc.color;
+ auto &symbol_config = terrain.symbol_configs.at(i);
+ auto &symbol = symbols_cb_map.at(i);
+ const auto has_character = symbol.has_character();
+ if ((symbol.color != 0) || (!(symbol.character & 0x80) && has_character)) {
+ symbol_config.color = symbol.color;
}
if (has_character) {
- cc_config.character = cc.character;
+ symbol_config.character = symbol.character;
}
}
const auto is_flavor_only = (baseitem.flavor != 0) && (visual_only || !baseitem.aware);
const auto o_name = is_flavor_only ? flavor_baseitem.flavor_name : baseitem.stripped_name();
c_prt(attr, o_name.data(), row + i, col);
- const auto &cc_config = flavor_baseitem.cc_config;
+ const auto &symbol_config = flavor_baseitem.symbol_config;
if (per_page == 1) {
- c_prt(attr, format("%02x/%02x", cc_config.color, cc_config.character), row + i, (w_ptr->wizard || visual_only) ? 64 : 68);
+ c_prt(attr, format("%02x/%02x", symbol_config.color, symbol_config.character), row + i, (w_ptr->wizard || visual_only) ? 64 : 68);
}
if (w_ptr->wizard || visual_only) {
c_prt(attr, format("%d", bi_id), row + i, 70);
}
- term_queue_bigchar(use_bigtile ? 76 : 77, row + i, { cc_config, {} });
+ term_queue_bigchar(use_bigtile ? 76 : 77, row + i, { symbol_config, {} });
}
for (; i < per_page; i++) {
object_idx[1] = -1;
const auto height = browser_rows - 1;
const auto width = wid - (max + 3);
- auto &cc_config = flavor_baseitem.cc_config;
+ auto &symbol_config = flavor_baseitem.symbol_config;
(void)visual_mode_command(
- 'v', &visual_list, height, width, &attr_top, &char_left, &cc_config.color, &cc_config.character, need_redraw);
+ 'v', &visual_list, height, width, &attr_top, &char_left, &symbol_config.color, &symbol_config.character, need_redraw);
}
grp_idx[grp_cnt] = -1;
bool flag = false;
bool redraw = true;
int column = 0;
- const auto &cc_cb = ColoredCharsClipboard::get_instance();
+ const auto &symbols_cb = DisplaySymbolsClipboard::get_instance();
while (!flag) {
if (redraw) {
clear_from(0);
#ifdef JP
prt(format("<方向>%s%s%s, ESC", (!visual_list && !visual_only) ? ", 'r'で詳細を見る" : "", visual_list ? ", ENTERで決定" : ", 'v'でシンボル変更",
- (cc_cb.cc != ColoredChar()) ? ", 'c', 'p'でペースト" : ", 'c'でコピー"),
+ (symbols_cb.symbol != DisplaySymbol()) ? ", 'c', 'p'でペースト" : ", 'c'でコピー"),
hgt - 1, 0);
#else
prt(format("<dir>%s%s%s, ESC", (!visual_list && !visual_only) ? ", 'r' to recall" : "", visual_list ? ", ENTER to accept" : ", 'v' for visuals",
- (cc_cb.cc != ColoredChar()) ? ", 'c', 'p' to paste" : ", 'c' to copy"),
+ (symbols_cb.symbol != DisplaySymbol()) ? ", 'c', 'p' to paste" : ", 'c' to copy"),
hgt - 1, 0);
#endif
}
}
- auto &cc_config = flavor_baseitem.cc_config;
+ auto &symbol_config = flavor_baseitem.symbol_config;
if (visual_list) {
- place_visual_list_cursor(max + 3, 7, cc_config.color, cc_config.character, attr_top, char_left);
+ place_visual_list_cursor(max + 3, 7, symbol_config.color, symbol_config.character, attr_top, char_left);
} else if (!column) {
term_gotoxy(0, 6 + (grp_cur - grp_top));
} else {
const auto height = browser_rows - 1;
const auto width = wid - (max + 3);
if (visual_mode_command(
- ch, &visual_list, height, width, &attr_top, &char_left, &cc_config.color, &cc_config.character, need_redraw)) {
+ ch, &visual_list, height, width, &attr_top, &char_left, &symbol_config.color, &symbol_config.character, need_redraw)) {
if (direct_k_idx >= 0) {
switch (ch) {
case '\n':
continue;
}
} else {
- if (angband_strchr(group_char, monrace.cc_def.character) == nullptr) {
+ if (angband_strchr(group_char, monrace.symbol_def.character) == nullptr) {
continue;
}
}
}
#ifdef JP
- const auto number_of_kills = angband_strchr("pt", monrace.cc_def.character) ? "人" : "体";
+ const auto number_of_kills = angband_strchr("pt", monrace.symbol_def.character) ? "人" : "体";
fprintf(fff, " %3d %sの %s\n", this_monster, number_of_kills, monrace.name.data());
#else
if (this_monster < 2) {
const auto &monrace = monraces_info[monrace_id];
const auto color = ((i + mon_top == mon_cur) ? TERM_L_BLUE : TERM_WHITE);
c_prt(color, (monrace.name.data()), row + i, col);
- const auto &cc_config = monrace.cc_config;
+ const auto &symbol_config = monrace.symbol_config;
if (per_page == 1) {
- c_prt(color, format("%02x/%02x", cc_config.color, cc_config.character), row + i, (w_ptr->wizard || visual_only) ? 56 : 61);
+ c_prt(color, format("%02x/%02x", symbol_config.color, symbol_config.character), row + i, (w_ptr->wizard || visual_only) ? 56 : 61);
}
if (w_ptr->wizard || visual_only) {
}
term_erase(69, row + i);
- term_queue_bigchar(use_bigtile ? 69 : 70, row + i, { cc_config, {} });
+ term_queue_bigchar(use_bigtile ? 69 : 70, row + i, { symbol_config, {} });
if (!visual_only) {
if (monrace.kind_flags.has_not(MonsterKindType::UNIQUE)) {
put_str(format("%5d", monrace.r_pkills), row + i, 73);
} else {
r_idx_list.push_back(*direct_r_idx);
auto &monrace = monraces_info[*direct_r_idx];
- auto &cc_config = monrace.cc_config;
+ auto &symbol_config = monrace.symbol_config;
(void)visual_mode_command('v', &visual_list, browser_rows - 1, wid - (max + 3),
- &color_top, &character_left, &cc_config.color, &cc_config.character, need_redraw);
+ &color_top, &character_left, &symbol_config.color, &symbol_config.character, need_redraw);
}
grp_idx.push_back(-1); // Sentinel
int column = 0;
bool flag = false;
bool redraw = true;
- const auto &cc_cb = ColoredCharsClipboard::get_instance();
+ const auto &symbols_cb = DisplaySymbolsClipboard::get_instance();
while (!flag) {
if (redraw) {
clear_from(0);
prt(format(_("%lu 種", "%lu Races"), r_idx_list.size()), 3, 26);
prt(format(_("<方向>%s%s%s, ESC", "<dir>%s%s%s, ESC"), (!visual_list && !visual_only) ? _(", 'r'で思い出を見る", ", 'r' to recall") : "",
visual_list ? _(", ENTERで決定", ", ENTER to accept") : _(", 'v'でシンボル変更", ", 'v' for visuals"),
- (cc_cb.cc != ColoredChar()) ? _(", 'c', 'p'でペースト", ", 'c', 'p' to paste") : _(", 'c'でコピー", ", 'c' to copy")),
+ (symbols_cb.symbol != DisplaySymbol()) ? _(", 'c', 'p'でペースト", ", 'c', 'p' to paste") : _(", 'c'でコピー", ", 'c' to copy")),
hgt - 1, 0);
- ColoredChar cc_dummy;
- auto *cc_ptr = &cc_dummy;
+ DisplaySymbol symbol_dummy;
+ auto *symbol_ptr = &symbol_dummy;
if (!r_idx_list.empty()) {
auto &monrace = monraces_info[r_idx_list[mon_cur]];
- cc_ptr = &monrace.cc_config;
+ symbol_ptr = &monrace.symbol_config;
if (!visual_only) {
monster_race_track(player_ptr, r_idx_list[mon_cur]);
handle_stuff(player_ptr);
}
if (visual_list) {
- const auto &cc_config = monrace.cc_config;
- place_visual_list_cursor(max + 3, 7, cc_config.color, cc_config.character, color_top, character_left);
+ const auto &symbol_config = monrace.symbol_config;
+ place_visual_list_cursor(max + 3, 7, symbol_config.color, symbol_config.character, color_top, character_left);
} else if (!column) {
term_gotoxy(0, 6 + (grp_cur - grp_top));
} else {
}
char ch = inkey();
- if (visual_mode_command(ch, &visual_list, browser_rows - 1, wid - (max + 3), &color_top, &character_left, &cc_ptr->color, &cc_ptr->character, need_redraw)) {
+ if (visual_mode_command(ch, &visual_list, browser_rows - 1, wid - (max + 3), &color_top, &character_left, &symbol_ptr->color, &symbol_ptr->character, need_redraw)) {
if (direct_r_idx) {
switch (ch) {
case '\n':
if (str_find(temp2, monster_name))
#endif
monrace_ids.push_back(monrace_id);
- } else if (all || (monrace.cc_def.character == sym)) {
+ } else if (all || (monrace.symbol_def.character == sym)) {
monrace_ids.push_back(monrace_id);
}
}
return;
}
- if (ms_ptr->r_ptr->cc_def.character == 'B') {
+ if (ms_ptr->r_ptr->symbol_def.character == 'B') {
if ((player_ptr->pet_extra_flags & (PF_ATTACK_SPELL | PF_TELEPORT)) != (PF_ATTACK_SPELL | PF_TELEPORT)) {
ms_ptr->ability_flags.reset(MonsterAbilityType::SPECIAL);
}
ms_ptr->ability_flags.reset(MonsterAbilityType::BR_LITE);
}
- if (ms_ptr->ability_flags.has(MonsterAbilityType::SPECIAL) && (ms_ptr->m_ptr->r_idx != MonsterRaceId::ROLENTO) && (ms_ptr->r_ptr->cc_def.character != 'B')) {
+ if (ms_ptr->ability_flags.has(MonsterAbilityType::SPECIAL) && (ms_ptr->m_ptr->r_idx != MonsterRaceId::ROLENTO) && (ms_ptr->r_ptr->symbol_def.character != 'B')) {
ms_ptr->ability_flags.reset(MonsterAbilityType::SPECIAL);
}
}
else if (pa_ptr->ma_ptr->effect == MA_SLOW) {
- if (!(r_ptr->behavior_flags.has(MonsterBehaviorType::NEVER_MOVE) || angband_strchr("~#{}.UjmeEv$,DdsbBFIJQSXclnw!=?", r_ptr->cc_def.character))) {
+ if (!(r_ptr->behavior_flags.has(MonsterBehaviorType::NEVER_MOVE) || angband_strchr("~#{}.UjmeEv$,DdsbBFIJQSXclnw!=?", r_ptr->symbol_def.character))) {
msg_format(_("%sの足首に関節蹴りをくらわした!", "You kick %s in the ankle."), pa_ptr->m_name);
special_effect = MA_SLOW;
} else {
drop_numbers = 0;
}
- if (!drop_item && (md_ptr->r_ptr->cc_def.character != '$')) {
+ if (!drop_item && (md_ptr->r_ptr->symbol_def.character != '$')) {
drop_numbers = 0;
}
return false;
}
- if (z_ptr->cc_def.character != r_ptr->cc_def.character) {
+ if (z_ptr->symbol_def.character != r_ptr->symbol_def.character) {
return false;
}
auto try_become_jural = one_in_(5) || !floor.is_in_underground();
try_become_jural &= monraces_info[r_idx].kind_flags.has_not(MonsterKindType::UNIQUE);
- try_become_jural &= angband_strchr("hkoptuyAHLOPTUVY", monraces_info[r_idx].cc_def.character) != nullptr;
+ try_become_jural &= angband_strchr("hkoptuyAHLOPTUVY", monraces_info[r_idx].symbol_def.character) != nullptr;
if (try_become_jural) {
mode |= PM_JURAL;
}
}
const auto &monrace = monentity.mflag2.has(MonsterConstantFlagType::CHAMELEON) ? monentity.get_monrace() : monraces_info[*r_idx];
- msg_format(_("モンスターの大群(%c)", "Monster horde (%c)."), monrace.cc_def.character);
+ msg_format(_("モンスターの大群(%c)", "Monster horde (%c)."), monrace.symbol_def.character);
return true;
}
return;
}
- switch (md_ptr->r_ptr->cc_def.character) {
+ switch (md_ptr->r_ptr->symbol_def.character) {
case '(':
if (player_ptr->current_floor_ptr->dun_level <= 0) {
return;
get_mon_num_prep(player_ptr, vault_aux_simple, nullptr);
MonsterRaceId r_idx = get_mon_num(player_ptr, 0, player_ptr->current_floor_ptr->dun_level + 10, PM_NONE);
get_mon_num_prep(player_ptr, nullptr, nullptr);
- vault_aux_char = monraces_info[r_idx].cc_def.character;
+ vault_aux_char = monraces_info[r_idx].symbol_def.character;
}
/*!
return false;
}
- if (!angband_strchr("ijm,", monrace.cc_def.character)) {
+ if (!angband_strchr("ijm,", monrace.symbol_def.character)) {
return false;
}
return false;
}
- if (monrace.cc_def.character == 'A') {
+ if (monrace.symbol_def.character == 'A') {
return true;
}
return false;
}
- if (!angband_strchr("CZ", r_ptr->cc_def.character)) {
+ if (!angband_strchr("CZ", r_ptr->symbol_def.character)) {
return false;
}
return false;
}
- if (!angband_strchr("!$&(/=?[\\|][`~>+", r_ptr->cc_def.character)) {
+ if (!angband_strchr("!$&(/=?[\\|][`~>+", r_ptr->symbol_def.character)) {
return false;
}
return false;
}
- if (monrace.cc_def.character != vault_aux_char) {
+ if (monrace.symbol_def.character != vault_aux_char) {
return false;
}
return false;
}
- if (monrace.cc_def.character != vault_aux_char) {
+ if (monrace.symbol_def.character != vault_aux_char) {
return false;
}
return false;
}
- if (angband_strchr("pht", monrace.cc_def.character)) {
+ if (angband_strchr("pht", monrace.symbol_def.character)) {
return true;
}
const auto &monrace = monraces_info[r_idx];
auto can_fish = monrace.feature_flags.has(MonsterFeatureType::AQUATIC);
can_fish &= monrace.kind_flags.has_not(MonsterKindType::UNIQUE);
- can_fish &= angband_strchr("Jjlw", monrace.cc_def.character) != nullptr;
+ can_fish &= angband_strchr("Jjlw", monrace.symbol_def.character) != nullptr;
return can_fish;
}
};
auto result = std::all_of(is_possible.begin(), is_possible.end(), [](const auto &v) { return v; });
- result &= std::all_of(d_ptr->r_chars.begin(), d_ptr->r_chars.end(), [r_ptr](const auto &v) { return v == r_ptr->cc_def.character; });
+ result &= std::all_of(d_ptr->r_chars.begin(), d_ptr->r_chars.end(), [r_ptr](const auto &v) { return v == r_ptr->symbol_def.character; });
return d_ptr->mode == DUNGEON_MODE_AND ? result : !result;
}
};
auto result = std::any_of(is_possible.begin(), is_possible.end(), [](const auto &v) { return v; });
- result |= std::any_of(d_ptr->r_chars.begin(), d_ptr->r_chars.end(), [r_ptr](const auto &v) { return v == r_ptr->cc_def.character; });
+ result |= std::any_of(d_ptr->r_chars.begin(), d_ptr->r_chars.end(), [r_ptr](const auto &v) { return v == r_ptr->symbol_def.character; });
return d_ptr->mode == DUNGEON_MODE_OR ? result : !result;
}
case MonsterRaceId::ROLENTO:
return spell_RF6_SPECIAL_ROLENTO(player_ptr, y, x, m_idx, t_idx, target_type);
default:
- if (monrace.cc_def.character == 'B') {
+ if (monrace.symbol_def.character == 'B') {
return spell_RF6_SPECIAL_B(player_ptr, y, x, m_idx, t_idx, target_type);
}
const auto &monrace = monraces_info[r_idx];
switch (type) {
case SUMMON_ANT:
- return monrace.cc_def.character == 'a';
+ return monrace.symbol_def.character == 'a';
case SUMMON_SPIDER:
- return monrace.cc_def.character == 'S';
+ return monrace.symbol_def.character == 'S';
case SUMMON_HOUND:
- return (monrace.cc_def.character == 'C') || (monrace.cc_def.character == 'Z');
+ return (monrace.symbol_def.character == 'C') || (monrace.symbol_def.character == 'Z');
case SUMMON_HYDRA:
- return monrace.cc_def.character == 'M';
+ return monrace.symbol_def.character == 'M';
case SUMMON_ANGEL:
- return (monrace.cc_def.character == 'A') && ((monrace.kind_flags.has(MonsterKindType::EVIL)) || (monrace.kind_flags.has(MonsterKindType::GOOD)));
+ return (monrace.symbol_def.character == 'A') && ((monrace.kind_flags.has(MonsterKindType::EVIL)) || (monrace.kind_flags.has(MonsterKindType::GOOD)));
case SUMMON_DEMON:
return monrace.kind_flags.has(MonsterKindType::DEMON);
case SUMMON_UNDEAD:
case SUMMON_DRAGON:
return monrace.kind_flags.has(MonsterKindType::DRAGON);
case SUMMON_HI_UNDEAD:
- return (monrace.cc_def.character == 'L') || (monrace.cc_def.character == 'V') || (monrace.cc_def.character == 'W');
+ return (monrace.symbol_def.character == 'L') || (monrace.symbol_def.character == 'V') || (monrace.symbol_def.character == 'W');
case SUMMON_HI_DRAGON:
- return monrace.cc_def.character == 'D';
+ return monrace.symbol_def.character == 'D';
case SUMMON_HI_DEMON:
- return ((monrace.cc_def.character == 'U') || (monrace.cc_def.character == 'H') || (monrace.cc_def.character == 'B')) && (monrace.kind_flags.has(MonsterKindType::DEMON));
+ return ((monrace.symbol_def.character == 'U') || (monrace.symbol_def.character == 'H') || (monrace.symbol_def.character == 'B')) && (monrace.kind_flags.has(MonsterKindType::DEMON));
case SUMMON_AMBERITES:
return monrace.kind_flags.has(MonsterKindType::AMBERITE);
case SUMMON_UNIQUE:
return monrace.kind_flags.has(MonsterKindType::UNIQUE);
case SUMMON_MOLD:
- return monrace.cc_def.character == 'm';
+ return monrace.symbol_def.character == 'm';
case SUMMON_BAT:
- return monrace.cc_def.character == 'b';
+ return monrace.symbol_def.character == 'b';
case SUMMON_QUYLTHULG:
- return monrace.cc_def.character == 'Q';
+ return monrace.symbol_def.character == 'Q';
case SUMMON_COIN_MIMIC:
- return monrace.cc_def.character == '$';
+ return monrace.symbol_def.character == '$';
case SUMMON_MIMIC:
- return (monrace.cc_def.character == '!') || (monrace.cc_def.character == '?') || (monrace.cc_def.character == '=') || (monrace.cc_def.character == '$') || (monrace.cc_def.character == '|');
+ return (monrace.symbol_def.character == '!') || (monrace.symbol_def.character == '?') || (monrace.symbol_def.character == '=') || (monrace.symbol_def.character == '$') || (monrace.symbol_def.character == '|');
case SUMMON_GOLEM:
- return (monrace.cc_def.character == 'g');
+ return (monrace.symbol_def.character == 'g');
case SUMMON_CYBER:
- return (monrace.cc_def.character == 'U') && monrace.ability_flags.has(MonsterAbilityType::ROCKET);
+ return (monrace.symbol_def.character == 'U') && monrace.ability_flags.has(MonsterAbilityType::ROCKET);
case SUMMON_KIN: {
- auto summon_kin_type = MonsterRace(summoner_idx).is_valid() ? monraces_info[summoner_idx].cc_def.character : PlayerRace(player_ptr).get_summon_symbol();
- return (monrace.cc_def.character == summon_kin_type) && (r_idx != MonsterRaceId::HAGURE);
+ auto summon_kin_type = MonsterRace(summoner_idx).is_valid() ? monraces_info[summoner_idx].symbol_def.character : PlayerRace(player_ptr).get_summon_symbol();
+ return (monrace.symbol_def.character == summon_kin_type) && (r_idx != MonsterRaceId::HAGURE);
}
case SUMMON_DAWN:
return r_idx == MonsterRaceId::DAWN;
return monrace.kind_flags.has(MonsterKindType::ANIMAL);
case SUMMON_ANIMAL_RANGER: {
auto is_match = monrace.kind_flags.has(MonsterKindType::ANIMAL);
- is_match &= angband_strchr("abcflqrwBCHIJKMRS", monrace.cc_def.character) != nullptr;
+ is_match &= angband_strchr("abcflqrwBCHIJKMRS", monrace.symbol_def.character) != nullptr;
is_match &= monrace.kind_flags.has_not(MonsterKindType::DRAGON);
is_match &= monrace.kind_flags.has_not(MonsterKindType::EVIL);
is_match &= monrace.kind_flags.has_not(MonsterKindType::UNDEAD);
case SUMMON_SMALL_MOAI:
return r_idx == MonsterRaceId::SMALL_MOAI;
case SUMMON_PYRAMID:
- return one_in_(16) ? monrace.cc_def.character == 'z' : r_idx == MonsterRaceId::SCARAB;
+ return one_in_(16) ? monrace.symbol_def.character == 'z' : r_idx == MonsterRaceId::SCARAB;
case SUMMON_PHANTOM:
return (r_idx == MonsterRaceId::PHANTOM_B) || (r_idx == MonsterRaceId::PHANTOM_W);
case SUMMON_BLUE_HORROR:
case SUMMON_LIVING:
return monrace.has_living_flag();
case SUMMON_HI_DRAGON_LIVING:
- return (monrace.cc_def.character == 'D') && monrace.has_living_flag();
+ return (monrace.symbol_def.character == 'D') && monrace.has_living_flag();
case SUMMON_ELEMENTAL:
- return monrace.cc_def.character == 'E';
+ return monrace.symbol_def.character == 'E';
case SUMMON_VORTEX:
- return monrace.cc_def.character == 'v';
+ return monrace.symbol_def.character == 'v';
case SUMMON_HYBRID:
- return monrace.cc_def.character == 'H';
+ return monrace.symbol_def.character == 'H';
case SUMMON_BIRD:
- return monrace.cc_def.character == 'B';
+ return monrace.symbol_def.character == 'B';
case SUMMON_KAMIKAZE:
return monrace.is_explodable();
case SUMMON_KAMIKAZE_LIVING: {
return is_match;
}
case SUMMON_EAGLES: {
- auto is_match = monrace.cc_def.character == 'B';
+ auto is_match = monrace.symbol_def.character == 'B';
is_match &= monrace.wilderness_flags.has(MonsterWildernessType::WILD_MOUNTAIN);
is_match &= monrace.wilderness_flags.has(MonsterWildernessType::WILD_ONLY);
return is_match;
case SUMMON_PIRANHAS:
return r_idx == MonsterRaceId::PIRANHA;
case SUMMON_ARMAGE_GOOD:
- return (monrace.cc_def.character == 'A') && (monrace.kind_flags.has(MonsterKindType::GOOD));
+ return (monrace.symbol_def.character == 'A') && (monrace.kind_flags.has(MonsterKindType::GOOD));
case SUMMON_ARMAGE_EVIL:
- return (monrace.kind_flags.has(MonsterKindType::DEMON)) || ((monrace.cc_def.character == 'A') && (monrace.kind_flags.has(MonsterKindType::EVIL)));
+ return (monrace.kind_flags.has(MonsterKindType::DEMON)) || ((monrace.symbol_def.character == 'A') && (monrace.kind_flags.has(MonsterKindType::EVIL)));
case SUMMON_APOCRYPHA_FOLLOWERS:
return (r_idx == MonsterRaceId::FOLLOWER_WARRIOR) || (r_idx == MonsterRaceId::FOLLOWER_MAGE);
case SUMMON_APOCRYPHA_DRAGONS:
- return (monrace.cc_def.character == 'D') && (monrace.level >= 60) && (r_idx != MonsterRaceId::WYRM_COLOURS) && (r_idx != MonsterRaceId::ALDUIN);
+ return (monrace.symbol_def.character == 'D') && (monrace.level >= 60) && (r_idx != MonsterRaceId::WYRM_COLOURS) && (r_idx != MonsterRaceId::ALDUIN);
case SUMMON_VESPOID:
return r_idx == MonsterRaceId::VESPOID;
case SUMMON_ANTI_TIGERS: {
- auto is_match = one_in_(32) ? (monrace.cc_def.character == 'P') : false;
- is_match |= one_in_(48) ? (monrace.cc_def.character == 'd') : false;
- is_match |= one_in_(16) ? (monrace.cc_def.character == 'l') : false;
+ auto is_match = one_in_(32) ? (monrace.symbol_def.character == 'P') : false;
+ is_match |= one_in_(48) ? (monrace.symbol_def.character == 'd') : false;
+ is_match |= one_in_(16) ? (monrace.symbol_def.character == 'l') : false;
is_match |= (r_idx == MonsterRaceId::STAR_VAMPIRE) || (r_idx == MonsterRaceId::SWALLOW) || (r_idx == MonsterRaceId::HAWK);
is_match |= (r_idx == MonsterRaceId::LION) || (r_idx == MonsterRaceId::BUFFALO) || (r_idx == MonsterRaceId::FIGHTER) || (r_idx == MonsterRaceId::GOLDEN_EAGLE);
is_match |= (r_idx == MonsterRaceId::SHALLOW_PUDDLE) || (r_idx == MonsterRaceId::DEEP_PUDDLE) || (r_idx == MonsterRaceId::SKY_WHALE);
}
} else if (food_type == PlayerRaceFoodType::CORPSE) {
auto corpse_r_idx = i2enum<MonsterRaceId>(o_ptr->pval);
- if (o_ptr->is_corpse() && angband_strchr("pht", monraces_info[corpse_r_idx].cc_def.character)) {
+ if (o_ptr->is_corpse() && angband_strchr("pht", monraces_info[corpse_r_idx].symbol_def.character)) {
return true;
}
}
const auto &monrace = monraces_info[statue_r_idx];
int namelen = strlen(monrace.name.data());
prt(format("%s: '", monrace.name.data()), 1, 15);
- term_queue_bigchar(18 + namelen, 1, { monrace.cc_config, {} });
+ term_queue_bigchar(18 + namelen, 1, { monrace.symbol_config, {} });
prt("'", 1, (use_bigtile ? 20 : 19) + namelen);
} else {
prt(_(" アイテムの能力:", " Item Attributes:"), 1, 15);
player_attack_type tmp_attack(*player_ptr->current_floor_ptr, y, x, hand, mode, fear, mdeath);
auto pa_ptr = &tmp_attack;
- const auto is_human = (pa_ptr->r_ptr->cc_def.character == 'p');
+ const auto is_human = (pa_ptr->r_ptr->symbol_def.character == 'p');
const auto is_lowlevel = (pa_ptr->r_ptr->level < (player_ptr->lev - 15));
attack_classify(player_ptr, pa_ptr);
int chance = calc_attack_quality(player_ptr, pa_ptr);
auto *o_ptr = &player_ptr->inventory_list[enum2i(INVEN_MAIN_HAND) + pa_ptr->hand];
- const auto is_zantetsu_nullified = (o_ptr->is_specific_artifact(FixedArtifactId::ZANTETSU) && (pa_ptr->r_ptr->cc_def.character == 'j'));
- const auto is_ej_nullified = (o_ptr->is_specific_artifact(FixedArtifactId::EXCALIBUR_J) && (pa_ptr->r_ptr->cc_def.character == 'S'));
+ const auto is_zantetsu_nullified = (o_ptr->is_specific_artifact(FixedArtifactId::ZANTETSU) && (pa_ptr->r_ptr->symbol_def.character == 'j'));
+ const auto is_ej_nullified = (o_ptr->is_specific_artifact(FixedArtifactId::EXCALIBUR_J) && (pa_ptr->r_ptr->symbol_def.character == 'S'));
calc_num_blow(player_ptr, pa_ptr);
/* Attack once for each legal blow */
continue;
}
- if (angband_strchr(Match, monrace.cc_def.character)) {
+ if (angband_strchr(Match, monrace.symbol_def.character)) {
if (player_ptr->monster_race_idx == m_ptr->r_idx) {
rfu.set_flag(SubWindowRedrawingFlag::MONSTER_LORE);
}
for (short i = 1; i < floor.m_max; i++) {
const auto &monster = floor.m_list[i];
const auto &monrace = monster.get_monrace();
- if (!monster.is_valid() || (monrace.cc_def.character != symbol)) {
+ if (!monster.is_valid() || (monrace.symbol_def.character != symbol)) {
continue;
}
if (monrace.kind_flags.has_not(MonsterKindType::EVIL)) {
auto can_sell = monrace.kind_flags.has(MonsterKindType::GOOD);
can_sell |= monrace.kind_flags.has(MonsterKindType::ANIMAL);
- can_sell |= angband_strchr("?!", monrace.cc_def.character) != nullptr;
+ can_sell |= angband_strchr("?!", monrace.symbol_def.character) != nullptr;
if (can_sell) {
return true;
}
BaseitemInfo::BaseitemInfo()
: bi_key(ItemKindType::NONE)
- , cc_def(ColoredChar(0, '\0'))
- , cc_config(ColoredChar(0, '\0'))
+ , symbol_def(DisplaySymbol(0, '\0'))
+ , symbol_config(DisplaySymbol(0, '\0'))
{
}
void BaseitemList::reset_all_visuals()
{
for (auto &baseitem : this->baseitems) {
- baseitem.cc_config = baseitem.cc_def;
+ baseitem.symbol_config = baseitem.symbol_def;
}
}
};
std::array<alloc_table, 4> alloc_tables{}; /*!< ベースアイテムの生成テーブル */
- ColoredChar cc_def; //!< 定義上のシンボル (色/文字).
+ DisplaySymbol symbol_def; //!< 定義上のシンボル (色/文字).
bool easy_know{}; /*!< ベースアイテムが初期からベース名を判断可能かどうか / This object is always known (if aware) */
RandomArtActType act_idx{}; /*!< 発動能力のID / Activative ability index */
/* @todo ここから下はBaseitemDefinitions.txt に依存しないミュータブルなフィールド群なので、将来的に分離予定 */
- ColoredChar cc_config; //!< ユーザ個別の設定シンボル (色/文字).
+ DisplaySymbol symbol_config; //!< ユーザ個別の設定シンボル (色/文字).
IDX flavor{}; /*!< 未鑑定名の何番目を当てるか(0は未鑑定名なし) / Special object flavor (or zero) */
bool aware{}; /*!< ベースアイテムが鑑定済かどうか / The player is "aware" of the item's effects */
*/
bool Grid::is_symbol(const int ch) const
{
- return this->get_terrain().cc_configs.at(F_LIT_STANDARD).character == ch;
+ return this->get_terrain().symbol_configs.at(F_LIT_STANDARD).character == ch;
}
void Grid::reset_costs()
return false;
}
- return angband_strchr("pht", monraces_info[i2enum<MonsterRaceId>(this->pval)].cc_def.character) != nullptr;
+ return angband_strchr("pht", monraces_info[i2enum<MonsterRaceId>(this->pval)].symbol_def.character) != nullptr;
}
/*!
const auto &baseitem = this->get_baseitem();
const auto flavor = baseitem.flavor;
if (flavor != 0) {
- return BaseitemList::get_instance().get_baseitem(flavor).cc_config.color;
+ return BaseitemList::get_instance().get_baseitem(flavor).symbol_config.color;
}
- const auto &cc_config = baseitem.cc_config;
+ const auto &symbol_config = baseitem.symbol_config;
auto has_attr = this->is_valid();
has_attr &= this->is_corpse();
- has_attr &= cc_config.color == TERM_DARK;
+ has_attr &= symbol_config.color == TERM_DARK;
if (!has_attr) {
- return cc_config.color;
+ return symbol_config.color;
}
- return monraces_info[i2enum<MonsterRaceId>(this->pval)].cc_config.color;
+ return monraces_info[i2enum<MonsterRaceId>(this->pval)].symbol_config.color;
}
/*
{
const auto &baseitem = this->get_baseitem();
const auto flavor = baseitem.flavor;
- return flavor ? BaseitemList::get_instance().get_baseitem(flavor).cc_config.character : baseitem.cc_config.character;
+ return flavor ? BaseitemList::get_instance().get_baseitem(flavor).symbol_config.character : baseitem.symbol_config.character;
}
/*!
const auto &monrace = this->get_appearance_monrace();
const auto mimic_symbols = "/|\\()[]=$,.!?&`#%<>+~";
- if (angband_strchr(mimic_symbols, monrace.cc_def.character) == nullptr) {
+ if (angband_strchr(mimic_symbols, monrace.symbol_def.character) == nullptr) {
return false;
}
std::optional<std::string> MonsterEntity::get_pain_message(std::string_view monster_name, int damage) const
{
auto &monrace = this->get_monrace();
- return MonsterPainDescriber(monrace.idx, monrace.cc_def.character, monster_name).describe(this->hp, damage, this->ml);
+ return MonsterPainDescriber(monrace.idx, monrace.symbol_def.character, monster_name).describe(this->hp, damage, this->ml);
}
/*!
void MonraceList::reset_all_visuals()
{
for (auto &[_, monrace] : monraces_info) {
- monrace.cc_config = monrace.cc_def;
+ monrace.symbol_config = monrace.symbol_def;
}
}
EXP next_exp{}; //!< 進化に必要な経験値
DEPTH level{}; //!< レベル / Level of creature
RARITY rarity{}; //!< レアリティ / Rarity of creature
- ColoredChar cc_def{}; //!< 定義上のシンボル (色/文字).
- ColoredChar cc_config{}; //!< 設定したシンボル (色/文字).
+ DisplaySymbol symbol_def{}; //!< 定義上のシンボル (色/文字).
+ DisplaySymbol symbol_config{}; //!< 設定したシンボル (色/文字).
MONSTER_NUMBER max_num{}; //!< 階に最大存在できる数 / Maximum population allowed per level
MONSTER_NUMBER cur_num{}; //!< 階に現在いる数 / Monster population on current level
FLOOR_IDX floor_id{}; //!< 存在している保存階ID / Location of unique monster
#include "grid/lighting-colors-table.h"
TerrainType::TerrainType()
- : cc_defs(DEFAULT_CC_MAP)
- , cc_configs(DEFAULT_CC_MAP)
+ : symbol_defs(DEFAULT_SYMBOLS)
+ , symbol_configs(DEFAULT_SYMBOLS)
{
}
*/
void TerrainType::reset_lighting(bool is_config)
{
- auto &cc_map = is_config ? this->cc_configs : this->cc_defs;
- if (is_ascii_graphics(cc_map[F_LIT_STANDARD].color)) {
- this->reset_lighting_ascii(cc_map);
+ auto &symbols = is_config ? this->symbol_configs : this->symbol_defs;
+ if (is_ascii_graphics(symbols[F_LIT_STANDARD].color)) {
+ this->reset_lighting_ascii(symbols);
return;
}
- this->reset_lighting_graphics(cc_map);
+ this->reset_lighting_graphics(symbols);
}
-void TerrainType::reset_lighting_ascii(std::map<int, ColoredChar> &cc_map)
+void TerrainType::reset_lighting_ascii(std::map<int, DisplaySymbol> &symbols)
{
- const auto color_standard = cc_map[F_LIT_STANDARD].color;
- const auto character_standard = cc_map[F_LIT_STANDARD].character;
- cc_map[F_LIT_LITE].color = lighting_colours[color_standard & 0x0f][0];
- cc_map[F_LIT_DARK].color = lighting_colours[color_standard & 0x0f][1];
+ const auto color_standard = symbols[F_LIT_STANDARD].color;
+ const auto character_standard = symbols[F_LIT_STANDARD].character;
+ symbols[F_LIT_LITE].color = lighting_colours[color_standard & 0x0f][0];
+ symbols[F_LIT_DARK].color = lighting_colours[color_standard & 0x0f][1];
for (int i = F_LIT_NS_BEGIN; i < F_LIT_MAX; i++) {
- cc_map[i].character = character_standard;
+ symbols[i].character = character_standard;
}
}
-void TerrainType::reset_lighting_graphics(std::map<int, ColoredChar> &cc_map)
+void TerrainType::reset_lighting_graphics(std::map<int, DisplaySymbol> &symbols)
{
- const auto color_standard = cc_map[F_LIT_STANDARD].color;
- const auto character_standard = cc_map[F_LIT_STANDARD].character;
+ const auto color_standard = symbols[F_LIT_STANDARD].color;
+ const auto character_standard = symbols[F_LIT_STANDARD].character;
for (auto i = F_LIT_NS_BEGIN; i < F_LIT_MAX; i++) {
- cc_map[i].color = color_standard;
+ symbols[i].color = color_standard;
}
- cc_map[F_LIT_LITE].character = character_standard + 2;
- cc_map[F_LIT_DARK].character = character_standard + 1;
+ symbols[F_LIT_LITE].character = character_standard + 2;
+ symbols[F_LIT_DARK].character = character_standard + 1;
}
TerrainList TerrainList::instance{};
constexpr auto F_LIT_MAX = 3;
constexpr auto F_LIT_NS_BEGIN = 1; /* Nonstandard */
-const std::map<int, ColoredChar> DEFAULT_CC_MAP = { { F_LIT_STANDARD, {} }, { F_LIT_LITE, {} }, { F_LIT_DARK, {} } };
+const std::map<int, DisplaySymbol> DEFAULT_SYMBOLS = { { F_LIT_STANDARD, {} }, { F_LIT_LITE, {} }, { F_LIT_DARK, {} } };
/*!
* @brief 地形状態変化指定構造体
TerrainState state[MAX_FEAT_STATES]{}; /*!< TerrainState テーブル */
FEAT_SUBTYPE subtype{}; /*!< 副特性値 */
FEAT_POWER power{}; /*!< 地形強度 */
- std::map<int, ColoredChar> cc_defs; //!< デフォルトの地形シンボル (色/文字).
- std::map<int, ColoredChar> cc_configs; //!< 設定変更後の地形シンボル (色/文字).
+ std::map<int, DisplaySymbol> symbol_defs; //!< デフォルトの地形シンボル (色/文字).
+ std::map<int, DisplaySymbol> symbol_configs; //!< 設定変更後の地形シンボル (色/文字).
bool is_permanent_wall() const;
void reset_lighting(bool is_config = true);
private:
- void reset_lighting_ascii(std::map<int, ColoredChar> &cc_map);
- void reset_lighting_graphics(std::map<int, ColoredChar> &cc_map);
+ void reset_lighting_ascii(std::map<int, DisplaySymbol> &symbols);
+ void reset_lighting_graphics(std::map<int, DisplaySymbol> &symbols);
};
class TerrainList {
* Mentally draw an attr/char at a given location
* Assumes given location and values are valid.
*/
-static void term_queue_char_aux(TERM_LEN x, TERM_LEN y, const ColoredCharPair &ccp)
+static void term_queue_char_aux(TERM_LEN x, TERM_LEN y, const DisplaySymbolPair &symbol_pair)
{
if ((x < 0) || (x >= game_term->wid)) {
return;
TERM_COLOR *scr_taa = &scrn->ta[y][x];
char *scr_tcc = &scrn->tc[y][x];
- const auto &cc_foreground = ccp.cc_foreground;
- const auto &cc_background = ccp.cc_background;
- auto should_ignore = *scr_aa == cc_foreground.color;
- should_ignore &= *scr_cc == cc_foreground.character;
- should_ignore &= *scr_taa == cc_background.color;
- should_ignore &= *scr_tcc == cc_background.character;
+ const auto &symbol_foreground = symbol_pair.symbol_foreground;
+ const auto &symbol_background = symbol_pair.symbol_background;
+ auto should_ignore = *scr_aa == symbol_foreground.color;
+ should_ignore &= *scr_cc == symbol_foreground.character;
+ should_ignore &= *scr_taa == symbol_background.color;
+ should_ignore &= *scr_tcc == symbol_background.character;
if (should_ignore) {
return;
}
/* Save the "literal" information */
- *scr_aa = cc_foreground.color;
- *scr_cc = cc_foreground.character;
+ *scr_aa = symbol_foreground.color;
+ *scr_cc = symbol_foreground.character;
- *scr_taa = cc_background.color;
- *scr_tcc = cc_background.character;
+ *scr_taa = symbol_background.color;
+ *scr_tcc = symbol_background.character;
/* Check for new min/max row info */
if (y < game_term->y1) {
}
}
-void term_queue_char(TERM_LEN x, TERM_LEN y, const ColoredCharPair &ccp)
+void term_queue_char(TERM_LEN x, TERM_LEN y, const DisplaySymbolPair &symbol_pair)
{
- term_queue_char_aux(x + game_term->offset_x, y + game_term->offset_y, ccp);
+ term_queue_char_aux(x + game_term->offset_x, y + game_term->offset_y, symbol_pair);
}
/*
* Otherwise, mentally draw a pair of attr/char at a given location.
* Assumes given location and values are valid.
*/
-void term_queue_bigchar(TERM_LEN x, TERM_LEN y, const ColoredCharPair &ccp_initial)
+void term_queue_bigchar(TERM_LEN x, TERM_LEN y, const DisplaySymbolPair &symbol_pair_initial)
{
#ifdef JP
/*
/* If non bigtile mode, call orginal function */
if (!use_bigtile) {
- term_queue_char_aux(ch_x, ch_y, ccp_initial);
+ term_queue_char_aux(ch_x, ch_y, symbol_pair_initial);
return;
}
/* A tile becomes a Bigtile */
- ColoredCharPair ccp = ccp_initial;
+ DisplaySymbolPair symbol_pair = symbol_pair_initial;
uint8_t color;
char character;
- if ((ccp_initial.cc_foreground.color & AF_TILE1) && (ccp_initial.cc_foreground.character & 0x80)) {
+ if ((symbol_pair_initial.symbol_foreground.color & AF_TILE1) && (symbol_pair_initial.symbol_foreground.character & 0x80)) {
/* Mark it as a Bigtile */
color = AF_BIGTILE2;
character = -1;
/* Ignore non-tile background */
- if (!((ccp_initial.cc_background.color & AF_TILE1) && (ccp_initial.cc_background.character & 0x80))) {
- ccp.cc_background = {};
+ if (!((symbol_pair_initial.symbol_background.color & AF_TILE1) && (symbol_pair_initial.symbol_background.character & 0x80))) {
+ symbol_pair.symbol_background = {};
}
}
* Use a multibyte character instead of a dirty pair of ASCII
* characters.
*/
- else if (' ' <= ccp_initial.cc_foreground.character) /* isprint(c) */
+ else if (' ' <= symbol_pair_initial.symbol_foreground.character) /* isprint(c) */
{
- character = ascii_to_zenkaku[2 * (ccp_initial.cc_foreground.character - ' ') + 1];
- ccp.cc_foreground.character = ascii_to_zenkaku[2 * (ccp_initial.cc_foreground.character - ' ')];
+ character = ascii_to_zenkaku[2 * (symbol_pair_initial.symbol_foreground.character - ' ') + 1];
+ symbol_pair.symbol_foreground.character = ascii_to_zenkaku[2 * (symbol_pair_initial.symbol_foreground.character - ' ')];
/* Mark it as a Kanji */
- color = ccp_initial.cc_foreground.color | AF_KANJI2;
- ccp.cc_foreground.color |= AF_KANJI1;
+ color = symbol_pair_initial.symbol_foreground.color | AF_KANJI2;
+ symbol_pair.symbol_foreground.color |= AF_KANJI1;
}
#endif
}
/* Display pair of attr/char */
- term_queue_char_aux(ch_x, ch_y, ccp);
+ term_queue_char_aux(ch_x, ch_y, symbol_pair);
term_queue_char_aux(ch_x + 1, ch_y, { { color, character }, {} });
}
* Otherwise, queue a pair of attr/char for display at the current
* cursor location, and advance the cursor to the right by two.
*/
-void term_add_bigch(const ColoredChar &cc)
+void term_add_bigch(const DisplaySymbol &symbol)
{
if (!use_bigtile) {
- (void)term_addch(cc.color, cc.character);
+ (void)term_addch(symbol.color, symbol.character);
return;
}
}
/* Paranoia -- no illegal chars */
- if (!cc.has_character()) {
+ if (!symbol.has_character()) {
return;
}
/* Queue the given character for display */
- term_queue_bigchar(game_term->scr->cx, game_term->scr->cy, { cc, {} });
+ term_queue_bigchar(game_term->scr->cx, game_term->scr->cy, { symbol, {} });
/* Advance the cursor */
game_term->scr->cx += 2;
/**** Available Variables ****/
extern term_type *game_term;
-class ColoredChar;
-class ColoredCharPair;
+class DisplaySymbol;
+class DisplaySymbolPair;
errr term_user(int n);
errr term_xtra(int n, int v);
-void term_queue_char(TERM_LEN x, TERM_LEN y, const ColoredCharPair &ccp);
-void term_queue_bigchar(TERM_LEN x, TERM_LEN y, const ColoredCharPair &ccp);
+void term_queue_char(TERM_LEN x, TERM_LEN y, const DisplaySymbolPair &symbol_pair);
+void term_queue_bigchar(TERM_LEN x, TERM_LEN y, const DisplaySymbolPair &symbol_pair);
void term_queue_line(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR *a, char *c, TERM_COLOR *ta, char *tc);
errr term_fresh();
errr term_gotoxy(TERM_LEN x, TERM_LEN y);
errr term_draw(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c);
errr term_addch(TERM_COLOR a, char c);
-void term_add_bigch(const ColoredChar &cc);
+void term_add_bigch(const DisplaySymbol &symbol);
errr term_addstr(int n, TERM_COLOR a, std::string_view sv);
errr term_putch(TERM_LEN x, TERM_LEN y, TERM_COLOR a, char c);
errr term_putstr(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, std::string_view sv);
#include <cstdint>
-class ColoredChar {
+class DisplaySymbol {
public:
- constexpr ColoredChar()
- : ColoredChar(0, '\0')
+ constexpr DisplaySymbol()
+ : DisplaySymbol(0, '\0')
{
}
- constexpr ColoredChar(uint8_t color, char character)
+ constexpr DisplaySymbol(uint8_t color, char character)
: color(color)
, character(character)
{
}
- bool operator==(const ColoredChar &other) const
+ bool operator==(const DisplaySymbol &other) const
{
return (this->color == other.color) && (this->character == other.character);
}
- bool operator!=(const ColoredChar &other) const
+ bool operator!=(const DisplaySymbol &other) const
{
return !(*this == other);
}
}
};
-class ColoredCharPair {
+class DisplaySymbolPair {
public:
- constexpr ColoredCharPair(const ColoredChar &cc_foreground, const ColoredChar &cc_background)
- : cc_foreground(cc_foreground)
- , cc_background(cc_background)
+ constexpr DisplaySymbolPair(const DisplaySymbol &symbol_foreground, const DisplaySymbol &symbol_background)
+ : symbol_foreground(symbol_foreground)
+ , symbol_background(symbol_background)
{
}
- ColoredChar cc_foreground;
- ColoredChar cc_background;
+ DisplaySymbol symbol_foreground;
+ DisplaySymbol symbol_background;
};
term_addstr(-1, TERM_WHITE, monrace.name);
term_addstr(-1, TERM_WHITE, " ('");
- term_add_bigch(monrace.cc_def);
+ term_add_bigch(monrace.symbol_def);
term_addstr(-1, TERM_WHITE, "')");
term_addstr(-1, TERM_WHITE, "/('");
- term_add_bigch(monrace.cc_config);
+ term_add_bigch(monrace.symbol_config);
term_addstr(-1, TERM_WHITE, "'):");
}
* @brief オブジェクトの表示を幻覚状態に差し替える
* @return 差し替えたシンボルと色
*/
-ColoredChar image_object()
+DisplaySymbol image_object()
{
if (use_graphics) {
auto &baseitems = BaseitemList::get_instance();
const std::span<BaseitemInfo> candidates(baseitems.begin() + 1, baseitems.end());
const auto &baseitem = rand_choice(candidates);
- return baseitem.cc_config;
+ return baseitem.symbol_config;
}
return { randnum1<uint8_t>(15), rand_choice(image_objects) };
* @brief モンスターの表示を幻覚状態に差し替える
* @return 差し替えたシンボルと色
*/
-ColoredChar image_monster()
+DisplaySymbol image_monster()
{
if (use_graphics) {
const auto monrace_id = MonsterRace::pick_one_at_random();
const auto &monrace = monraces_info[monrace_id];
- return monrace.cc_config;
+ return monrace.symbol_config;
}
const auto color = randnum1<uint8_t>(15);
* @brief オブジェクト&モンスターの表示を幻覚状態に差し替える
* @return 差し替えたシンボルと色
*/
-ColoredChar image_random()
+DisplaySymbol image_random()
{
if (randint0(100) < 75) {
return image_monster();
* @return シンボル表記
* @todo 強力発動コピペの嵐…ポインタ引数の嵐……Fuuu^h^hck!!
*/
-ColoredCharPair map_info(PlayerType *player_ptr, const Pos2D &pos)
+DisplaySymbolPair map_info(PlayerType *player_ptr, const Pos2D &pos)
{
auto &floor = *player_ptr->current_floor_ptr;
auto &grid = floor.get_grid(pos);
auto &terrains = TerrainList::get_instance();
auto *terrain_mimic_ptr = &grid.get_terrain_mimic();
- ColoredChar cc_config;
+ DisplaySymbol symbol_config;
if (terrain_mimic_ptr->flags.has_not(TerrainCharacteristics::REMEMBER)) {
auto is_visible = any_bits(grid.info, (CAVE_MARK | CAVE_LITE | CAVE_MNLT));
auto is_glowing = match_bits(grid.info, CAVE_GLOW | CAVE_MNDK, CAVE_GLOW);
auto can_view = grid.is_view() && (is_glowing || player_ptr->see_nocto);
const auto is_blind = player_ptr->effects()->blindness()->is_blind();
if (!is_blind && (is_visible || can_view)) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_STANDARD];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_STANDARD];
if (player_ptr->wild_mode) {
if (view_special_lite && !w_ptr->is_daytime()) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_DARK];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_DARK];
}
} else if (darkened_grid(player_ptr, &grid)) {
const auto unsafe_terrain_id = (view_unsafe_grids && (grid.info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
terrain_mimic_ptr = &terrains[unsafe_terrain_id];
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_STANDARD];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_STANDARD];
} else if (view_special_lite) {
if (grid.info & (CAVE_LITE | CAVE_MNLT)) {
if (view_yellow_lite) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_LITE];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_LITE];
}
} else if ((grid.info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_DARK];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_DARK];
} else if (!(grid.info & CAVE_VIEW)) {
if (view_bright_lite) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_DARK];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_DARK];
}
}
}
} else {
const auto unsafe_terrain_id = (view_unsafe_grids && (grid.info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
terrain_mimic_ptr = &terrains[unsafe_terrain_id];
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_STANDARD];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_STANDARD];
}
} else {
if (grid.is_mark() && is_revealed_wall(floor, pos)) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_STANDARD];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_STANDARD];
const auto is_blind = player_ptr->effects()->blindness()->is_blind();
if (player_ptr->wild_mode) {
if (view_granite_lite && (is_blind || !w_ptr->is_daytime())) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_DARK];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_DARK];
}
} else if (darkened_grid(player_ptr, &grid) && !is_blind) {
if (terrain_mimic_ptr->flags.has_all_of({ TerrainCharacteristics::LOS, TerrainCharacteristics::PROJECT })) {
const auto unsafe_terrain_id = (view_unsafe_grids && (grid.info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
terrain_mimic_ptr = &terrains[unsafe_terrain_id];
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_STANDARD];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_STANDARD];
} else if (view_granite_lite && view_bright_lite) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_DARK];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_DARK];
}
} else if (view_granite_lite) {
if (is_blind) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_DARK];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_DARK];
} else if (grid.info & (CAVE_LITE | CAVE_MNLT)) {
if (view_yellow_lite) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_LITE];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_LITE];
}
} else if (view_bright_lite) {
if (!(grid.info & CAVE_VIEW)) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_DARK];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_DARK];
} else if ((grid.info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_DARK];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_DARK];
} else if (terrain_mimic_ptr->flags.has_not(TerrainCharacteristics::LOS) && !check_local_illumination(player_ptr, pos.y, pos.x)) {
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_DARK];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_DARK];
}
}
}
} else {
const auto unsafe_terrain_id = (view_unsafe_grids && (grid.info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
terrain_mimic_ptr = &terrains[unsafe_terrain_id];
- cc_config = terrain_mimic_ptr->cc_configs[F_LIT_STANDARD];
+ symbol_config = terrain_mimic_ptr->symbol_configs[F_LIT_STANDARD];
}
}
feat_priority = terrain_mimic_ptr->priority;
}
- ColoredCharPair ccp = { cc_config, cc_config };
+ DisplaySymbolPair symbol_pair = { symbol_config, symbol_config };
const auto is_hallucinated = player_ptr->effects()->hallucination()->is_hallucinated();
if (is_hallucinated && one_in_(256)) {
- ccp.cc_foreground = image_random();
+ symbol_pair.symbol_foreground = image_random();
}
for (const auto this_o_idx : grid.o_idx_list) {
}
}
- ccp.cc_foreground = { o_ptr->get_color(), o_ptr->get_symbol() };
+ symbol_pair.symbol_foreground = { o_ptr->get_color(), o_ptr->get_symbol() };
feat_priority = 20;
if (is_hallucinated) {
- ccp.cc_foreground = image_object();
+ symbol_pair.symbol_foreground = image_object();
}
break;
}
if (grid.has_monster() && display_autopick != 0) {
- ccp.cc_foreground = set_term_color(player_ptr, pos, ccp.cc_foreground);
- return ccp;
+ symbol_pair.symbol_foreground = set_term_color(player_ptr, pos, symbol_pair.symbol_foreground);
+ return symbol_pair;
}
auto *m_ptr = &floor.m_list[grid.m_idx];
if (!m_ptr->ml) {
- ccp.cc_foreground = set_term_color(player_ptr, pos, ccp.cc_foreground);
- return ccp;
+ symbol_pair.symbol_foreground = set_term_color(player_ptr, pos, symbol_pair.symbol_foreground);
+ return symbol_pair;
}
const auto &monrace_ap = m_ptr->get_appearance_monrace();
feat_priority = 30;
if (is_hallucinated) {
if (!monrace_ap.visual_flags.has_all_of({ MonsterVisualType::CLEAR, MonsterVisualType::CLEAR_COLOR })) {
- ccp.cc_foreground = image_monster();
+ symbol_pair.symbol_foreground = image_monster();
}
- ccp.cc_foreground = set_term_color(player_ptr, pos, ccp.cc_foreground);
- return ccp;
+ symbol_pair.symbol_foreground = set_term_color(player_ptr, pos, symbol_pair.symbol_foreground);
+ return symbol_pair;
}
- cc_config = monrace_ap.cc_config;
+ symbol_config = monrace_ap.symbol_config;
if (monrace_ap.visual_flags.has_none_of({ MonsterVisualType::CLEAR, MonsterVisualType::SHAPECHANGER, MonsterVisualType::CLEAR_COLOR, MonsterVisualType::MULTI_COLOR, MonsterVisualType::RANDOM_COLOR })) {
- ccp.cc_foreground = set_term_color(player_ptr, pos, cc_config);
- return ccp;
+ symbol_pair.symbol_foreground = set_term_color(player_ptr, pos, symbol_config);
+ return symbol_pair;
}
if (monrace_ap.visual_flags.has_all_of({ MonsterVisualType::CLEAR, MonsterVisualType::CLEAR_COLOR })) {
- ccp.cc_foreground = set_term_color(player_ptr, pos, ccp.cc_foreground);
- return ccp;
+ symbol_pair.symbol_foreground = set_term_color(player_ptr, pos, symbol_pair.symbol_foreground);
+ return symbol_pair;
}
- if (monrace_ap.visual_flags.has(MonsterVisualType::CLEAR_COLOR) && (ccp.cc_foreground.color != TERM_DARK) && !use_graphics) {
+ if (monrace_ap.visual_flags.has(MonsterVisualType::CLEAR_COLOR) && (symbol_pair.symbol_foreground.color != TERM_DARK) && !use_graphics) {
/* Do nothing */
} else if (monrace_ap.visual_flags.has(MonsterVisualType::MULTI_COLOR) && !use_graphics) {
if (monrace_ap.visual_flags.has(MonsterVisualType::ANY_COLOR)) {
- ccp.cc_foreground.color = randnum1<uint8_t>(15);
+ symbol_pair.symbol_foreground.color = randnum1<uint8_t>(15);
} else {
constexpr static auto colors = {
TERM_RED,
TERM_GREEN,
};
- ccp.cc_foreground.color = rand_choice(colors);
+ symbol_pair.symbol_foreground.color = rand_choice(colors);
}
} else if (monrace_ap.visual_flags.has(MonsterVisualType::RANDOM_COLOR) && !use_graphics) {
- ccp.cc_foreground.color = grid.m_idx % 15 + 1;
+ symbol_pair.symbol_foreground.color = grid.m_idx % 15 + 1;
} else {
- ccp.cc_foreground.color = cc_config.color;
+ symbol_pair.symbol_foreground.color = symbol_config.color;
}
- if (monrace_ap.visual_flags.has(MonsterVisualType::CLEAR) && (ccp.cc_foreground.character != ' ') && !use_graphics) {
- ccp.cc_foreground = set_term_color(player_ptr, pos, ccp.cc_foreground);
- return ccp;
+ if (monrace_ap.visual_flags.has(MonsterVisualType::CLEAR) && (symbol_pair.symbol_foreground.character != ' ') && !use_graphics) {
+ symbol_pair.symbol_foreground = set_term_color(player_ptr, pos, symbol_pair.symbol_foreground);
+ return symbol_pair;
}
if (monrace_ap.visual_flags.has(MonsterVisualType::SHAPECHANGER)) {
if (use_graphics) {
auto r_idx = MonsterRace::pick_one_at_random();
const auto &monrace = monraces_info[r_idx];
- ccp.cc_foreground = monrace.cc_config;
+ symbol_pair.symbol_foreground = monrace.symbol_config;
} else {
- ccp.cc_foreground.character = one_in_(25) ? rand_choice(image_objects) : rand_choice(image_monsters);
+ symbol_pair.symbol_foreground.character = one_in_(25) ? rand_choice(image_objects) : rand_choice(image_monsters);
}
- ccp.cc_foreground = set_term_color(player_ptr, pos, ccp.cc_foreground);
- return ccp;
+ symbol_pair.symbol_foreground = set_term_color(player_ptr, pos, symbol_pair.symbol_foreground);
+ return symbol_pair;
}
- ccp.cc_foreground = set_term_color(player_ptr, pos, { ccp.cc_foreground.color, cc_config.character });
- return ccp;
+ symbol_pair.symbol_foreground = set_term_color(player_ptr, pos, { symbol_pair.symbol_foreground.color, symbol_config.character });
+ return symbol_pair;
}
/*!
extern uint8_t display_autopick;
class PlayerType;
-ColoredCharPair map_info(PlayerType *player_ptr, const Pos2D &pos);
+DisplaySymbolPair map_info(PlayerType *player_ptr, const Pos2D &pos);
std::optional<uint8_t> get_monochrome_display_color(PlayerType *player_ptr);
term_addstr(-1, TERM_WHITE, buf);
term_addstr(-1, TERM_WHITE, " ");
- term_add_bigch(monrace.cc_config);
+ term_add_bigch(monrace.symbol_config);
if (monrace.r_tkills && m_ptr->mflag2.has_not(MonsterConstantFlagType::KAGE)) {
buf = format(" %2d", monrace.level);
}
term_gotoxy(x + 13, y);
- term_add_bigch(monrace.cc_config);
+ term_add_bigch(monrace.symbol_config);
term_addstr(-1, TERM_WHITE, " ");
term_addstr(-1, TERM_WHITE, name);
const auto pos_x = x - player_ptr->x + game_term->wid / 2 - 1;
if (!in_bounds2(player_ptr->current_floor_ptr, y, x)) {
const auto &terrain = TerrainList::get_instance()[feat_none];
- const auto &cc_foreground = terrain.cc_configs.at(F_LIT_STANDARD);
- term_queue_char(pos_x, pos_y, { cc_foreground, {} });
+ const auto &symbol_foreground = terrain.symbol_configs.at(F_LIT_STANDARD);
+ term_queue_char(pos_x, pos_y, { symbol_foreground, {} });
continue;
}
- auto ccp = map_info(player_ptr, { y, x });
- ccp.cc_foreground.color = get_monochrome_display_color(player_ptr).value_or(ccp.cc_foreground.color);
+ auto symbol_pair = map_info(player_ptr, { y, x });
+ symbol_pair.symbol_foreground.color = get_monochrome_display_color(player_ptr).value_or(symbol_pair.symbol_foreground.color);
- term_queue_char(pos_x, pos_y, ccp);
+ term_queue_char(pos_x, pos_y, symbol_pair);
}
}
}
auto &monster = player_ptr->current_floor_ptr->m_list[monster_list_index];
if (MonsterRace(monster.r_idx).is_valid()) {
const auto &monrace = monster.get_monrace();
- const auto &cc_config = monrace.cc_config;
- term_putstr(col - 2, row + row_offset, 2, cc_config.color, format("%c", cc_config.character));
+ const auto &symbol_config = monrace.symbol_config;
+ term_putstr(col - 2, row + row_offset, 2, symbol_config.color, format("%c", symbol_config.character));
term_putstr(col - 1, row + row_offset, 5, TERM_WHITE, format("%5d", monster.hp));
term_putstr(col + 5, row + row_offset, 6, TERM_WHITE, format("%5d", monster.max_maxhp));
}
for (auto y = ymin; y <= ymax; y++) {
for (auto x = xmin; x <= xmax; x++) {
- auto ccp = map_info(player_ptr, { y, x });
- ccp.cc_foreground.color = get_monochrome_display_color(player_ptr).value_or(ccp.cc_foreground.color);
+ auto symbol_pair = map_info(player_ptr, { y, x });
+ symbol_pair.symbol_foreground.color = get_monochrome_display_color(player_ptr).value_or(symbol_pair.symbol_foreground.color);
- term_queue_bigchar(panel_col_of(x), y - panel_row_prt, ccp);
+ term_queue_bigchar(panel_col_of(x), y - panel_row_prt, symbol_pair);
}
}
match_autopick = -1;
autopick_obj = nullptr;
feat_priority = -1;
- const auto ccp = map_info(player_ptr, { j, i });
+ const auto symbol_pair = map_info(player_ptr, { j, i });
tp = (byte)feat_priority;
if (match_autopick != -1 && (match_autopick_yx[y][x] == -1 || match_autopick_yx[y][x] > match_autopick)) {
match_autopick_yx[y][x] = match_autopick;
tp = 0x7f;
}
- bigma[j + 1][i + 1] = ccp.cc_foreground.color;
- bigmc[j + 1][i + 1] = ccp.cc_foreground.character;
+ bigma[j + 1][i + 1] = symbol_pair.symbol_foreground.color;
+ bigmc[j + 1][i + 1] = symbol_pair.symbol_foreground.character;
bigmp[j + 1][i + 1] = tp;
}
}
x = i / xrat + 1;
y = j / yrat + 1;
- ColoredChar cc_foreground(bigma[j + 1][i + 1], bigmc[j + 1][i + 1]);
+ DisplaySymbol symbol_foreground(bigma[j + 1][i + 1], bigmc[j + 1][i + 1]);
tp = bigmp[j + 1][i + 1];
if (mp[y][x] == tp) {
int cnt = 0;
for (const auto &dd : CCW_DD) {
- if ((cc_foreground.character == bigmc[j + 1 + dd.y][i + 1 + dd.x]) && (cc_foreground.color == bigma[j + 1 + dd.y][i + 1 + dd.x])) {
+ if ((symbol_foreground.character == bigmc[j + 1 + dd.y][i + 1 + dd.x]) && (symbol_foreground.color == bigma[j + 1 + dd.y][i + 1 + dd.x])) {
cnt++;
}
}
}
if (mp[y][x] < tp) {
- ma[y][x] = cc_foreground.color;
- mc[y][x] = cc_foreground.character;
+ ma[y][x] = symbol_foreground.color;
+ mc[y][x] = symbol_foreground.character;
mp[y][x] = tp;
}
}
for (y = 0; y < hgt + 2; ++y) {
term_gotoxy(COL_MAP, y);
for (x = 0; x < wid + 2; ++x) {
- ColoredChar cc_foreground(ma[y][x], mc[y][x]);
- cc_foreground.color = get_monochrome_display_color(player_ptr).value_or(cc_foreground.color);
+ DisplaySymbol symbol_foreground(ma[y][x], mc[y][x]);
+ symbol_foreground.color = get_monochrome_display_color(player_ptr).value_or(symbol_foreground.color);
- term_add_bigch(cc_foreground);
+ term_add_bigch(symbol_foreground);
}
}
view_granite_lite = old_view_granite_lite;
}
-ColoredChar set_term_color(PlayerType *player_ptr, const Pos2D &pos, const ColoredChar &cc_orig)
+DisplaySymbol set_term_color(PlayerType *player_ptr, const Pos2D &pos, const DisplaySymbol &symbol_orig)
{
if (!player_ptr->is_located_at(pos)) {
- return cc_orig;
+ return symbol_orig;
}
feat_priority = 31;
const auto &monrace = monraces_info[MonsterRaceId::PLAYER];
- return monrace.cc_config;
+ return monrace.symbol_config;
}
/*
extern int match_autopick;
extern int feat_priority;
-class ColoredChar;
+class DisplaySymbol;
class PlayerType;
void print_field(concptr info, TERM_LEN row, TERM_LEN col);
void print_map(PlayerType *player_ptr);
void display_map(PlayerType *player_ptr, int *cy, int *cx);
-ColoredChar set_term_color(PlayerType *player_ptr, const Pos2D &pos, const ColoredChar &cc_orig);
+DisplaySymbol set_term_color(PlayerType *player_ptr, const Pos2D &pos, const DisplaySymbol &symbol_orig);
int panel_col_of(int col);
return _("準ランダムな", "S.Rand");
}
- switch (monrace.cc_def.color) {
+ switch (monrace.symbol_def.color) {
case TERM_DARK:
return _("黒い", "Dark");
case TERM_WHITE:
hp = format("%dd%d", monrace.hdice, monrace.hside);
}
- const auto symbol = format("%s '%c'", attr_to_text(monrace).data(), monrace.cc_def.character);
+ const auto symbol = format("%s '%c'", attr_to_text(monrace).data(), monrace.symbol_def.character);
ofs << format("%-45.45s%4s %4s %4s %7s %7s %19.19s\n",
nam.data(), lev.data(), rar.data(), spd.data(), hp.data(),
ac.data(), symbol.data());
spoil_out(format(_("%s/%s (", "%s%s ("), monrace.name.data(), _(monrace.E_name.data(), ""))); /* ---)--- */
spoil_out(attr_to_text(monrace));
- spoil_out(format(" '%c')\n", monrace.cc_def.character));
+ spoil_out(format(" '%c')\n", monrace.symbol_def.character));
spoil_out("=== ");
spoil_out(format("Num:%d ", enum2i(monrace_id)));
spoil_out(format("Lev:%d ", (int)monrace.level));
for (auto monrace_id : get_mon_evol_roots()) {
const auto *r_ptr = &monraces_info[monrace_id];
constexpr auto fmt_before = _("[%d]: %s (レベル%d, '%c')\n", "[%d]: %s (Level %d, '%c')\n");
- fprintf(spoiler_file, fmt_before, enum2i(monrace_id), r_ptr->name.data(), r_ptr->level, r_ptr->cc_def.character);
+ fprintf(spoiler_file, fmt_before, enum2i(monrace_id), r_ptr->name.data(), r_ptr->level, r_ptr->symbol_def.character);
for (auto n = 1; MonsterRace(r_ptr->next_r_idx).is_valid(); n++) {
fprintf(spoiler_file, "%*s-(%d)-> ", n * 2, "", r_ptr->next_exp);
fprintf(spoiler_file, "[%d]: ", enum2i(r_ptr->next_r_idx));
r_ptr = &monraces_info[r_ptr->next_r_idx];
constexpr auto fmt_after = _("%s (レベル%d, '%c')\n", "%s (Level %d, '%c')\n");
- fprintf(spoiler_file, fmt_after, r_ptr->name.data(), r_ptr->level, r_ptr->cc_def.character);
+ fprintf(spoiler_file, fmt_after, r_ptr->name.data(), r_ptr->level, r_ptr->symbol_def.character);
}
fputc('\n', spoiler_file);