29#define MAX_FILE_EXTENSIONS 50
213 for (j = 0; j <
width; j++) {
217#define MULTI_UNc(a,b) ((a * b - (b / 2)) / 0xFF)
224 data[j * 4 + 0] =
tmp;
231 data[j * 4 + 0] =
tmp;
238 data[j * 4 + 3] = 255;
255 log_error(
"Cairo image surface creation error");
267 log_fatal(
"Failed reading graphics file: \"%s\"", filename);
340 for (
i = 0;
i <
width && *start_x == -1;
i++) {
341 for (j = 0; j <
height; j++) {
352 for (j = 0; j <
height; j++) {
363 for (j = *start_x; j <= *
end_x; j++) {
374 for (j = *start_x; j <= *
end_x; j++) {
444 unsigned char *p =
pixels;
445 unsigned char *end = p + 4 *
width;
448#define DIV_UNc(a,b) (((guint16) (a) * 0xFF + ((b) / 2)) / (b))
460 p[1] = p[2] = p[3] = 0;
468 p[0] = p[1] = p[2] = 0;
struct canvas int int struct sprite int int int int height
struct canvas int int int int struct sprite *sprite struct canvas struct color * pcolor
struct canvas int int canvas_y
struct canvas int canvas_x
struct canvas int int struct sprite int int int width
void get_text_size(int *width, int *height, enum client_font font, const char *text)
void surface_put_text(cairo_t *cr, int x, int y, float zoom, enum client_font font, struct color *pcolor, const char *text)
#define FC_STATIC_CANVAS_INIT
struct color * color_alloc(int r, int g, int b)
void color_free(struct color *color)
static GtkWidget * source
static void surf_destroy_callback(void *data)
void free_sprite(struct sprite *s)
struct sprite * create_sprite(int width, int height, struct color *pcolor)
struct sprite * sprite_scale(struct sprite *src, int new_w, int new_h)
struct sprite * load_gfxnumber(int num)
GdkPixbuf * surface_get_pixbuf(cairo_surface_t *surf, int width, int height)
GdkPixbuf * sprite_get_pixbuf(struct sprite *sprite)
GdkPixbuf * create_extra_pixbuf(const struct extra_type *pextra)
struct sprite * load_gfxfile(const char *filename, bool svgflag)
#define MAX_FILE_EXTENSIONS
void sprite_get_bounding_box(struct sprite *sprite, int *start_x, int *start_y, int *end_x, int *end_y)
struct sprite * crop_blankspace(struct sprite *s)
const char ** gfx_fileextensions(void)
void picture_set_from_surface(GtkPicture *pic, cairo_surface_t *surf)
GtkWidget * picture_new_from_surface(cairo_surface_t *surf)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_fatal(message,...)
#define log_error(message,...)
void put_drawn_sprites(struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y, int count, struct drawn_sprite *pdrawn, bool fog)
struct sprite int int int int struct sprite * mask
struct sprite int int int int struct sprite int int float scale
struct sprite int int int int struct sprite int mask_offset_x
struct sprite int int int int struct sprite int int float bool smooth get_sprite_dimensions
struct sprite int int int int struct sprite int int mask_offset_y
cairo_surface_t * surface
cairo_surface_t * surface
int fc_snprintf(char *str, size_t n, const char *format,...)
static bool is_bigendian(void)
int fill_basic_extra_sprite_array(const struct tileset *t, struct drawn_sprite *sprs, const struct extra_type *pextra)
int tileset_tile_height(const struct tileset *t)
int tileset_tile_width(const struct tileset *t)