Freeciv-3.1: /fast/freeciv/nightly/S3_1/ai/tex/texaimsg.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
texaimsg.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__TEXAIMSG_H
14#define FC__TEXAIMSG_H
15
16#define SPECENUM_NAME texaimsgtype
17#define SPECENUM_VALUE0 TEXAI_MSG_THR_EXIT
18#define SPECENUM_VALUE0NAME "Exit"
19#define SPECENUM_VALUE1 TEXAI_MSG_FIRST_ACTIVITIES
20#define SPECENUM_VALUE1NAME "FirstActivities"
21#define SPECENUM_VALUE2 TEXAI_MSG_PHASE_FINISHED
22#define SPECENUM_VALUE2NAME "PhaseFinished"
23#define SPECENUM_VALUE3 TEXAI_MSG_TILE_INFO
24#define SPECENUM_VALUE3NAME "TileInfo"
25#define SPECENUM_VALUE4 TEXAI_MSG_MAP_ALLOC
26#define SPECENUM_VALUE4NAME "MapAlloc"
27#define SPECENUM_VALUE5 TEXAI_MSG_MAP_FREE
28#define SPECENUM_VALUE5NAME "MapFree"
29#define SPECENUM_VALUE6 TEXAI_MSG_CITY_CREATED
30#define SPECENUM_VALUE6NAME "CityCreated"
31#define SPECENUM_VALUE7 TEXAI_MSG_CITY_CHANGED
32#define SPECENUM_VALUE7NAME "CityChanged"
33#define SPECENUM_VALUE8 TEXAI_MSG_CITY_DESTROYED
34#define SPECENUM_VALUE8NAME "CityDestroyed"
35#define SPECENUM_VALUE9 TEXAI_MSG_UNIT_CREATED
36#define SPECENUM_VALUE9NAME "UnitCreated"
37#define SPECENUM_VALUE10 TEXAI_MSG_UNIT_CHANGED
38#define SPECENUM_VALUE10NAME "UnitChanged"
39#define SPECENUM_VALUE11 TEXAI_MSG_UNIT_DESTROYED
40#define SPECENUM_VALUE11NAME "UnitDestroyed"
41#define SPECENUM_VALUE12 TEXAI_MSG_UNIT_MOVED
42#define SPECENUM_VALUE12NAME "UnitMoved"
43#include "specenum_gen.h"
44
45#define SPECENUM_NAME texaireqtype
46#define SPECENUM_VALUE0 TEXAI_REQ_WORKER_TASK
47#define SPECENUM_VALUE0NAME "WorkerTask"
48#define SPECENUM_VALUE1 TEXAI_REQ_TURN_DONE
49#define SPECENUM_VALUE1NAME "TurnDone"
50#define SPECENUM_VALUE2 TEXAI_BUILD_CHOICE
51#define SPECENUM_VALUE2NAME "BuildChoice"
52#include "specenum_gen.h"
53
54 struct texai_msg
55{
56 enum texaimsgtype type;
57 struct player *plr;
58 void *data;
59};
60
61 struct texai_req
62{
63 enum texaireqtype type;
64 struct player *plr;
65 void *data;
66};
67
68#define SPECLIST_TAG texaimsg
69#define SPECLIST_TYPE struct texai_msg
70#include "speclist.h"
71
72#define SPECLIST_TAG texaireq
73#define SPECLIST_TYPE struct texai_req
74#include "speclist.h"
75
76void texai_send_msg(enum texaimsgtype type, struct player *pplayer,
77 void *data);
78void texai_send_req(enum texaireqtype type, struct player *pplayer,
79 void *data);
80
81void texai_first_activities(struct ai_type *ait, struct player *pplayer);
82void texai_phase_finished(struct ai_type *ait, struct player *pplayer);
83
84#endif /* FC__TEXAIMSG_H */
type
GType type
Definition repodlgs.c:1312
specenum_gen.h
speclist.h
ai_type
Definition ai.h:50
player
Definition player.h:249
texai_msg
Definition texaimsg.h:55
texai_msg::plr
struct player * plr
Definition texaimsg.h:57
texai_msg::type
enum texaimsgtype type
Definition texaimsg.h:56
texai_msg::data
void * data
Definition texaimsg.h:58
texai_req
Definition texaimsg.h:62
texai_req::data
void * data
Definition texaimsg.h:65
texai_req::type
enum texaireqtype type
Definition texaimsg.h:63
texai_req::plr
struct player * plr
Definition texaimsg.h:64
texai_first_activities
void texai_first_activities(struct ai_type *ait, struct player *pplayer)
Definition texaimsg.c:63
texai_send_msg
void texai_send_msg(enum texaimsgtype type, struct player *pplayer, void *data)
Definition texaimsg.c:26
texai_phase_finished
void texai_phase_finished(struct ai_type *ait, struct player *pplayer)
Definition texaimsg.c:71
texai_send_req
void texai_send_req(enum texaireqtype type, struct player *pplayer, void *data)
Definition texaimsg.c:48