#include "monster/monster-status.h"
#include "object/item-tester-hooker.h"
#include "object/object-info.h"
-#include "object/object-kind.h"
#include "object/object-mark-types.h"
#include "player/player-status-flags.h"
#include "player/player-status.h"
#include "spell-kind/magic-item-recharger.h"
+#include "system/baseitem-info-definition.h"
#include "system/floor-type-definition.h"
#include "system/grid-type-definition.h"
-#include "system/monster-race-definition.h"
-#include "system/monster-type-definition.h"
-#include "system/object-type-definition.h"
+#include "system/item-entity.h"
+#include "system/monster-entity.h"
+#include "system/monster-race-info.h"
#include "system/player-type-definition.h"
+#include "system/terrain-type-definition.h"
#include "target/target-describer.h"
#include "target/target-preparation.h"
#include "target/target-setter.h"
* name: name of monster
* </pre>
*/
-static void print_monster_line(TERM_LEN x, TERM_LEN y, monster_type *m_ptr, int n_same)
+static void print_monster_line(TERM_LEN x, TERM_LEN y, MonsterEntity *m_ptr, int n_same)
{
char buf[256];
- MONRACE_IDX r_idx = m_ptr->ap_r_idx;
- auto *r_ptr = &r_info[r_idx];
+ MonsterRaceId r_idx = m_ptr->ap_r_idx;
+ auto *r_ptr = &monraces_info[r_idx];
term_erase(0, y, 255);
term_gotoxy(x, y);
return;
}
if (r_ptr->kind_flags.has(MonsterKindType::UNIQUE)) {
- bool is_bounty = false;
- for (int i = 0; i < MAX_BOUNTY; i++) {
- if (w_ptr->bounty_r_idx[i] == r_idx) {
- is_bounty = true;
- break;
- }
- }
-
- term_addstr(-1, TERM_WHITE, is_bounty ? " W" : " U");
+ term_addstr(-1, TERM_WHITE, MonsterRace(r_idx).is_bounty(true) ? " W" : " U");
} else {
sprintf(buf, "%3d", n_same);
term_addstr(-1, TERM_WHITE, buf);
term_addstr(-1, TERM_WHITE, buf);
- sprintf(buf, " %s ", r_ptr->name.c_str());
+ sprintf(buf, " %s ", r_ptr->name.data());
term_addstr(-1, TERM_WHITE, buf);
}
* @param y 表示行
* @param max_lines 最大何行描画するか
*/
-void print_monster_list(floor_type *floor_ptr, const std::vector<MONSTER_IDX> &monster_list, TERM_LEN x, TERM_LEN y, TERM_LEN max_lines)
+void print_monster_list(FloorType *floor_ptr, const std::vector<MONSTER_IDX> &monster_list, TERM_LEN x, TERM_LEN y, TERM_LEN max_lines)
{
TERM_LEN line = y;
- monster_type *last_mons = nullptr;
+ MonsterEntity *last_mons = nullptr;
int n_same = 0;
size_t i;
for (i = 0; i < monster_list.size(); i++) {
auto m_ptr = &floor_ptr->m_list[monster_list[i]];
- if (is_pet(m_ptr)) {
+ if (m_ptr->is_pet()) {
continue;
} // pet
- if (!m_ptr->r_idx) {
+ if (!MonsterRace(m_ptr->r_idx).is_valid()) {
continue;
} // dead?
}
if (show_item_graph) {
- TERM_COLOR a = object_attr(o_ptr);
- auto c = object_char(o_ptr);
+ const auto a = o_ptr->get_color();
+ const auto c = o_ptr->get_symbol();
term_queue_bigchar(cur_col, cur_row, a, c, 0, 0);
if (use_bigtile) {
cur_col++;
TERM_COLOR a;
char c;
if (!in_bounds2(player_ptr->current_floor_ptr, y, x)) {
- auto *f_ptr = &f_info[feat_none];
+ auto *f_ptr = &terrains_info[feat_none];
a = f_ptr->x_attr[F_LIT_STANDARD];
c = f_ptr->x_char[F_LIT_STANDARD];
term_queue_char(x - player_ptr->x + game_term->wid / 2 - 1, y - player_ptr->y + game_term->hgt / 2 - 1, a, c, ta, tc);
}
term_activate(angband_term[j]);
- if (player_ptr->monster_race_idx) {
+ if (MonsterRace(player_ptr->monster_race_idx).is_valid()) {
display_roff(player_ptr);
}
}
term_activate(angband_term[j]);
- if (player_ptr->object_kind_idx) {
- display_koff(player_ptr, player_ptr->object_kind_idx);
+ if (player_ptr->baseitem_info_idx) {
+ display_koff(player_ptr, player_ptr->baseitem_info_idx);
}
term_fresh();
* @details
* Lookコマンドでカーソルを合わせた場合に合わせてミミックは考慮しない。
*/
-static const monster_type *monster_on_floor_items(floor_type *floor_ptr, const grid_type *g_ptr)
+static const MonsterEntity *monster_on_floor_items(FloorType *floor_ptr, const grid_type *g_ptr)
{
if (g_ptr->m_idx == 0) {
return nullptr;
}
auto m_ptr = &floor_ptr->m_list[g_ptr->m_idx];
- if (!monster_is_valid(m_ptr) || !m_ptr->ml) {
+ if (!m_ptr->is_valid() || !m_ptr->ml) {
return nullptr;
}
if (is_hallucinated) {
sprintf(line, _("(X:%03d Y:%03d) 何か奇妙な物の足元の発見済みアイテム一覧", "Found items at (%03d,%03d) under something strange"), x, y);
} else {
- const monster_race *const r_ptr = &r_info[m_ptr->ap_r_idx];
- sprintf(line, _("(X:%03d Y:%03d) %sの足元の発見済みアイテム一覧", "Found items at (%03d,%03d) under %s"), x, y, r_ptr->name.c_str());
+ const MonsterRaceInfo *const r_ptr = &monraces_info[m_ptr->ap_r_idx];
+ sprintf(line, _("(X:%03d Y:%03d) %sの足元の発見済みアイテム一覧", "Found items at (%03d,%03d) under %s"), x, y, r_ptr->name.data());
}
} else {
- const feature_type *const f_ptr = &f_info[g_ptr->feat];
- concptr fn = f_ptr->name.c_str();
+ const TerrainType *const f_ptr = &terrains_info[g_ptr->feat];
+ concptr fn = f_ptr->name.data();
char buf[512];
- if (f_ptr->flags.has(FloorFeatureType::STORE) || (f_ptr->flags.has(FloorFeatureType::BLDG) && !floor_ptr->inside_arena)) {
+ if (f_ptr->flags.has(TerrainCharacteristics::STORE) || (f_ptr->flags.has(TerrainCharacteristics::BLDG) && !floor_ptr->inside_arena)) {
sprintf(buf, _("%sの入口", "on the entrance of %s"), fn);
- } else if (f_ptr->flags.has(FloorFeatureType::WALL)) {
+ } else if (f_ptr->flags.has(TerrainCharacteristics::WALL)) {
sprintf(buf, _("%sの中", "in %s"), fn);
} else {
sprintf(buf, _("%s", "on %s"), fn);
// (y,x) のアイテムを1行に1個ずつ書く。
TERM_LEN term_y = 1;
for (const auto o_idx : g_ptr->o_idx_list) {
- ObjectType *const o_ptr = &floor_ptr->o_list[o_idx];
+ ItemEntity *const o_ptr = &floor_ptr->o_list[o_idx];
// 未発見アイテムおよび金は対象外。
if (none_bits(o_ptr->marked, OM_FOUND) || o_ptr->tval == ItemKindType::GOLD) {