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")
87#define SPECENUM_VALUE3 TECH_USER_1
88#define SPECENUM_VALUE4 TECH_USER_2
89#define SPECENUM_VALUE5 TECH_USER_3
90#define SPECENUM_VALUE6 TECH_USER_4
91#define SPECENUM_VALUE7 TECH_USER_5
92#define SPECENUM_VALUE8 TECH_USER_6
93#define SPECENUM_VALUE9 TECH_USER_7
94#define SPECENUM_VALUE10 TECH_USER_8
95#define SPECENUM_VALUE11 TECH_USER_9
96#define SPECENUM_VALUE12 TECH_USER_LAST
98#define SPECENUM_COUNT TF_COUNT
99#define SPECENUM_BITVECTOR bv_tech_flags
100#define SPECENUM_NAMEOVERRIDE
103#define MAX_NUM_USER_TECH_FLAGS (TECH_USER_LAST - TECH_USER_1 + 1)
188#define tech_class_index(_ptclass_) (_ptclass_)->idx
193#define tech_class_iterate(_p) \
196 for (_i_##_p = 0; _i_##_p < game.control.num_tech_classes; _i_##_p++) { \
197 struct tech_class *_p = tech_class_by_number(_i_##_p);
199#define tech_class_iterate_end \
203#define tech_class_re_active_iterate(_p) \
204 tech_class_iterate(_p) { \
205 if (!_p->ruledit_disabled) {
207#define tech_class_re_active_iterate_end \
209 } tech_class_iterate_end;
240#define advance_index_iterate(_start, _index) \
242 advance_index_iterate_max(_start, _index, advance_count())
244#define advance_index_iterate_end \
245 advance_index_iterate_max_end \
248#define advance_index_iterate_max(_start, _index, _max) \
250 Tech_type_id _index = (_start); \
251 Tech_type_id _aco_##_index = (_max); \
252 for (; _index < _aco_##_index; _index++) {
254#define advance_index_iterate_max_end \
260#define advance_iterate_base(_start, _p) \
262 struct advance *_p = advance_by_number(_start); \
264 for (; _p <= advance_array_last(); _p++) {
266#define advance_iterate_base_end \
271#define advance_iterate(_p) advance_iterate_base(A_FIRST, _p)
272#define advance_iterate_end advance_iterate_base_end
274#define advance_iterate_all(_p) advance_iterate_base(A_NONE, _p)
275#define advance_iterate_all_end advance_iterate_base_end
277#define advance_re_active_iterate(_p) \
278 advance_iterate(_p) { \
279 if (_p->require[AR_ONE] != A_NEVER) {
281#define advance_re_active_iterate_end \
283 } advance_iterate_end;
295#define advance_req_iterate(_goal, _padvance) \
296 generic_iterate(struct advance_req_iter, const struct advance *, \
297 _padvance, advance_req_iter_sizeof, advance_req_iter_init,\
299#define advance_req_iterate_end generic_iterate_end
310#define advance_root_req_iterate(_goal, _padvance) \
311 generic_iterate(struct advance_root_req_iter, const struct advance *, \
312 _padvance, advance_root_req_iter_sizeof, \
313 advance_root_req_iter_init, \
315#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)
bool is_regular_advance(struct advance *padvance)
Tech_type_id advance_number(const struct advance *padvance)
void user_tech_flags_free(void)