![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
Include dependency graph for mapimg.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | MAX_LEN_MAPDEF 256 |
| #define | SPECENUM_NAME mapimg_layer |
| #define | SPECENUM_VALUE0 MAPIMG_LAYER_AREA |
| #define | SPECENUM_VALUE0NAME "a" |
| #define | SPECENUM_VALUE1 MAPIMG_LAYER_BORDERS |
| #define | SPECENUM_VALUE1NAME "b" |
| #define | SPECENUM_VALUE2 MAPIMG_LAYER_CITIES |
| #define | SPECENUM_VALUE2NAME "c" |
| #define | SPECENUM_VALUE3 MAPIMG_LAYER_FOGOFWAR |
| #define | SPECENUM_VALUE3NAME "f" |
| #define | SPECENUM_VALUE4 MAPIMG_LAYER_KNOWLEDGE |
| #define | SPECENUM_VALUE4NAME "k" |
| #define | SPECENUM_VALUE5 MAPIMG_LAYER_TERRAIN |
| #define | SPECENUM_VALUE5NAME "t" |
| #define | SPECENUM_VALUE6 MAPIMG_LAYER_UNITS |
| #define | SPECENUM_VALUE6NAME "u" |
| #define | SPECENUM_COUNT MAPIMG_LAYER_COUNT |
| #define | SPECENUM_COUNTNAME "-" |
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) () |
| typedef struct rgbcolor *(* | mapimg_plrcolor_get_func) (int) |
Functions | |
| 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. More... | |
| void | mapimg_reset () |
| Reset the map image subsystem. More... | |
| void | mapimg_free () |
| Free all memory allocated by the map image subsystem. More... | |
| int | mapimg_count () |
| Return the number of map image definitions. More... | |
| char * | mapimg_help (const char *cmdname) |
| Return a help string for the 'mapimg' command. More... | |
| const char * | mapimg_error () |
| Returns the last error. More... | |
| bool | mapimg_define (const char *maparg, bool check) |
| Define on map image. More... | |
| bool | mapimg_delete (int id) |
| Delete a map image definition. More... | |
| bool | mapimg_show (int id, char *str, size_t str_len, bool detail) |
| Show a map image definition. More... | |
| bool | mapimg_id2str (int id, char *str, size_t str_len) |
| Return the map image definition 'id' as a mapdef string. More... | |
| bool | mapimg_create (struct mapdef *pmapdef, bool force, const char *savename, const char *path) |
| Create the requested map image. More... | |
| bool | mapimg_colortest (const char *savename, const char *path) |
| Create images which shows all map colors (playercolor, terrain colors). More... | |
| struct mapdef * | mapimg_isvalid (int id) |
| Check if a map image definition is valid. More... | |
| typedef enum known_type(* mapimg_tile_known_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).
One image is created for each supported image format. The filename will be [basename as used for savegames]-colortest.[format].
Definition at line 1156 of file mapimg.cpp.
Referenced by mapimg_command().
| int mapimg_count | ( | ) |
Return the number of map image definitions.
Definition at line 420 of file mapimg.cpp.
Referenced by freeciv::server::begin_phase(), mapimg_client_define(), mapimg_command(), mapimg_define(), mapimg_test(), sg_load_mapimg(), sg_save_mapimg(), and show_mapimg().
| 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 1050 of file mapimg.cpp.
Referenced by freeciv::server::begin_phase(), and mapimg_command().
| bool mapimg_define | ( | const char * | maparg, |
| bool | check | ||
| ) |
Define on map image.
Definition at line 590 of file mapimg.cpp.
Referenced by mapimg_client_define(), mapimg_command(), and sg_load_mapimg().
| bool mapimg_delete | ( | int | id | ) |
Delete a map image definition.
Definition at line 918 of file mapimg.cpp.
Referenced by mapimg_client_define(), mapimg_command(), and sg_load_mapimg().
| const char* mapimg_error | ( | ) |
Returns the last error.
Definition at line 585 of file mapimg.cpp.
Referenced by freeciv::server::begin_phase(), and mapimg_command().
| void mapimg_free | ( | ) |
Free all memory allocated by the map image subsystem.
Definition at line 405 of file mapimg.cpp.
Referenced by client_game_free(), and server_quit().
| char* mapimg_help | ( | const char * | cmdname | ) |
Return a help string for the 'mapimg' command.
Definition at line 457 of file mapimg.cpp.
| bool mapimg_id2str | ( | int | id, |
| char * | str, | ||
| size_t | str_len | ||
| ) |
Return the map image definition 'id' as a mapdef string.
This function is a wrapper for mapimg_def2str().
Definition at line 1029 of file mapimg.cpp.
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 351 of file mapimg.cpp.
Referenced by client_game_init().
| struct mapdef* mapimg_isvalid | ( | int | id | ) |
Check if a map image definition is valid.
This function is a wrapper for mapimg_checkplayers().
Definition at line 886 of file mapimg.cpp.
Referenced by freeciv::server::begin_phase(), mapimg_client_define(), and mapimg_command().
| void mapimg_reset | ( | ) |
Reset the map image subsystem.
Definition at line 386 of file mapimg.cpp.
Referenced by client_game_reset(), mapimg_free(), and freeciv::server::shut_game_down().
| bool mapimg_show | ( | int | id, |
| char * | str, | ||
| size_t | str_len, | ||
| bool | detail | ||
| ) |
Show a map image definition.
Definition at line 937 of file mapimg.cpp.
Referenced by mapimg_command(), and show_mapimg().