summaryrefslogtreecommitdiffstats
path: root/core/color.cpp
diff options
context:
space:
mode:
authormrawlingst <mrawlingst@gmail.com>2017-09-07 16:19:44 -0400
committermrawlingst <mrawlingst@gmail.com>2017-09-07 16:19:44 -0400
commit6aa5bc23470fbf82492a825663f3c13cde0d1323 (patch)
tree469d754e26301e17bd3c6cdab52090c01b82561a /core/color.cpp
parent0b8fa1e01068af9924742ade2625e021ccd2c5a8 (diff)
downloadredot-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.cpp12
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;
}