| 23 | static std::vector<u8> s_buffer; |
| 24 | |
| 25 | static SDL_Surface* convertToRGBA(SDL_Surface* src) |
| 26 | { |
| 27 | SDL_PixelFormat rgba32 = { |
| 28 | SDL_PIXELFORMAT_RGBA32, |
| 29 | NULL, // Palette |
| 30 | 32, // BitsPerPixel |
| 31 | 4, // BytesPerPixel |
| 32 | {0, 0}, // padding |
| 33 | 0x000000FF, // Rmask |
| 34 | 0x0000FF00, // Gmask |
| 35 | 0x00FF0000, // Bmask |
| 36 | 0xFF000000, // Amask |
| 37 | 0, // Rloss |
| 38 | 0, // Gloss |
| 39 | 0, // Bloss |
| 40 | 0, // Aloss |
| 41 | 0, // Rshift |
| 42 | 8, // Gshift |
| 43 | 16, // Bshift |
| 44 | 24, // Ashift |
| 45 | 0, |
| 46 | nullptr |
| 47 | }; |
| 48 | SDL_Surface* n = SDL_ConvertSurface(src, &rgba32, 0); |
| 49 | SDL_FreeSurface(src); |
| 50 | return n; |
| 51 | } |
| 52 | |
| 53 | void init() |
| 54 | { |
no outgoing calls
no test coverage detected