truelight@4300: /* $Id$ */ truelight@4300: truelight@4300: #ifndef HEIGHTMAP_H truelight@4300: #define HEIGHTMAP_H truelight@4300: truelight@4300: /* truelight@4300: * Order of these enums has to be the same as in lang/english.txt truelight@4300: * Otherwise you will get inconsistent behaviour. truelight@4300: */ truelight@4300: enum { truelight@4300: HM_COUNTER_CLOCKWISE, //! Rotate the map counter clockwise 45 degrees truelight@4300: HM_CLOCKWISE, //! Rotate the map clockwise 45 degrees truelight@4300: }; truelight@4300: truelight@4300: /** truelight@4300: * Get the dimensions of a heightmap. truelight@4300: * @return Returns false if loading of the image failed. truelight@4300: */ truelight@4300: bool GetHeightmapDimensions(char *filename, uint *x, uint *y); truelight@4300: truelight@4300: /** truelight@4300: * Load a heightmap from file and change the map in his current dimensions truelight@4300: * to a landscape representing the heightmap. truelight@4300: * It converts pixels to height. The brighter, the higher. truelight@4300: */ truelight@4300: void LoadHeightmap(char *filename); truelight@4300: truelight@4300: /** truelight@4300: * Make an empty world where all tiles are of height 'tile_height'. truelight@4300: */ truelight@4300: void FlatEmptyWorld(byte tile_height); truelight@4300: truelight@4300: #endif /* HEIGHTMAP_H */