map_get_depth()

Purpose

Returns the number of lines occupied by a map

Old name

#define mapsize map_get_depth

Syntax

int map_get_depth(mapnr)

Parameters

int mapnr

The number of the map whose size is required

Description

The function map_get_depth() returns the number of screen lines occupied by the specified map. If the map is not on the screen, it returns the number of lines in the map, which is useful in printing to determine whether there is sufficient room on the current page to display the map.

The return value in the two cases may be different if map_load() has been called since a map with the specified number was displayed, or the IN_BOX was used to put a box around a map. Therefore you should probably avoid calling map_get_depth() for a map to be printed if a map of the same number was displayed using map_draw() etc.

Return value

The number of lines occupied by the map

See also

map_get_width()

Example

nr_lines = map_get_depth(1);