[crossfire] create_and_rescale_image_from_data weirdness

Nicolas Weeger nicolas.weeger at laposte.net
Sun Sep 4 10:57:51 CDT 2005


Hello.

The logic of create_and_rescale_image_from_data (in gtk/image.c) is strange.

In a first pass, it tests
    if (iscale != 100) {
and calls in any case create_icon_image which creates the pixmap's image
and mask through rgba_to_gdkpixmap.

Then just after
    if (use_config[CONFIG_MAPSCALE] != 100) {
which always create_map_image, which first line is erasing the mark and
image just created and calls rgba_to_gdkpixmap!

As I'm not too familiar with client display logic, I'm not sure of the
best fix, but obviously there's an extra call :)

Also, when
	if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL) {
is true, a png_tmp is allocated and never freed.

Ryo

    
    


More information about the crossfire mailing list