Freeciv-3.3: /fast/freeciv/nightly/main/ai/tex/texaiworld.c File Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Data Structures | Functions | Variables
texaiworld.c File Reference
`#include "idex.h"`
`#include "map.h"`
`#include "world_object.h"`
`#include "infracache.h"`
`#include "texaiplayer.h"`
`#include "texaiworld.h"`

Go to the source code of this file.

## Data Structures

struct | texai_tile_info_msg
struct | texai_city_info_msg
struct | texai_id_msg
struct | texai_unit_info_msg
struct | texai_unit_move_msg

## Functions

void | texai_world_init (void)
void | texai_world_close (void)
void | texai_map_init (void)
struct civ_map * | texai_map_get (void)
void | texai_map_close (void)
void | texai_tile_info (struct tile *ptile)
void | texai_tile_info_recv (void *data)
static void | texai_city_update (struct city *pcity, enum texaimsgtype msgtype)
void | texai_city_created (struct city *pcity)
void | texai_city_changed (struct city *pcity)
void | texai_city_info_recv (void *data, enum texaimsgtype msgtype)
struct city * | texai_map_city (int city_id)
void | texai_city_destroyed (struct city *pcity)
void | texai_city_destruction_recv (void *data)
static void | texai_unit_update (struct unit *punit, enum texaimsgtype msgtype)
void | texai_unit_created (struct unit *punit)
void | texai_unit_changed (struct unit *punit)
void | texai_unit_info_recv (void *data, enum texaimsgtype msgtype)
void | texai_unit_destroyed (struct unit *punit)
void | texai_unit_destruction_recv (void *data)
void | texai_unit_move_seen (struct unit *punit)
void | texai_unit_moved_recv (void *data)

## Variables

static struct world | texai_world

## Function Documentation

## ◆ texai_city_changed()

void texai_city_changed | ( | struct city * | pcity | ) |

City on main map has (potentially) changed.

Definition at line 169 of file texaiworld.c.

Referenced by fc_ai_tex_setup().

## ◆ texai_city_created()

void texai_city_created | ( | struct city * | pcity | ) |

New city has been added to the main map.

Definition at line 161 of file texaiworld.c.

Referenced by fc_ai_tex_setup(), and texai_control_gained().

## ◆ texai_city_destroyed()

void texai_city_destroyed | ( | struct city * | pcity | ) |

City has been removed from the main map.

Definition at line 226 of file texaiworld.c.

Referenced by fc_ai_tex_setup().

## ◆ texai_city_destruction_recv()

void texai_city_destruction_recv | ( | void * | data | ) |

Receive city destruction to the thread.

Definition at line 240 of file texaiworld.c.

Referenced by texai_check_messages().

## ◆ texai_city_info_recv()

void texai_city_info_recv | ( | void * | data,
|  | enum texaimsgtype | msgtype
| ) |  |

Receive city update to the thread.

Definition at line 177 of file texaiworld.c.

Referenced by texai_check_messages().

## ◆ texai_city_update()

static void texai_city_update | ( | struct city * | pcity,
|  | enum texaimsgtype | msgtype
| ) |  |

static

Send city information to the thread.

Definition at line 144 of file texaiworld.c.

Referenced by texai_city_changed(), and texai_city_created().

## ◆ texai_map_city()

struct city * texai_map_city | ( | int | city_id | ) |

Get city from the tex map

Definition at line 218 of file texaiworld.c.

Referenced by texai_check_messages().

## ◆ texai_map_close()

void texai_map_close | ( | void |  | ) |

Free resources allocated for texai world map

Definition at line 102 of file texaiworld.c.

Referenced by texai_map_free_recv().

## ◆ texai_map_get()

struct civ_map * texai_map_get | ( | void |  | ) |

Return tex worldmap

Definition at line 94 of file texaiworld.c.

Referenced by texai_check_messages().

## ◆ texai_map_init()

void texai_map_init | ( | void |  | ) |

Initialize world map for texai

Definition at line 85 of file texaiworld.c.

Referenced by texai_map_alloc_recv(), and texai_thread_start().

## ◆ texai_tile_info()

void texai_tile_info | ( | struct tile * | ptile | ) |

Tile info updated on main map. Send update to tex map.

Definition at line 110 of file texaiworld.c.

Referenced by fc_ai_tex_setup(), and texai_whole_map_copy().

## ◆ texai_tile_info_recv()

void texai_tile_info_recv | ( | void * | data | ) |

Receive tile update to the thread.

Definition at line 126 of file texaiworld.c.

Referenced by texai_check_messages().

## ◆ texai_unit_changed()

void texai_unit_changed | ( | struct unit * | punit | ) |

Unit (potentially) changed in main map.

Definition at line 291 of file texaiworld.c.

Referenced by fc_ai_tex_setup().

## ◆ texai_unit_created()

void texai_unit_created | ( | struct unit * | punit | ) |

New unit has been added to the main map.

Definition at line 283 of file texaiworld.c.

Referenced by fc_ai_tex_setup(), and texai_control_gained().

## ◆ texai_unit_destroyed()

void texai_unit_destroyed | ( | struct unit * | punit | ) |

Unit has been removed from the main map.

Definition at line 338 of file texaiworld.c.

Referenced by fc_ai_tex_setup().

## ◆ texai_unit_destruction_recv()

void texai_unit_destruction_recv | ( | void * | data | ) |

Receive unit destruction to the thread.

Definition at line 352 of file texaiworld.c.

Referenced by texai_check_messages().

## ◆ texai_unit_info_recv()

void texai_unit_info_recv | ( | void * | data,
|  | enum texaimsgtype | msgtype
| ) |  |

Receive unit update to the thread.

Definition at line 299 of file texaiworld.c.

Referenced by texai_check_messages().

## ◆ texai_unit_move_seen()

void texai_unit_move_seen | ( | struct unit * | punit | ) |

Unit has moved in the main map.

Definition at line 376 of file texaiworld.c.

Referenced by fc_ai_tex_setup().

## ◆ texai_unit_moved_recv()

void texai_unit_moved_recv | ( | void * | data | ) |

Receive unit move to the thread.

Definition at line 391 of file texaiworld.c.

Referenced by texai_check_messages().

## ◆ texai_unit_update()

static void texai_unit_update | ( | struct unit * | punit,
|  | enum texaimsgtype | msgtype
| ) |  |

static

Send unit information to the thread.

Definition at line 265 of file texaiworld.c.

Referenced by texai_unit_changed(), and texai_unit_created().

## ◆ texai_world_close()

void texai_world_close | ( | void |  | ) |

Free resources allocated for texai world object

Definition at line 77 of file texaiworld.c.

Referenced by texai_thread_start().

## ◆ texai_world_init()

void texai_world_init | ( | void |  | ) |

Initialize world object for texai

Definition at line 69 of file texaiworld.c.

Referenced by texai_thread_start().

## Variable Documentation

## ◆ texai_world

struct world texai_world

static

Definition at line 31 of file texaiworld.c.

Referenced by texai_city_destruction_recv(), texai_city_info_recv(), texai_map_city(), texai_map_close(), texai_map_get(), texai_map_init(), texai_tile_info_recv(), texai_unit_destruction_recv(), texai_unit_info_recv(), texai_unit_moved_recv(), texai_world_close(), and texai_world_init().