mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Added SDL_PIXELFORMAT_BGR444
This commit is contained in:
parent
a9ac9e3865
commit
20ddf45ede
@ -191,6 +191,9 @@ typedef enum
|
||||
SDL_PIXELFORMAT_RGB444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_4444, 12, 2),
|
||||
SDL_PIXELFORMAT_BGR444 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
|
||||
SDL_PACKEDLAYOUT_4444, 12, 2),
|
||||
SDL_PIXELFORMAT_RGB555 =
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
|
||||
SDL_PACKEDLAYOUT_1555, 15, 2),
|
||||
|
@ -577,6 +577,9 @@ SDLTest_PrintPixelFormat(char *text, size_t maxlen, Uint32 format)
|
||||
case SDL_PIXELFORMAT_RGB444:
|
||||
SDL_snprintfcat(text, maxlen, "RGB444");
|
||||
break;
|
||||
case SDL_PIXELFORMAT_BGR444:
|
||||
SDL_snprintfcat(text, maxlen, "BGR444");
|
||||
break;
|
||||
case SDL_PIXELFORMAT_RGB555:
|
||||
SDL_snprintfcat(text, maxlen, "RGB555");
|
||||
break;
|
||||
|
@ -94,6 +94,7 @@ SDL_GetPixelFormatName(Uint32 format)
|
||||
CASE(SDL_PIXELFORMAT_INDEX8)
|
||||
CASE(SDL_PIXELFORMAT_RGB332)
|
||||
CASE(SDL_PIXELFORMAT_RGB444)
|
||||
CASE(SDL_PIXELFORMAT_BGR444)
|
||||
CASE(SDL_PIXELFORMAT_RGB555)
|
||||
CASE(SDL_PIXELFORMAT_BGR555)
|
||||
CASE(SDL_PIXELFORMAT_ARGB4444)
|
||||
@ -321,6 +322,12 @@ SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask,
|
||||
Amask == 0x0000) {
|
||||
return SDL_PIXELFORMAT_RGB444;
|
||||
}
|
||||
if (Rmask == 0x000F &&
|
||||
Gmask == 0x00F0 &&
|
||||
Bmask == 0x0F00 &&
|
||||
Amask == 0x0000) {
|
||||
return SDL_PIXELFORMAT_BGR444;
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
if (Rmask == 0) {
|
||||
|
@ -10,7 +10,7 @@
|
||||
/* Test case functions */
|
||||
|
||||
/* Definition of all RGB formats used to test pixel conversions */
|
||||
const int _numRGBPixelFormats = 30;
|
||||
const int _numRGBPixelFormats = 31;
|
||||
Uint32 _RGBPixelFormats[] =
|
||||
{
|
||||
SDL_PIXELFORMAT_INDEX1LSB,
|
||||
@ -20,6 +20,7 @@ Uint32 _RGBPixelFormats[] =
|
||||
SDL_PIXELFORMAT_INDEX8,
|
||||
SDL_PIXELFORMAT_RGB332,
|
||||
SDL_PIXELFORMAT_RGB444,
|
||||
SDL_PIXELFORMAT_BGR444,
|
||||
SDL_PIXELFORMAT_RGB555,
|
||||
SDL_PIXELFORMAT_BGR555,
|
||||
SDL_PIXELFORMAT_ARGB4444,
|
||||
@ -53,6 +54,7 @@ char* _RGBPixelFormatsVerbose[] =
|
||||
"SDL_PIXELFORMAT_INDEX8",
|
||||
"SDL_PIXELFORMAT_RGB332",
|
||||
"SDL_PIXELFORMAT_RGB444",
|
||||
"SDL_PIXELFORMAT_BGR444",
|
||||
"SDL_PIXELFORMAT_RGB555",
|
||||
"SDL_PIXELFORMAT_BGR555",
|
||||
"SDL_PIXELFORMAT_ARGB4444",
|
||||
|
@ -310,6 +310,7 @@ surface_testCompleteSurfaceConversion(void *arg)
|
||||
SDL_PIXELFORMAT_INDEX8,
|
||||
SDL_PIXELFORMAT_RGB332,
|
||||
SDL_PIXELFORMAT_RGB444,
|
||||
SDL_PIXELFORMAT_BGR444,
|
||||
SDL_PIXELFORMAT_RGB555,
|
||||
SDL_PIXELFORMAT_BGR555,
|
||||
SDL_PIXELFORMAT_ARGB4444,
|
||||
|
Loading…
Reference in New Issue
Block a user