summaryrefslogtreecommitdiffstats
path: root/include/chc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/chc.h')
-rw-r--r--include/chc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/chc.h b/include/chc.h
index 31aa49bc..eb1bae83 100644
--- a/include/chc.h
+++ b/include/chc.h
@@ -32,9 +32,10 @@
#define CHE_O(c) ((c) >> 3)
#define CHE_P(c) ((c) & 7)
-#define RTL(x) (((x) - 3) >> 1)
+#define RTL(myturn, x) ((myturn)==BLK?BRD_ROW-1-((x)-3)/2:((x)-3)/2)
+#define CTL(myturn, x) ((myturn)==BLK?BRD_COL-1-(x):(x))
#define dim(x) (sizeof(x) / sizeof(x[0]))
-#define LTR(x) ((x) * 2 + 3)
+#define LTR(myturn, x) ((((myturn)==BLK?BRD_ROW-1-(x):(x)) * 2) + 3)
#define CHE(a, b) ((a) | ((b) << 3))
#define BLACK_COLOR ANSI_COLOR(1;36)