re-match sub_81C79BC (from #1177)

also re-define RBG macros
This commit is contained in:
Kurausukun
2020-10-23 22:07:30 -04:00
parent 627853a2bf
commit 44c2d15ca9
3 changed files with 39 additions and 133 deletions

View File

@@ -1,6 +1,10 @@
#ifndef GUARD_RGB_H
#define GUARD_RGB_H
#define GET_R(color) ((color) & 0x1F)
#define GET_G(color) (((color) >> 5) & 0x1F)
#define GET_B(color) (((color) >> 10) & 0x1F)
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
#define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r))
#define _RGB(r, g, b) ((((b) & 0x1F) << 10) + (((g) & 0x1F) << 5) + ((r) & 0x1F))