Switch display-selection framework from dspwrappers to "struct display".
[gnushogi.git] / gnushogi / eval.c
index b0ae6c1..ac3404a 100644 (file)
@@ -32,9 +32,6 @@
 #include "gnushogi.h"
 #include "pattern.h"
 
-extern void
-ShowStage(void);
-
 /* Hash table for preventing multiple scoring of the same position */
 
 int EADD = 0;       /* number of writes to the cache table */
@@ -1354,6 +1351,12 @@ PawnValue(short sq, short side)
 
     if (in_opening_stage)
     {
+#ifndef MINISHOGI
+/* FIXME: [HGM] The 3rd-rank Pawn section is meaningless in mini-Shogi,
+ * (which does not have opposing Pawns), and can do out-of-bound access,
+ * as the promotion zone is only 1 rank, so Pawns can be closer than 3 ranks
+ * to the board edge.
+ */
         if (crow(c1, sq) == 2) /* pawn on 3d rank */
         {
             if (board[(c1 == black) ?
@@ -1383,7 +1386,6 @@ PawnValue(short sq, short side)
             }
         }
 
-#ifndef MINISHOGI
 /* FIXME: calculations below are wrong for minishogi, all done for 9x9
  * board - and anyway we don't know the stage really :)
  */
@@ -2133,7 +2135,7 @@ UpdatePatterns(short side, short GameCnt)
     }
 
     if (flag.post)
-        ShowPatternCount(side, n);
+        dsp->ShowPatternCount(side, n);
 
     if (os != END_OF_SEQUENCES)
         update_advance_bonus(side, os);
@@ -2525,8 +2527,8 @@ DetermineGameType(short side_to_move)
     }
     else
     {
-        ShowPatternCount(black, -1);
-        ShowPatternCount(white, -1);
+        dsp->ShowPatternCount(black, -1);
+        dsp->ShowPatternCount(white, -1);
     }
 }
 
@@ -2703,7 +2705,7 @@ DetermineStage(short side)
         stage = 0;
 
     if (flag.post)
-        ShowStage();
+        dsp->ShowStage();
 
     /* Determine stage dependant weights */