add world generator level 2 (heightmaps)

This commit is contained in:
MihailRis
2024-09-11 15:23:09 +03:00
parent 8268176527
commit 8516cf4f7f
3 changed files with 17 additions and 10 deletions
+2 -2
View File
@@ -112,10 +112,10 @@ local function _generate_biome_parameters(x, y, w, h, seed, s)
end
function generate_biome_parameters(x, y, w, h, seed)
local bpd = 4
local bpd = 8
local tmap, hmap = _generate_biome_parameters(
math.floor(x/bpd), math.floor(y/bpd),
math.floor(w/bpd)+1, math.floor(h/bpd)+1, seed, bpd)
math.floor(w/bpd)+1, math.floor(h/bpd)+1, seed, bpd)
tmap:resize(w+bpd, h+bpd, 'linear')
tmap:crop(0, 0, w, h)