aboutsummaryrefslogtreecommitdiff
path: root/include/tak.h
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2021-01-17 23:16:09 -0500
committertslil <tslil@posteo.de>2026-08-28 19:37:41 +0100
commitb1d677fa134741527669b93a77810cf01dd34de5 (patch)
treebb51d2e76cd13f58a79356ff0c2b1a4e037f1b14 /include/tak.h
parentdecedc910e271d2b54298441e271524c065d119e (diff)
Inlined placements, should be faster
Diffstat (limited to 'include/tak.h')
-rw-r--r--include/tak.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/tak.h b/include/tak.h
index ad0b994..0a97c2d 100644
--- a/include/tak.h
+++ b/include/tak.h
@@ -19,10 +19,11 @@ enum WIN_TYPE { WIN_DRAW,
typedef uint8_t data_t;
typedef uint16_t colour_stack_t;
-#define NUM_SHIFT 4
-#define STONE_MASK 0b00000011
-#define STONE_AT(l) (celldat[(l)] & STONE_MASK)
-#define COUNT_AT(l) (celldat[(l)] >> NUM_SHIFT)
+#define NUM_SHIFT 4
+#define NUM_INC (0x1<<NUM_SHIFT) // 0b00010000
+#define STONE_MASK 0b00000011
+#define STONE_AT(l) (celldat[(l)] & STONE_MASK)
+#define COUNT_AT(l) (celldat[(l)] >> NUM_SHIFT)
#define THE_COORDS(col,row) ((col)+(row)*board_size)
extern enum WIN_TYPE won;