mirror of https://github.com/mgba-emu/mgba.git
Core: Fixx M_*8 macros
This commit is contained in:
parent
434789c6d1
commit
ea3e6d6b54
|
@ -27,9 +27,9 @@ typedef uint32_t color_t;
|
|||
#define M_G5(X) (((X) >> 5) & 0x1F)
|
||||
#define M_B5(X) (((X) >> 10) & 0x1F)
|
||||
|
||||
#define M_R8(X) (((((X) << 3) & 0xF8) * 0x21) >> 5)
|
||||
#define M_G8(X) (((((X) >> 2) & 0xF8) * 0x21) >> 5)
|
||||
#define M_B8(X) (((((X) >> 7) & 0xF8) * 0x21) >> 5)
|
||||
#define M_R8(X) (((((X) << 3) & 0xF8) * 0x21) >> 2)
|
||||
#define M_G8(X) (((((X) >> 2) & 0xF8) * 0x21) >> 2)
|
||||
#define M_B8(X) (((((X) >> 7) & 0xF8) * 0x21) >> 2)
|
||||
|
||||
#define M_RGB5_TO_BGR8(X) ((M_R5(X) << 3) | (M_G5(X) << 11) | (M_B5(X) << 19))
|
||||
#define M_RGB5_TO_RGB8(X) ((M_R5(X) << 19) | (M_G5(X) << 11) | (M_B5(X) << 3))
|
||||
|
|
Loading…
Reference in New Issue