src/heightmap.h
changeset 5475 2e6990a8c7c4
parent 4300 c7e43c47a2b9
child 6179 d19b0137d8e4
equal deleted inserted replaced
5474:ac55aefc54f3 5475:2e6990a8c7c4
       
     1 /* $Id$ */
       
     2 
       
     3 #ifndef HEIGHTMAP_H
       
     4 #define HEIGHTMAP_H
       
     5 
       
     6 /*
       
     7  * Order of these enums has to be the same as in lang/english.txt
       
     8  * Otherwise you will get inconsistent behaviour.
       
     9  */
       
    10 enum {
       
    11 	HM_COUNTER_CLOCKWISE, //! Rotate the map counter clockwise 45 degrees
       
    12 	HM_CLOCKWISE,         //! Rotate the map clockwise 45 degrees
       
    13 };
       
    14 
       
    15 /**
       
    16  * Get the dimensions of a heightmap.
       
    17  * @return Returns false if loading of the image failed.
       
    18  */
       
    19 bool GetHeightmapDimensions(char *filename, uint *x, uint *y);
       
    20 
       
    21 /**
       
    22  * Load a heightmap from file and change the map in his current dimensions
       
    23  *  to a landscape representing the heightmap.
       
    24  * It converts pixels to height. The brighter, the higher.
       
    25  */
       
    26 void LoadHeightmap(char *filename);
       
    27 
       
    28 /**
       
    29  * Make an empty world where all tiles are of height 'tile_height'.
       
    30  */
       
    31 void FlatEmptyWorld(byte tile_height);
       
    32 
       
    33 #endif /* HEIGHTMAP_H */