Freeciv-3.4
Loading...
Searching...
No Matches
accessarea.c
Go to the documentation of this file.
1/****************************************************************************
2 Freeciv - Copyright (C) 2004 - The Freeciv Team
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
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* common/aicore */
19#include "pf_tools.h"
20
21/* common */
22#include "player.h"
23#include "tiledef.h"
24
25#include "accessarea.h"
26
28 const struct unit_type *access_unit;
29};
30
31static struct access_info ainfo = { nullptr };
32
34
35/*********************************************************************/
39void access_info_init(const struct unit_type *aunit)
40{
41 if (aunit != nullptr) {
42 int i;
43
45
46 for (i = 0; i < MAX_NUM_PLAYERS; i++) {
48 }
49 }
50}
51
52/*********************************************************************/
56{
57 int i;
58
59 if (ainfo.access_unit != nullptr) {
60 ainfo.access_unit = nullptr;
61
62 for (i = 0; i < MAX_NUM_PLAYERS; i++) {
64 }
65 }
66}
67
68/*********************************************************************/
72{
73 return ainfo.access_unit;
74}
75
76/*********************************************************************/
89
90/*********************************************************************/
94void area_list_clear_plr(struct player *pplayer)
95{
97}
98
99/*********************************************************************/
103void area_list_for_player_set(struct player *pplayer, struct aarea_list *alist)
104{
105 aalist[player_index(pplayer)] = alist;
106}
static struct aarea_list * aalist[MAX_NUM_PLAYERS]
Definition accessarea.c:33
void area_list_for_player_set(struct player *pplayer, struct aarea_list *alist)
Definition accessarea.c:103
void access_info_init(const struct unit_type *aunit)
Definition accessarea.c:39
void area_list_clear(struct aarea_list *alist)
Definition accessarea.c:80
void access_info_close(void)
Definition accessarea.c:55
const struct unit_type * access_info_access_unit(void)
Definition accessarea.c:71
static struct access_info ainfo
Definition accessarea.c:31
void area_list_clear_plr(struct player *pplayer)
Definition accessarea.c:94
#define aarea_list_iterate_end
Definition accessarea.h:31
#define aarea_list_iterate(aarealist, parea)
Definition accessarea.h:29
char * incite_cost
Definition comments.c:77
#define MAX_NUM_PLAYERS
Definition fc_types.h:36
int player_index(const struct player *pplayer)
Definition player.c:818
const struct unit_type * access_unit
Definition accessarea.c:28