summaryrefslogtreecommitdiff
path: root/test-thm-mvmt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test-thm-mvmt.sh')
-rwxr-xr-xtest-thm-mvmt.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/test-thm-mvmt.sh b/test-thm-mvmt.sh
index ab3678e..2957c48 100755
--- a/test-thm-mvmt.sh
+++ b/test-thm-mvmt.sh
@@ -8,7 +8,8 @@ yspd=$yvel
x2=256
y2=256
flip=0
-heightmap="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1"
+#heightmap="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1"
+heightmap="16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16"
#heightmap="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16"
#heightmap="16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1"
w1=16
@@ -29,8 +30,9 @@ while read frame key held; do
[ "${key#*KEY_S}" != "$key" ] && negy="" && y1=$(echo "$y1+$yspd" | bc)
[ "${key#*KEY_A}" != "$key" ] && negx="-" && x1=$(echo "$x1-$xspd" | bc)
[ "${key#*KEY_D}" != "$key" ] && negx="" && x1=$(echo "$x1+$xspd" | bc)
+ printf "0\n$w1,$h1\n$x1,$y1\n$negx$xspd,$negy$yspd\n$w2,$h2\n$flip\n$heightmap\n$x2,$y2" | ./clld
xy=$(printf "0\n$w1,$h1\n$x1,$y1\n$negx$xspd,$negy$yspd\n$w2,$h2\n$flip\n$heightmap\n$x2,$y2" | ./clld | tail -n2 | tr -d ',' | head -n1)
x1=$(echo "$xy" | awk '{print $1}')
y1=$(echo "$xy" | awk '{print $2}')
- printf "\33[1;1H$x1 $y1 \33[2;1H$negx$xspd $negy$yspd \33[3;1H \b\b"
+ #printf "\33[1;1H$x1 $y1 \33[2;1H$negx$xspd $negy$yspd \33[3;1H \b\b"
done