zenilib
0.5.3.0
|
Go to the source code of this file.
Macros | |
#define | BI_BITFIELDS 3 |
#define | BI_RGB 0 |
#define | BI_RLE4 2 |
#define | BI_RLE8 1 |
#define | SAVE_32BIT_BMP |
Functions | |
static void | CorrectAlphaChannel (SDL_Surface *surface) |
SDL_Surface * | SDL_LoadBMP_RW (SDL_RWops *src, int freesrc) |
int | SDL_SaveBMP_RW (SDL_Surface *saveme, SDL_RWops *dst, int freedst) |
#define BI_BITFIELDS 3 |
Definition at line 46 of file SDL_bmp.c.
Referenced by SDL_LoadBMP_RW().
#define BI_RGB 0 |
Definition at line 43 of file SDL_bmp.c.
Referenced by SDL_LoadBMP_RW(), and SDL_SaveBMP_RW().
|
static |
Definition at line 50 of file SDL_bmp.c.
References SDL_Surface::h, SDL_Surface::pitch, SDL_Surface::pixels, SDL_ALPHA_OPAQUE, SDL_FALSE, and SDL_TRUE.
Referenced by SDL_LoadBMP_RW().
SDL_Surface* SDL_LoadBMP_RW | ( | SDL_RWops * | src, |
int | freesrc | ||
) |
Load a surface from a seekable SDL data stream (memory or file).
If freesrc
is non-zero, the stream will be closed after being read.
The new surface should be freed with SDL_FreeSurface().
Definition at line 80 of file SDL_bmp.c.
References SDL_Color::a, SDL_Color::b, BI_BITFIELDS, BI_RGB, bits, SDL_Palette::colors, CorrectAlphaChannel(), SDL_Surface::format, SDL_Color::g, SDL_Surface::h, i, int, SDL_Palette::ncolors, NULL, pad, SDL_Surface::pitch, SDL_Surface::pixels, SDL_Color::r, RW_SEEK_SET, SDL_ALPHA_OPAQUE, SDL_ClearError(), SDL_CreateRGBSurface(), SDL_EFREAD, SDL_EFSEEK, SDL_Error(), SDL_FALSE, SDL_FreeSurface(), SDL_GetError(), SDL_OutOfMemory, SDL_ReadLE16(), SDL_ReadLE32(), SDL_realloc(), SDL_RWclose, SDL_RWread, SDL_RWseek, SDL_RWtell, SDL_SetError(), SDL_strcmp(), SDL_strncmp(), SDL_Swap16(), SDL_Swap32(), SDL_TRUE, and SDL_Surface::w.
int SDL_SaveBMP_RW | ( | SDL_Surface * | surface, |
SDL_RWops * | dst, | ||
int | freedst | ||
) |
Save a surface to a seekable SDL data stream (memory or file).
If freedst
is non-zero, the stream will be closed after being written.
Definition at line 411 of file SDL_bmp.c.
References SDL_PixelFormat::Amask, BI_RGB, bits, SDL_PixelFormat::BitsPerPixel, SDL_PixelFormat::Bmask, SDL_PixelFormat::BytesPerPixel, colors, SDL_Palette::colors, else, SDL_BlitInfo::flags, SDL_Surface::format, SDL_PixelFormat::Gmask, SDL_Surface::h, i, SDL_BlitMap::info, SDL_Surface::map, SDL_Palette::ncolors, NULL, pad, SDL_PixelFormat::palette, SDL_Surface::pitch, SDL_Surface::pixels, SDL_PixelFormat::Rmask, RW_SEEK_SET, SDL_BYTEORDER, SDL_ClearError(), SDL_ConvertSurface(), SDL_COPY_COLORKEY, SDL_EFSEEK, SDL_EFWRITE, SDL_Error(), SDL_FALSE, SDL_FreeSurface(), SDL_GetError(), SDL_InitFormat(), SDL_LIL_ENDIAN, SDL_LockSurface(), SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR24, SDL_PIXELFORMAT_BGRA8888, SDL_RWclose, SDL_RWseek, SDL_RWtell, SDL_RWwrite, SDL_SetError(), SDL_strcmp(), SDL_TRUE, SDL_UnlockSurface(), SDL_WriteLE16(), SDL_WriteLE32(), and SDL_Surface::w.