[MIRROR] Color matrix defines for filters and identity [MDB IGNORE] (#25823)

* 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.

* Color matrix defines for filters and identity

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-12-24 20:58:26 +00:00
committed by GitHub
co-authored by Ghom
parent 4102ead7a6
commit 0f1761fa40
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)