DrawDefMap

Category: Landscape
Since engine version: 4.9.1.0 GWE

Description

Draws a dynamic map within the specified rectangle using a given map specification from Landscape.txt.

Syntax

bool DrawDefMap (int iX, int iY, int iWdt, int iHgt, string szMapDef);

Parameters

iX:
Left border of the rectangle in which to draw the map
iY:
Top border of the rectangle in which to draw the map
iWdt:
Width of the rectangle in which to draw the map
iHgt:
Height of the rectangle in which to draw the map
szMapDef:
Name of the map to be used from Landscape.txt

Remark

The Landscape.txt component is usually removed from memory after scenario initialization. To keep it in memory for later use by this command you should specify the option KeepMapCreator=1 in Scenario.txt section [Landscape].

Example

DrawDefMap(0,0,LandscapeWidth(), LandscapeHeight(), "TheMap");
Draws 'TheMap' over the complete landscape. 'TheMap' must be defined in Landscape.txt.
See also: DrawMap
Sven2, April 2002