Color matrix defines for filters and identity (#80320)

This PR converts the procs `color_matrix_identity`,
`color_matrix_lightness` and `color_matrix_contrast` into
defines/macros. Also adds in defines for common color matrix filters.

I don't like how `color_matrix_identity` is a one-line proc with no arg.
Also these help people identify the sort of color matrix filter is being
used.
This commit is contained in:
Ghom
2023-12-24 21:14:01 +01:00
committed by GitHub
parent ec62465b29
commit f3983e3901
9 changed files with 40 additions and 31 deletions
@@ -12,7 +12,7 @@
else if(istext(_target?.color))
current_color = color_hex2color_matrix(_target.color)
else
current_color = color_matrix_identity()
current_color = COLOR_MATRIX_IDENTITY
var/mutable_appearance/view = image('icons/misc/colortest.dmi', "colors")
if(_target)
@@ -338,7 +338,7 @@
if(VV_COLOR_MATRIX)
.["value"] = open_color_matrix_editor()
if(.["value"] == color_matrix_identity()) //identity is equivalent to null
if(.["value"] == COLOR_MATRIX_IDENTITY) //identity is equivalent to null
.["class"] = null
if(VV_INFINITY)