Bug #2513 ยป 0001-AI-Rename-variable-to-allow-modules-written-in-C.patch
| ai/classic/classicai.c | ||
|---|---|---|
|
{
|
||
|
struct ai_type *deftype = classic_ai_get_self();
|
||
|
FC_FREE(deftype->private);
|
||
|
FC_FREE(deftype->pprivate);
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
| ... | ... | |
|
private = fc_malloc(sizeof(struct dai_private_data));
|
||
|
private->contemplace_workers = TRUE;
|
||
|
ai->private = private;
|
||
|
ai->pprivate = private;
|
||
|
ai->funcs.module_close = cai_module_close;
|
||
| ai/default/daicity.c | ||
|---|---|---|
|
struct unit_type *utype;
|
||
|
Continent_id place = tile_continent(pcenter);
|
||
|
struct ai_city *city_data = def_ai_city_data(pcity, ait);
|
||
|
struct dai_private_data *private = (struct dai_private_data *)ait->private;
|
||
|
struct dai_private_data *private = (struct dai_private_data *)ait->pprivate;
|
||
|
const struct civ_map *nmap = &(wld.map);
|
||
|
if (!private->contemplace_workers) {
|
||
| ai/tex/texai.c | ||
|---|---|---|
|
{
|
||
|
TEXAI_AIT;
|
||
|
FC_FREE(ait->private);
|
||
|
FC_FREE(ait->pprivate);
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
| ... | ... | |
|
private = fc_malloc(sizeof(struct dai_private_data));
|
||
|
private->contemplace_workers = FALSE; /* We use custom code to set worker want and type */
|
||
|
ai->private = private;
|
||
|
ai->pprivate = private;
|
||
|
texai_init_self(ai);
|
||
| common/ai.h | ||
|---|---|---|
|
{
|
||
|
char name[MAX_LEN_NAME];
|
||
|
void *private;
|
||
|
void *pprivate;
|
||
|
struct {
|
||
|
/* Called for every AI type when server quits. */
|
||