Freeciv-3.1
Loading...
Searching...
No Matches
taimsg.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__TAIMSG_H
14#define FC__TAIMSG_H
15
16#define SPECENUM_NAME taimsgtype
17#define SPECENUM_VALUE0 TAI_MSG_THR_EXIT
18#define SPECENUM_VALUE0NAME "Exit"
19#define SPECENUM_VALUE1 TAI_MSG_FIRST_ACTIVITIES
20#define SPECENUM_VALUE1NAME "FirstActivities"
21#define SPECENUM_VALUE2 TAI_MSG_PHASE_FINISHED
22#define SPECENUM_VALUE2NAME "PhaseFinished"
23#include "specenum_gen.h"
24
25#define SPECENUM_NAME taireqtype
26#define SPECENUM_VALUE0 TAI_REQ_WORKER_TASK
27#define SPECENUM_VALUE0NAME "WorkerTask"
28#define SPECENUM_VALUE1 TAI_REQ_TURN_DONE
29#define SPECENUM_VALUE1NAME "TurnDone"
30#include "specenum_gen.h"
31
32struct tai_msg
33{
34 enum taimsgtype type;
35 struct player *plr;
36 void *data;
37};
38
39struct tai_req
40{
41 enum taireqtype type;
42 struct player *plr;
43 void *data;
44};
45
46#define SPECLIST_TAG taimsg
47#define SPECLIST_TYPE struct tai_msg
48#include "speclist.h"
49
50#define SPECLIST_TAG taireq
51#define SPECLIST_TYPE struct tai_req
52#include "speclist.h"
53
54void tai_send_msg(enum taimsgtype type, struct player *pplayer,
55 void *data);
56void tai_send_req(enum taireqtype type, struct player *pplayer,
57 void *data);
58
59void tai_first_activities(struct ai_type *ait, struct player *pplayer);
60void tai_phase_finished(struct ai_type *ait, struct player *pplayer);
61
62#endif /* FC__TAIMSG_H */
GType type
Definition repodlgs.c:1312
Definition ai.h:50
struct player * plr
Definition taimsg.h:35
enum taimsgtype type
Definition taimsg.h:34
void * data
Definition taimsg.h:36
struct player * plr
Definition taimsg.h:42
enum taireqtype type
Definition taimsg.h:41
void * data
Definition taimsg.h:43
void tai_send_req(enum taireqtype type, struct player *pplayer, void *data)
Definition taimsg.c:48
void tai_send_msg(enum taimsgtype type, struct player *pplayer, void *data)
Definition taimsg.c:26
void tai_phase_finished(struct ai_type *ait, struct player *pplayer)
Definition taimsg.c:71
void tai_first_activities(struct ai_type *ait, struct player *pplayer)
Definition taimsg.c:63