X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=evalgraph.c;h=e3608f09e83c330db268db938536662fe63a569b;hb=33ddf089fa72ec8ed7e9613b1325d71cfe77fc63;hp=2767560e2549258447817b419e0a7c8908b3a37d;hpb=959078d28a10387d4583f8bd2f46d52a799065d3;p=xboard.git diff --git a/evalgraph.c b/evalgraph.c index 2767560..e3608f0 100644 --- a/evalgraph.c +++ b/evalgraph.c @@ -53,6 +53,7 @@ int currFirst = 0; int currLast = 0; int currCurrent = -1; int range = 1; +int differentialView; int nWidthPB = 0; int nHeightPB = 0; @@ -85,6 +86,7 @@ GetPvScore (int index) { int score = currPvInfo[ index ].score; + if(differentialView) score = index < currLast-1 ? -currPvInfo[ index+1 ].score - score : 0; if( index & 1 ) score = -score; /* Flip score for black */ return score; @@ -312,15 +314,26 @@ static void DrawHistograms () { VisualizationData vd; + int i; double step = 1; if( InitVisualization( &vd ) ) { if( vd.hist_width < MIN_HIST_WIDTH ) { DrawHistogramAsDiagram( vd.cy, vd.paint_width, vd.hist_count ); + step = 0.5*vd.paint_width / (((vd.hist_count | 7) + 1)/2 + 1.); } else { - DrawHistogramFull( vd.cy, vd.hist_width, vd.hist_count ); + DrawHistogramFull( vd.cy, step = vd.hist_width, vd.hist_count ); } } + if(!differentialView) return; + differentialView = 0; + DrawSegment( MarginX + MarginW, vd.cy, NULL, NULL, PEN_NONE ); + for( i=0; i