summaryrefslogtreecommitdiff
path: root/src/chess.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/chess.h')
-rwxr-xr-xsrc/chess.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/chess.h b/src/chess.h
index 8a1185a..7760920 100755
--- a/src/chess.h
+++ b/src/chess.h
@@ -158,11 +158,11 @@ typedef struct _DLIST_ENTRY
//
#ifndef OFFSET_OF
#define OFFSET_OF(field, type) \
- (ULONG)(&((type *)0)->field)
+ (size_t)(&((type *)0)->field)
#endif
#ifndef CONTAINING_STRUCT
#define CONTAINING_STRUCT(address, type, field) \
- ((type *)((BYTE *)(address) - (BYTE *)(OFFSET_OF(field, type))))
+ ((type *)((BYTE *)(address) - (OFFSET_OF(field, type))))
#endif
#define WHITE (1)
@@ -1255,7 +1255,7 @@ _assert(CHAR *szFile, ULONG uLine);
#endif
#ifndef ABS_DIFF
-#define ABS_DIFF(a, b) (abs((a) - (b)))
+#define ABS_DIFF(a, b) (abs((int)(a) - (int)(b)))
#endif
#define FILE_DISTANCE(a, b) (ABS_DIFF(FILE((a)), FILE((b))))
@@ -1745,6 +1745,15 @@ SetRootToInitialPosition(void);
void
SlidePiece(POSITION *pos, COOR cFrom, COOR cTo);
+void
+SlidePieceWithoutSigs(POSITION *pos, COOR cFrom, COOR cTo);
+
+void
+SlidePawn(POSITION *pos, COOR cFrom, COOR cTo);
+
+void
+SlidePawnWithoutSigs(POSITION *pos, COOR cFrom, COOR cTo);
+
PIECE
LiftPiece(POSITION *pos, COOR cSquare);