1 /* vim:tw=78:ts=8:sw=4:set ft=c: */
3 Copyright (C) 2002-2006 Ben Kibbey <bjk@luxsci.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #define COPYRIGHT "Copyright (C) 2002-2006 " PACKAGE_BUGREPORT
23 #define LINE_GRAPHIC(c) ((!config.linegraphics) ? ' ' : c)
24 #define ROWTOMATRIX(r) ((8 - r) * 2 + 2 - 1)
25 #define COLTOMATRIX(c) ((c == 1) ? 1 : c * 4 - 3)
26 #define BOARD_HEIGHT 18
27 #define BOARD_WIDTH 34
28 #define STATUS_HEIGHT (BOARD_HEIGHT + HISTORY_HEIGHT - TAG_HEIGHT)
29 #define STATUS_WIDTH (COLS - BOARD_WIDTH)
31 #define TAG_WIDTH (COLS - BOARD_WIDTH)
32 #define HISTORY_HEIGHT (LINES - BOARD_HEIGHT)
33 #define HISTORY_WIDTH (COLS - STATUS_WIDTH)
34 #define MAX_VALUE_WIDTH (COLS - 8)
53 static char gameexp
[255];
54 static char moveexp
[255];
55 struct itimerval clock_timer
;
57 int markstart
= -1, markend
= -1;
59 char loadfile
[FILENAME_MAX
];
64 // Loaded filename from the command line or from the file input dialog.
67 NO_FILE
, PGN_FILE
, FEN_FILE
, EPD_FILE
76 struct file_s
**files
;
78 const char *history_menu_help_str
= {
79 " UP/DOWN - previous/next menu item\n" \
80 " HOME/END - first/last menu item\n" \
81 " PGDN/PGUP - next/previous page\n" \
82 " a-zA-Z0-9 - jump to item\n" \
83 " CTRL-a - annotate the selected move\n" \
84 " ENTER - view annotation\n" \
85 " CTRL-d - toggle board details\n" \
89 const char *mainhelp
= {
90 "p - play mode keys\n" \
91 "h - history mode keys\n" \
92 "e - board edit mode keys\n" \
93 "g - global game keys"
96 const char *filebrowser_help
= {
97 " UP/DOWN - previous/next menu item\n" \
98 " HOME/END - first/last menu item\n" \
99 " PGDN/PGUP - next/previous page\n" \
100 " a-zA-Z0-9 - jump to item\n" \
101 " ENTER - select item\n" \
102 " ~ - change to home directory\n" \
106 const char *naghelp
= {
107 " UP/DOWN - previous/next menu item\n" \
108 " HOME/END - first/last menu item\n" \
109 " PGDN/PGUP - next/previous page\n" \
110 " a-zA-Z0-9 - jump to item\n" \
111 " SPACE - toggle selected item\n" \
112 " CTRL-X - quit with changes"
119 char *notify
; // The status window notification line buffer.
122 int curses_initialized
;
124 // When in history mode a full step is to the next move of the same playing
125 // side. Half stepping is alternating sides.
128 void update_all(GAME g
);
129 void parse_engine_output(GAME
*g
, char *str
);
130 void update_status_notify(GAME g
, char *fmt
, ...);
131 void edit_tags(GAME g
, BOARD b
, int edit
);
132 void add_custom_tags(TAG
***t
);
135 void dump_board(int, BOARD
);
136 void dump_flags(int);
137 char *debug_board(BOARD
);