From: Yann Dirson Date: Sat, 19 Oct 2013 14:03:55 +0000 (+0200) Subject: Fix ShowPrompt implementation across display drivers. X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f30d0521d5d0847df94b8785d350281cb54fae1e;p=gnushogi.git Fix ShowPrompt implementation across display drivers. --- diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 53efa2b..55201aa 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -1568,16 +1568,7 @@ InputCommand(char *command) Sdepth = 0; #ifdef QUIETBACKGROUND - if (NOT_CURSES) - { - PromptForMove(); - } - else - { - ShowSidetoMove(); - ShowPrompt(); - } - + ShowPrompt(); have_shown_prompt = true; #endif /* QUIETBACKGROUND */ @@ -1624,15 +1615,7 @@ InputCommand(char *command) { #endif /* QUIETBACKGROUND */ - if (NOT_CURSES) - { - PromptForMove(); - } - else - { - ShowSidetoMove(); - ShowPrompt(); - } + ShowPrompt(); #ifdef QUIETBACKGROUND } diff --git a/gnushogi/cursesdsp.c b/gnushogi/cursesdsp.c index d71aa63..d6c7cef 100644 --- a/gnushogi/cursesdsp.c +++ b/gnushogi/cursesdsp.c @@ -226,8 +226,9 @@ ShowPlayers(void) void -ShowPrompt(void) +Curses_ShowPrompt(void) { + Curses_ShowSidetoMove(); gotoXY(TAB, 17); printw(CP[121]); /* Your move is? */ ClearEoln(); diff --git a/gnushogi/cursesdsp.h b/gnushogi/cursesdsp.h index 7031bd4..b7c3643 100644 --- a/gnushogi/cursesdsp.h +++ b/gnushogi/cursesdsp.h @@ -66,6 +66,7 @@ int Curses_GetString(char* sx); void Curses_ShowPatternCount(short side, short n); void Curses_ShowPostnValue(short sq); void Curses_ShowPostnValues(void); +void Curses_ShowPrompt(void); void Curses_ShowResponseTime(void); void Curses_ShowResults(short score, unsigned short *bstline, char ch); void Curses_ShowSidetoMove(void); @@ -82,7 +83,6 @@ void ClearMessage(void); void DrawPiece(short sq); void ShowHeader(void); void ShowPlayers(void); -void ShowPrompt(void); void ShowScore(short score); void UpdateClocks(void); void gotoXY(short x, short y); diff --git a/gnushogi/dspwrappers.c b/gnushogi/dspwrappers.c index ebe0f05..dc139ce 100644 --- a/gnushogi/dspwrappers.c +++ b/gnushogi/dspwrappers.c @@ -105,6 +105,7 @@ DISPLAY_STDARGFUNC(Printf, (const char *format, ...), format, (format, ap)) DISPLAY_FUNC(ShowPatternCount, (short side, short n), (side, n)) DISPLAY_FUNC(ShowPostnValue, (short sq), (sq)) DISPLAY_VOIDFUNC(ShowPostnValues) +DISPLAY_VOIDFUNC(ShowPrompt) DISPLAY_VOIDFUNC(ShowResponseTime) DISPLAY_FUNC(ShowResults, (short score, unsigned short *bstline, char ch), (score, bstline, ch)) DISPLAY_VOIDFUNC(ShowSidetoMove) diff --git a/gnushogi/dspwrappers.h b/gnushogi/dspwrappers.h index e563982..31400d2 100644 --- a/gnushogi/dspwrappers.h +++ b/gnushogi/dspwrappers.h @@ -64,6 +64,7 @@ extern int GetString(char* sx); extern void ShowPatternCount(short side, short n); extern void ShowPostnValue(short sq); extern void ShowPostnValues(void); +extern void ShowPrompt(void); extern void ShowResponseTime(void); extern void ShowResults(short score, unsigned short *bstline, char ch); extern void ShowSidetoMove(void); diff --git a/gnushogi/gnushogi.h b/gnushogi/gnushogi.h index 39c0715..1eeef98 100644 --- a/gnushogi/gnushogi.h +++ b/gnushogi/gnushogi.h @@ -1042,7 +1042,6 @@ extern void SearchStartStuff(short side); extern void ShowDepth(char ch); extern void TerminateSearch(int); extern void ShowResults(short score, unsigned short *bstline, char ch); -extern void PromptForMove(void); extern void SetupBoard(void); extern void algbr(short f, short t, short flag); extern void OutputMove(void); diff --git a/gnushogi/rawdsp.c b/gnushogi/rawdsp.c index cbbfe52..1c43393 100644 --- a/gnushogi/rawdsp.c +++ b/gnushogi/rawdsp.c @@ -60,9 +60,8 @@ Raw_ClearScreen(void) } -/* FIXME: change to ShowPrompt? */ void -PromptForMove(void) +Raw_ShowPrompt(void) { if (!barebones && !XSHOGI) { diff --git a/gnushogi/rawdsp.h b/gnushogi/rawdsp.h index 758ee26..a60ae5d 100644 --- a/gnushogi/rawdsp.h +++ b/gnushogi/rawdsp.h @@ -66,6 +66,7 @@ int Raw_GetString(char* sx); void Raw_ShowPatternCount(short side, short n); void Raw_ShowPostnValue(short sq); void Raw_ShowPostnValues(void); +void Raw_ShowPrompt(void); void Raw_ShowResponseTime(void); void Raw_ShowResults(short score, unsigned short *bstline, char ch); void Raw_ShowSidetoMove(void); @@ -77,7 +78,6 @@ void Raw_help(void); /* The following are only found in rawdsp.h: */ -void PromptForMove(void); void SetupBoard(void); #endif /* _RAWDSP_H_ */