52 #define MAX_LEN_MAPDEF 256
55 #define SPECENUM_NAME mapimg_layer
56 #define SPECENUM_VALUE0 MAPIMG_LAYER_AREA
57 #define SPECENUM_VALUE0NAME "a"
58 #define SPECENUM_VALUE1 MAPIMG_LAYER_BORDERS
59 #define SPECENUM_VALUE1NAME "b"
60 #define SPECENUM_VALUE2 MAPIMG_LAYER_CITIES
61 #define SPECENUM_VALUE2NAME "c"
62 #define SPECENUM_VALUE3 MAPIMG_LAYER_FOGOFWAR
63 #define SPECENUM_VALUE3NAME "f"
64 #define SPECENUM_VALUE4 MAPIMG_LAYER_KNOWLEDGE
65 #define SPECENUM_VALUE4NAME "k"
66 #define SPECENUM_VALUE5 MAPIMG_LAYER_TERRAIN
67 #define SPECENUM_VALUE5NAME "t"
68 #define SPECENUM_VALUE6 MAPIMG_LAYER_UNITS
69 #define SPECENUM_VALUE6NAME "u"
71 #define SPECENUM_COUNT MAPIMG_LAYER_COUNT
72 #define SPECENUM_COUNTNAME "-"
73 #include "specenum_gen.h"
78 const struct tile *ptile,
const struct player *pplayer,
bool knowledge);
79 typedef struct terrain *(*mapimg_tile_terrain_func)(
80 const struct tile *ptile,
const struct player *pplayer,
bool knowledge);
81 typedef struct player *(*mapimg_tile_player_func)(
82 const struct tile *ptile,
const struct player *pplayer,
bool knowledge);
85 typedef struct rgbcolor *(*mapimg_plrcolor_get_func)(int);
105 bool mapimg_show(
int id,
char *str,
size_t str_len,
bool detail);
mapimg_tile_player_func mapimg_tile_owner
mapimg_tile_terrain_func mapimg_tile_terrain
mapimg_tile_player_func mapimg_tile_city
mapimg_tile_player_func mapimg_tile_unit
mapimg_tile_known_func mapimg_tile_known
mapimg_plrcolor_get_func mapimg_plrcolor_get
mapimg_plrcolor_count_func mapimg_plrcolor_count
int(* mapimg_plrcolor_count_func)()
bool mapimg_id2str(int id, char *str, size_t str_len)
Return the map image definition 'id' as a mapdef string.
void mapimg_reset()
Reset the map image subsystem.
struct player *(* mapimg_tile_player_func)(const struct tile *ptile, const struct player *pplayer, bool knowledge)
bool mapimg_colortest(const char *savename, const char *path)
Create images which shows all map colors (playercolor, terrain colors).
int mapimg_count()
Return the number of map image definitions.
const char * mapimg_error()
Returns the last error.
struct mapdef * mapimg_isvalid(int id)
Check if a map image definition is valid.
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)
Initialisation of the map image subsystem.
void mapimg_free()
Free all memory allocated by the map image subsystem.
bool mapimg_define(const char *maparg, bool check)
Define on map image.
bool mapimg_delete(int id)
Delete a map image definition.
enum known_type(* mapimg_tile_known_func)(const struct tile *ptile, const struct player *pplayer, bool knowledge)
char * mapimg_help(const char *cmdname)
Return a help string for the 'mapimg' command.
bool mapimg_create(struct mapdef *pmapdef, bool force, const char *savename, const char *path)
Create the requested map image.
struct rgbcolor *(* mapimg_plrcolor_get_func)(int)
struct terrain *(* mapimg_tile_terrain_func)(const struct tile *ptile, const struct player *pplayer, bool knowledge)
bool mapimg_show(int id, char *str, size_t str_len, bool detail)
Show a map image definition.
char maparg[MAX_LEN_MAPARG]