ent_createterrain(BMAP* skin, VECTOR* position, var nx, var ny, var size): ENTITY*
Creates a chunked terrain entity without an external HMP file.
Parameters:
skin
- Pointer to the terrain skin bmap, or NULL for a black skin with one pixel per cell.
position
- Position of the terrain center
nx, ny
- Number of terrain cells in x and y direction
size - Size of a terrain cell in quants
Returns:
Pointer to the created terrain entity
Speed:
Medium
Remarks:
- The created terrain is flat. For shaping hills and valleys, use the ent_setvertex function.
- The total size of the terrain is nx*size in x direction and ny*size in y direction.
- See ent_create for general remarks on creating entities.
Example:
ENTITY* newterrain = ent_createterrain(bmap_create("skin.pcx"),vector(0,0,0),128,128,10);
See also:
ENTITIES, ent_create, ent_createlayer, bmap_create, level.c ► latest
version online