summaryrefslogtreecommitdiff
path: root/src/bigtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bigtab.c')
-rw-r--r--src/bigtab.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/bigtab.c b/src/bigtab.c
new file mode 100644
index 0000000..483ded7
--- /dev/null
+++ b/src/bigtab.c
@@ -0,0 +1,15 @@
+int ref2(int i, int x, int y);
+static short table[730][3][244];
+
+void bigtab_init(void)
+{
+ for (int i = 0; i < 729; i++)
+ for (int x = 0; x < 3; x++)
+ for (int y = 243; y > 0; y /= 3)
+ table[i][x][y] = ref2(i, x, y);
+}
+
+int bigtab(int i, int x, int y)
+{
+ return table[i][x][y];
+}