WIP: Прозрачность #4

Draft
Koldun wants to merge 2 commits from Koldun/mapserver:transparency into devel
Showing only changes of commit 7d853c2180 - Show all commits

View File

@ -149,7 +149,7 @@ func (r *MapBlockRenderer) Render(pos1, pos2 *types.MapBlockCoords) (*image.NRGB
for x := 0; x < 16; x++ {
for z := 0; z < 16; z++ {
var colors_stack [15]color.RGBA
var colors_stack [16]color.RGBA
var visible_nodes_count uint8 = 0
for y := 15; y >= 0; y-- {
if xzOccupationMap[x][z] {
@ -243,6 +243,10 @@ func (r *MapBlockRenderer) Render(pos1, pos2 *types.MapBlockCoords) (*image.NRGB
}
}
if visible_nodes_count == 0 {
continue
}
visible_nodes_count--
result_color := colors_stack[visible_nodes_count]
if visible_nodes_count > 0 {