Feature #1918 » 0065-access_areas_refresh-Iterate-tiledefs-with-tiledef_i.patch
| common/accessarea.c | ||
|---|---|---|
|
struct access_area *aarea = fc_malloc(sizeof(struct access_area));
|
||
|
struct pf_parameter parameter;
|
||
|
struct pf_map *pfm;
|
||
|
int i;
|
||
|
aarea->cities = city_list_new();
|
||
|
aarea->capital = is_capital(pcity);
|
||
| ... | ... | |
|
} city_list_iterate_end;
|
||
|
BV_CLR_ALL(aarea->tiledefs);
|
||
|
for (i = 0; i < MAX_TILEDEFS; i++) {
|
||
|
pf_map_tiles_iterate(pfm, ptile, TRUE) {
|
||
|
if (tile_matches_tiledef(tiledef_by_number(i), ptile)) {
|
||
|
BV_SET(aarea->tiledefs, i);
|
||
|
pf_map_tiles_iterate(pfm, ptile, TRUE) {
|
||
|
tiledef_iterate(td) {
|
||
|
if (tile_matches_tiledef(td, ptile)) {
|
||
|
BV_SET(aarea->tiledefs, tiledef_number(td));
|
||
|
break;
|
||
|
}
|
||
|
} pf_map_tiles_iterate_end;
|
||
|
}
|
||
|
} tiledef_iterate_end;
|
||
|
} pf_map_tiles_iterate_end;
|
||
|
pf_map_destroy(pfm);
|
||
|
}
|
||