/* * XScrabble - X version of the popular board game, for 1 to 4 players. * * This software comes with NO warranty whatsoever. I therefore take no * responsibility for any damages, losses or problems caused through use * or misuse of this program. * * I hereby grant permission for this program to be freely copied and * distributed by any means, provided no charge is made for it. * * Matthew Chapman, csuoq@csv.warwick.ac.uk * Oct 1994. */ /* xinit.c - global declarations */ #include "scrab.h" XtAppContext app_context; Widget topLevel,sq[MAXPLAYERS][BOARDSIZE][BOARDSIZE]; Widget br[MAXPLAYERS][LONGBAR]; Widget message[MAXPLAYERS]; Widget all,title; Widget barw[MAXPLAYERS],tilesleft[MAXPLAYERS]; Widget timeleft[MAXPLAYERS],scoretitle,scorebox[MAXPLAYERS]; Widget pauseButton[MAXPLAYERS],exitButton[MAXPLAYERS]; Widget helpgameButton[MAXPLAYERS],helpgame[MAXPLAYERS]; Widget helpgame_item[MAXPLAYERS][HELP_ITEMS]; Widget menuButton[MAXPLAYERS],menu[MAXPLAYERS]; Widget menu_item[MAXPLAYERS][MENU_ITEMS]; /* struct AppData { int version,players,bell,timelim,t[4]; String disp[4],name[4]; Boolean load; String dictfile,scorefile,rulesfile; } app_data; */ /* buttons */ Widget finish[MAXPLAYERS],change[MAXPLAYERS]; Widget pass[MAXPLAYERS],evaluate[MAXPLAYERS]; Widget title; Widget blankshell,hi_scoretop[MAXPLAYERS],blankf,blanktitle,a2z[NUMLETTERS_MAX]; Widget changeshell,changef,changetitle,changeconfirm,changecancel; Widget changeletts[BARLEN],topl[MAXPLAYERS],lvtop[MAXPLAYERS],lvdismiss[MAXPLAYERS]; Widget hi_score_ent[MAXPLAYERS][MAXPLAYERS],hi_dismiss[MAXPLAYERS]; Widget rulestop[MAXPLAYERS],rulesdismiss[MAXPLAYERS],rulesmain[MAXPLAYERS]; Widget showbagtop[MAXPLAYERS],showbagmain[MAXPLAYERS], showbagupdate[MAXPLAYERS], showbagdismiss[MAXPLAYERS]; Widget selectbagtop[MAXPLAYERS],selectbagmain[MAXPLAYERS], selectbagupdate[MAXPLAYERS], selectbagdismiss[MAXPLAYERS]; Widget checkwordtop[MAXPLAYERS], checkwordmain[MAXPLAYERS], checkwordresult[MAXPLAYERS], checkwordupdate[MAXPLAYERS], checkworddismiss[MAXPLAYERS]; Widget placewordtop[MAXPLAYERS], placewordupdate[MAXPLAYERS], placeworddismiss[MAXPLAYERS]; Widget listwordtop[MAXPLAYERS], listwordupdate[MAXPLAYERS], listworddismiss[MAXPLAYERS]; Widget suggestiontop[MAXPLAYERS], suggestionupdate[MAXPLAYERS], suggestiondismiss[MAXPLAYERS]; Widget bestgotop[MAXPLAYERS],bestgodismiss[MAXPLAYERS],bestgomain[MAXPLAYERS]; Widget keytop[MAXPLAYERS],keydismiss[MAXPLAYERS]; Widget abouttop[MAXPLAYERS],aboutdismiss[MAXPLAYERS]; Widget messtop[MAXPLAYERS]; Widget compw[MAXPLAYERS], compshowbar[MAXPLAYERS], comphidebar[MAXPLAYERS]; /* extra buttons */ Widget lastgo[MAXPLAYERS],revert[MAXPLAYERS],juggle[MAXPLAYERS]; Display *dpy[MAXPLAYERS]; char bar[MAXPLAYERS][LONGBAR]; Pixmap bgxpm, markhelp[MAXPLAYERS], markmenu[MAXPLAYERS]; Boolean menu_status[MAXPLAYERS][MENU_ITEMS]; Boolean helpgame_status[MAXPLAYERS][HELP_ITEMS]; char *colours[] = { "green","skyblue","blue2","orange","red" }; Boolean is_perm[BOARDSIZE][BOARDSIZE]; Boolean waiting=False,waiting_for_blank,waiting_for_change,finished_go; char blank_letter; char cboard[BOARDSIZE][BOARDSIZE]; /* to check for everyone passing */ int num_passed=0; int type[MAXPLAYERS]; /* for the timer */ int comp,time_limit; /* for the sound level */ int bell_level; char modestart[80], modepause[80];