Freeciv-3.2
|
Go to the source code of this file.
Typedefs | |
typedef enum known_type(* | mapimg_tile_known_func) (const struct tile *ptile, const struct player *pplayer, bool knowledge) |
typedef struct terrain *(* | mapimg_tile_terrain_func) (const struct tile *ptile, const struct player *pplayer, bool knowledge) |
typedef struct player *(* | mapimg_tile_player_func) (const struct tile *ptile, const struct player *pplayer, bool knowledge) |
typedef int(* | mapimg_plrcolor_count_func) (void) |
typedef struct rgbcolor *(* | mapimg_plrcolor_get_func) (int) |
#define SPECENUM_COUNT MAPIMG_LAYER_COUNT |
#define SPECENUM_NAME mapimg_layer |
#define SPECENUM_VALUE0 MAPIMG_LAYER_AREA |
#define SPECENUM_VALUE1 MAPIMG_LAYER_BORDERS |
#define SPECENUM_VALUE2 MAPIMG_LAYER_CITIES |
#define SPECENUM_VALUE3 MAPIMG_LAYER_FOGOFWAR |
#define SPECENUM_VALUE4 MAPIMG_LAYER_KNOWLEDGE |
#define SPECENUM_VALUE5 MAPIMG_LAYER_TERRAIN |
#define SPECENUM_VALUE6 MAPIMG_LAYER_UNITS |
Create images which shows all map colors (playercolor, terrain colors). One image is created for each supported toolkit and image format. The filename will be [basename as used for savegames]-colortest-[toolkit].[format].
Definition at line 1438 of file mapimg.c.
Referenced by mapimg_command().
Return the number of map image definitions.
Definition at line 573 of file mapimg.c.
Referenced by mapimg_client_define(), mapimg_command(), mapimg_define(), mapimg_test(), sg_load_mapimg(), sg_load_mapimg(), sg_save_mapimg(), show_mapimg(), and srv_running().
bool mapimg_create | ( | struct mapdef * | pmapdef, |
bool | force, | ||
const char * | savename, | ||
const char * | path | ||
) |
Create the requested map image. The filename is created as [basename as used for savegames]-[mapstr].[mapext] where [mapstr] contains the map definition and [mapext] the selected image extension. If 'force' is FALSE, the image is only created if game.info.turn is a multiple of the map setting turns.
Definition at line 1332 of file mapimg.c.
Referenced by mapimg_client_createmap(), mapimg_command(), and srv_running().
Definition at line 769 of file mapimg.c.
Referenced by mapimg_client_define(), mapimg_command(), sg_load_mapimg(), and sg_load_mapimg().
Delete a map image definition.
Definition at line 1204 of file mapimg.c.
Referenced by mapimg_client_define(), mapimg_command(), sg_load_mapimg(), and sg_load_mapimg().
Returns the last error.
Definition at line 759 of file mapimg.c.
Referenced by mapimg_client_save(), mapimg_command(), and srv_running().
Free all memory allocated by the map image subsystem.
Definition at line 558 of file mapimg.c.
Referenced by client_game_free(), and server_quit().
Return the map image definition 'id' as a mapdef string. This function is a wrapper for mapimg_def2str().
Definition at line 1311 of file mapimg.c.
Referenced by mapimg_command(), and sg_save_mapimg().
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. The arguments are used to determine the map knowledge, the terrain type as well as the tile, city and unit owner.
Definition at line 506 of file mapimg.c.
Referenced by client_game_init(), and srv_prepare().
Check if the map image subsustem is initialised.
Definition at line 1555 of file mapimg.c.
Referenced by mapimg_count(), mapimg_define(), mapimg_free(), mapimg_init(), mapimg_reset(), and mapimg_test().
Check if a map image definition is valid. This function is a wrapper for mapimg_checkplayers().
Definition at line 1121 of file mapimg.c.
Referenced by mapimg_client_createmap(), mapimg_client_define(), mapimg_command(), and srv_running().
Reset the map image subsystem.
Definition at line 541 of file mapimg.c.
Referenced by client_game_reset(), mapimg_free(), and srv_main().
Show a map image definition.
Definition at line 1223 of file mapimg.c.
Referenced by mapimg_command(), and show_mapimg().