precomputed shade algo, viewport basic render

This commit is contained in:
anton.gurov
2019-10-30 17:56:30 +03:00
parent 4a77323aab
commit 3958951cd5
15 changed files with 924 additions and 26 deletions

View File

@ -36,10 +36,14 @@ func (layer *Layer) WithColor(colorName string) *Layer {
func (layer *Layer) PutWithRawBackground(x,y int, symbol interface{}, bgColor uint32) {
layer.before()
prevColor := uint32(blt.State(blt.TK_COLOR))
prevCompMode := blt.State(blt.TK_COMPOSITION)
blt.Color(bgColor)
blt.Composition(1)
layer.Put(x,y,"█")
blt.Color(prevColor)
layer.Put(x,y, symbol)
blt.Composition(prevCompMode)
}
func (layer *Layer) PutWithBackground(x,y int, symbol interface{}, bgColorName string) {