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
23{
24 struct ai_city defai; /* Keep this first so default ai finds it */
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
37static 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 */
void * city_ai_data(const struct city *pcity, const struct ai_type *ai)
Definition city.c:3609
Definition ai.h:50
Definition city.h:320
struct ai_city defai
Definition texaicity.h:24
int unit_wants[U_LAST]
Definition texaicity.h:25
static struct texai_city * texai_city_data(struct ai_type *ait, const struct city *pcity)
Definition texaicity.h:37
void texai_city_alloc(struct ai_type *ait, struct city *pcity)
Definition texaicity.c:565
void texai_city_free(struct ai_type *ait, struct city *pcity)
Definition texaicity.c:578
void texai_city_worker_requests_create(struct ai_type *ait, struct player *pplayer, struct city *pcity)
Definition texaicity.c:72
void texai_city_worker_wants(struct ai_type *ait, struct player *pplayer, struct city *pcity)
Definition texaicity.c:93
void texai_req_worker_task_rcv(struct texai_req *req)
Definition texaicity.c:531
#define U_LAST
Definition unittype.h:40