X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=evalgraph.c;h=1380276dce7a164a644e1ab9f5199db322d67dc9;hb=56310c5b198bc521e0a715377c68378b7bcf10a5;hp=b5c18d0c096245c44769aaebb215b5382d433b80;hpb=acea380c8297962d08281764451837d6936c1a54;p=xboard.git diff --git a/evalgraph.c b/evalgraph.c index b5c18d0..1380276 100644 --- a/evalgraph.c +++ b/evalgraph.c @@ -85,6 +85,19 @@ static int GetPvScore( int index ) return score; } +char* MakeEvalTitle( char * title) +{ + int score = currPvInfo[ currCurrent ].score; + int depth = currPvInfo[ currCurrent ].depth; + static char buf[MSG_SIZ]; + + if( depth <=0 ) return title; + if( currCurrent & 1 ) score = -score; /* Flip score for black */ + snprintf(buf, MSG_SIZ, "%s {%s%.2f/%-2d %d}", title, score>0 ? "+" : " ", score/100., depth, (currPvInfo[currCurrent].time+50)/100); + + return buf; +} + // back-end /* For a centipawn value, this function returns the height of the corresponding @@ -330,7 +343,7 @@ int GetMoveIndexFromPoint( int x, int y ) void PaintEvalGraph( void ) { VariantClass v = gameInfo.variant; - range = (gameInfo.holdingsWidth && v != VariantSuper && v != VariantGreat) ? 2 : 1; // [HGM] double range in drop games + range = (gameInfo.holdingsWidth && v != VariantSuper && v != VariantGreat && v != VariantSChess) ? 2 : 1; // [HGM] double range in drop games /* Draw */ DrawRectangle(0, 0, nWidthPB, nHeightPB, 2, FILLED); DrawAxis();