19#ifdef SDL2_PLAIN_INCLUDE
24#include <SDL2/SDL_image.h>
47 static const char *ext[] = {
75 SDL_Surface *pbuf = NULL;
77 if ((pbuf = IMG_Load(filename)) == NULL) {
78 log_error(
_(
"load_gfxfile: Unable to load graphic file %s!"), filename);
82 if (pbuf->format->palette != NULL) {
120 int mask_offset_x,
int mask_offset_y,
121 float scale,
bool smooth)
123 SDL_Rect src_rect = {(Sint16) x, (Sint16) y, (Uint16)
width, (Uint16)
height};
125 SDL_Surface *pdest = NULL;
141 SDL_Surface *mypixbuf = NULL;
148 mypixbuf = SDL_CreateRGBSurface(SDL_SWSURFACE,
width,
height, 32,
149 0x0000FF00, 0x00FF0000,
150 0xFF000000, 0x000000FF);
152 mypixbuf = SDL_CreateRGBSurface(SDL_SWSURFACE,
width,
height, 32,
153 0x00FF0000, 0x0000FF00,
154 0x000000FF, 0xFF000000);
157 SDL_FillRect(mypixbuf, NULL,
158 SDL_MapRGBA(mypixbuf->format,
struct canvas int int struct sprite int int int int height
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color * pcolor
struct canvas int int struct sprite int int int width
static GtkWidget * source
void get_sprite_dimensions(struct sprite *sprite, int *width, int *height)
void free_sprite(struct sprite *s)
struct sprite * load_gfxnumber(int num)
struct sprite * load_gfxfile(const char *filename)
struct sprite * crop_sprite(struct sprite *source, int x, int y, int width, int height, struct sprite *mask, int mask_offset_x, int mask_offset_y, float scale, bool smooth)
const char ** gfx_fileextensions(void)
SDL_Surface * mask_surface(SDL_Surface *src, SDL_Surface *mask, int mask_offset_x, int mask_offset_y)
SDL_Surface * crop_rect_from_surface(SDL_Surface *psource, SDL_Rect *prect)
SDL_Surface * convert_surf(SDL_Surface *surf_in)
static struct sprite * ctor_sprite(SDL_Surface *surf)
#define GET_SURF(m_sprite)
#define GET_SURF_REAL(m_sprite)
#define fc_assert_ret(condition)
#define fc_assert_ret_val(condition, val)
#define log_error(message,...)
struct SDL_Surface * psurface
static bool is_bigendian(void)