|
< index < 15. Heightmap toolkit |
===================================== | > 15.2 Basic operations |
C++ : TCODHeightMap::TCODHeightMap(int w, int h)
C : typedef struct {
int w,h;
float *values;
} TCOD_heightmap_t;
TCOD_heightmap_t *TCOD_heightmap_new(int w,int h)
Py : heightmap_new(w,h)
| Parameter | Description |
|---|---|
| w,h | The width and height of the heightmap. |
C++ : TCODHeightMap myMap(50,50);
C : TCOD_heightmap_t *my_map=TCOD_heightmap_new(50,50);
Py : map=libtcod.heightmap_new(50,50)
print map.w, map.h