int main() { cleargrid(); printgrid(); char gridsquare = -5; char whereinsquare = -5; startturn: gridsquare = returnlocation("Which grid do you want to start in?\n"); whereinsquare = returnlocation("Where do you wish to play in that grid?\n"); if (locationtaken(gridsquare,whereinsquare)) {goto startturn;} return 0; }
void makeoptions() { showmouse(); createwindows(0,5,5,150,75,0,4,"BrUsH CoLoR"); createlist(0,0,15,25); additem(0,0,"Black"); additem(0,0,"Blue"); additem(0,0,"Green"); additem(0,0,"Cyan"); additem(0,0,"Red"); additem(0,0,"Magenta"); additem(0,0,"Brown"); additem(0,0,"Lt. Gray"); additem(0,0,"Gray"); additem(0,0,"Lt. Blue"); additem(0,0,"Lt. Green"); additem(0,0,"Lt. Cyan"); additem(0,0,"Pink"); additem(0,0,"Lt. Magenta"); additem(0,0,"Yellow"); additem(0,0,"White"); additem(0,0,"Transparent"); createwindows(1,5,80,175,220,0,4,"BrUsH aTTrIbUtEs"); createlist(1,0,15,115); createlist(1,1,15,185); createlabel(1,0,15,100,125,112,4); createlabel(1,1,15,170,125,182,4); changelabel(1,0,"Brush Type"); changelabel(1,1,"Brush Width"); additem(1,0,"Freehand"); additem(1,0,"Flood Fill"); additem(1,0,"Line"); additem(1,0,"Rectangle"); //additem(1,0,"Circle"); //additem(1,0,"Filled Circle"); //additem(1,0,"Filled Rectangle"); additem(1,1,"1"); additem(1,1,"2"); additem(1,1,"3"); additem(1,1,"4"); additem(1,1,"5"); createwindows(2,5,225,290,375,0,4,"FiLe oPtIoNs"); createtext(2,0,20,265,280,285); createlabel(2,0,20,250,170,262,5); changelabel(2,0,"Filename:"); createbutton(2,0,20,290,90,330,3,"Save"); createbutton(2,1,100,290,170,330,3,"Load"); createbutton(2,2,20,340,170,360,4,"Quit"); createwindows(3,300,10,610,400,0,4,"DrAwInG gRiD"); createbutton(3,0,310,375,410,397,5,"Clear Grid"); cleargrid(); }