truelight@4300: /* $Id$ */ truelight@4300: rubidium@9111: /** @file heightmap.h Functions related to creating heightmaps from files. */ belugas@6179: 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 { belugas@6179: HM_COUNTER_CLOCKWISE, ///< Rotate the map counter clockwise 45 degrees belugas@6179: HM_CLOCKWISE, ///< Rotate the map clockwise 45 degrees truelight@4300: }; truelight@4300: truelight@4300: /** truelight@4300: * Get the dimensions of a heightmap. belugas@6179: * @param filename to query belugas@6179: * @param x dimension x belugas@6179: * @param y dimension y 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. belugas@6179: * @param filename of the heighmap file to be imported 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'. belugas@6179: * @param tile_height of the desired new empty world truelight@4300: */ truelight@4300: void FlatEmptyWorld(byte tile_height); truelight@4300: truelight@4300: #endif /* HEIGHTMAP_H */