X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Finit.c;h=ac870a5099fbcb40067168f00cc0cc901ff3acef;hb=refs%2Fheads%2Fmini;hp=b0f63df578434683f354264903a02ba56ee89767;hpb=1907f35d3370f971df16e40dec4135110386a84c;p=gnushogi.git diff --git a/gnushogi/init.c b/gnushogi/init.c index b0f63df..ac870a5 100644 --- a/gnushogi/init.c +++ b/gnushogi/init.c @@ -50,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 @@ -89,6 +87,20 @@ const small_short sweep[NO_PIECES] = false, true, true, false }; +const int typeMask[NO_PIECES] = +{ + 0, T_PAWN, +#ifndef MINISHOGI + T_LANCE, T_KNIGHT, +#endif + T_SILVER, T_GOLD, T_BISHOP, T_ROOK, + T_PPAWN, +#ifndef MINISHOGI + T_PLANCE, T_PKNIGHT, +#endif + T_PSILVER, T_PBISHOP, T_PROOK, T_KING +}; + #ifdef SAVE_DISTDATA short @@ -487,9 +499,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; @@ -667,13 +680,11 @@ InitMain(void) TCflag = true; OperatorTime = 0; - barebones = 1; } else { TCflag = false; OperatorTime = 0; - barebones = 0; } dsp->Initialize();