Another attempt at fixing compiler warnings for SDLTest_SurfaceImage_t.
2 * Automated SDL test common framework.
4 * Written by Edgar Simo "bobbens"
6 * Released under Public Domain.
14 # define FORMAT SDL_PIXELFORMAT_ARGB8888
15 # define AMASK 0xff000000 /**< Alpha bit mask. */
16 # define RMASK 0x00ff0000 /**< Red bit mask. */
17 # define GMASK 0x0000ff00 /**< Green bit mask. */
18 # define BMASK 0x000000ff /**< Blue bit mask. */
21 typedef struct SurfaceImage_s {
24 unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */
25 const char *pixel_data;
28 #define ALLOWABLE_ERROR_OPAQUE 0
29 #define ALLOWABLE_ERROR_BLENDED 64
32 * @brief Compares a surface and a surface image for equality.
34 * @param sur Surface to compare.
35 * @param img Image to compare against.
36 * @return 0 if they are the same, -1 on error and positive if different.
38 int surface_compare( SDL_Surface *sur, const SurfaceImage_t *img, int allowable_error );