colordance

This commit is contained in:
2019-10-31 00:55:51 +03:00
parent ffe658e90e
commit 8dd242b242
9 changed files with 185 additions and 86 deletions

View File

@ -39,8 +39,8 @@ type Tile struct {
BlocksPass bool
BlocksSight bool
Explored bool
Visible bool
MustDraw bool
Visible bool
Colordance bool
}
@ -94,8 +94,9 @@ func NewWaterTile() *Tile {
Explored: false,
MustDraw: true, //fixme debug
Colordance: true,
Appearance: &Appearance{
Char: ".",
Char: " ",
ColorSet: &TileColorSet{
current: ch,
Fg: func() uint32 { return blt.ColorFromARGB(255, 220, 220, 250) },
@ -103,19 +104,20 @@ func NewWaterTile() *Tile {
return blt.ColorFromARGB(
255,
ch.R,
colordance(ch.G, 2, 42, 4),
colordance(ch.B, 180, 229, 12),
colordance(ch.G, 0, 15, 2),
colordance(ch.B, 120, 220, 12),
)
},
DarkFg: func() uint32 { return blt.ColorFromARGB(255, 30, 20, 50) },
DarkBg: func() uint32 { return blt.ColorFromARGB(255, 7, 7, 30) },
},
},
}
}
func NewDeepWaterTile() *Tile {
ch := &ColorHolder{5, 2, 154}
ch := &ColorHolder{5, 2, 122}
return &Tile{
Name: "Deep Water",
Description: "Deep water",
@ -133,8 +135,8 @@ func NewDeepWaterTile() *Tile {
return blt.ColorFromARGB(
255,
ch.R,
colordance(ch.G, 0, 15, 2),
colordance(ch.B, 120, 180, 5),
colordance(ch.G, 2, 42, 4),
colordance(ch.B, 180, 229, 12),
)
},
DarkFg: func() uint32 { return blt.ColorFromARGB(255, 30, 20, 50) },