X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=common.h;h=18c3b387f3b43509434325cea1a01d0ac9ac2d4c;hb=756dc94735b48fd28efc0bd19c4099acc39ccb94;hp=fc3da45853f91a960ff7edfcab374cdc876b9542;hpb=b95871c81d97fab30442cb1509b06168dfd3aeff;p=xboard.git diff --git a/common.h b/common.h index fc3da45..18c3b38 100644 --- a/common.h +++ b/common.h @@ -1,11 +1,13 @@ /* * common.h -- Common definitions for X and Windows NT versions of XBoard - * $Id: common.h,v 2.1 2003/10/27 19:21:00 mann Exp $ * * Copyright 1991 by Digital Equipment Corporation, Maynard, - * Massachusetts. Enhancements Copyright - * 1992-2001,2002,2003,2004,2005,2006,2007,2008,2009 Free Software - * Foundation, Inc. + * Massachusetts. + * + * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, + * 2007, 2008, 2009 Free Software Foundation, Inc. + * + * Enhancements Copyright 2005 Alessandro Scotti * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -123,13 +125,17 @@ int pclose(FILE *); outside world in ASCII. In a similar way, the different rank numbering systems (starting at rank 0 or 1) are implemented by redefining '1'. */ -#define BOARD_SIZE 16 /* [HGM] for in declarations */ -#define BOARD_HEIGHT (gameInfo.boardHeight) // [HGM] made user adjustable +#define BOARD_RANKS 11 /* [HGM] for in declarations */ +#define BOARD_FILES 16 /* [HGM] for in declarations */ +#define BOARD_HEIGHT (gameInfo.boardHeight) /* [HGM] made user adjustable */ #define BOARD_WIDTH (gameInfo.boardWidth + 2*gameInfo.holdingsWidth) -#define BOARD_LEFT (gameInfo.holdingsWidth) // [HGM] play-board edges +#define BOARD_LEFT (gameInfo.holdingsWidth) /* [HGM] play-board edges */ #define BOARD_RGHT (gameInfo.boardWidth + gameInfo.holdingsWidth) -#define ONE ('1'-(BOARD_HEIGHT>9)) // [HGM] foremost board rank -#define AAA ('a'-BOARD_LEFT) // [HGM] leftmost board file +#define CASTLING (BOARD_RANKS-1) /* [HGM] hide in upper rank */ +#define EP_STATUS CASTLING][(BOARD_FILES-2) /* [HGM] in upper rank */ +#define HOLDINGS_SET CASTLING][(BOARD_FILES-1) /* [HGM] in upper-right corner*/ +#define ONE ('1'-(BOARD_HEIGHT>9)) /* [HGM] foremost board rank */ +#define AAA ('a'-BOARD_LEFT) /* [HGM] leftmost board file */ #define DROP_RANK -3 #define MAX_MOVES 1000 #define MSG_SIZ 512 @@ -148,6 +154,7 @@ int pclose(FILE *); #define FIRST_HOST "localhost" #define SECOND_HOST "localhost" #define TELNET_PROGRAM "telnet" +#define DEF_BITMAP_DIR "/usr/share/games/xboard/bitmaps.xchess" /* AP: shouldn't be hardcoded directory, but better than nothing at the moment */ #define MATCH_MODE "False" #define INIT_STRING "new\nrandom\n" #define WHITE_STRING "white\ngo\n" @@ -206,6 +213,7 @@ typedef enum { BlackCannon, BlackNightrider, BlackCardinal, BlackDragon, BlackGrasshopper, BlackSilver, BlackFalcon, BlackLance, BlackCobra, BlackUnicorn, BlackKing, EmptySquare, + NoRights, // [HGM] gamestate: for castling rights hidden in board[CASTLING] ClearBoard, WhitePlay, BlackPlay, PromotePiece, DemotePiece /*for use on EditPosition menus*/ } ChessSquare; @@ -217,7 +225,7 @@ typedef enum { #define SHOGI (int)EmptySquare + (int) -typedef ChessSquare Board[BOARD_SIZE][BOARD_SIZE]; +typedef ChessSquare Board[BOARD_RANKS][BOARD_FILES]; typedef enum { WhiteKingSideCastle = 1, WhiteQueenSideCastle, @@ -566,7 +574,10 @@ typedef struct { char *zippyVariants; int zippyMaxGames; int zippyReplayTimeout; /*seconds*/ + int zippyShortGame; /* [HGM] aborter */ #endif + Boolean lowTimeWarning; /* [HGM] low time */ + char *lowTimeWarningColor; char *serverMovesName; Boolean suppressLoadMoves; @@ -594,6 +605,12 @@ typedef struct { char *secondOptions; char *fenOverride1; char *fenOverride2; + Boolean keepAlive; /* [HGM] alive */ + Boolean forceIllegal;/*[HGM] illegal */ + Boolean noJoin; /* [HGM] join */ + char *wrapContSeq; /* continuation sequence when xboard wraps text */ + Boolean useInternalWrap; /* use internal wrapping -- noJoin usurps this if set */ + Boolean pasteSelection; /* paste X selection instead of clipboard */ } AppData, *AppDataPtr; /* [AS] PGN tags (for showing in the game list) */ @@ -608,10 +625,11 @@ typedef struct { #define GLT_TIME_CONTROL 't' #define GLT_VARIANT 'v' #define GLT_OUT_OF_BOOK 'a' +#define GLT_RESULT_COMMENT 'c' /* [HGM] rescom */ #define GLT_DEFAULT_TAGS "eprd" /* Event, players, result, date */ -#define GLT_ALL_TAGS "esdoprwbtva" +#define GLT_ALL_TAGS "esdoprwbtvac" #define PGN_OUT_OF_BOOK "Annotator" @@ -642,6 +660,19 @@ typedef struct { int holdingsWidth; /* number of files left and right of board, 0 or 2 */ } GameInfo; +/* [AS] Search stats from chessprogram, for the played move */ +// [HGM] moved here from backend.h because it occurs in declarations of front-end functions +typedef struct { + int score; /* Centipawns */ + int depth; /* Plies */ + int time; /* Milliseconds */ +} ChessProgramStats_Move; + +// [HGM] chat +#define MAX_CHAT 3 +extern int chatCount; +extern char chatPartner[MAX_CHAT][MSG_SIZ]; + #endif