if (FLG_NOUN_BEGIN <= flg && flg <= FLG_NOUN_END) {
int i;
for (i = FLG_NOUN_BEGIN; i <= FLG_NOUN_END; i++) {
- REM_FLG(i);
+ entry->remove(i);
}
} else if (FLG_UNAWARE <= flg && flg <= FLG_STAR_IDENTIFIED) {
int i;
for (i = FLG_UNAWARE; i <= FLG_STAR_IDENTIFIED; i++) {
- REM_FLG(i);
+ entry->remove(i);
}
} else if (FLG_ARTIFACT <= flg && flg <= FLG_AVERAGE) {
int i;
for (i = FLG_ARTIFACT; i <= FLG_AVERAGE; i++) {
- REM_FLG(i);
+ entry->remove(i);
}
} else if (FLG_RARE <= flg && flg <= FLG_COMMON) {
int i;
for (i = FLG_RARE; i <= FLG_COMMON; i++) {
- REM_FLG(i);
+ entry->remove(i);
}
}
if (add) {
ADD_FLG(flg);
} else {
- REM_FLG(flg);
+ entry->remove(flg);
}
tb->lines_list[y] = autopick_line_from_entry(*entry);
if (FLG_NOUN_BEGIN <= flg && flg <= FLG_NOUN_END) {
int i;
for (i = FLG_NOUN_BEGIN; i <= FLG_NOUN_END; i++) {
- REM_FLG(i);
+ entry->remove(i);
}
}
}
if (object_is_bounty(player_ptr, o_ptr)) {
- REM_FLG(FLG_WORTHLESS);
+ entry->remove(FLG_WORTHLESS);
ADD_FLG(FLG_WANTED);
}
#define ADD_KEY2(KEY) strcat(ptr, KEY)
#define ADD_FLG(FLG) (entry->flags[FLG / 32] |= (1UL << (FLG % 32)))
-#define REM_FLG(FLG) (entry->flags[FLG / 32] &= ~(1UL << (FLG % 32)))
#define ADD_FLG_NOUN(FLG) (ADD_FLG(FLG), prev_flg = FLG)
#include "object-enchant/item-feeling.h"
#include "system/item-entity.h"
#include "system/player-type-definition.h"
+#include "util/bit-flags-calculator.h"
#include "util/quarks.h"
/*!
return this->flags[flag / 32] & (1UL << (flag % 32));
}
+void autopick_type::remove(int flag)
+{
+ reset_bits(this->flags[flag / 32], 1UL << (flag % 32));
+}
+
/*!
* @brief Free memory of lines_list.
*/
byte dice; /*!< 武器のダイス値基準値 / Weapons which have more than 'dice' dice match */
byte bonus; /*!< アイテムのボーナス基準値 / Items which have more than 'bonus' magical bonus match */
bool has(int flag) const;
+ void remove(int flag);
};
/*