summaryrefslogtreecommitdiff
path: root/include/constants
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2021-07-14 14:15:12 -0400
committerGitHub <noreply@github.com>2021-07-14 14:15:12 -0400
commit2162e948d1889cbf5c651b9747dab1194323f2da (patch)
tree57a826d56544031e7193ec180ca003c704efd654 /include/constants
parent05559a2fcff5262b6a0c694e745e8dbdb5905a10 (diff)
parent6333c3957edf9130ac44ac7fd152a8563621f1a5 (diff)
Merge pull request #831 from PikalaxALT/more_matching
Match more functions
Diffstat (limited to 'include/constants')
-rw-r--r--include/constants/rgb.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/constants/rgb.h b/include/constants/rgb.h
new file mode 100644
index 000000000..136b74d5e
--- /dev/null
+++ b/include/constants/rgb.h
@@ -0,0 +1,13 @@
+#ifndef POKERUBY_CONSTANTS_RGB_H
+#define POKERUBY_CONSTANTS_RGB_H
+
+#define GET_R(color) ((color) & 0x1F)
+#define GET_G(color) (((color) >> 5) & 0x1F)
+#define GET_B(color) (((color) >> 10) & 0x1F)
+
+#define RGB_ALPHA (1 << 15)
+#define IS_ALPHA(color) ((color) & RGB_ALPHA)
+
+#define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r))
+
+#endif // POKERUBY_CONSTANTS_RGB_H