# HG changeset patch # User Bill Nagel # Date 1215818242 0 # Node ID bfa41136b77a991c0cb59948b477738820f3fdb7 # Parent 99a4ec0e2e77bd333215fcde6aa6cc65ec4049b4 xpat2: patch from debian for klondike diff -r 99a4ec0e2e77 -r bfa41136b77a xpat2/receipt --- a/xpat2/receipt Fri Jul 11 20:11:55 2008 +0000 +++ b/xpat2/receipt Fri Jul 11 23:17:22 2008 +0000 @@ -15,6 +15,7 @@ { cd $src patch -p1 < ../stuff/xpat2.patch + patch -p1 < ../stuff/layout.patch cd src cp ../../stuff/Makefile . make diff -r 99a4ec0e2e77 -r bfa41136b77a xpat2/stuff/layout.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xpat2/stuff/layout.patch Fri Jul 11 23:17:22 2008 +0000 @@ -0,0 +1,38 @@ +--- xpat2-1.07.orig/src/layout.c ++++ xpat2-1.07/src/layout.c +@@ -332,17 +332,9 @@ + } + } else { + /* enough space for the slots! */ +- int currentx = geo.dx; +-/* printf("generating high layout for %d,%d\n", geo.w, geo.h); */ +- if (rem_x >= (rules.numslots + 1) * (geo.cw + geo.dx) && +- !(rules.variant & NODEAL)) { +- /* there is space for the deck, and we can use one! */ +- geo.pg[game.numpiles-1].x = geo.dx; +- geo.pg[game.numpiles-1].y = geo.dy + geo.ch + geo.dy; +- currentx += geo.cw + geo.dx; +- new_layout_type = GEN_BIG_LAYOUT_WITH_DECK; +- geo.preferred_width += geo.dx + geo.cw; +- } ++ int currentx = geo.dx + rules.numdecks * (geo.cw + geo.dx); ++ new_layout_type = GEN_BIG_LAYOUT_WITH_DECK; ++ geo.preferred_width += rules.numdecks * (geo.dx + geo.cw); + for (i = 0; i < rules.numslots; ++i) { + /* create slot of full window height */ + p->x = currentx; +@@ -351,6 +343,14 @@ + currentx += geo.cw + geo.dx; + ++p; + } ++ /* finally, position the decks */ ++ for (i = 0; i < rules.numdecks; ++i) { ++ p[0].x = i * (geo.dx + geo.cw); ++ p[1].x = p[0].x; ++ p[0].y = geo.dy + 2 * (geo.ch + geo.dy); ++ p[1].y = geo.dy + geo.ch + geo.dy; ++ p += 2; ++ } + /* redo pos. of stacks */ + p = geo.pg; + for (i = 0; i < rules.numstacks; ++i) {