Freeciv-3.1: /fast/freeciv/nightly/S3_1/ai/threaded/taimsg.h Source File

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
32 struct tai_msg
33{
34 enum taimsgtype type;
35 struct player *plr;
36 void *data;
37};
38
39 struct 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 */
type
GType type
Definition repodlgs.c:1312
specenum_gen.h
speclist.h
ai_type
Definition ai.h:50
player
Definition player.h:249
tai_msg
Definition taimsg.h:33
tai_msg::plr
struct player * plr
Definition taimsg.h:35
tai_msg::type
enum taimsgtype type
Definition taimsg.h:34
tai_msg::data
void * data
Definition taimsg.h:36
tai_req
Definition taimsg.h:40
tai_req::plr
struct player * plr
Definition taimsg.h:42
tai_req::type
enum taireqtype type
Definition taimsg.h:41
tai_req::data
void * data
Definition taimsg.h:43
tai_send_req
void tai_send_req(enum taireqtype type, struct player *pplayer, void *data)
Definition taimsg.c:48
tai_send_msg
void tai_send_msg(enum taimsgtype type, struct player *pplayer, void *data)
Definition taimsg.c:26
tai_phase_finished
void tai_phase_finished(struct ai_type *ait, struct player *pplayer)
Definition taimsg.c:71
tai_first_activities
void tai_first_activities(struct ai_type *ait, struct player *pplayer)
Definition taimsg.c:63