Tweaks to remove "helper macros"

* More direct transform maps were agreed to be clearer.
* Remove helpers, just use simple `RC` macro to map a
  logical location to a row/column pair.
This commit is contained in:
Pete Johanson
2020-06-16 21:32:11 -04:00
parent a65cdea66b
commit 6b6ecb3b0c
2 changed files with 9 additions and 15 deletions

View File

@@ -4,10 +4,4 @@
#define KT_ROW(item) (item >> 8)
#define KT_COL(item) (item & 0xFF)
#define KT_ROW_COL(row, col) (((row) << 8) + (col))
#define _IDENTITY_ENTRY(col, row) KT_ROW_COL(row, col)
#define KT_ID_ROW(row, count) UTIL_LISTIFY(count, _IDENTITY_ENTRY, row)
#define _OFFSET_ENTRY(col, offset, row) KT_ROW_COL(row, col + offset)
#define KT_OFFSET_ROW(offset, row, count) UTIL_LISTIFY(count, _OFFSET_ENTRY, offset, row)
#define RC(row, col) (((row) << 8) + (col))