wok-current annotate xpat2/stuff/layout.patch @ rev 11850
Up libcrypto (1.0.0g)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 27 09:12:19 2012 +0100 (2012-02-27) |
parents | |
children |
rev | line source |
---|---|
wcnagel@1043 | 1 --- xpat2-1.07.orig/src/layout.c |
wcnagel@1043 | 2 +++ xpat2-1.07/src/layout.c |
wcnagel@1043 | 3 @@ -332,17 +332,9 @@ |
wcnagel@1043 | 4 } |
wcnagel@1043 | 5 } else { |
wcnagel@1043 | 6 /* enough space for the slots! */ |
wcnagel@1043 | 7 - int currentx = geo.dx; |
wcnagel@1043 | 8 -/* printf("generating high layout for %d,%d\n", geo.w, geo.h); */ |
wcnagel@1043 | 9 - if (rem_x >= (rules.numslots + 1) * (geo.cw + geo.dx) && |
wcnagel@1043 | 10 - !(rules.variant & NODEAL)) { |
wcnagel@1043 | 11 - /* there is space for the deck, and we can use one! */ |
wcnagel@1043 | 12 - geo.pg[game.numpiles-1].x = geo.dx; |
wcnagel@1043 | 13 - geo.pg[game.numpiles-1].y = geo.dy + geo.ch + geo.dy; |
wcnagel@1043 | 14 - currentx += geo.cw + geo.dx; |
wcnagel@1043 | 15 - new_layout_type = GEN_BIG_LAYOUT_WITH_DECK; |
wcnagel@1043 | 16 - geo.preferred_width += geo.dx + geo.cw; |
wcnagel@1043 | 17 - } |
wcnagel@1043 | 18 + int currentx = geo.dx + rules.numdecks * (geo.cw + geo.dx); |
wcnagel@1043 | 19 + new_layout_type = GEN_BIG_LAYOUT_WITH_DECK; |
wcnagel@1043 | 20 + geo.preferred_width += rules.numdecks * (geo.dx + geo.cw); |
wcnagel@1043 | 21 for (i = 0; i < rules.numslots; ++i) { |
wcnagel@1043 | 22 /* create slot of full window height */ |
wcnagel@1043 | 23 p->x = currentx; |
wcnagel@1043 | 24 @@ -351,6 +343,14 @@ |
wcnagel@1043 | 25 currentx += geo.cw + geo.dx; |
wcnagel@1043 | 26 ++p; |
wcnagel@1043 | 27 } |
wcnagel@1043 | 28 + /* finally, position the decks */ |
wcnagel@1043 | 29 + for (i = 0; i < rules.numdecks; ++i) { |
wcnagel@1043 | 30 + p[0].x = i * (geo.dx + geo.cw); |
wcnagel@1043 | 31 + p[1].x = p[0].x; |
wcnagel@1043 | 32 + p[0].y = geo.dy + 2 * (geo.ch + geo.dy); |
wcnagel@1043 | 33 + p[1].y = geo.dy + geo.ch + geo.dy; |
wcnagel@1043 | 34 + p += 2; |
wcnagel@1043 | 35 + } |
wcnagel@1043 | 36 /* redo pos. of stacks */ |
wcnagel@1043 | 37 p = geo.pg; |
wcnagel@1043 | 38 for (i = 0; i < rules.numstacks; ++i) { |