Freeciv21
Develop your civilization from humble roots to a global empire
tools_fc_interface.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 1996-2021 Freeciv21 and Freeciv contributors. This file is
3  part of Freeciv21. Freeciv21 is free software: you can
4  ^oo^ redistribute it and/or modify it under the terms of the GNU
5  (..) General Public License as published by the Free Software
6  () () Foundation, either version 3 of the License, or (at your
7  ()__() option) any later version. You should have received
8  a copy of the GNU General Public License along with Freeciv21. If not,
9  see https://www.gnu.org/licenses/.
10  */
11 
12 // common
13 #include "fc_interface.h"
14 
15 // server
16 #include "srv_main.h"
17 
18 #include "tools_fc_interface.h"
19 
23 static bool tool_player_tile_vision_get(const struct tile *ptile,
24  const struct player *pplayer,
25  enum vision_layer vision)
26 {
27  qCritical("Assumed unused function %s called.", __FUNCTION__);
28  return false;
29 }
30 
34 static int tool_player_tile_city_id_get(const struct tile *ptile,
35  const struct player *pplayer)
36 {
37  qCritical("Assumed unused function %s called.", __FUNCTION__);
38  return IDENTITY_NUMBER_ZERO;
39 }
40 
45 {
46  struct functions *funcs = fc_interface_funcs();
47 
48  // May be used when generating help texts
55 
56  // Not used. Set to dummy functions.
59 
60  /* Keep this function call at the end. It checks if all required functions
61  are defined. */
63 }
struct functions * fc_interface_funcs()
Return the function pointer.
void fc_interface_init()
Test and initialize the functions.
#define IDENTITY_NUMBER_ZERO
Definition: fc_types.h:76
const char * server_ss_name_get(server_setting_id id)
Returns the name of the server setting with the specified id.
Definition: srv_main.cpp:3281
bool server_ss_val_bool_get(server_setting_id id)
Returns the value of the boolean server setting with the specified id.
Definition: srv_main.cpp:3311
server_setting_id server_ss_by_name(const char *name)
Returns the id of the server setting with the specified name.
Definition: srv_main.cpp:3266
int server_ss_val_int_get(server_setting_id id)
Returns the value of the integer server setting with the specified id.
Definition: srv_main.cpp:3326
unsigned int server_ss_val_bitwise_get(server_setting_id id)
Returns the value of the bitwise server setting with the specified id.
Definition: srv_main.cpp:3341
enum sset_type server_ss_type_get(server_setting_id id)
Returns the type of the server setting with the specified id.
Definition: srv_main.cpp:3296
int(* player_tile_city_id_get)(const struct tile *ptile, const struct player *pplayer)
Definition: fc_interface.h:42
int(* server_setting_val_int_get)(server_setting_id id)
Definition: fc_interface.h:29
bool(* player_tile_vision_get)(const struct tile *ptile, const struct player *pplayer, enum vision_layer vision)
Definition: fc_interface.h:36
const char *(* server_setting_name_get)(server_setting_id id)
Definition: fc_interface.h:26
bool(* server_setting_val_bool_get)(server_setting_id id)
Definition: fc_interface.h:28
server_setting_id(* server_setting_by_name)(const char *name)
Definition: fc_interface.h:25
unsigned int(* server_setting_val_bitwise_get)(server_setting_id id)
Definition: fc_interface.h:30
enum sset_type(* server_setting_type_get)(server_setting_id id)
Definition: fc_interface.h:27
Definition: player.h:231
Definition: tile.h:42
Definition: vision.h:83
static bool tool_player_tile_vision_get(const struct tile *ptile, const struct player *pplayer, enum vision_layer vision)
Unused but required by fc_interface_init()
static int tool_player_tile_city_id_get(const struct tile *ptile, const struct player *pplayer)
Unused but required by fc_interface_init()
void fc_interface_init_tool()
Initialize tool specific functions.