include/SDL_pixels.h
changeset 4982 660d3a432102
parent 4492 bff93336121e
child 5156 307ccc9c135e
     1.1 --- a/include/SDL_pixels.h	Wed Jan 12 14:29:01 2011 -0800
     1.2 +++ b/include/SDL_pixels.h	Wed Jan 12 14:53:23 2011 -0800
     1.3 @@ -138,6 +138,7 @@
     1.4  #define SDL_ISPIXELFORMAT_FOURCC(format)    \
     1.5      ((format) && !((format) & 0x80000000))
     1.6  
     1.7 +/* Note: If you modify this list, update SDL_GetPixelFormatName() */
     1.8  enum
     1.9  {
    1.10      SDL_PIXELFORMAT_UNKNOWN,
    1.11 @@ -170,15 +171,27 @@
    1.12      SDL_PIXELFORMAT_ARGB4444 =
    1.13          SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
    1.14                                 SDL_PACKEDLAYOUT_4444, 16, 2),
    1.15 +    SDL_PIXELFORMAT_RGBA4444 =
    1.16 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
    1.17 +                               SDL_PACKEDLAYOUT_4444, 16, 2),
    1.18      SDL_PIXELFORMAT_ABGR4444 =
    1.19          SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
    1.20                                 SDL_PACKEDLAYOUT_4444, 16, 2),
    1.21 +    SDL_PIXELFORMAT_BGRA4444 =
    1.22 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
    1.23 +                               SDL_PACKEDLAYOUT_4444, 16, 2),
    1.24      SDL_PIXELFORMAT_ARGB1555 =
    1.25          SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
    1.26                                 SDL_PACKEDLAYOUT_1555, 16, 2),
    1.27 +    SDL_PIXELFORMAT_RGBA5551 =
    1.28 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
    1.29 +                               SDL_PACKEDLAYOUT_5551, 16, 2),
    1.30      SDL_PIXELFORMAT_ABGR1555 =
    1.31          SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
    1.32                                 SDL_PACKEDLAYOUT_1555, 16, 2),
    1.33 +    SDL_PIXELFORMAT_BGRA5551 =
    1.34 +        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
    1.35 +                               SDL_PACKEDLAYOUT_5551, 16, 2),
    1.36      SDL_PIXELFORMAT_RGB565 =
    1.37          SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
    1.38                                 SDL_PACKEDLAYOUT_565, 16, 2),
    1.39 @@ -270,6 +283,11 @@
    1.40  } SDL_PixelFormat;
    1.41  
    1.42  /**
    1.43 + * \brief Get the human readable name of a pixel format
    1.44 + */
    1.45 +extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);
    1.46 +
    1.47 +/**
    1.48   *  \brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.
    1.49   *  
    1.50   *  \return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.