equal
deleted
inserted
replaced
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 |