Skip to content

Commit

Permalink
Add replacement beam sprites (#173)
Browse files Browse the repository at this point in the history
Add imagemagick script for making bullet sprites
  • Loading branch information
cxong committed Jun 13, 2015
1 parent acc4c8f commit bc48519
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions graphics/beam.txt
@@ -0,0 +1,4 @@
Derived from Bullet Collection 2 (M484 Games)
by Master484 (http://m484games.ucoz.com/)
http://opengameart.org/content/bullet-collection-2-m484-games
http://creativecommons.org/publicdomain/zero/1.0/
Binary file added graphics/beam_8x8.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions graphics/make_bullet_spritesheet.sh
@@ -0,0 +1,23 @@
#!/bin/sh
#
# Create a bullet spritesheet by rotating a source image
#
if [ "$#" -ne 1 ]; then
echo "Usage: make_bullet_spritesheet.sh infile"
exit 1
fi
command='convert $1 -background none -virtual-pixel background'

for i in `seq 45 45 315`; do
command="$command \\( -clone 0 -filter Point -distort SRT $i \\)"
done

BASENAME=`basename "$1" | cut -d. -f1`
DIMENSIONS=`identify -format "%wx%h" $1`
OUTFILE=${BASENAME}_${DIMENSIONS}.png

command="$command +append -channel A -threshold 60% $OUTFILE"

eval $command

chmod 644 $OUTFILE

0 comments on commit bc48519

Please sign in to comment.