worked on premove bug
[xboard.git] / bitmaps / dopkbm1.sh
1 size=$1
2 from=$2
3 char=$3
4 piece=$4
5 kind=$5
6
7 # pk2bm has a bug in the -W -H feature: sometimes it gives a
8 # garbled bitmap.
9 #pk2bm -W$size -H$size -o $char $from |  tr -d '\000' | \
10 #    sed -f fixup.sed | sed -e s/NAME/${piece}${size}${kind}/ \
11 #    > ${piece}${size}${kind}.bm
12
13 # It doesn't help to add the -b flag; the bug remains the same.
14 # This way also has the drawback of depending on a quickie homebrew
15 # program (pktype2bm) that isn't very robust.
16 #pk2bm -W$size -H$size -b -o $char $from | egrep '\.|\*' |
17 #    pktype2bm ${piece}${size}${kind} $size $size \
18 #    > ${piece}${size}${kind}.bm
19
20 # This way, you have to manually edit each bitmap (with the "bitmap"
21 # program, say) to add margins as needed.  It has the advantage that
22 # you have control over placement, so you don't have to center exactly
23 # if that's the wrong thing to do.
24 pk2bm -o $char $from |  tr -d '\000' | \
25     sed -f fixup.sed | sed -e s/NAME/${piece}${size}${kind}/ \
26     > ${piece}${size}${kind}.bm
27