return result;
}
-void have_esp_orc(player_type *creature_ptr)
+BIT_FLAGS have_esp_orc(player_type *creature_ptr)
{
object_type *o_ptr;
BIT_FLAGS flgs[TR_FLAG_SIZE];
-
- creature_ptr->esp_orc = FALSE;
+ BIT_FLAGS result = 0L;
for (inventory_slot_type i = INVEN_RARM; i < INVEN_TOTAL; i++) {
o_ptr = &creature_ptr->inventory_list[i];
object_flags(creature_ptr, o_ptr, flgs);
if (have_flag(flgs, TR_ESP_ORC))
- creature_ptr->esp_orc = TRUE;
+ result |= 0x01 << (i - INVEN_RARM);
}
+
+ return result;
}
void have_esp_troll(player_type *creature_ptr)
BIT_FLAGS have_esp_animal(player_type *creature_ptr);
BIT_FLAGS have_esp_undead(player_type *creature_ptr);
BIT_FLAGS have_esp_demon(player_type *creature_ptr);
-void have_esp_orc(player_type *creature_ptr);
+BIT_FLAGS have_esp_orc(player_type *creature_ptr);
void have_esp_troll(player_type *creature_ptr);
void have_esp_giant(player_type *creature_ptr);
void have_esp_dragon(player_type *creature_ptr);
BIT_FLAGS old_esp_animal = creature_ptr->esp_animal;
BIT_FLAGS old_esp_undead = creature_ptr->esp_undead;
BIT_FLAGS old_esp_demon = creature_ptr->esp_demon;
- bool old_esp_orc = creature_ptr->esp_orc;
+ BIT_FLAGS old_esp_orc = creature_ptr->esp_orc;
bool old_esp_troll = creature_ptr->esp_troll;
bool old_esp_giant = creature_ptr->esp_giant;
bool old_esp_dragon = creature_ptr->esp_dragon;
creature_ptr->esp_animal = have_esp_animal(creature_ptr);
creature_ptr->esp_undead = have_esp_undead(creature_ptr);
creature_ptr->esp_demon = have_esp_demon(creature_ptr);
- have_esp_orc(creature_ptr);
+ creature_ptr->esp_orc = have_esp_orc(creature_ptr);
have_esp_troll(creature_ptr);
have_esp_giant(creature_ptr);
have_esp_dragon(creature_ptr);
BIT_FLAGS esp_animal;
BIT_FLAGS esp_undead;
BIT_FLAGS esp_demon;
- bool esp_orc;
+ BIT_FLAGS esp_orc;
bool esp_troll;
bool esp_giant;
bool esp_dragon;