}
}
-void SendProgramStatsToFrontend( ChessProgramState * cps )
+void SendProgramStatsToFrontend( ChessProgramState * cps, ChessProgramStats * cpstats )
{
- SetProgramStats( cps == &first ? 0 : 1,
- programStats.depth,
- programStats.nodes,
- programStats.score,
- programStats.time,
- programStats.movelist,
- lastHint );
+ char * hint = lastHint;
+ FrontEndProgramStats stats;
+
+ stats.which = cps == &first ? 0 : 1;
+ stats.depth = cpstats->depth;
+ stats.nodes = cpstats->nodes;
+ stats.score = cpstats->score;
+ stats.time = cpstats->time;
+ stats.pv = cpstats->movelist;
+ stats.hint = lastHint;
+ stats.an_move_index = 0;
+ stats.an_move_count = 0;
+
+ if( gameMode == AnalyzeMode || gameMode == AnalyzeFile ) {
+ stats.hint = cpstats->move_name;
+ stats.an_move_index = cpstats->nr_moves - cpstats->moves_left;
+ stats.an_move_count = cpstats->nr_moves;
+ }
+
+ SetProgramStats( &stats );
}
void
fprintf(debugFP, "Undoing extra move from %s, gameMode %d\n",
cps->which, gameMode);
}
+
SendToProgram("undo\n", cps);
}
return;
programStats.line_is_book = 0;
}
- SendProgramStatsToFrontend( cps );
+ SendProgramStatsToFrontend( cps, &programStats );
/*
[AS] Protect the thinkOutput buffer from overflow... this
isn't searching, so stats won't change) */
programStats.line_is_book = 1;
- SendProgramStatsToFrontend( cps );
+ SendProgramStatsToFrontend( cps, &programStats );
if (currentMove == forwardMostMove || gameMode==AnalyzeMode || gameMode == AnalyzeFile) {
DisplayMove(currentMove - 1);
programStats.nr_moves = mvtot;
strcpy(programStats.move_name, mvname);
programStats.ok_to_send = 1;
+ programStats.movelist[0] = '\0';
- SendProgramStatsToFrontend( cps );
+ SendProgramStatsToFrontend( cps, &programStats );
DisplayAnalysis();
return;
if (sscanf(message, "%d%c %d %d %lu %[^\n]\n",
&plylev, &plyext, &curscore, &time, &nodes, buf1) >= 5)
{
+ ChessProgramStats cpstats;
+
if (plyext != ' ' && plyext != '\t') {
time *= 100;
}
curscore = -curscore;
}
- programStats.depth = plylev;
- programStats.nodes = nodes;
- programStats.time = time;
- programStats.score = curscore;
- programStats.got_only_move = 0;
- programStats.movelist[0] = '\0';
+ cpstats.depth = plylev;
+ cpstats.nodes = nodes;
+ cpstats.time = time;
+ cpstats.score = curscore;
+ cpstats.got_only_move = 0;
+ cpstats.movelist[0] = '\0';
if (buf1[0] != NULLCHAR) {
- safeStrCpy( programStats.movelist, buf1, sizeof(programStats.movelist) );
+ safeStrCpy( cpstats.movelist, buf1, sizeof(cpstats.movelist) );
}
- programStats.ok_to_send = 0;
- programStats.line_is_book = 0;
- programStats.nr_moves = 0;
- programStats.moves_left = 0;
+ cpstats.ok_to_send = 0;
+ cpstats.line_is_book = 0;
+ cpstats.nr_moves = 0;
+ cpstats.moves_left = 0;
- SendProgramStatsToFrontend( cps );
+ SendProgramStatsToFrontend( cps, &cpstats );
}
}
}
#define PGN_SIDE_WHITE 0
#define PGN_SIDE_BLACK 1
+/* [AS] */
static int FindFirstMoveOutOfBook( int side )
{
int result = -1;
int score = pvInfoList[index].score;
int in_book = 0;
- if( depth == 0 ) {
- in_book = 1; /* Yace */
- }
- if( score == 0 ) {
- if( depth <= 1 || depth == 63 /* Zappa */ ) {
+ if( depth <= 2 ) {
in_book = 1;
}
+ else if( score == 0 && depth == 63 ) {
+ in_book = 1; /* Zappa */
+ }
+ else if( score == 2 && depth == 99 ) {
+ in_book = 1; /* Abrok */
}
has_book_hit += in_book;
return result;
}
+/* [AS] */
void GetOutOfBookInfo( char * buf )
{
int oob[2];
if (time <= 0) time = 1;
if (otime <= 0) otime = 1;
- sprintf(message, "time %ld\notim %ld\n", time, otime);
+ sprintf(message, "time %ld\n", time);
+ SendToProgram(message, cps);
+
+ sprintf(message, "otim %ld\n", otime);
SendToProgram(message, cps);
}
void ThawUI P((void));
extern char *programName;
-void SetProgramStats P(( int which, int depth, unsigned long nodes, int score, int time, char * pv, char * hint )); /* [AS] */
+typedef struct FrontEndProgramStats_TAG {
+ int which;
+ int depth;
+ unsigned long nodes;
+ int score;
+ int time;
+ char * pv;
+ char * hint;
+ int an_move_index;
+ int an_move_count;
+} FrontEndProgramStats;
+
+void SetProgramStats P(( FrontEndProgramStats * stats )); /* [AS] */
#endif
#define EDITTAGS_FONT_COLOSSAL "Courier New:8.0"\r
#define EDITTAGS_FONT_TITANIC "Courier New:8.0"\r
\r
+#define MOVEHISTORY_FONT_ALL "MS Sans Serif:8.0"
+
#define COLOR_SHOUT "#209000"\r
#define COLOR_SSHOUT "b #289808"\r
#define COLOR_CHANNEL1 "#2020E0"\r
#define IDI_CLOCK_14 470
#define IDI_UNKNOWN_14 471
#define IDI_BALOON_14 472
+#define IDI_ANALYZE_14 473
+#define IDI_ANALYZE2_14 474
#define DLG_Promotion 500\r
#define PB_Queen 502\r
#define PB_Rook 503\r
#define OPT_ChooseCommentsFont 1417\r
#define OPT_ChooseConsoleFont 1418\r
#define OPT_DefaultFonts 1419\r
+#define OPT_ChooseMoveHistoryFont 1420
#define OPT_AutoRaiseBoard 1421\r
+#define OPT_SampleMoveHistoryFont 1421
#define OPT_ShowButtonBar 1422\r
+#define OPT_MessageFont6 1422
#define OPT_SaveExtPGN 1423
#define OPT_HideThinkFromHuman 1424
#define IDC_GameListDoFilter 1425
#define STATE_THINKING 0
#define STATE_IDLE 1
#define STATE_PONDERING 2
+#define STATE_ANALYZING 3
static int windowMode = 1;
static HICON hiClear = NULL;
static HICON hiPondering = NULL;
static HICON hiThinking = NULL;
+static HICON hiAnalyzing = NULL;
static int lastDepth[2] = { -1, -1 };
static int lastForwardMostMove[2] = { -1, -1 };
static int engineState[2] = { -1, -1 };
typedef struct {
- int which;
HWND hColorIcon;
HWND hLabel;
HWND hStateIcon;
HWND hLabelNPS;
HWND hMemo;
char * name;
+ int which;
int depth;
unsigned long nodes;
int score;
int time;
char * pv;
char * hint;
+ int an_move_index;
+ int an_move_count;
} EngineOutputData;
static HICON LoadIconEx( int id )
hiClear = LoadIconEx( IDI_TRANS_14 );
hiPondering = LoadIconEx( IDI_PONDER_14 );
hiThinking = LoadIconEx( IDI_CLOCK_14 );
+ hiAnalyzing = LoadIconEx( IDI_ANALYZE2_14 );
needInit = FALSE;
}
}
return result;
}
+static int IsEnginePondering( int which )
+{
+ int result = FALSE;
+
+ switch (gameMode) {
+ case MachinePlaysBlack:
+ case IcsPlayingBlack:
+ if( WhiteOnMove(forwardMostMove) ) result = TRUE;
+ break;
+ case MachinePlaysWhite:
+ case IcsPlayingWhite:
+ if( ! WhiteOnMove(forwardMostMove) ) result = TRUE;
+ break;
+ case TwoMachinesPlay:
+ if( GetActiveEngineColor() != ENGINE_COLOR_UNKNOWN ) {
+ if( GetEngineColor( which ) != GetActiveEngineColor() ) result = TRUE;
+ }
+ break;
+ }
+
+ return result;
+}
+
static VOID PositionControlSet( HWND hDlg, int x, int y, int clientWidth, int memoHeight, int idColor, int idEngineLabel, int idNPS, int idMemo, int idStateIcon, int idStateData )
{
int label_x = x + ICON_SIZE + H_MARGIN;
int memo_y = y + ICON_SIZE + LABEL_V_DISTANCE;
SetControlPos( hDlg, idColor, x, y, ICON_SIZE, ICON_SIZE );
- SetControlPos( hDlg, idEngineLabel, label_x, label_y, max_w / 2, label_h );
+ SetControlPos( hDlg, idEngineLabel, label_x, label_y, state_icon_x - label_x, label_h );
SetControlPos( hDlg, idStateIcon, state_icon_x, y, ICON_SIZE, ICON_SIZE );
SetControlPos( hDlg, idStateData, state_data_x, label_y, state_data_w, label_h );
SetControlPos( hDlg, idNPS, nps_x, label_y, nps_w, label_h );
case STATE_PONDERING:
SetIcon( hStateIcon, hiPondering );
break;
+ case STATE_ANALYZING:
+ SetIcon( hStateIcon, hiAnalyzing );
+ break;
default:
SetIcon( hStateIcon, hiClear );
break;
static VOID UpdateControls( EngineOutputData * ed )
{
+ BOOL isPondering = FALSE;
+
char s_label[MAX_NAME_LENGTH + 32];
char * name = ed->name;
s_label[ MAX_NAME_LENGTH-1 ] = '\0';
#ifdef SHOW_PONDERING
- if( GetActiveEngineColor() != ENGINE_COLOR_UNKNOWN ) {
- if( GetEngineColor(ed->which) != GetActiveEngineColor() ) {
+ if( IsEnginePondering( ed->which ) ) {
char buf[8];
buf[0] = '\0';
SetEngineState( ed->which, STATE_PONDERING, buf );
}
- else {
+ else if( gameMode == TwoMachinesPlay ) {
SetEngineState( ed->which, STATE_THINKING, "" );
}
+ else if( gameMode == AnalyzeMode || gameMode == AnalyzeFile ) {
+ char buf[64];
+ int time_secs = ed->time / 100;
+ int time_mins = time_secs / 60;
+
+ buf[0] = '\0';
+
+ if( ed->an_move_index != 0 && ed->an_move_count != 0 && *ed->hint != '\0' ) {
+ char mov[16];
+
+ strncpy( mov, ed->hint, sizeof(mov) );
+ mov[ sizeof(mov)-1 ] = '\0';
+
+ sprintf( buf, "%d/%d: %s [%02d:%02d:%02d]", ed->an_move_index, ed->an_move_count, mov, time_mins / 60, time_mins % 60, time_secs % 60 );
+ }
+
+ SetEngineState( ed->which, STATE_ANALYZING, buf );
}
else {
SetEngineState( ed->which, STATE_IDLE, "" );
return engineOutputDialogUp;
}
-VOID EngineOutputUpdate( int which, int depth, unsigned long nodes, int score, int time, char * pv, char * hint )
+VOID EngineOutputUpdate( FrontEndProgramStats * stats )
{
EngineOutputData ed;
BOOL clearMemo = FALSE;
+ int which;
+ int depth;
+
+ if( stats == 0 ) {
+ SetEngineState( 0, STATE_IDLE, "" );
+ SetEngineState( 1, STATE_IDLE, "" );
+ return;
+ }
+
+ which = stats->which;
+ depth = stats->depth;
- if( which < 0 || which > 1 || depth < 0 || time < 0 || pv == 0 || *pv == '\0' ) {
+ if( which < 0 || which > 1 || depth < 0 || stats->time < 0 || stats->pv == 0 ) {
return;
}
ed.which = which;
ed.depth = depth;
- ed.nodes = nodes;
- ed.score = score;
- ed.time = time;
- ed.pv = pv;
- ed.hint = hint;
+ ed.nodes = stats->nodes;
+ ed.score = stats->score;
+ ed.time = stats->time;
+ ed.pv = stats->pv;
+ ed.hint = stats->hint;
+ ed.an_move_index = stats->an_move_index;
+ ed.an_move_count = stats->an_move_count;
/* Get target control */
if( which == 0 ) {
lastDepth[which] = depth;
lastForwardMostMove[which] = forwardMostMove;
- if( pv[0] == ' ' ) {
- if( strncmp( pv, " no PV", 6 ) == 0 ) { /* Hack on hack! :-O */
+ if( ed.pv != 0 && ed.pv[0] == ' ' ) {
+ if( strncmp( ed.pv, " no PV", 6 ) == 0 ) { /* Hack on hack! :-O */
ed.pv = "";
}
}
extern WindowPlacement wpMoveHistory;
+extern BoardSize boardSize;
+
/* Module globals */
typedef char MoveHistoryString[ MOVE_LEN*2 ];
SendDlgItemMessage( moveHistoryDialog, IDC_MoveHistory, EM_SETEVENTMASK, 0, ENM_MOUSEEVENTS );
+ /* Set font */
+ SendDlgItemMessage( moveHistoryDialog, IDC_MoveHistory, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0 ));
+
/* Restore window placement */
RestoreWindowPlacement( hDlg, &wpMoveHistory );
}
#define MF(x) {x, {0, }, {0, }, 0}\r
MyFont fontRec[NUM_SIZES][NUM_FONTS] =\r
{\r
- { MF(CLOCK_FONT_TINY), MF(MESSAGE_FONT_TINY), \r
- MF(COORD_FONT_TINY), MF(CONSOLE_FONT_TINY),\r
- MF(COMMENT_FONT_TINY), MF(EDITTAGS_FONT_TINY) },\r
- { MF(CLOCK_FONT_TEENY), MF(MESSAGE_FONT_TEENY), \r
- MF(COORD_FONT_TEENY), MF(CONSOLE_FONT_TEENY),\r
- MF(COMMENT_FONT_TEENY), MF(EDITTAGS_FONT_TEENY) },\r
- { MF(CLOCK_FONT_DINKY), MF(MESSAGE_FONT_DINKY),\r
- MF(COORD_FONT_DINKY), MF(CONSOLE_FONT_DINKY),\r
- MF(COMMENT_FONT_DINKY), MF(EDITTAGS_FONT_DINKY) },\r
- { MF(CLOCK_FONT_PETITE), MF(MESSAGE_FONT_PETITE),\r
- MF(COORD_FONT_PETITE), MF(CONSOLE_FONT_PETITE),\r
- MF(COMMENT_FONT_PETITE), MF(EDITTAGS_FONT_PETITE) },\r
- { MF(CLOCK_FONT_SLIM), MF(MESSAGE_FONT_SLIM),\r
- MF(COORD_FONT_SLIM), MF(CONSOLE_FONT_SLIM),\r
- MF(COMMENT_FONT_SLIM), MF(EDITTAGS_FONT_SLIM) },\r
- { MF(CLOCK_FONT_SMALL), MF(MESSAGE_FONT_SMALL),\r
- MF(COORD_FONT_SMALL), MF(CONSOLE_FONT_SMALL),\r
- MF(COMMENT_FONT_SMALL), MF(EDITTAGS_FONT_SMALL) },\r
- { MF(CLOCK_FONT_MEDIOCRE), MF(MESSAGE_FONT_MEDIOCRE),\r
- MF(COORD_FONT_MEDIOCRE), MF(CONSOLE_FONT_MEDIOCRE),\r
- MF(COMMENT_FONT_MEDIOCRE), MF(EDITTAGS_FONT_MEDIOCRE) },\r
- { MF(CLOCK_FONT_MIDDLING), MF(MESSAGE_FONT_MIDDLING),\r
- MF(COORD_FONT_MIDDLING), MF(CONSOLE_FONT_MIDDLING),\r
- MF(COMMENT_FONT_MIDDLING), MF(EDITTAGS_FONT_MIDDLING) },\r
- { MF(CLOCK_FONT_AVERAGE), MF(MESSAGE_FONT_AVERAGE),\r
- MF(COORD_FONT_AVERAGE), MF(CONSOLE_FONT_AVERAGE),\r
- MF(COMMENT_FONT_AVERAGE), MF(EDITTAGS_FONT_AVERAGE) },\r
- { MF(CLOCK_FONT_MODERATE), MF(MESSAGE_FONT_MODERATE),\r
- MF(COORD_FONT_MODERATE), MF(CONSOLE_FONT_MODERATE),\r
- MF(COMMENT_FONT_MODERATE), MF(EDITTAGS_FONT_MODERATE) },\r
- { MF(CLOCK_FONT_MEDIUM), MF(MESSAGE_FONT_MEDIUM),\r
- MF(COORD_FONT_MEDIUM), MF(CONSOLE_FONT_MEDIUM),\r
- MF(COMMENT_FONT_MEDIUM), MF(EDITTAGS_FONT_MEDIUM) },\r
- { MF(CLOCK_FONT_BULKY), MF(MESSAGE_FONT_BULKY),\r
- MF(COORD_FONT_BULKY), MF(CONSOLE_FONT_BULKY),\r
- MF(COMMENT_FONT_BULKY), MF(EDITTAGS_FONT_BULKY) },\r
- { MF(CLOCK_FONT_LARGE), MF(MESSAGE_FONT_LARGE),\r
- MF(COORD_FONT_LARGE), MF(CONSOLE_FONT_LARGE),\r
- MF(COMMENT_FONT_LARGE), MF(EDITTAGS_FONT_LARGE) },\r
- { MF(CLOCK_FONT_BIG), MF(MESSAGE_FONT_BIG),\r
- MF(COORD_FONT_BIG), MF(CONSOLE_FONT_BIG),\r
- MF(COMMENT_FONT_BIG), MF(EDITTAGS_FONT_BIG) },\r
- { MF(CLOCK_FONT_HUGE), MF(MESSAGE_FONT_HUGE),\r
- MF(COORD_FONT_HUGE), MF(CONSOLE_FONT_HUGE),\r
- MF(COMMENT_FONT_HUGE), MF(EDITTAGS_FONT_HUGE) },\r
- { MF(CLOCK_FONT_GIANT), MF(MESSAGE_FONT_GIANT),\r
- MF(COORD_FONT_GIANT), MF(CONSOLE_FONT_GIANT),\r
- MF(COMMENT_FONT_GIANT), MF(EDITTAGS_FONT_GIANT) },\r
- { MF(CLOCK_FONT_COLOSSAL), MF(MESSAGE_FONT_COLOSSAL),\r
- MF(COORD_FONT_COLOSSAL), MF(CONSOLE_FONT_COLOSSAL),\r
- MF(COMMENT_FONT_COLOSSAL), MF(EDITTAGS_FONT_COLOSSAL) },\r
- { MF(CLOCK_FONT_TITANIC), MF(MESSAGE_FONT_TITANIC),\r
- MF(COORD_FONT_TITANIC), MF(CONSOLE_FONT_TITANIC),\r
- MF(COMMENT_FONT_TITANIC), MF(EDITTAGS_FONT_TITANIC) },\r
+ { MF(CLOCK_FONT_TINY), MF(MESSAGE_FONT_TINY), MF(COORD_FONT_TINY), MF(CONSOLE_FONT_TINY), MF(COMMENT_FONT_TINY), MF(EDITTAGS_FONT_TINY), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_TEENY), MF(MESSAGE_FONT_TEENY), MF(COORD_FONT_TEENY), MF(CONSOLE_FONT_TEENY), MF(COMMENT_FONT_TEENY), MF(EDITTAGS_FONT_TEENY), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_DINKY), MF(MESSAGE_FONT_DINKY), MF(COORD_FONT_DINKY), MF(CONSOLE_FONT_DINKY), MF(COMMENT_FONT_DINKY), MF(EDITTAGS_FONT_DINKY), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_PETITE), MF(MESSAGE_FONT_PETITE), MF(COORD_FONT_PETITE), MF(CONSOLE_FONT_PETITE), MF(COMMENT_FONT_PETITE), MF(EDITTAGS_FONT_PETITE), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_SLIM), MF(MESSAGE_FONT_SLIM), MF(COORD_FONT_SLIM), MF(CONSOLE_FONT_SLIM), MF(COMMENT_FONT_SLIM), MF(EDITTAGS_FONT_SLIM), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_SMALL), MF(MESSAGE_FONT_SMALL), MF(COORD_FONT_SMALL), MF(CONSOLE_FONT_SMALL), MF(COMMENT_FONT_SMALL), MF(EDITTAGS_FONT_SMALL), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_MEDIOCRE), MF(MESSAGE_FONT_MEDIOCRE), MF(COORD_FONT_MEDIOCRE), MF(CONSOLE_FONT_MEDIOCRE), MF(COMMENT_FONT_MEDIOCRE), MF(EDITTAGS_FONT_MEDIOCRE), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_MIDDLING), MF(MESSAGE_FONT_MIDDLING), MF(COORD_FONT_MIDDLING), MF(CONSOLE_FONT_MIDDLING), MF(COMMENT_FONT_MIDDLING), MF(EDITTAGS_FONT_MIDDLING), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_AVERAGE), MF(MESSAGE_FONT_AVERAGE), MF(COORD_FONT_AVERAGE), MF(CONSOLE_FONT_AVERAGE), MF(COMMENT_FONT_AVERAGE), MF(EDITTAGS_FONT_AVERAGE), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_MODERATE), MF(MESSAGE_FONT_MODERATE), MF(COORD_FONT_MODERATE), MF(CONSOLE_FONT_MODERATE), MF(COMMENT_FONT_MODERATE), MF(EDITTAGS_FONT_MODERATE), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_MEDIUM), MF(MESSAGE_FONT_MEDIUM), MF(COORD_FONT_MEDIUM), MF(CONSOLE_FONT_MEDIUM), MF(COMMENT_FONT_MEDIUM), MF(EDITTAGS_FONT_MEDIUM), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_BULKY), MF(MESSAGE_FONT_BULKY), MF(COORD_FONT_BULKY), MF(CONSOLE_FONT_BULKY), MF(COMMENT_FONT_BULKY), MF(EDITTAGS_FONT_BULKY), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_LARGE), MF(MESSAGE_FONT_LARGE), MF(COORD_FONT_LARGE), MF(CONSOLE_FONT_LARGE), MF(COMMENT_FONT_LARGE), MF(EDITTAGS_FONT_LARGE), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_BIG), MF(MESSAGE_FONT_BIG), MF(COORD_FONT_BIG), MF(CONSOLE_FONT_BIG), MF(COMMENT_FONT_BIG), MF(EDITTAGS_FONT_BIG), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_HUGE), MF(MESSAGE_FONT_HUGE), MF(COORD_FONT_HUGE), MF(CONSOLE_FONT_HUGE), MF(COMMENT_FONT_HUGE), MF(EDITTAGS_FONT_HUGE), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_GIANT), MF(MESSAGE_FONT_GIANT), MF(COORD_FONT_GIANT), MF(CONSOLE_FONT_GIANT), MF(COMMENT_FONT_GIANT), MF(EDITTAGS_FONT_GIANT), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_COLOSSAL), MF(MESSAGE_FONT_COLOSSAL), MF(COORD_FONT_COLOSSAL), MF(CONSOLE_FONT_COLOSSAL), MF(COMMENT_FONT_COLOSSAL), MF(EDITTAGS_FONT_COLOSSAL), MF(MOVEHISTORY_FONT_ALL) },
+ { MF(CLOCK_FONT_TITANIC), MF(MESSAGE_FONT_TITANIC), MF(COORD_FONT_TITANIC), MF(CONSOLE_FONT_TITANIC), MF(COMMENT_FONT_TITANIC), MF(EDITTAGS_FONT_TITANIC), MF(MOVEHISTORY_FONT_ALL) },
};\r
\r
MyFont *font[NUM_SIZES][NUM_FONTS];\r
VOID EngineOutputPopUp();
VOID EngineOutputPopDown();
BOOL EngineOutputIsUp();
-VOID EngineOutputUpdate( int which, int depth, unsigned long nodes, int score, int time, char * pv, char * hint );
+VOID EngineOutputUpdate( FrontEndProgramStats * stats );
\r
/*\r
* Setting "frozen" should disable all user input other than deleting\r
{ "tagsFont", ArgFont, (LPVOID) EDITTAGS_FONT, TRUE },\r
{ "commentFont", ArgFont, (LPVOID) COMMENT_FONT, TRUE },\r
{ "icsFont", ArgFont, (LPVOID) CONSOLE_FONT, TRUE },\r
+ { "moveHistoryFont", ArgFont, (LPVOID) MOVEHISTORY_FONT, TRUE }, /* [AS] */
{ "boardSize", ArgBoardSize, (LPVOID) &boardSize,\r
TRUE }, /* must come after all fonts */\r
{ "size", ArgBoardSize, (LPVOID) &boardSize, FALSE },\r
EvalGraphSet( first, last, current, pvInfoList );
}
-void SetProgramStats( int which, int depth, unsigned long nodes, int score, int time, char * pv, char * hint )
+void SetProgramStats( FrontEndProgramStats * stats )
{
#if 0
char buf[1024];
sprintf( buf, "SetStats for %d: depth=%d, nodes=%lu, score=%5.2f, time=%5.2f, pv=%s\n",
- which, depth, nodes, score / 100.0, time / 100.0, pv == 0 ? "n/a" : pv );
+ stats->which, stats->depth, stats->nodes, stats->score / 100.0, stats->time / 100.0, stats->pv == 0 ? "n/a" : stats->pv );
OutputDebugString( buf );
#endif
- EngineOutputUpdate( which, depth, nodes, score, time, pv, hint );
+ EngineOutputUpdate( stats );
}
DEFPUSHBUTTON "OK",IDOK,156,208,50,14
PUSHBUTTON "Cancel",IDCANCEL,212,208,50,14
PUSHBUTTON "Choose...",OPT_ChooseClockFont,212,15,45,15
- PUSHBUTTON "Choose...",OPT_ChooseMessageFont,212,45,45,15
- PUSHBUTTON "Choose...",OPT_ChooseCoordFont,212,75,45,15
- PUSHBUTTON "Choose...",OPT_ChooseTagFont,212,118,45,15
- PUSHBUTTON "Choose...",OPT_ChooseCommentsFont,212,148,45,15
- PUSHBUTTON "Choose...",OPT_ChooseConsoleFont,212,178,45,15
+ PUSHBUTTON "Choose...",OPT_ChooseMessageFont,212,39,45,15
+ PUSHBUTTON "Choose...",OPT_ChooseCoordFont,212,63,45,15
+ PUSHBUTTON "Choose...",OPT_ChooseTagFont,212,101,45,15
+ PUSHBUTTON "Choose...",OPT_ChooseCommentsFont,212,125,45,15
+ PUSHBUTTON "Choose...",OPT_ChooseConsoleFont,212,149,45,15
+ PUSHBUTTON "Choose...",OPT_ChooseMoveHistoryFont,212,174,45,15
PUSHBUTTON "&Defaults",OPT_DefaultFonts,3,208,50,15
CONTROL "",OPT_SampleCoordFont,"RICHEDIT",ES_READONLY | \r
- WS_DISABLED | WS_BORDER,67,71,140,20
+ WS_DISABLED | WS_BORDER,67,59,140,20
CONTROL "",OPT_SampleTagFont,"RICHEDIT",ES_READONLY | \r
- WS_DISABLED | WS_BORDER,67,114,140,20
+ WS_DISABLED | WS_BORDER,67,97,140,20
CONTROL "",OPT_SampleCommentsFont,"RICHEDIT",ES_READONLY | \r
- WS_DISABLED | WS_BORDER,67,144,140,20
+ WS_DISABLED | WS_BORDER,67,121,140,20
CONTROL "",OPT_SampleConsoleFont,"RICHEDIT",ES_READONLY | \r
- WS_DISABLED | WS_BORDER,67,174,140,20
+ WS_DISABLED | WS_BORDER,67,145,140,20
LTEXT "Clocks",OPT_ClockFont,13,16,45,10,NOT WS_GROUP
- LTEXT "Messages",OPT_MessageFont,13,46,45,10,NOT WS_GROUP
- LTEXT "Coordinates",OPT_CoordFont,13,76,45,10,NOT WS_GROUP
- LTEXT "Tags",OPT_EditTagsFont,13,119,45,10,NOT WS_GROUP
- LTEXT "Comments",OPT_CommentsFont,13,149,45,10,NOT WS_GROUP
- LTEXT "ICS Interaction",OPT_MessageFont5,13,179,50,10,NOT
+ LTEXT "Messages",OPT_MessageFont,13,40,45,10,NOT WS_GROUP
+ LTEXT "Coordinates",OPT_CoordFont,13,64,45,10,NOT WS_GROUP
+ LTEXT "Tags",OPT_EditTagsFont,13,102,45,10,NOT WS_GROUP
+ LTEXT "Comments",OPT_CommentsFont,13,126,45,10,NOT WS_GROUP
+ LTEXT "ICS Interaction",OPT_MessageFont5,13,150,50,10,NOT
WS_GROUP\r
CONTROL "",OPT_SampleClockFont,"RICHEDIT",ES_READONLY | \r
WS_DISABLED | WS_BORDER,67,11,140,20
CONTROL "",OPT_SampleMessageFont,"RICHEDIT",ES_READONLY | \r
- WS_DISABLED | WS_BORDER,67,41,140,20
- GROUPBOX "Current Board Size",IDC_STATIC,3,1,259,100
- GROUPBOX "All Board Sizes",IDC_STATIC,3,102,259,100
+ WS_DISABLED | WS_BORDER,67,35,140,20
+ GROUPBOX "Current Board Size",IDC_STATIC,3,1,259,83
+ GROUPBOX "All Board Sizes",IDC_STATIC,3,87,259,109
+ CONTROL "",OPT_SampleMoveHistoryFont,"RICHEDIT",ES_READONLY |
+ WS_DISABLED | WS_BORDER,67,170,140,20
+ LTEXT "Move History",OPT_MessageFont6,13,175,50,10,NOT
+ WS_GROUP
END\r
\r
DLG_NewGameFRC DIALOG DISCARDABLE 0, 0, 176, 47
CAPTION "Engine output"
FONT 8, "MS Sans Serif"
BEGIN
- LTEXT "Engine #1",IDC_EngineLabel1,14,2,110,8
+ LTEXT "Engine #1",IDC_EngineLabel1,14,2,84,8
RTEXT "NPS",IDC_Engine1_NPS,206,2,57,8
CONTROL "",IDC_EngineMemo1,"RICHEDIT",ES_MULTILINE |
ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_BORDER | WS_VSCROLL |
WS_HSCROLL | WS_TABSTOP,2,92,262,74
ICON IDI_UNKNOWN_14,IDC_Color1,2,4,20,20,SS_REALSIZEIMAGE
ICON IDI_UNKNOWN_14,IDC_Color2,4,84,20,20
- LTEXT "Static",IDC_StateData1,182,2,19,8
- ICON IDI_TRANS_14,IDC_StateIcon1,160,2,20,20
+ LTEXT "Static",IDC_StateData1,120,2,83,8
+ ICON IDI_TRANS_14,IDC_StateIcon1,98,0,21,20
LTEXT "Static",IDC_StateData2,186,84,19,8
ICON IDI_TRANS_14,IDC_StateIcon2,164,84,20,20
END
PUSHBUTTON "Cancel",IDCANCEL,154,112,50,14
END
-DLG_OptionsUCI DIALOG DISCARDABLE 0, 0, 228, 102
+DLG_OptionsUCI DIALOG DISCARDABLE 0, 0, 228, 124
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "UCI Options"
FONT 8, "MS Sans Serif"
PUSHBUTTON "...",IDC_BrowseForEGTB,206,40,17,14
LTEXT "EGTB Size (MB):",IDC_STATIC,2,62,54,8
EDITTEXT IDC_SizeOfEGTB,62,58,40,14,ES_AUTOHSCROLL
- DEFPUSHBUTTON "OK",IDOK,118,84,50,14
- PUSHBUTTON "Cancel",IDCANCEL,174,84,50,14
+ CONTROL "Use Book:",IDC_UseBook,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,2,80,49,10
+ EDITTEXT IDC_BookFile,62,76,140,14,ES_AUTOHSCROLL
+ PUSHBUTTON "...",IDC_BrowseForBook,206,76,17,14
+ DEFPUSHBUTTON "OK",IDOK,118,106,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,174,106,50,14
+END
+
+DLG_Null DIALOG DISCARDABLE 0, 0, 186, 50
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Null"
+FONT 8, "MS Sans Serif"
+BEGIN
END
\r
LEFTMARGIN, 7
RIGHTMARGIN, 221
TOPMARGIN, 7
- BOTTOMMARGIN, 95
+ BOTTOMMARGIN, 117
+ END
+
+ DLG_Null, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 179
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 43
END
END\r
#endif // APSTUDIO_INVOKED\r
IDI_CLOCK_14 ICON DISCARDABLE "bitmaps\\clock_14.ico"
IDI_UNKNOWN_14 ICON DISCARDABLE "bitmaps\\unknown_14.ico"
IDI_BALOON_14 ICON DISCARDABLE "bitmaps\\baloon_14.ico"
+IDI_ANALYZE_14 ICON DISCARDABLE "bitmaps\\analyze_14.ico"
+IDI_ANALYZE2_14 ICON DISCARDABLE "bitmaps\\analyze2_14.ico"
\r
/////////////////////////////////////////////////////////////////////////////\r
//\r
BEGIN\r
"1", IDM_DirectCommand1, VIRTKEY, ALT, NOINVERT\r
"2", IDM_DirectCommand2, VIRTKEY, ALT, NOINVERT\r
+ "B", IDM_Book, VIRTKEY, ALT, NOINVERT
"C", IDM_CopyGame, VIRTKEY, ALT, NOINVERT\r
"C", IDM_CopyPosition, VIRTKEY, SHIFT, ALT, NOINVERT
- "M", IDM_TypeInMove, VIRTKEY, ALT, NOINVERT
+ "I", IDM_TypeInMove, VIRTKEY, ALT, NOINVERT
"N", IDM_NewGame, VIRTKEY, CONTROL, NOINVERT
"O", IDM_LoadGame, VIRTKEY, CONTROL, NOINVERT
"S", IDM_SaveGame, VIRTKEY, CONTROL, NOINVERT
extern HWND hwndConsole;\r
extern char *defaultTextAttribs[];\r
extern HWND commentDialog;\r
+extern HWND moveHistoryDialog;
extern char installDir[];\r
extern HWND hCommPort; /* currently open comm port */\r
extern DCB dcb;\r
SetSampleFontText(hDlg, OPT_SampleTagFont, &workFont[EDITTAGS_FONT]);\r
SetSampleFontText(hDlg, OPT_SampleCommentsFont, &workFont[COMMENT_FONT]);\r
SetSampleFontText(hDlg, OPT_SampleConsoleFont, &workFont[CONSOLE_FONT]);\r
+ SetSampleFontText(hDlg, OPT_SampleMoveHistoryFont, &workFont[MOVEHISTORY_FONT]);
firstPaint = FALSE;\r
}\r
break;\r
CopyFont(font[i][EDITTAGS_FONT], &workFont[EDITTAGS_FONT]);\r
CopyFont(font[i][CONSOLE_FONT], &workFont[CONSOLE_FONT]);\r
CopyFont(font[i][COMMENT_FONT], &workFont[COMMENT_FONT]);\r
+ CopyFont(font[i][MOVEHISTORY_FONT], &workFont[MOVEHISTORY_FONT]);
}\r
/* end sad necessity */\r
\r
InvalidateRect(editTagsDialog, &rect, TRUE);\r
}\r
\r
+ if( moveHistoryDialog != NULL ) {
+ SendDlgItemMessage(moveHistoryDialog, IDC_MoveHistory,
+ WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf,
+ MAKELPARAM(TRUE, 0));
+ InvalidateRect(editTagsDialog, NULL, TRUE);
+ }
+
if (hwndConsole) {\r
ChangedConsoleFont();\r
}\r
SetSampleFontText(hDlg, OPT_SampleConsoleFont, &workFont[CONSOLE_FONT]);\r
break;\r
\r
+ case OPT_ChooseMoveHistoryFont:
+ MyCreateFont(hDlg, &workFont[MOVEHISTORY_FONT]);
+ SetSampleFontText(hDlg, OPT_SampleMoveHistoryFont, &workFont[MOVEHISTORY_FONT]);
+ break;
+
case OPT_DefaultFonts:\r
for (i=0; i<NUM_FONTS; i++) {\r
DeleteObject(&workFont[i].hf);\r
SetSampleFontText(hDlg, OPT_SampleTagFont, &workFont[EDITTAGS_FONT]);\r
SetSampleFontText(hDlg, OPT_SampleCommentsFont, &workFont[COMMENT_FONT]);\r
SetSampleFontText(hDlg, OPT_SampleConsoleFont, &workFont[CONSOLE_FONT]);\r
+ SetSampleFontText(hDlg, OPT_SampleMoveHistoryFont, &workFont[MOVEHISTORY_FONT]);
break;\r
}\r
}\r