20#ifdef HAVE_MAPIMG_MAGICKWAND
22 #include <MagickWand/MagickWand.h>
24 #include <wand/MagickWand.h>
58#ifndef MagickLibInterface
59# define MagickLibInterface 0
61#ifndef MagickLibVersion
62# define MagickLibVersion 0
67#if (MagickLibInterface > 3) || (MagickLibVersion >= 0x662)
68# define magickwand_size_t size_t
70# define magickwand_size_t unsigned long
89#define NUM_PIXEL TILE_SIZE * TILE_SIZE
101 const struct player *pplayer,
127 const struct player *pplayer,
130 const struct player *pplayer,
133 const struct player *pplayer,
136 const struct player *pplayer,
139 const struct player *pplayer,
169 const struct player *pplayer,
172 const struct player *pplayer,
175 const struct player *pplayer,
178 const struct player *pplayer,
181 const struct player *pplayer,
191 0, 1, 2, 3, 4, 5, 6, 7,
192 0, 1, 2, 3, 4, 5, 6, 7,
199 2, 2, 2, 2, 2, 2, 2, 2,
200 3, 3, 3, 3, 3, 3, 3, 3,
207 const struct player *pplayer,
210 const struct player *pplayer,
213 const struct player *pplayer,
216 const struct player *pplayer,
219 const struct player *pplayer,
226#define ARG_PLRBV "plrbv"
227#define ARG_PLRID "plrid"
228#define ARG_PLRNAME "plrname"
231#define SPECENUM_NAME mapdef_arg
232#define SPECENUM_VALUE0 MAPDEF_FORMAT
233#define SPECENUM_VALUE0NAME "format"
234#define SPECENUM_VALUE1 MAPDEF_MAP
235#define SPECENUM_VALUE1NAME "map"
236#define SPECENUM_VALUE2 MAPDEF_PLRBV
237#define SPECENUM_VALUE2NAME ARG_PLRBV
238#define SPECENUM_VALUE3 MAPDEF_PLRID
239#define SPECENUM_VALUE3NAME ARG_PLRID
240#define SPECENUM_VALUE4 MAPDEF_PLRNAME
241#define SPECENUM_VALUE4NAME ARG_PLRNAME
242#define SPECENUM_VALUE5 MAPDEF_SHOW
243#define SPECENUM_VALUE5NAME "show"
244#define SPECENUM_VALUE6 MAPDEF_TURNS
245#define SPECENUM_VALUE6NAME "turns"
246#define SPECENUM_VALUE7 MAPDEF_ZOOM
247#define SPECENUM_VALUE7NAME "zoom"
248#define SPECENUM_COUNT MAPDEF_COUNT
254#define SPECENUM_NAME imageformat
255#define SPECENUM_BITWISE
256#define SPECENUM_VALUE0 IMGFORMAT_GIF
257#define SPECENUM_VALUE0NAME "gif"
258#define SPECENUM_VALUE1 IMGFORMAT_PNG
259#define SPECENUM_VALUE1NAME "png"
260#define SPECENUM_VALUE2 IMGFORMAT_PPM
261#define SPECENUM_VALUE2NAME "ppm"
262#define SPECENUM_VALUE3 IMGFORMAT_JPG
263#define SPECENUM_VALUE3NAME "jpg"
267#define SPECENUM_NAME imagetool
268#define SPECENUM_VALUE0 IMGTOOL_PPM
269#define SPECENUM_VALUE0NAME "ppm"
270#define SPECENUM_VALUE1 IMGTOOL_MAGICKWAND
271#define SPECENUM_VALUE1NAME "magick"
275#define SPECENUM_NAME show_player
276#define SPECENUM_VALUE0 SHOW_NONE
277#define SPECENUM_VALUE0NAME "none"
278#define SPECENUM_VALUE1 SHOW_EACH
279#define SPECENUM_VALUE1NAME "each"
280#define SPECENUM_VALUE2 SHOW_HUMAN
281#define SPECENUM_VALUE2NAME "human"
282#define SPECENUM_VALUE3 SHOW_ALL
283#define SPECENUM_VALUE3NAME "all"
285#define SPECENUM_VALUE4 SHOW_PLRNAME
286#define SPECENUM_VALUE4NAME ARG_PLRNAME
288#define SPECENUM_VALUE5 SHOW_PLRID
289#define SPECENUM_VALUE5NAME ARG_PLRID
291#define SPECENUM_VALUE6 SHOW_PLRBV
292#define SPECENUM_VALUE6NAME ARG_PLRBV
300#define SPECENUM_NAME mapimg_status
301#define SPECENUM_VALUE0 MAPIMG_STATUS_UNKNOWN
302#define SPECENUM_VALUE0NAME _("not checked")
303#define SPECENUM_VALUE1 MAPIMG_STATUS_OK
304#define SPECENUM_VALUE1NAME _("OK")
305#define SPECENUM_VALUE2 MAPIMG_STATUS_ERROR
306#define SPECENUM_VALUE2NAME _("error")
309#define MAX_LEN_MAPARG MAX_LEN_MAPDEF
310#define MAX_NUM_MAPIMG 10
314 const char *val,
bool check);
348#define SPECLIST_TAG mapdef
349#define SPECLIST_TYPE struct mapdef
352#define mapdef_list_iterate(mapdef_list, pmapdef) \
353 TYPED_LIST_ITERATE(struct mapdef, mapdef_list, pmapdef)
354#define mapdef_list_iterate_end \
361#define IMG_BORDER_HEIGHT 5
362#define IMG_BORDER_WIDTH IMG_BORDER_HEIGHT
363#define IMG_SPACER_HEIGHT 5
364#define IMG_LINE_HEIGHT 5
365#define IMG_TEXT_HEIGHT 12
393 int xsize,
int ysize);
397static inline int img_index(
const int x,
const int y,
407#ifdef HAVE_MAPIMG_MAGICKWAND
427#define GEN_TOOLKIT(_tool, _format_default, _formats, _save_func, _help) \
428 {_tool, _format_default, _formats, _save_func, _help},
433 N_(
"Standard ppm files"))
434#ifdef HAVE_MAPIMG_MAGICKWAND
444#ifdef HAVE_MAPIMG_MAGICKWAND
445 #define MAPIMG_DEFAULT_IMGFORMAT IMGFORMAT_GIF
446 #define MAPIMG_DEFAULT_IMGTOOL IMGTOOL_MAGICKWAND
448 #define MAPIMG_DEFAULT_IMGFORMAT IMGFORMAT_PPM
449 #define MAPIMG_DEFAULT_IMGTOOL IMGTOOL_PPM
454#define img_toolkit_iterate(_toolkit) \
457 for (_i = 0; _i < img_toolkits_count; _i++) { \
458 const struct toolkit *_toolkit = &img_toolkits[_i];
460#define img_toolkit_iterate_end \
465#define MAX_LEN_ERRORBUF 1024
469 const char *format, ...)
471#define MAPIMG_LOG(format, ...) \
472 mapimg_log(__FILE__, __FUNCTION__, __FC_LINE__, format, ## __VA_ARGS__)
473#define MAPIMG_ASSERT_RET_VAL(cond, expr) \
474 fc_assert_action(cond, MAPIMG_LOG(_("internal error")); return (expr))
588 case SHOW_NONE:
return _(
"no players, only terrain");
589 case SHOW_EACH:
return _(
"one image per player");
590 case SHOW_HUMAN:
return _(
"one image per human player");
591 case SHOW_ALL:
return _(
"all players on a single image");
592 case SHOW_PLRNAME:
return _(
"just the player named with 'plrname'");
593 case SHOW_PLRID:
return _(
"just the player specified with 'plrid'");
594 case SHOW_PLRBV:
return _(
"one image per player in 'plrbv'");
607 enum mapimg_layer layer;
693 _(
"This command controls the creation of map images. Supported "
695 " define <mapdef> - define a map image; returns numeric <id>\n"
696 " show <id>|all - list map image definitions or show a specific one\n"
697 " create <id>|all - manually save image(s) for current map state\n"
698 " delete <id>|all - delete map image definition(s)\n"
699 " colortest - create test image(s) showing all colors\n"
701 "Multiple definitions can be active at once. "
702 "A definition <mapdef> consists of colon-separated options:\n"
704 "option (default) description\n"
706 "format=<[tool|]format> %-10s file format\n"
707 "show=<show> %-10s which players to show\n"
708 " plrname=<name> player name\n"
709 " plrid=<id> numeric player id\n"
710 " plrbv=<bit vector> see example; first char = id 0\n"
711 "turns=<turns> %-10s save image each <turns> turns\n"
712 " (0=no autosave, save with 'create')\n"
713 "zoom=<zoom> %-10s magnification factor (1-5)\n"
714 "map=<map> %-10s which map layers to draw\n"
716 "<[tool|]format> = use image format <format>, optionally specifying "
717 "toolkit <tool>. The following toolkits and formats are compiled in:\n"
720 "<show> determines which players are represented and how many "
721 "images are saved by this definition:\n"
724 "<map> can contain one or more of the following layers:\n"
725 " - 'a' show area within borders of specified players\n"
726 " - 'b' show borders of specified players\n"
727 " - 'c' show cities of specified players\n"
728 " - 'f' show fog of war (single-player images only)\n"
729 " - 'k' show only player knowledge (single-player images only)\n"
730 " - 't' full display of terrain types\n"
731 " - 'u' show units of specified players\n"
733 "Examples of <mapdef>:\n"
734 " 'zoom=1:map=tcub:show=all:format=ppm|ppm'\n"
735 " 'zoom=2:map=tcub:show=each:format=png'\n"
736 " 'zoom=1:map=tcub:show=plrname:plrname=Otto:format=gif'\n"
737 " 'zoom=3:map=cu:show=plrbv:plrbv=010011:format=jpg'\n"
738 " 'zoom=1:map=t:show=none:format=magick|jpg'"),
767#define NUM_MAX_MAPARGS 10
768#define NUM_MAX_MAPOPTS 2
785 MAPIMG_LOG(
_(
"map definition string too long (max %d characters)"),
791 MAPIMG_LOG(
_(
"maximum number of map definitions reached (%d)"),
799 MAPIMG_LOG(
_(
"duplicate of map image definition %d ('%s')"),
i,
837 switch (
pmapdef->player.show) {
840 MAPIMG_LOG(
_(
"'show=%s' but no player name 'plrname'"),
847 MAPIMG_LOG(
_(
"'show=%s' but no player id 'plrid'"),
854 MAPIMG_LOG(
_(
"'show=%s' but no player bitvector 'plrbv'"),
885#undef NUM_MAX_MAPARGS
886#undef NUM_MAX_MAPOPTS
891#define NUM_MAX_FORMATARGS 2
893 const char *val,
bool check)
896 log_debug(
"Option '%s' for mapimg used more than once.",
972 enum mapimg_layer layer;
980 for (
l = 0;
l <
len;
l++) {
1007 MAPIMG_LOG(
_(
"invalid character in bitvector: '%c' (%s)"),
1010 }
else if (val[
i] ==
'1') {
1028 MAPIMG_LOG(
_(
"'plrid' should be between 0 and %d"),
1044 MAPIMG_LOG(
_(
"player name too long: '%s' (max: %lu)"), val,
1045 (
unsigned long)
sizeof(
pmapdef->player.name));
1072 if (
sscanf(val,
"%d", &turns) != 0) {
1074 MAPIMG_LOG(
_(
"'turns' should be between 0 and 99"));
1090 if (
sscanf(val,
"%d", &zoom) != 0) {
1092 MAPIMG_LOG(
_(
"'zoom' factor should be between 1 and 5"));
1111 MAPIMG_LOG(
_(
"invalid value for option '%s': '%s'"),
1115#undef NUM_MAX_FORMATARGS
1135 MAPIMG_LOG(
_(
"map definition not checked (game not started)"));
1240 "definition %d\n"),
id);
1272 switch (
pmapdef->player.show) {
1351 MAPIMG_LOG(
_(
"map definition not checked or error"));
1373 switch (
pmapdef->player.show) {
1422 log_debug(
"Image generation time: %g seconds (%g apparent)",
1569 MAPIMG_LOG(
_(
"no map definition with id %d"),
id);
1581 enum mapimg_layer layer;
1586 MAPIMG_LOG(
_(
"map definition not checked or error"));
1607 switch (
pmapdef->player.show) {
1649 switch (
pmapdef->player.show) {
1669 if (pplayer !=
NULL) {
1675 _(
"unknown player name: '%s'"),
pmapdef->player.name);
1685 if (pplayer !=
NULL) {
1691 _(
"invalid player id: %d"),
pmapdef->player.id);
1708 const char *format, ...)
1738 enum mapimg_layer layer;
1739 int i, count = 0,
plr_id = -1;
1741 switch (
pmapdef->player.show) {
1771 }
else if (count == 1 &&
plr_id != -1) {
1874 int xsize,
int ysize)
1886 pimg->mapsize.x = xsize;
1887 pimg->mapsize.y = ysize;
1889 pimg->imgsize.x = 0;
1890 pimg->imgsize.y = 0;
1899 pimg->imgsize.x += (
pimg->mapsize.x +
pimg->mapsize.y / 2)
1901 pimg->imgsize.y += (
pimg->mapsize.x +
pimg->mapsize.y / 2)
1907 pimg->imgsize.y += (
pimg->mapsize.x -
pimg->mapsize.y / 2) / 2
1959 sizeof(*
pimg->map));
1986 pimg->imgsize.x *
pimg->imgsize.y);
2002 return pimg->imgsize.x *
y +
x;
2099#ifdef HAVE_MAPIMG_MAGICKWAND
2100#define SET_COLOR(str, pcolor) \
2101 fc_snprintf(str, sizeof(str), "rgb(%d,%d,%d)", \
2102 pcolor->r, pcolor->g, pcolor->b);
2240 (
unsigned char *)
title);
2250 for (
y = 0;
y <
pimg->imgsize.y;
y++) {
2257 for (
x = 0;
x <
pimg->imgsize.x;
x++) {
2276 cat_snprintf(comment,
sizeof(comment),
"map definition: %s\n",
2318 MAPIMG_LOG(
_(
"the ppm toolkit can only create images in the ppm "
2336 fprintf(fp,
"# map definition: %s\n",
pimg->def->maparg);
2338 if (
pimg->def->colortest) {
2339 fprintf(fp,
"# color test\n");
2349 fprintf(fp,
"# no players\n");
2353 pimg->imgsize.y *
pimg->def->zoom);
2357 for (
y = 0;
y <
pimg->imgsize.y;
y++) {
2361 for (
x = 0;
x <
pimg->imgsize.x;
x++) {
2401 static char buf[512];
2405 "playerno:%d:color:(%3d, %3d, %3d):name:\"%s\"",
2469 &&
BV_ISSET(
pimg->def->player.checked_plrbv, player_id)) {
2475 && (
BV_ISSET(
pimg->def->player.checked_plrbv, player_id)
2490 if (
BV_ISSET(
pimg->def->player.checked_plrbv, player_id)
2500 if (
BV_ISSET(
pimg->def->player.checked_plrbv, player_id)
2544 const struct player *pplayer,
2563 const struct player *pplayer,
2599 const struct player *pplayer,
2622 const struct player *pplayer,
2664 const struct player *pplayer,
2675 if (
NULL == ptile) {
2762 const struct player *pplayer,
2783 const struct player *pplayer,
2824 const struct player *pplayer,
2849 const struct player *pplayer,
2888 const struct player *pplayer,
2899 if (
NULL == ptile) {
3001 const struct player *pplayer,
3020 const struct player *pplayer,
3059 const struct player *pplayer,
3082 const struct player *pplayer,
3124 const struct player *pplayer,
3135 if (
NULL == ptile) {
3223 y += (
pimg->mapsize.x - 1)/2;
3251 for (;
i >= 0;
i--) {
3265 switch (
pmapdef->player.show) {
3309 { 255, 255, 255,
NULL},
3331 return pplayer->
rgb;
3345 return pterrain->
rgb;
void astr_free(struct astring *astr)
void astr_set(struct astring *astr, const char *format,...)
void astr_init(struct astring *astr)
void astr_add(struct astring *astr, const char *format,...)
static size_t astr_len(const struct astring *astr) fc__attribute((nonnull(1)))
static const char * astr_str(const struct astring *astr) fc__attribute((nonnull(1)))
#define BV_DEFINE(name, bits)
#define BV_ISSET(bv, bit)
#define BV_ISSET_ANY(vec)
const char * calendar_text(void)
struct canvas int int int int struct sprite *sprite struct canvas struct color * pcolor
void free_tokens(char **tokens, size_t ntokens)
int get_tokens(const char *str, char **tokens, size_t num_tokens, const char *delimiterset)
#define MAX_NUM_PLAYER_SLOTS
int generate_save_name(const char *format, char *buf, int buflen, const char *reason)
#define fc_assert_ret(condition)
#define log_verbose(message,...)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_debug(message,...)
#define log_error(message,...)
struct tile * mapstep(const struct civ_map *nmap, const struct tile *ptile, enum direction8 dir)
#define topo_has_flag(topo, flag)
#define MAP_TO_NATIVE_POS(pnat_x, pnat_y, map_x, map_y)
#define wrap_has_flag(wrap, flag)
#define whole_map_iterate(_map, _tile)
#define whole_map_iterate_end
#define index_to_map_pos(pmap_x, pmap_y, mindex)
static bv_pixel pixel_fogofwar_hexa(const struct tile *ptile, const struct player *pplayer, bool knowledge)
static int bvplayers_count(const struct mapdef *pmapdef)
static bv_pixel pixel_fogofwar_rect(const struct tile *ptile, const struct player *pplayer, bool knowledge)
#define MAPIMG_DEFAULT_IMGFORMAT
static char error_buffer[MAX_LEN_ERRORBUF]
bool mapimg_id2str(int id, char *str, size_t str_len)
mapimg_tile_player_func mapimg_tile_owner
static bool mapimg_test(int id)
bool(* img_save_func)(const struct img *pimg, const char *mapimgfile)
const char * mapimg_get_format_default(void)
bool mapimg_initialised(void)
static bool mapimg_def2str(struct mapdef *pmapdef, char *str, size_t str_len)
static void base_coor_hexa(struct img *pimg, int *base_x, int *base_y, int x, int y)
bool mapimg_colortest(const char *savename, const char *path)
#define img_toolkit_iterate(_toolkit)
static struct img * img_new(struct mapdef *mapdef, int topo, int wrap, int xsize, int ysize)
#define magickwand_size_t
static bv_pixel pixel_city_rect(const struct tile *ptile, const struct player *pplayer, bool knowledge)
struct mapdef * mapimg_isvalid(int id)
static bv_pixel pixel_border_hexa(const struct tile *ptile, const struct player *pplayer, bool knowledge)
mapimg_tile_terrain_func mapimg_tile_terrain
mapimg_tile_player_func mapimg_tile_city
static struct mapdef * mapdef_new(bool colortest)
static bool img_save_ppm(const struct img *pimg, const char *mapimgfile)
static void img_destroy(struct img *pimg)
#define IMG_BORDER_HEIGHT
#define IMG_SPACER_HEIGHT
bv_pixel(* plot_func)(const struct tile *ptile, const struct player *pplayer, bool knowledge)
mapimg_tile_player_func mapimg_tile_unit
static void img_plot(struct img *pimg, int x, int y, const struct rgbcolor *pcolor, const bv_pixel pixel)
static bool img_filename(const char *mapimgfile, enum imageformat format, char *filename, size_t filename_len)
static const struct rgbcolor * imgcolor_terrain(const struct terrain *pterrain)
static void img_createmap(struct img *pimg)
static const char * showname_help(enum show_player showplr)
static void mapimg_log(const char *file, const char *function, int line, const char *format,...) fc__attribute((__format__(__printf__
void mapimg_init(mapimg_tile_known_func mapimg_tile_known, mapimg_tile_terrain_func mapimg_tile_terrain, mapimg_tile_player_func mapimg_tile_owner, mapimg_tile_player_func mapimg_tile_city, mapimg_tile_player_func mapimg_tile_unit, mapimg_plrcolor_count_func mapimg_plrcolor_count, mapimg_plrcolor_get_func mapimg_plrcolor_get)
static bv_pixel pixel_border_rect(const struct tile *ptile, const struct player *pplayer, bool knowledge)
#define mapdef_list_iterate_end
static int img_index(const int x, const int y, const struct img *pimg)
static struct tile_shape tile_rect
const struct strvec * mapimg_get_format_list(void)
mapimg_tile_known_func mapimg_tile_known
static bool img_save(const struct img *pimg, const char *mapimgfile, const char *path)
static bv_pixel pixel_city_hexa(const struct tile *ptile, const struct player *pplayer, bool knowledge)
static bv_pixel pixel_fogofwar_isohexa(const struct tile *ptile, const struct player *pplayer, bool knowledge)
void(* base_coor_func)(struct img *pimg, int *base_x, int *base_y, int x, int y)
#define img_toolkit_iterate_end
mapimg_plrcolor_get_func mapimg_plrcolor_get
static bv_pixel pixel_tile_isohexa(const struct tile *ptile, const struct player *pplayer, bool knowledge)
mapimg_plrcolor_count_func mapimg_plrcolor_count
bool mapimg_define(const char *maparg, bool check)
bool mapimg_delete(int id)
static const struct rgbcolor * imgcolor_player(int plr_id)
#define MAPIMG_DEFAULT_IMGTOOL
#define MAPIMG_LOG(format,...)
static bv_pixel pixel_tile_hexa(const struct tile *ptile, const struct player *pplayer, bool knowledge)
static bv_pixel pixel_city_isohexa(const struct tile *ptile, const struct player *pplayer, bool knowledge)
static void base_coor_rect(struct img *pimg, int *base_x, int *base_y, int x, int y)
static struct tile_shape tile_hexa
#define MAPIMG_ASSERT_RET_VAL(cond, expr)
static char * mapimg_generate_name(struct mapdef *pmapdef)
static bv_pixel pixel_unit_rect(const struct tile *ptile, const struct player *pplayer, bool knowledge)
static bv_pixel pixel_unit_hexa(const struct tile *ptile, const struct player *pplayer, bool knowledge)
static void img_plot_tile(struct img *pimg, const struct tile *ptile, const struct rgbcolor *pcolor, const bv_pixel pixel)
static void base_coor_isohexa(struct img *pimg, int *base_x, int *base_y, int x, int y)
static const int img_toolkits_count
static void mapdef_destroy(struct mapdef *pmapdef)
bool mapimg_create(struct mapdef *pmapdef, bool force, const char *savename, const char *path)
static const struct rgbcolor * imgcolor_special(enum img_special imgcolor)
static bv_pixel pixel_border_isohexa(const struct tile *ptile, const struct player *pplayer, bool knowledge)
#define mapdef_list_iterate(mapdef_list, pmapdef)
const char * mapimg_error(void)
#define GEN_TOOLKIT(_tool, _format_default, _formats, _save_func, _help)
static const char * img_playerstr(const struct player *pplayer)
static struct tile_shape tile_isohexa
bool mapimg_show(int id, char *str, size_t str_len, bool detail)
static bool mapimg_define_arg(struct mapdef *pmapdef, enum mapdef_arg arg, const char *val, bool check)
static bool mapimg_checkplayers(struct mapdef *pmapdef, bool recheck)
static const struct toolkit * img_toolkit_get(enum imagetool tool)
static bv_pixel pixel_unit_isohexa(const struct tile *ptile, const struct player *pplayer, bool knowledge)
static void img_set_pixel(struct img *pimg, const int mindex, const struct rgbcolor *pcolor)
static bv_pixel pixel_tile_rect(const struct tile *ptile, const struct player *pplayer, bool knowledge)
static struct toolkit img_toolkits[]
#define NUM_MAX_FORMATARGS
char * mapimg_help(const char *cmdname)
static const char * bvplayers_str(const bv_player plrbv)
struct rgbcolor *(* mapimg_plrcolor_get_func)(int)
int(* mapimg_plrcolor_count_func)(void)
enum known_type(* mapimg_tile_known_func)(const struct tile *ptile, const struct player *pplayer, bool knowledge)
struct terrain *(* mapimg_tile_terrain_func)(const struct tile *ptile, const struct player *pplayer, bool knowledge)
struct player *(* mapimg_tile_player_func)(const struct tile *ptile, const struct player *pplayer, bool knowledge)
#define fc_calloc(n, esz)
struct player * player_by_name_prefix(const char *name, enum m_pre_result *result)
struct player * player_by_number(const int player_id)
int player_slot_count(void)
int player_number(const struct player *pplayer)
const char * player_name(const struct player *pplayer)
int player_index(const struct player *pplayer)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
bool gives_shared_vision(const struct player *me, const struct player *them)
#define players_iterate_end
#define players_iterate(_pplayer)
bool make_dir(const char *pathname)
bool path_is_absolute(const char *filename)
void strvec_append(struct strvec *psv, const char *string)
struct strvec * strvec_new(void)
struct packet_game_info info
struct tile_shape * tileshape
char title[MAX_LEN_MAPDEF]
const struct rgbcolor ** map
enum mapimg_status status
char error[MAX_LEN_MAPDEF]
struct mapdef::@46 player
bool layers[MAPIMG_LAYER_COUNT]
char maparg[MAX_LEN_MAPARG]
enum borders_mode borders
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
int fc_strcasecmp(const char *str0, const char *str1)
int cat_snprintf(char *str, size_t n, const char *format,...)
int fc_vsnprintf(char *str, size_t n, const char *format, va_list ap)
FILE * fc_fopen(const char *filename, const char *opentype)
#define sz_strlcpy(dest, src)
#define sz_strlcat(dest, src)
Terrain_type_id terrain_count(void)
struct terrain * terrain_by_number(const Terrain_type_id type)
#define is_ocean(pterrain)
void timer_destroy(struct timer *t)
void timer_start(struct timer *t)
struct timer * timer_new(enum timer_timetype type, enum timer_use use, const char *name)
double timer_read_seconds(struct timer *t)