Freeciv-3.2: /fast/freeciv/nightly/S3_2/ai/tex/texaicity.h Source File

Freeciv-3.2

Loading...
Searching...
No Matches
texaicity.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__TEXAICITY_H
14#define FC__TEXAICITY_H
15
16/* ai/default */
17#include "daicity.h"
18
19struct city;
20struct texai_req;
21
22 struct texai_city
23{
24 struct ai_city defai; /* Keep this first so default ai finds it */
25 int unit_wants[U_LAST];
26};
27
28void texai_city_alloc(struct ai_type *ait, struct city *pcity);
29void texai_city_free(struct ai_type *ait, struct city *pcity);
30
31void texai_city_worker_requests_create(struct ai_type *ait, struct player *pplayer,
32 struct city *pcity);
33void texai_city_worker_wants(struct ai_type *ait,
34 struct player *pplayer, struct city *pcity);
35void texai_req_worker_task_rcv(struct texai_req *req);
36
37 static inline struct texai_city *texai_city_data(struct ai_type *ait,
38 const struct city *pcity)
39{
40 return (struct texai_city *)city_ai_data(pcity, ait);
41}
42
43#endif /* FC__TEXAICITY_H */
city_ai_data
void * city_ai_data(const struct city *pcity, const struct ai_type *ai)
Definition city.c:3597
daicity.h
ai_city
Definition daicity.h:34
ai_type
Definition ai.h:50
city
Definition city.h:320
player
Definition player.h:247
texai_city
Definition texaicity.h:23
texai_city::defai
struct ai_city defai
Definition texaicity.h:24
texai_city::unit_wants
int unit_wants[U_LAST]
Definition texaicity.h:25
texai_req
Definition texaimsg.h:62
texai_city_data
static struct texai_city * texai_city_data(struct ai_type *ait, const struct city *pcity)
Definition texaicity.h:37
texai_city_alloc
void texai_city_alloc(struct ai_type *ait, struct city *pcity)
Definition texaicity.c:564
texai_city_free
void texai_city_free(struct ai_type *ait, struct city *pcity)
Definition texaicity.c:577
texai_city_worker_requests_create
void texai_city_worker_requests_create(struct ai_type *ait, struct player *pplayer, struct city *pcity)
Definition texaicity.c:72
texai_city_worker_wants
void texai_city_worker_wants(struct ai_type *ait, struct player *pplayer, struct city *pcity)
Definition texaicity.c:93
texai_req_worker_task_rcv
void texai_req_worker_task_rcv(struct texai_req *req)
Definition texaicity.c:530
U_LAST
#define U_LAST
Definition unittype.h:40