X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=bin%2Fspriter.sh;h=f8df9dd33d7f069e7304e9cd1a400121add342c2;hb=beefda31077f0d6a9cdd0dcad26d32dd3ef5bf2b;hp=e9f4026c1e6006d0dde95f22ae3b36f21b2f98b5;hpb=a0a60175da199e687e19998d4d3fe35f82682d31;p=brisk-img.git diff --git a/bin/spriter.sh b/bin/spriter.sh index e9f4026..f8df9dd 100755 --- a/bin/spriter.sh +++ b/bin/spriter.sh @@ -20,8 +20,8 @@ convert -size $((w * 9))x$((h * 5)) xc:none ${fou}${sfx}_bg.png convert -size $((h * 9))x$((w * 5)) xc:none ${fou}${sfx}_oriz_bg.png convert -size ${w}x${h} xc:none ${fou}${sfx}_empty.png -convert -size ${h}x${w} xc:none ${fou}${sfx}_empty_eawe.png - +convert -size ${h}x${w} xc:none ${fou}${sfx}_empty_ea.png +cp ${fou}${sfx}_empty_ea.png ${fou}${sfx}_empty_we.png cssname="${fou}${sfx}.css" rm -f $cssname touch $cssname @@ -44,9 +44,13 @@ for direction in "" "_ea" "_we"; do fi card_id=$(printf "%02d" "$((seed * 10 + card))") + if [ "$card_id" = "40" ]; then + card_id="cover" + fi + card_url=$(echo "$fou" | sed 's@.*/\([^/]\+/[^/]\+$\)@\1@g') cat <> $cssname img[data-card-id="${card_id}${direction}"] { - background: url('img/cards_xx${direction}.png') -${x}px -${y}px; + background: url('${card_url}${direction}.png') -${x}px -${y}px; } EOF