diff options
author | mrawlingst <mrawlingst@gmail.com> | 2017-09-07 16:19:44 -0400 |
---|---|---|
committer | mrawlingst <mrawlingst@gmail.com> | 2017-09-07 16:19:44 -0400 |
commit | 6aa5bc23470fbf82492a825663f3c13cde0d1323 (patch) | |
tree | 469d754e26301e17bd3c6cdab52090c01b82561a /core/color.cpp | |
parent | 0b8fa1e01068af9924742ade2625e021ccd2c5a8 (diff) | |
download | redot-engine-6aa5bc23470fbf82492a825663f3c13cde0d1323.tar.gz |
Change Color.to_32() to to_rgba32() and format as RGBA
Diffstat (limited to 'core/color.cpp')
-rw-r--r-- | core/color.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/color.cpp b/core/color.cpp index ab264d31d4..259a4988b1 100644 --- a/core/color.cpp +++ b/core/color.cpp @@ -34,7 +34,7 @@ #include "math_funcs.h" #include "print_string.h" -uint32_t Color::to_ARGB32() const { +uint32_t Color::to_argb32() const { uint32_t c = (uint8_t)(a * 255); c <<= 8; @@ -47,7 +47,7 @@ uint32_t Color::to_ARGB32() const { return c; } -uint32_t Color::to_ABGR32() const { +uint32_t Color::to_abgr32() const { uint32_t c = (uint8_t)(a * 255); c <<= 8; c |= (uint8_t)(b * 255); @@ -59,15 +59,15 @@ uint32_t Color::to_ABGR32() const { return c; } -uint32_t Color::to_32() const { +uint32_t Color::to_rgba32() const { - uint32_t c = (uint8_t)(a * 255); - c <<= 8; - c |= (uint8_t)(r * 255); + uint32_t c = (uint8_t)(r * 255); c <<= 8; c |= (uint8_t)(g * 255); c <<= 8; c |= (uint8_t)(b * 255); + c <<= 8; + c |= (uint8_t)(a * 255); return c; } |