fix wrong keyword
[xonotic/xonotic-maps.pk3dir.git] / textures / alphamod / make.sh
1 for x in `seq 0 100`; do
2         nnn=`printf %03d $x`
3         a=$(($x * 20 / 9))
4         b=$((33 + $x * 20 / 9))
5         convert \
6                 -size 128x128 \
7                 xc:"rgb($a,$a,$a)" \
8                 -fill "rgb($b,$b,$b)" \
9                 -draw "rectangle 0,0 63,63" \
10                 -draw "rectangle 64,64 127,127" \
11                 -gravity center \
12                 -font "Bitstream-Vera-Sans-Bold" \
13                 -pointsize 24 \
14                 -fill white \
15                 -draw "text -1,-1 '$x%'" \
16                 -draw "text 0,-1 '$x%'" \
17                 -draw "text 1,-1 '$x%'" \
18                 -draw "text -1,0 '$x%'" \
19                 -draw "text 1,0 '$x%'" \
20                 -draw "text -1,1 '$x%'" \
21                 -draw "text 0,1 '$x%'" \
22                 -draw "text 1,1 '$x%'" \
23                 -fill black \
24                 -draw "text 0,0 '$x%'" \
25                 PNM:- |\
26                 pamtotga -mono -norle > "alpha_$nnn.tga"
27         cat <<EOF
28 textures/alphamod/alpha_$nnn
29 {
30         qer_trans 0.30
31         surfaceparm nodraw
32         surfaceparm nonsolid
33         surfaceparm skip
34         surfaceparm detail
35         surfaceparm trans
36         q3map_alphaMod volume
37         q3map_alphaMod const ${nnn%??}.${nnn#?}
38 }
39 EOF
40 done > ../../scripts/alphamod.shader