4 * The geeky little puzzle game with a big noodly crunch!
6 * gPlanarity copyright (C) 2005 Monty <monty@xiph.org>
7 * Original Flash game by John Tantalo <john.tantalo@case.edu>
8 * Original game concept by Mary Radcliffe
10 * gPlanarity is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2, or (at your option)
15 * gPlanarity is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with Postfish; see the file COPYING. If not, write to the
22 * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
29 #include <gtk/gtkmain.h>
37 #include "gameboard.h"
39 void update_push(Gameboard
*g
, cairo_t
*c
){
41 if(g
->pushed_curtain
){
45 draw_foreground(g
,c
,0,0,w
,h
);
47 // copy in the score and button surfaces
48 cairo_set_source_surface(c
,g
->forescore
,0,0);
49 cairo_rectangle(c
, 0,0,w
,
53 cairo_set_source_surface(c
,g
->forebutton
,0,h
-SCOREHEIGHT
);
54 cairo_rectangle(c
, 0,0,w
,h
);
57 if(g
->show_intersections
)
58 draw_intersections(g
,&g
->g
,c
,0,0,w
,h
);
60 cairo_set_source (c
, g
->curtainp
);
63 if(g
->redraw_callback
)g
->redraw_callback(g
);
67 void push_curtain(Gameboard
*g
,void(*redraw_callback
)(Gameboard
*g
)){
68 if(!g
->pushed_curtain
){
69 cairo_t
*c
= cairo_create(g
->background
);
71 g
->redraw_callback
=redraw_callback
;
78 //gameboard_draw(g,0,0,w,h);
82 void pop_curtain(Gameboard
*g
){
83 if(g
->pushed_curtain
){