diff options
author | June McEnroe <june@causal.agency> | 2019-03-27 22:19:22 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-03-27 22:19:22 -0400 |
commit | 27255d093b863efd331d993fea7c1f28b6ff4b00 (patch) | |
tree | cc87989e16b50fdc90483b91bd55d38a80ac4ab6 /sol.c | |
parent | Remove unneeded include (diff) | |
download | wep-27255d093b863efd331d993fea7c1f28b6ff4b00.tar.gz wep-27255d093b863efd331d993fea7c1f28b6ff4b00.zip |
Add FreeCell
Diffstat (limited to 'sol.c')
-rw-r--r-- | sol.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sol.c b/sol.c index c925955..c7ad5ec 100644 --- a/sol.c +++ b/sol.c @@ -187,6 +187,10 @@ enum { TableauX = StackMarginX, TableauY = StockY + Cards_Height + StackMarginY, + FanRightDeltaX = 14, + FanDownDeltaYBack = 3, + FanDownDeltaYFront = 15, + WindowWidth = 7 * Cards_Width + 8 * StackMarginX, WindowHeight = 2 * (StackMarginY + Cards_Height) + 6 * FanDownDeltaYBack @@ -194,7 +198,12 @@ enum { + StackMarginY, }; -static const struct Style FanWaste3 = { 1, 14, SquareDeltaY, 14, SquareDeltaY }; +static const struct Style FanRight = { + 1, 0, 0, FanRightDeltaX, SquareDeltaY +}; +static const struct Style FanDown = { + 1, 0, FanDownDeltaYBack, 0, FanDownDeltaYFront +}; static struct SDL_Rect stackRects[StacksLen]; static struct Layout layout; @@ -210,7 +219,7 @@ static void updateLayout(void) { SDL_Rect waste = { WasteX, WasteY, Cards_Width, Cards_Height }; layoutStack(&layout, &waste, &stacks[Waste1], &Square); - layoutStack(&layout, &waste, &stacks[Waste3], &FanWaste3); + layoutStack(&layout, &waste, &stacks[Waste3], &FanRight); SDL_Rect found = { FoundationX, FoundationY, Cards_Width, Cards_Height }; for (uint i = Foundation1; i <= Foundation4; ++i) { |