w_grid_alloc: baseline impl

This commit is contained in:
Björn Linse
2021-02-22 15:03:46 +01:00
parent 070e084a64
commit 08ca5207cd
11 changed files with 87 additions and 71 deletions

View File

@@ -517,6 +517,10 @@ static HlAttrs get_colors_force(int attr)
/// @return the resulting attributes.
int hl_blend_attrs(int back_attr, int front_attr, bool *through)
{
if (front_attr < 0 || back_attr < 0) {
return -1;
}
HlAttrs fattrs = get_colors_force(front_attr);
int ratio = fattrs.hl_blend;
if (ratio <= 0) {