wok-4.x rev 1043
xpat2: patch from debian for klondike
author | Bill Nagel <wcnagel@xxxxxxxx> |
---|---|
date | Fri Jul 11 23:17:22 2008 +0000 (2008-07-11) |
parents | 99a4ec0e2e77 |
children | 8bae5c6c50e6 |
files | xpat2/receipt xpat2/stuff/layout.patch |
line diff
1.1 --- a/xpat2/receipt Fri Jul 11 20:11:55 2008 +0000 1.2 +++ b/xpat2/receipt Fri Jul 11 23:17:22 2008 +0000 1.3 @@ -15,6 +15,7 @@ 1.4 { 1.5 cd $src 1.6 patch -p1 < ../stuff/xpat2.patch 1.7 + patch -p1 < ../stuff/layout.patch 1.8 cd src 1.9 cp ../../stuff/Makefile . 1.10 make
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/xpat2/stuff/layout.patch Fri Jul 11 23:17:22 2008 +0000 2.3 @@ -0,0 +1,38 @@ 2.4 +--- xpat2-1.07.orig/src/layout.c 2.5 ++++ xpat2-1.07/src/layout.c 2.6 +@@ -332,17 +332,9 @@ 2.7 + } 2.8 + } else { 2.9 + /* enough space for the slots! */ 2.10 +- int currentx = geo.dx; 2.11 +-/* printf("generating high layout for %d,%d\n", geo.w, geo.h); */ 2.12 +- if (rem_x >= (rules.numslots + 1) * (geo.cw + geo.dx) && 2.13 +- !(rules.variant & NODEAL)) { 2.14 +- /* there is space for the deck, and we can use one! */ 2.15 +- geo.pg[game.numpiles-1].x = geo.dx; 2.16 +- geo.pg[game.numpiles-1].y = geo.dy + geo.ch + geo.dy; 2.17 +- currentx += geo.cw + geo.dx; 2.18 +- new_layout_type = GEN_BIG_LAYOUT_WITH_DECK; 2.19 +- geo.preferred_width += geo.dx + geo.cw; 2.20 +- } 2.21 ++ int currentx = geo.dx + rules.numdecks * (geo.cw + geo.dx); 2.22 ++ new_layout_type = GEN_BIG_LAYOUT_WITH_DECK; 2.23 ++ geo.preferred_width += rules.numdecks * (geo.dx + geo.cw); 2.24 + for (i = 0; i < rules.numslots; ++i) { 2.25 + /* create slot of full window height */ 2.26 + p->x = currentx; 2.27 +@@ -351,6 +343,14 @@ 2.28 + currentx += geo.cw + geo.dx; 2.29 + ++p; 2.30 + } 2.31 ++ /* finally, position the decks */ 2.32 ++ for (i = 0; i < rules.numdecks; ++i) { 2.33 ++ p[0].x = i * (geo.dx + geo.cw); 2.34 ++ p[1].x = p[0].x; 2.35 ++ p[0].y = geo.dy + 2 * (geo.ch + geo.dy); 2.36 ++ p[1].y = geo.dy + geo.ch + geo.dy; 2.37 ++ p += 2; 2.38 ++ } 2.39 + /* redo pos. of stacks */ 2.40 + p = geo.pg; 2.41 + for (i = 0; i < rules.numstacks; ++i) {