45#define A_LAST (MAX_NUM_ADVANCES + 1)
46#define A_FUTURE (A_LAST + 1)
47#define A_ARRAY_SIZE (A_FUTURE + 1)
48#define A_UNSET (A_LAST + 2)
49#define A_UNKNOWN (A_LAST + 3)
75#define SPECENUM_NAME tech_flag_id
77#define SPECENUM_VALUE0 TF_BONUS_TECH
80#define SPECENUM_VALUE0NAME N_("Bonus_Tech")
82#define SPECENUM_VALUE1 TF_BRIDGE
83#define SPECENUM_VALUE1NAME N_("Bridge")
85#define SPECENUM_VALUE2 TF_BUILD_AIRBORNE
86#define SPECENUM_VALUE2NAME N_("Build_Airborne")
88#define SPECENUM_VALUE3 TF_CLAIM_OCEAN
89#define SPECENUM_VALUE3NAME N_("Claim_Ocean")
92#define SPECENUM_VALUE4 TF_CLAIM_OCEAN_LIMITED
93#define SPECENUM_VALUE4NAME N_("Claim_Ocean_Limited")
94#define SPECENUM_VALUE5 TECH_USER_1
95#define SPECENUM_VALUE6 TECH_USER_2
96#define SPECENUM_VALUE7 TECH_USER_3
97#define SPECENUM_VALUE8 TECH_USER_4
98#define SPECENUM_VALUE9 TECH_USER_5
99#define SPECENUM_VALUE10 TECH_USER_6
100#define SPECENUM_VALUE11 TECH_USER_7
101#define SPECENUM_VALUE12 TECH_USER_LAST
103#define SPECENUM_COUNT TF_COUNT
104#define SPECENUM_BITVECTOR bv_tech_flags
105#define SPECENUM_NAMEOVERRIDE
108#define MAX_NUM_USER_TECH_FLAGS (TECH_USER_LAST - TECH_USER_1 + 1)
193#define tech_class_index(_ptclass_) (_ptclass_)->idx
198#define tech_class_iterate(_p) \
201 for (_i_##_p = 0; _i_##_p < game.control.num_tech_classes; _i_##_p++) { \
202 struct tech_class *_p = tech_class_by_number(_i_##_p);
204#define tech_class_iterate_end \
208#define tech_class_re_active_iterate(_p) \
209 tech_class_iterate(_p) { \
210 if (!_p->ruledit_disabled) {
212#define tech_class_re_active_iterate_end \
214 } tech_class_iterate_end;
244#define advance_index_iterate(_start, _index) \
246 advance_index_iterate_max(_start, _index, advance_count())
248#define advance_index_iterate_end \
249 advance_index_iterate_max_end \
252#define advance_index_iterate_max(_start, _index, _max) \
254 Tech_type_id _index = (_start); \
255 Tech_type_id _aco_##_index = (_max); \
256 for (; _index < _aco_##_index; _index++) {
258#define advance_index_iterate_max_end \
264#define advance_iterate_base(_start, _p) \
266 struct advance *_p = advance_by_number(_start); \
268 for (; _p <= advance_array_last(); _p++) {
270#define advance_iterate_base_end \
275#define advance_iterate(_p) advance_iterate_base(A_FIRST, _p)
276#define advance_iterate_end advance_iterate_base_end
278#define advance_iterate_all(_p) advance_iterate_base(A_NONE, _p)
279#define advance_iterate_all_end advance_iterate_base_end
281#define advance_re_active_iterate(_p) \
282 advance_iterate(_p) { \
283 if (_p->require[AR_ONE] != A_NEVER) {
285#define advance_re_active_iterate_end \
287 } advance_iterate_end;
299#define advance_req_iterate(_goal, _padvance) \
300 generic_iterate(struct advance_req_iter, const struct advance *, \
301 _padvance, advance_req_iter_sizeof, advance_req_iter_init,\
303#define advance_req_iterate_end generic_iterate_end
314#define advance_root_req_iterate(_goal, _padvance) \
315 generic_iterate(struct advance_root_req_iter, const struct advance *, \
316 _padvance, advance_root_req_iter_sizeof, \
317 advance_root_req_iter_init, \
319#define advance_root_req_iterate_end generic_iterate_end
#define BV_DEFINE(name, bits)
struct requirement_vector research_reqs
struct tech_class * tclass
struct advance * require[AR_SIZE]
struct name_translation name
char graphic_str[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct name_translation name
Tech_type_id advance_count_real(void)
struct advance * advance_by_number(const Tech_type_id atype)
void tech_classes_init(void)
const char * tech_class_rule_name(const struct tech_class *ptclass)
void set_user_tech_flag_name(enum tech_flag_id id, const char *name, const char *helptxt)
bool is_future_tech(Tech_type_id tech)
struct advance * valid_advance(struct advance *padvance)
void techs_precalc_data(void)
struct advance * advance_by_translated_name(const char *name)
bool advance_has_flag(Tech_type_id tech, enum tech_flag_id flag)
size_t advance_root_req_iter_sizeof(void)
const char * tech_class_name_translation(const struct tech_class *ptclass)
struct advance * valid_advance_by_number(const Tech_type_id atype)
struct iterator * advance_root_req_iter_init(struct advance_root_req_iter *it, const struct advance *goal)
struct iterator * advance_req_iter_init(struct advance_req_iter *it, const struct advance *goal)
struct advance * advance_requires(const struct advance *padvance, enum tech_req require)
const char * advance_name_translation(const struct advance *padvance)
bool techs_have_fixed_costs(void)
Tech_type_id advance_required(const Tech_type_id tech, enum tech_req require)
struct tech_class * tech_class_by_number(const int idx)
const char * advance_rule_name(const struct advance *padvance)
static Tech_type_id advance_count(void)
const struct advance * advance_array_last(void)
Tech_type_id advance_index(const struct advance *padvance)
const char * tech_flag_helptxt(enum tech_flag_id id)
struct advance * advance_by_rule_name(const char *name)
void user_tech_flags_init(void)
size_t advance_req_iter_sizeof(void)
struct tech_class * tech_class_by_rule_name(const char *name)
Tech_type_id advance_number(const struct advance *padvance)
void user_tech_flags_free(void)