diff options
author | epoch <epoch@hacking.allowed.org> | 2018-03-29 17:51:23 -0500 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2018-03-29 17:51:23 -0500 |
commit | 4267148da482fe00413e38ee785cd7e012531d78 (patch) | |
tree | a668769240bf4882ab3b5d372e3498ce24c9ff90 /filebrowser/list_to_cubes.sh | |
parent | c0b68c0ae9f7bf19e356ddeeecae37c59da20216 (diff) | |
download | hackvr-4267148da482fe00413e38ee785cd7e012531d78.tar.gz hackvr-4267148da482fe00413e38ee785cd7e012531d78.zip |
added hex encoding and fixed uninitialized variable bug
Diffstat (limited to 'filebrowser/list_to_cubes.sh')
-rwxr-xr-x | filebrowser/list_to_cubes.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/filebrowser/list_to_cubes.sh b/filebrowser/list_to_cubes.sh index fe9b241..2cdbe92 100755 --- a/filebrowser/list_to_cubes.sh +++ b/filebrowser/list_to_cubes.sh @@ -8,18 +8,26 @@ # # line1 # line2 +j=1 +r=200 while read -r line;do if [ "_$line" != '_' ];then # ../tools/obj2hackvr.pl "$line" ../meshes/cube.obj - printf "%s addshape 18 3 8 0 0 0 8 0 0 0 0\n" "$line" + #turn line into hex to prevent stupid shit + hexline="$(printf "%s" "$line" | xxd -p | tr -d '\n')" + printf "%s addshape 18 3 8 %d %d 0 %d %d 0 %d %d\n" "$hexline" "$j" "$r" "$[$j+8]" "$r" "$j" "$r" cd .. - printf "%s\n" "$line" | ./makelabel.sh "$line" 15 0 0 + printf "%s\n" "$line" | tee /dev/stderr | ./makelabel.sh "$hexline" 15 $j $r cd filebrowser - printf "%s move 0 %d 0 0 0 0 0 0 0\n" "$line" "$i" + #printf "%s move 0 %d %d 0 0 0 0 0 0\n" "$hexline" "$i" "$r" + printf "%s rotate 0 %d 0\n" "$hexline" "$[i * 3]" #somehow printf '%s\n' "$line" | ./testfont.sh and make its output belong to same group as $line.. sed? i=$[i+10] + j=$[j+4] else + cat camera.pos printf "USER deleteallexcept USER\n" #deleteallexcept doesn't have gr deletions yet I think. + j=0 i=0 fi done |