src/heightmap.cpp
branchgamebalance
changeset 9911 0b8b245a2391
parent 9895 7bd07f43b0e3
child 6872 1c4a4a609f85
child 8617 931e0970d509
child 9723 eee46cb39750
equal deleted inserted replaced
9910:0b2aebc8283e 9911:0b8b245a2391
   273 
   273 
   274 	fclose(f);
   274 	fclose(f);
   275 	return true;
   275 	return true;
   276 }
   276 }
   277 
   277 
       
   278 /**
       
   279  * Converts a given grayscale map to something that fits in OTTD map system
       
   280  * and create a map of that data.
       
   281  * @param img_width  the with of the image in pixels/tiles
       
   282  * @param img_height the height of the image in pixels/tiles
       
   283  * @param map        the input map
       
   284  */
   278 static void GrayscaleToMapHeights(uint img_width, uint img_height, byte *map)
   285 static void GrayscaleToMapHeights(uint img_width, uint img_height, byte *map)
   279 {
   286 {
   280 	/* Defines the detail of the aspect ratio (to avoid doubles) */
   287 	/* Defines the detail of the aspect ratio (to avoid doubles) */
   281 	const uint num_div = 16384;
   288 	const uint num_div = 16384;
   282 
   289