X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Finit.c;h=1c034d08c5bd55fa77166846e936193178c000c6;hb=7e806d3c2cba049e315b13e64cadfa309c734ba5;hp=e6b495f527aa182fbd58b15832bbefd0aa13d00a;hpb=fd2d3b3b66801eba904e700842604033c9af8c23;p=gnushogi.git diff --git a/gnushogi/init.c b/gnushogi/init.c index e6b495f..1c034d0 100644 --- a/gnushogi/init.c +++ b/gnushogi/init.c @@ -4,6 +4,7 @@ * ---------------------------------------------------------------------- * Copyright (c) 1993, 1994, 1995 Matthias Mutz * Copyright (c) 1999 Michael Vanier and the Free Software Foundation + * Copyright (c) 2008, 2013, 2014 Yann Dirson and the Free Software Foundation * * GNU SHOGI is based on GNU CHESS * @@ -49,8 +50,6 @@ */ short hard_time_limit = 1; -short barebones = 0; /* Suppress printing of statistics - * (mainly for xshogi). */ #ifdef LIST_ON_EXIT short nolist = 0; /* List the game after exit. */ #else @@ -486,9 +485,10 @@ NewGame(void) compptr = oppptr = 0; stage = 0; stage2 = -1; /* the game is not yet started */ - flag.illegal = flag.mate = flag.post = flag.quit + flag.illegal = flag.mate = flag.quit = flag.reverse = flag.bothsides = flag.onemove = flag.force = false; + flag.post &= xboard; /* xboard: do not alter post status on 'new' */ flag.material = flag.coords = flag.hash = flag.easy = flag.beep = flag.rcptr = true; @@ -591,7 +591,7 @@ NewGame(void) } ClearCaptured(); - ClearScreen(); + dsp->ClearScreen(); InitializeStats(); #ifdef HAVE_GETTIMEOFDAY @@ -614,9 +614,9 @@ NewGame(void) if (TCflag) SetTimeControl(); else if (MaxResponseTime == 0) - SelectLevel(sx); + dsp->SelectLevel(sx); - UpdateDisplay(0, 0, 1, 0); + dsp->UpdateDisplay(0, 0, 1, 0); GetOpenings(); GetOpeningPatterns(&max_opening_sequence); @@ -666,16 +666,14 @@ InitMain(void) TCflag = true; OperatorTime = 0; - barebones = 1; } else { TCflag = false; OperatorTime = 0; - barebones = 0; } - Initialize(); + dsp->Initialize(); Initialize_dist(); Initialize_eval(); #if !defined SAVE_NEXTPOS @@ -725,6 +723,6 @@ ExitMain(void) #endif /* HASHFILE */ #endif /* ttblsz */ - ExitShogi(); + dsp->ExitShogi(); }