Freeciv-3.2
Loading...
Searching...
No Matches
tools_fc_interface.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 2017 - Freeciv Development 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 */
19#include "fc_interface.h"
20
21/* server */
22#include "srv_main.h"
23
24
25#include "tools_fc_interface.h"
26
27
28/***********************************************************************/
31static bool tool_player_tile_vision_get(const struct tile *ptile,
32 const struct player *pplayer,
34{
35 log_error("Assumed unused function %s called.", __FUNCTION__);
36 return FALSE;
37}
38
39/***********************************************************************/
42static int tool_player_tile_city_id_get(const struct tile *ptile,
43 const struct player *pplayer)
44{
45 log_error("Assumed unused function %s called.", __FUNCTION__);
47}
48
49/***********************************************************************/
52static void tool_gui_color_free(struct color *pcolor)
53{
54 log_error("Assumed unused function %s called.", __FUNCTION__);
55}
56
57/***********************************************************************/
61{
63
64 memset(funcs, 0, sizeof(*funcs));
65
66 /* May be used when generating help texts */
67 funcs->server_setting_by_name = server_ss_by_name;
68 funcs->server_setting_name_get = server_ss_name_get;
69 funcs->server_setting_type_get = server_ss_type_get;
70 funcs->server_setting_val_bool_get = server_ss_val_bool_get;
71 funcs->server_setting_val_int_get = server_ss_val_int_get;
72 funcs->server_setting_val_bitwise_get = server_ss_val_bitwise_get;
73
74 /* Not used. Set to dummy functions. */
75 funcs->player_tile_vision_get = tool_player_tile_vision_get;
76 funcs->player_tile_city_id_get = tool_player_tile_city_id_get;
77 funcs->gui_color_free = tool_gui_color_free;
78
79 /* Keep this function call at the end. It checks if all required functions
80 are defined. */
82}
struct canvas int int int int struct sprite *sprite struct canvas struct color * pcolor
Definition canvas_g.h:56
char * incite_cost
Definition comments.c:75
void libfreeciv_init(bool check_fc_interface)
struct functions * fc_interface_funcs(void)
#define IDENTITY_NUMBER_ZERO
Definition fc_types.h:92
static struct gui_funcs funcs
#define log_error(message,...)
Definition log.h:103
const char * server_ss_name_get(server_setting_id id)
Definition srv_main.c:3636
bool server_ss_val_bool_get(server_setting_id id)
Definition srv_main.c:3666
server_setting_id server_ss_by_name(const char *name)
Definition srv_main.c:3621
int server_ss_val_int_get(server_setting_id id)
Definition srv_main.c:3681
unsigned int server_ss_val_bitwise_get(server_setting_id id)
Definition srv_main.c:3696
enum sset_type server_ss_type_get(server_setting_id id)
Definition srv_main.c:3651
Definition colors.h:21
Definition tile.h:50
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47
static bool tool_player_tile_vision_get(const struct tile *ptile, const struct player *pplayer, enum vision_layer vision)
static int tool_player_tile_city_id_get(const struct tile *ptile, const struct player *pplayer)
static void tool_gui_color_free(struct color *pcolor)
void fc_interface_init_tool(void)