http://bugs.freeciv.org/Ticket/Display.html?id=39411 >
Due to a bug where sheight is not fetched before a sprite but after,
gov sprites can show up misaligned. Mystery why this doesn't happen
with default ruleset.
It does show up with ancients modpack 2.1.0-1 and ampcients tileset.
What it looks like: Gov icon on a tech is drawn too high, so that it
sits at text height, halfway out of the box.
The patch is to get_sprite_dimensions before canvas_draw_sprite_full,
which was probably intended all the time.
Patch against S2_1, r13006, this is a bug fix that should go into the
branch and trunk I hope
Index: client/reqtree.c
===
--- client/reqtree.c (revision 13006)
+++ client/reqtree.c (arbetskopia)
@@ -967,12 +967,12 @@
if (preq->source.type == REQ_TECH
&& preq->source.value.tech == node->tech) {
sprite = get_government_sprite(tileset, gov);
+ get_sprite_dimensions(sprite, &swidth, &sheight);
canvas_put_sprite_full(pcanvas,
icon_startx,
starty + text_h + 4
+ (height - text_h - 4 - sheight) / 2,
sprite);
- get_sprite_dimensions(sprite, &swidth, &sheight);
icon_startx += swidth + 2;
}
} requirement_vector_iterate_end;
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev