]> git.rm.cloudns.org Git - xonotic/xonotic-maps.pk3dir.git/commitdiff
add some QR code tests (not used by map yet)
authorRudolf Polzer <divverent@xonotic.org>
Wed, 14 Mar 2012 20:00:02 +0000 (21:00 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 14 Mar 2012 20:00:50 +0000 (21:00 +0100)
12 files changed:
scripts/map_augenkrebs.shader
textures/map_augenkrebs/qr-i.png [new file with mode: 0644]
textures/map_augenkrebs/qr-m0.png [new file with mode: 0644]
textures/map_augenkrebs/qr-m1.png [new file with mode: 0644]
textures/map_augenkrebs/qr-m2.png [new file with mode: 0644]
textures/map_augenkrebs/qr-m3.png [new file with mode: 0644]
textures/map_augenkrebs/qr-r1.png [new file with mode: 0644]
textures/map_augenkrebs/qr-r2.png [new file with mode: 0644]
textures/map_augenkrebs/qr-r3.png [new file with mode: 0644]
textures/map_augenkrebs/qr.png [new file with mode: 0644]
textures/map_augenkrebs/qr.sh [new file with mode: 0644]
textures/map_augenkrebs/qranim.png [new file with mode: 0644]

index 51819e1c9171ca4c112db3d60584cd51f6165cd5..2c88c9ed5f6907d88d521d19e807fe90351096ee 100644 (file)
@@ -474,3 +474,12 @@ textures/map_augenkrebs/tvsnow
                blendfunc filter
        }
 }
+textures/map_augenkrebs/qranim
+{
+       nopicmip
+       nomipmaps
+       {
+               map textures/map_augenkrebs/qranim
+               tcmod page 4 3 0.05
+       }
+}
diff --git a/textures/map_augenkrebs/qr-i.png b/textures/map_augenkrebs/qr-i.png
new file mode 100644 (file)
index 0000000..0dcd1ef
Binary files /dev/null and b/textures/map_augenkrebs/qr-i.png differ
diff --git a/textures/map_augenkrebs/qr-m0.png b/textures/map_augenkrebs/qr-m0.png
new file mode 100644 (file)
index 0000000..aac2436
Binary files /dev/null and b/textures/map_augenkrebs/qr-m0.png differ
diff --git a/textures/map_augenkrebs/qr-m1.png b/textures/map_augenkrebs/qr-m1.png
new file mode 100644 (file)
index 0000000..9c416c4
Binary files /dev/null and b/textures/map_augenkrebs/qr-m1.png differ
diff --git a/textures/map_augenkrebs/qr-m2.png b/textures/map_augenkrebs/qr-m2.png
new file mode 100644 (file)
index 0000000..aa10c15
Binary files /dev/null and b/textures/map_augenkrebs/qr-m2.png differ
diff --git a/textures/map_augenkrebs/qr-m3.png b/textures/map_augenkrebs/qr-m3.png
new file mode 100644 (file)
index 0000000..3231c84
Binary files /dev/null and b/textures/map_augenkrebs/qr-m3.png differ
diff --git a/textures/map_augenkrebs/qr-r1.png b/textures/map_augenkrebs/qr-r1.png
new file mode 100644 (file)
index 0000000..3e20f4f
Binary files /dev/null and b/textures/map_augenkrebs/qr-r1.png differ
diff --git a/textures/map_augenkrebs/qr-r2.png b/textures/map_augenkrebs/qr-r2.png
new file mode 100644 (file)
index 0000000..5a51ecd
Binary files /dev/null and b/textures/map_augenkrebs/qr-r2.png differ
diff --git a/textures/map_augenkrebs/qr-r3.png b/textures/map_augenkrebs/qr-r3.png
new file mode 100644 (file)
index 0000000..80c535e
Binary files /dev/null and b/textures/map_augenkrebs/qr-r3.png differ
diff --git a/textures/map_augenkrebs/qr.png b/textures/map_augenkrebs/qr.png
new file mode 100644 (file)
index 0000000..d86337e
Binary files /dev/null and b/textures/map_augenkrebs/qr.png differ
diff --git a/textures/map_augenkrebs/qr.sh b/textures/map_augenkrebs/qr.sh
new file mode 100644 (file)
index 0000000..0d33f62
--- /dev/null
@@ -0,0 +1,44 @@
+urls='
+http://youtu.be/oJwcRyf5XZM
+http://youtu.be/1ZbOD-yVTxw
+http://youtu.be/gxc-kREijH4
+http://youtu.be/9ufjRoidV_E
+http://youtu.be/SmpITVtnMXk
+http://youtu.be/Pvkj3PfO4gM,http://youtu.be/kfVsfOSbJY0
+'
+
+makeqr()
+{
+       echo "$4" | qrencode -o "$1" -l H -s 14 -m 0
+       mogrify -mattecolor white $2 -frame $((256 - `identify -format %w "$1"` / 2)) $3 "$1"
+       optipng -o7 -nc "$1"
+}
+
+makeqr qr.png    "" ""                       "https://pzt.me/8o8s"
+makeqr qr-i.png  "" "-negate"                "https://pzt.me/072d"
+# numbered by location of small dot: 3 2 1 0
+makeqr qr-m0.png "" "-transpose"             "https://pzt.me/654q"
+makeqr qr-m1.png "" "-flop"                  "https://pzt.me/654q"
+makeqr qr-m2.png "" "-flip"                  "https://pzt.me/654q"
+makeqr qr-m3.png "" "-transpose -flip -flop" "https://pzt.me/654q"
+makeqr qr-r1.png "" "-flip -transpose"       "https://pzt.me/4tfi"
+makeqr qr-r2.png "" "-flop -transpose"       "https://pzt.me/4tfi"
+makeqr qr-r3.png "" "-flip -flop"            "https://pzt.me/4tfi"
+
+i=0
+for u in $urls; do
+       i=$(($i+1))
+       makeqr qr-$i.png     "" ""        ${u%%,*}
+       makeqr qr-${i}_i.png "" "-negate" ${u%%,*}
+done
+
+l=
+j=0
+while [ $j -lt $i ]; do
+       j=$(($j+1))
+       l="$l qr-$j.png qr-$((($j-1+$i/2)%$i+1))_i.png"
+done
+convert -delay 10 $l qranim.gif
+montage -border 0 -frame 0 -geometry +0+0 $l qranim.png
+optipng -o7 -nc qranim.png
+rm -f $l
diff --git a/textures/map_augenkrebs/qranim.png b/textures/map_augenkrebs/qranim.png
new file mode 100644 (file)
index 0000000..9af06c1
Binary files /dev/null and b/textures/map_augenkrebs/qranim.png differ