#define SOLID 0
#define OUTLINE 1
Boolean cairoAnimate;
-static cairo_surface_t *csBoardWindow, *csDualBoard;
+Option *currBoard;
+static cairo_surface_t *csBoardWindow;
static cairo_surface_t *pngPieceImages[2][(int)BlackPawn+4]; // png 256 x 256 images
static cairo_surface_t *pngPieceBitmaps[2][(int)BlackPawn]; // scaled pieces as used
static cairo_surface_t *pngPieceBitmaps2[2][(int)BlackPawn+4]; // scaled pieces in store
void
SwitchWindow ()
{
- cairo_surface_t *cstmp = csBoardWindow;
- csBoardWindow = csDualBoard;
dual = !dual;
- if(!csDualBoard) {
- csBoardWindow = DRAWABLE(dualOptions+3);
- dual = 1;
- }
- csDualBoard = cstmp;
+ currBoard = (dual ? &mainOptions[W_BOARD] : &dualOptions[3]);
+ csBoardWindow = DRAWABLE(currBoard);
}
#define BoardSize int
DrawSeekOpen ()
{
csBoardWindow = (cairo_surface_t *) mainOptions[W_BOARD].choice;
+ currBoard = &mainOptions[W_BOARD];
}
void
SetPen(cr, lineGap, col, 0);
cairo_stroke(cr);
cairo_destroy(cr);
- DrawExpose(NULL, x - lineGap/2, y - lineGap/2, squareSize+2*lineGap, squareSize+2*lineGap);
+ GraphExpose(currBoard, x - lineGap/2, y - lineGap/2, squareSize+2*lineGap, squareSize+2*lineGap);
}
static int
cairo_fill (cr);
cairo_destroy (cr);
if(c_animBufs[anr+destBuf] == csBoardWindow)
- DrawExpose(NULL, destX, destY, squareSize, squareSize);
+ GraphExpose(currBoard, destX, destY, squareSize, squareSize);
}
void