X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwengineo.c;h=4876a708112b13bb3158f9f6b16ff6eb6164e51d;hb=43aacbdf1c19177fe05487e0c76e207189e5bdb0;hp=d10f3d9ab0dd02c127d75e9bcea4c52f8232ad71;hpb=9ee62d95780e76fa6cfc8abc7986e9f3c28868fd;p=xboard.git diff --git a/winboard/wengineo.c b/winboard/wengineo.c index d10f3d9..4876a70 100644 --- a/winboard/wengineo.c +++ b/winboard/wengineo.c @@ -3,6 +3,8 @@ * * Author: Alessandro Scotti (Dec 2005) * + * Copyright 2005 Alessandro Scotti + * * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -32,9 +34,9 @@ #include #include "common.h" -#include "winboard.h" #include "frontend.h" #include "backend.h" +#include "winboard.h" #include "wsnap.h" @@ -59,27 +61,8 @@ HICON icons[8]; // [HGM] this front-end array translates back-end icon indicator HWND outputField[2][7]; // [HGM] front-end array to translate output field to window handle -void EngineOutputPopUp(); -void EngineOutputPopDown(); -int EngineOutputIsUp(); - #define SHOW_PONDERING -/* Imports from backend.c */ -char * SavePart(char *str); -extern int opponentKibitzes; - -/* Imports from winboard.c */ -extern HWND engineOutputDialog; -extern int engineOutputDialogUp; - -extern HINSTANCE hInst; -extern HWND hwndMain; - -extern WindowPlacement wpEngineOutput; - -extern BoardSize boardSize; - /* Module variables */ #define H_MARGIN 2 #define V_MARGIN 2 @@ -95,12 +78,11 @@ extern BoardSize boardSize; #define STATE_ANALYZING 3 static int windowMode = 1; - static int needInit = TRUE; - static int lastDepth[2] = { -1, -1 }; static int lastForwardMostMove[2] = { -1, -1 }; static int engineState[2] = { -1, -1 }; +static BOOLEAN engineOutputDialogUp = FALSE; typedef struct { // HWND hColorIcon; // [HGM] the output-control handles are no loger passed, @@ -545,7 +527,7 @@ void EngineOutputUpdate( FrontEndProgramStats * stats ) if( clearMemo ) DoClearMemo(which); /* Update */ - lastDepth[which] = depth; + lastDepth[which] = depth == 1 && ed.nodes == 0 ? 0 : depth; // [HGM] info-line kudge lastForwardMostMove[which] = forwardMostMove; if( ed.pv != 0 && ed.pv[0] == ' ' ) { @@ -805,7 +787,8 @@ static void UpdateControls( EngineOutputData * ed ) sprintf( s_time, "%d:%02d.%02d", time_secs / 60, time_secs % 60, time_cent ); /* Put all together... */ - sprintf( buf, "%3d\t%s\t%s\t%s\t", ed->depth, s_score, s_nodes, s_time ); + if(ed->nodes == 0 && ed->score == 0 && ed->time == 0) sprintf( buf, "%3d\t", ed->depth ); else + sprintf( buf, "%3d\t%s\t%s\t%s\t", ed->depth, s_score, s_nodes, s_time ); /* Add PV */ buflen = strlen(buf);