13#ifndef FC__ADVCHOICE_H
14#define FC__ADVCHOICE_H
32#ifdef ADV_CHOICE_TRACK
33#define ADV_CHOICE_LOG_LEVEL LOG_NORMAL
50#ifdef ADV_CHOICE_TRACK
71#ifdef ADV_CHOICE_TRACK
74#define adv_choice_mark(_choice) (_choice)->log_if_chosen = TRUE
85#define adv_choice_set_use(_choice, _use)
86#define adv_choice_mark(_choice)
87#define adv_choice_log_info(_choice, _loc1, _loc2)
88#define adv_choice_log_int(_choice, _loc1, _loc2)
95#define ADV_CHOICE_LOG(_choice) adv_choice_log_int((_choice), __FILE__, __FC_LINE__)
98#define ADV_CHOICE_ASSERT(c)
100#define ADV_CHOICE_ASSERT(c) \
102 if ((c).want > 0) { \
103 fc_assert((c).type > CT_NONE && (c).type < CT_LAST); \
104 if (!is_unit_choice_type((c).type)) { \
105 int _iindex = improvement_index((c).value.building); \
106 fc_assert(_iindex >= 0 && _iindex < improvement_count()); \
108 int _uindex = utype_index((c).value.utype); \
109 fc_assert(_uindex >= 0 && _uindex < utype_count()); \
void adv_deinit_choice(struct adv_choice *choice)
#define adv_choice_set_use(_choice, _use)
#define adv_choice_log_int(_choice, _loc1, _loc2)
void adv_init_choice(struct adv_choice *choice)
struct adv_choice * adv_better_choice_free(struct adv_choice *first, struct adv_choice *second)
void adv_free_choice(struct adv_choice *choice)
static void adv_choice_copy(struct adv_choice *dest, struct adv_choice *src)
struct adv_choice * adv_better_choice(struct adv_choice *first, struct adv_choice *second)
static const char * adv_choice_get_use(const struct adv_choice *choice)
struct adv_choice * adv_new_choice(void)
bool is_unit_choice_type(enum choice_type type)
#define adv_choice_log_info(_choice, _loc1, _loc2)
const char * adv_choice_rule_name(const struct adv_choice *choice)