Windows port
[gnushogi.git] / gnushogi / gnushogi.h
index 1eeef98..8a16fc7 100644 (file)
@@ -81,7 +81,6 @@ extern short nolist;          /* Don't list game after exit.           */
 #define small_ushort unsigned char
 
 
-typedef small_short    BYTE;
 typedef small_ushort   UBYTE;
 typedef short          SHORT;
 typedef unsigned short USHORT;
@@ -130,9 +129,13 @@ typedef unsigned long  ULONG;
 
 #include <sys/param.h>
 #include <sys/types.h>
-#include <sys/times.h>
-#include <sys/ioctl.h>
-
+#ifdef WIN32
+#  include <windows.h>
+#else
+   typedef small_short    BYTE;
+#  include <sys/times.h>
+#  include <sys/ioctl.h>
+#endif
 
 #if TIME_WITH_SYS_TIME
 #  include <sys/time.h>
@@ -175,7 +178,6 @@ extern void movealgbr(short m, char *s);
 #  define PTBLBDSIZE (NO_SQUARES + NO_PIECES)
 #endif
 
-#include "dspwrappers.h"   /* Display functions. */
 #include "eval.h"
 
 #define SCORE_LIMIT 12000
@@ -301,10 +303,10 @@ enum {
 #endif
 
 /* move symbols */
-#define pxx (CP[2])
-#define qxx (CP[1])
-#define rxx (CP[4])
-#define cxx (CP[3])
+#define pxx (" PLNSGBRPLNSBRK ")
+#define qxx (" plnsgbrplnsbrk ")
+#define rxx ("ihgfedcba")
+#define cxx ("987654321")
 
 /***************** Table limits ********************************************/
 
@@ -729,7 +731,6 @@ extern short balance[2];
 extern small_short ChkFlag[], CptrFlag[], TesujiFlag[];
 extern short Pscore[], Tscore[];
 extern /*unsigned*/ short rehash;  /* -1 is used as a flag --tpm */
-extern char version[], patchlevel[];
 extern unsigned int ttbllimit;
 extern unsigned int TTadd;
 extern unsigned int ttblsize;
@@ -820,7 +821,6 @@ typedef struct hashval drop_hashcode_array[2][NO_PIECES][NO_SQUARES];
 
 extern hashcode_array  *hashcode;
 extern drop_hashcode_array  *drop_hashcode;
-extern char  *CP[];
 
 #ifdef QUIETBACKGROUND
 extern short background;
@@ -863,6 +863,10 @@ extern struct hashentry  *ttable[2];
 extern short rpthash[2][256];
 extern char *DRAW;
 
+extern char* DRAW_REPETITION;
+extern char *DRAW_MAXMOVES;
+extern char *DRAW_JUSTDRAW;
+
 #define row(a)     ((a) / NO_COLS)
 #define column(a)  ((a) % NO_COLS)
 #define locn(a, b) (((a) * NO_COLS) + b)
@@ -1031,7 +1035,6 @@ typedef enum
 #endif
 } ElapsedTime_mode;
 
-extern void  ElapsedTime(ElapsedTime_mode iop);
 extern void  SetResponseTime(short side);
 extern void  CheckForTimeout(int score, int globalscore,
                              int Jscore, int zwndw);
@@ -1049,10 +1052,6 @@ extern void  ShowCurrentMove(short pnt, short f, short t);
 extern void  ListGame(void);
 extern void  ShowMessage(char *s);
 extern void  ClearScreen(void);
-extern void  gotoXY(short x, short y);
-extern void  ClearEoln(void);
-extern void  DrawPiece(short sq);
-extern void  UpdateClocks(void);
 extern void  DoDebug(void);
 extern void  DoTable(short table[NO_SQUARES]);
 extern void  ShowPostnValues(void);
@@ -1073,6 +1072,7 @@ extern void  ShowLine(unsigned short *bstline);
 extern int   pick(short p1, short p2);
 extern short repetition(void);
 extern void  TimeCalc(void);
+extern void  ElapsedTime(ElapsedTime_mode iop);
 
 extern short
 DropPossible(short piece, short side, short sq); /* genmoves.c */
@@ -1090,4 +1090,6 @@ typedef enum
 extern int VerifyMove(char *s, VerifyMove_mode iop, unsigned short *mv);
 extern unsigned short TTage;
 
+#include "dspwrappers.h"   /* Display functions. */
+
 #endif /* _GNUSHOGI_H_ */