#define SHOW_PONDERING\r
\r
/* Imports from backend.c */\r
-char * SavePart(char *str);\r
+char * SavePart(char *str);
+extern int opponentKibitzes;\r
\r
/* Imports from winboard.c */\r
//extern HWND engineOutputDialog;\r
int an_move_count;\r
} EngineOutputData;\r
\r
-static VerifyDisplayMode();\r
+static int VerifyDisplayMode();\r
static void UpdateControls( EngineOutputData * ed );\r
static SetEngineState( int which, int state, char * state_data );\r
int j;\r
\r
if (!engineOutputDialogUp) return;\r
+ DoClearMemo(1);
j = 0;\r
XtSetArg(args[j], XtNx, &engineOutputX); j++;\r
XtSetArg(args[j], XtNy, &engineOutputY); j++;\r
return;\r
}\r
\r
+ if(gameMode == IcsObserving) return; // [HGM] kibitz: shut up engine if we are observing an ICS game
+
which = stats->which;\r
depth = stats->depth;\r
\r
}\r
\r
// pure back end\r
-static VerifyDisplayMode()\r
+int VerifyDisplayMode()\r
{\r
int mode;\r
\r
case AnalyzeFile:\r
case MachinePlaysWhite:\r
case MachinePlaysBlack:\r
+ mode = 0;\r
+ break;\r
case IcsPlayingWhite:\r
case IcsPlayingBlack:\r
- mode = 0;\r
+ mode = appData.zippyPlay && opponentKibitzes; // [HGM] kibitz\r
break;\r
case TwoMachinesPlay:\r
mode = 1;\r
}
// ToNrEvent(currentMove);
}
-\r
+
+// [HGM] kibitz: write kibitz line; split window for it if necessary
+void OutputKibitz(int window, char *text)
+{
+ if(!EngineOutputIsUp()) return;
+ if(!opponentKibitzes) { // on first kibitz of game, clear memos
+ DoClearMemo(1);
+ if(gameMode == IcsObserving) DoClearMemo(0);
+ }
+ opponentKibitzes = TRUE; // this causes split window DisplayMode in ICS modes.
+ VerifyDisplayMode();
+ if(gameMode == IcsObserving) {
+ DoSetWindowText(0, nLabel, gameInfo.white);
+ SetIcon( 0, nColorIcon, nColorWhite);
+ SetIcon( 0, nStateIcon, nClear);
+ }
+ DoSetWindowText(1, nLabel, gameMode == IcsPlayingBlack ? gameInfo.white : gameInfo.black); // opponent name
+ SetIcon( 1, nColorIcon, gameMode == IcsPlayingBlack ? nColorWhite : nColorBlack);
+ SetIcon( 1, nStateIcon, nClear);
+ InsertIntoMemo(window-1, text);
+}
+