From adbe3504da7bfecb255bbe854bfc0963c02a743b Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 7 Jul 2011 19:37:12 +0200 Subject: [PATCH] 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. --- args.h | 1 + common.h | 1 + engineoutput.c | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) 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 ); } -- 1.7.0.4