mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 03:31:49 +01:00
Add 15bpp ABGR format
This commit is contained in:
parent
0db5c0da94
commit
9231103344
@ -470,8 +470,11 @@ INLINE void WRITE_LONG(void *address, uint32 data)
|
|||||||
|
|
||||||
/* 5:5:5 RGB */
|
/* 5:5:5 RGB */
|
||||||
#elif defined(USE_15BPP_RENDERING)
|
#elif defined(USE_15BPP_RENDERING)
|
||||||
|
#if defined(USE_ABGR)
|
||||||
|
#define MAKE_PIXEL(r,g,b) ((1 << 15) | (b) << 11 | ((b) >> 3) << 10 | (g) << 6 | ((g) >> 3) << 5 | (r) << 1 | (r) >> 3)
|
||||||
|
#else
|
||||||
#define MAKE_PIXEL(r,g,b) ((1 << 15) | (r) << 11 | ((r) >> 3) << 10 | (g) << 6 | ((g) >> 3) << 5 | (b) << 1 | (b) >> 3)
|
#define MAKE_PIXEL(r,g,b) ((1 << 15) | (r) << 11 | ((r) >> 3) << 10 | (g) << 6 | ((g) >> 3) << 5 | (b) << 1 | (b) >> 3)
|
||||||
|
#endif
|
||||||
/* 5:6:5 RGB */
|
/* 5:6:5 RGB */
|
||||||
#elif defined(USE_16BPP_RENDERING)
|
#elif defined(USE_16BPP_RENDERING)
|
||||||
#define MAKE_PIXEL(r,g,b) ((r) << 12 | ((r) >> 3) << 11 | (g) << 7 | ((g) >> 2) << 5 | (b) << 1 | (b) >> 3)
|
#define MAKE_PIXEL(r,g,b) ((r) << 12 | ((r) >> 3) << 11 | (g) << 7 | ((g) >> 2) << 5 | (b) << 1 | (b) >> 3)
|
||||||
|
@ -51,11 +51,17 @@
|
|||||||
|
|
||||||
/* 5:5:5 RGB */
|
/* 5:5:5 RGB */
|
||||||
#elif defined(USE_15BPP_RENDERING)
|
#elif defined(USE_15BPP_RENDERING)
|
||||||
|
#if defined(USE_ABGR)
|
||||||
|
#define PIXEL(r,g,b) ((1 << 15) | ((b) << 10) | ((g) << 5) | (r))
|
||||||
|
#define GET_B(pixel) (((pixel) & 0x7c00) >> 10)
|
||||||
|
#define GET_G(pixel) (((pixel) & 0x03e0) >> 5)
|
||||||
|
#define GET_R(pixel) (((pixel) & 0x001f) >> 0)
|
||||||
|
#else
|
||||||
#define PIXEL(r,g,b) ((1 << 15) | ((r) << 10) | ((g) << 5) | (b))
|
#define PIXEL(r,g,b) ((1 << 15) | ((r) << 10) | ((g) << 5) | (b))
|
||||||
#define GET_R(pixel) (((pixel) & 0x7c00) >> 10)
|
#define GET_R(pixel) (((pixel) & 0x7c00) >> 10)
|
||||||
#define GET_G(pixel) (((pixel) & 0x03e0) >> 5)
|
#define GET_G(pixel) (((pixel) & 0x03e0) >> 5)
|
||||||
#define GET_B(pixel) (((pixel) & 0x001f) >> 0)
|
#define GET_B(pixel) (((pixel) & 0x001f) >> 0)
|
||||||
|
#endif
|
||||||
/* 5:6:5 RGB */
|
/* 5:6:5 RGB */
|
||||||
#elif defined(USE_16BPP_RENDERING)
|
#elif defined(USE_16BPP_RENDERING)
|
||||||
#define PIXEL(r,g,b) (((r) << 11) | ((g) << 5) | (b))
|
#define PIXEL(r,g,b) (((r) << 11) | ((g) << 5) | (b))
|
||||||
@ -134,4 +140,3 @@ extern void (*parse_satb)(int line);
|
|||||||
extern void (*update_bg_pattern_cache)(int index);
|
extern void (*update_bg_pattern_cache)(int index);
|
||||||
|
|
||||||
#endif /* _RENDER_H_ */
|
#endif /* _RENDER_H_ */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user