From: H.G. Muller Date: Thu, 7 Jul 2011 17:37:12 +0000 (+0200) Subject: Add -scoreWhite option X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=adbe3504da7bfecb255bbe854bfc0963c02a743b;p=xboard.git Add -scoreWhite option This is similar to -absoluteAnalysisScores, except that it works in all modes, and flips the score given by the engines in the engine-output window when black is to move. --- diff --git a/args.h b/args.h index fa69cb0..fbf2651 100644 --- a/args.h +++ b/args.h @@ -622,6 +622,7 @@ ArgDescriptor argDescriptors[] = { { "secondPgnName", ArgString, (void *) &appData.pgnName[1], FALSE, (ArgIniType) "" }, { "sn", ArgString, (void *) &appData.pgnName[1], FALSE, INVALID }, { "absoluteAnalysisScores", ArgBoolean, (void *) &appData.whitePOV, TRUE, FALSE }, + { "scoreWhite", ArgBoolean, (void *) &appData.scoreWhite, TRUE, FALSE }, { "fSAN", ArgTrue, (void *) &appData.pvSAN[0], FALSE, FALSE }, { "sSAN", ArgTrue, (void *) &appData.pvSAN[1], FALSE, FALSE }, { "pairingEngine", ArgFilename, (void *) &appData.pairingEngine, TRUE, "" }, diff --git a/common.h b/common.h index 9423537..17feddb 100644 --- a/common.h +++ b/common.h @@ -650,6 +650,7 @@ typedef struct { Boolean pieceMenu; Boolean sweepSelect; Boolean whitePOV; + Boolean scoreWhite; Boolean pvSAN[ENGINES]; char *tourneyFile; diff --git a/engineoutput.c b/engineoutput.c index a21282e..46b34a3 100644 --- a/engineoutput.c +++ b/engineoutput.c @@ -194,7 +194,7 @@ void SetProgramStats( FrontEndProgramStats * stats ) // now directly called by b header[0] = NULLCHAR; if(gameMode == AnalyzeMode && (multi = MultiPV(&first)) >= 0) { snprintf(header, MSG_SIZ, "\t%s viewpoint\t\tfewer / Multi-PV setting = %d / more\n", - appData.whitePOV ? "white" : "mover", first.option[multi].value); + appData.whitePOV || appData.scoreWhite ? "white" : "mover", first.option[multi].value); InsertIntoMemo( which, header, 0); } else if(appData.ponderNextMove && lastLine[which][0]) { @@ -481,7 +481,7 @@ static void UpdateControls( EngineOutputData * ed ) } /* Score */ - h = (gameMode == AnalyzeMode && appData.whitePOV && !WhiteOnMove(currentMove) ? -1 : 1) * ed->score; + h = ((gameMode == AnalyzeMode && appData.whitePOV || appData.scoreWhite) && !WhiteOnMove(currentMove) ? -1 : 1) * ed->score; if( h > 0 ) { snprintf( s_score, sizeof(s_score)/sizeof(s_score[0]), "+%.2f", h / 100.0 ); }