aboutsummaryrefslogtreecommitdiff
path: root/utils/gentranscode.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xutils/gentranscode.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/gentranscode.sh b/utils/gentranscode.sh
index 7749ba7..2f73df7 100755
--- a/utils/gentranscode.sh
+++ b/utils/gentranscode.sh
@@ -2,8 +2,8 @@
2 2
3type="${1:-src}" 3type="${1:-src}"
4 4
5gcc -DDEBUG h48_to_"$type".c ../src/cube.c -o h48_to_"$type" 5gcc -DDEBUG h48_to_"$type".c ../cube.c -o h48_to_"$type"
6gcc -DDEBUG invert.c ../src/cube.c -o invert 6gcc -DDEBUG invert.c ../cube.c -o invert
7 7
8# Old version 8# Old version
9genarray() { 9genarray() {
@@ -22,7 +22,7 @@ genarray() {
22genfuncs() { 22genfuncs() {
23 for f in transform_??_???.txt; do 23 for f in transform_??_???.txt; do
24 trans="$(echo $f | sed 's/.*_// ; s/\.txt//')" 24 trans="$(echo $f | sed 's/.*_// ; s/\.txt//')"
25 printf 'static inline cube_t\ninline_trans_%s' "$trans" 25 printf 'static inline cube_t\n_trans_%s' "$trans"
26 printf '(cube_t c)\n{\n' 26 printf '(cube_t c)\n{\n'
27 printf '\tcube_t ret;\n\n' 27 printf '\tcube_t ret;\n\n'
28 printf '\tcube_t tn = ' 28 printf '\tcube_t tn = '
@@ -32,7 +32,7 @@ genfuncs() {
32 printf ';\n\n\tret = compose(tn, c);\n' 32 printf ';\n\n\tret = compose(tn, c);\n'
33 printf '\tret = compose(ret, ti);\n' 33 printf '\tret = compose(ret, ti);\n'
34 if [ -n "$(echo "$trans" | grep "m")" ]; then 34 if [ -n "$(echo "$trans" | grep "m")" ]; then
35 printf '\tret = flipallcorners(ret);\n' 35 printf '\tret = _invertco(ret);\n'
36 fi 36 fi
37 printf '\n\treturn ret;\n}\n\n' 37 printf '\n\treturn ret;\n}\n\n'
38 done 38 done

Generated with cgit - Back to sebastiano.tronto.net