From 380bff59eba9fb86032d6fc94a7ee512cdc8dd1a Mon Sep 17 00:00:00 2001 From: gered Date: Tue, 4 Apr 2023 15:34:23 -0400 Subject: [PATCH] add BlendFunction::MultipliedBlend --- ggdt/src/graphics/color.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ggdt/src/graphics/color.rs b/ggdt/src/graphics/color.rs index 82d04f1..3eec334 100644 --- a/ggdt/src/graphics/color.rs +++ b/ggdt/src/graphics/color.rs @@ -23,6 +23,7 @@ pub enum BlendFunction { Blend, BlendSourceWithAlpha(u8), TintedBlend(u32), + MultipliedBlend(u32), } impl BlendFunction { @@ -45,6 +46,10 @@ impl BlendFunction { let tinted = tint_argb32(src, *tint); blend_argb32(tinted, dest) } + MultipliedBlend(color) => { + let multiplied = multiply_argb32(src, *color); + blend_argb32(multiplied, dest) + } } } }