#include "core/stuff-handler.h"
#include "floor/floor-util.h"
#include "game-option/option-flags.h"
+#include "object/item-tester-hooker.h"
#include "player/player-race.h"
#include "system/player-type-definition.h"
#include "term/gameterm.h"
if (window_flags & (PW_INVEN)) {
player_ptr->window_flags &= ~(PW_INVEN);
- fix_inventory(player_ptr, TV_NONE); // TODO:2.2.2 まともなtval参照手段を確保
+ fix_inventory(player_ptr, AllMatchItemTester());
}
if (window_flags & (PW_EQUIP)) {
player_ptr->window_flags &= ~(PW_EQUIP);
- fix_equip(player_ptr, TV_NONE); // TODO:2.2.2 まともなtval参照手段を確保
+ fix_equip(player_ptr, AllMatchItemTester());
}
if (window_flags & (PW_SPELL)) {
* @brief サブウィンドウに所持品一覧を表示する / Hack -- display inventory in sub-windows
* @param player_ptr プレーヤーへの参照ポインタ
*/
-void fix_inventory(player_type *player_ptr, tval_type item_tester_tval)
+void fix_inventory(player_type *player_ptr, const ItemTester &item_tester)
{
for (int j = 0; j < 8; j++) {
term_type *old = Term;
continue;
term_activate(angband_term[j]);
- display_inventory(player_ptr, TvalItemTester(item_tester_tval));
+ display_inventory(player_ptr, item_tester);
term_fresh();
term_activate(old);
}
* Hack -- display equipment in sub-windows
* @param player_ptr プレーヤーへの参照ポインタ
*/
-void fix_equip(player_type *player_ptr, tval_type item_tester_tval)
+void fix_equip(player_type *player_ptr, const ItemTester &item_tester)
{
for (int j = 0; j < 8; j++) {
term_type *old = Term;
continue;
term_activate(angband_term[j]);
- display_equipment(player_ptr, TvalItemTester(item_tester_tval));
+ display_equipment(player_ptr, item_tester);
term_fresh();
term_activate(old);
}
#pragma once
#include "system/angband.h"
-#include "object/tval-types.h"
#include <vector>
typedef struct floor_type floor_type;
typedef struct player_type player_type;
-void fix_inventory(player_type *player_ptr, tval_type item_tester_tval);
+class ItemTester;
+void fix_inventory(player_type *player_ptr, const ItemTester &item_tester);
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 fix_monster_list(player_type *player_ptr);
-void fix_equip(player_type *player_ptr, tval_type item_tester_tval);
+void fix_equip(player_type *player_ptr, const ItemTester &item_tester);
void fix_player(player_type *player_ptr);
void fix_message(void);
void fix_overhead(player_type *player_ptr);