equal
deleted
inserted
replaced
796 void GenerateTerrainPerlin(void) |
796 void GenerateTerrainPerlin(void) |
797 { |
797 { |
798 uint x, y; |
798 uint x, y; |
799 |
799 |
800 if (!AllocHeightMap()) return; |
800 if (!AllocHeightMap()) return; |
|
801 GenerateWorldSetAbortCallback(FreeHeightMap); |
|
802 |
801 HeightMapGenerate(); |
803 HeightMapGenerate(); |
802 |
804 |
803 IncreaseGeneratingWorldProgress(GWP_LANDSCAPE); |
805 IncreaseGeneratingWorldProgress(GWP_LANDSCAPE); |
804 |
806 |
805 HeightMapNormalize(); |
807 HeightMapNormalize(); |
821 /* Recreate void tiles at the border in case they have been affected by generation */ |
823 /* Recreate void tiles at the border in case they have been affected by generation */ |
822 for (y = 0; y < _height_map.size_y - 1; y++) MakeVoid(_height_map.size_x * y + _height_map.size_x - 1); |
824 for (y = 0; y < _height_map.size_y - 1; y++) MakeVoid(_height_map.size_x * y + _height_map.size_x - 1); |
823 for (x = 0; x < _height_map.size_x; x++) MakeVoid(_height_map.size_x * y + x); |
825 for (x = 0; x < _height_map.size_x; x++) MakeVoid(_height_map.size_x * y + x); |
824 |
826 |
825 FreeHeightMap(); |
827 FreeHeightMap(); |
826 } |
828 GenerateWorldSetAbortCallback(NULL); |
|
829 } |