12 #include <fc_config.h>
34 fc_assert(
id >= 0 &&
id < FREECIV_AI_MOD_LAST);
78 qCritical(
_(
"Too many AI modules. Max is %d."), FREECIV_AI_MOD_LAST);
112 if (orig_name ==
nullptr) {
122 qWarning(
_(
"Unknown AI type %s, using \"classic\" instead"), orig_name);
void init_ai(struct ai_type *ai)
Initializes AI structure.
struct ai_type * get_ai_type(int id)
Returns ai_type of given id.
const char * ai_name(const struct ai_type *ai)
Return the name of the ai type.
void ai_type_dealloc()
Free latest ai_type.
static struct ai_type ai_types[FREECIV_AI_MOD_LAST]
struct ai_type * ai_type_by_name(const char *search)
Find ai type with given name.
struct ai_type * ai_type_alloc()
Return next free ai_type.
const char * ai_type_name_or_fallback(const char *orig_name)
Return usable ai type name, if possible.
int ai_type_get_count()
Return number of ai types.
int ai_type_number(const struct ai_type *ai)
Returns id of the given ai_type.
#define ai_type_iterate_end
#define ai_type_iterate(NAME_ai)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
int fc_strcasecmp(const char *str0, const char *str1)
Compare strings like strcmp(), but ignoring case.