Freeciv-3.2
Loading...
Searching...
No Matches
fc_interface.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/* utility */
19#include "astring.h"
20#include "fciconv.h"
21#include "netfile.h"
22#include "shared.h"
23
24/* common */
25#include "player.h"
26#include "tile.h"
27#include "vision.h"
28
29#include "fc_interface.h"
30
31/* Struct with functions pointers; the functions are defined in
32 ./client/client_main.c:init_client_functions(),
33 ./server/srv_main.c:init_server_functions(), and
34 ./tools/shared/tools_fc_interface.c(). */
36
37/* The functions are accessed via this pointer. */
38const struct functions *fc_funcs = NULL;
39/* After this is set to TRUE (in interface_init()), the functions are
40 available via fc_funcs. */
42
43/************************************************************************/
48{
50
51 return &fc_functions;
52}
53
54/************************************************************************/
57void i_am_server(void)
58{
60}
61
62/************************************************************************/
65void i_am_client(void)
66{
68}
69
70/************************************************************************/
98
99/************************************************************************/
void fc_astr_init(void)
Definition astring.c:414
void fc_astr_free(void)
Definition astring.c:422
char * incite_cost
Definition comments.c:75
void i_am_server(void)
void i_am_client(void)
const struct functions * fc_funcs
struct functions fc_functions
void libfreeciv_init(bool check_fc_interface)
bool fc_funcs_defined
void libfreeciv_free(void)
struct functions * fc_interface_funcs(void)
bool am_i_server
Definition game.c:65
void fc_iconv_close(void)
Definition fciconv.c:417
#define fc_assert_exit(condition)
Definition log.h:197
void netfile_free(void)
Definition netfile.c:327
void diplrel_mess_close(void)
Definition player.c:1808
void free_user_home_dir(void)
Definition shared.c:665
void init_nls(void)
Definition shared.c:1470
void free_data_dir_names(void)
Definition shared.c:866
void free_multicast_group(void)
Definition shared.c:1705
void free_fileinfo_data(void)
Definition shared.c:1158
void free_nls(void)
Definition shared.c:1532
void free_freeciv_storage_dir(void)
Definition shared.c:696
int(* player_tile_city_id_get)(const struct tile *ptile, const struct player *pplayer)
int(* server_setting_val_int_get)(server_setting_id id)
bool(* player_tile_vision_get)(const struct tile *ptile, const struct player *pplayer, enum vision_layer vision)
bool(* server_setting_val_bool_get)(server_setting_id id)
server_setting_id(* server_setting_by_name)(const char *name)
unsigned int(* server_setting_val_bitwise_get)(server_setting_id id)
enum sset_type(* server_setting_type_get)(server_setting_id id)
void(* gui_color_free)(struct color *pcolor)
const char *(* server_setting_name_get)(server_setting_id id)
void fc_support_init(void)
Definition support.c:1343
void fc_support_free(void)
Definition support.c:1361
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47