Created
December 20, 2016 13:43
-
-
Save FreeSlave/ec18b6dbd124657c3294371fc21a0216 to your computer and use it in GitHub Desktop.
Generate quake3 common textures with imagemagick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
gen_texture() | |
{ | |
name=$1 | |
color1=$2 | |
color2=$3 | |
textcolor=$4 | |
text=$(echo -n "$name" | tr '[:lower:]' '[:upper:]') | |
convert -size 64x64 xc:"$color2" -fill "$color1" -draw "rectangle 0,0 32,32" -draw "rectangle 32,32 64,64" \ | |
-pointsize 12 -gravity center -fill "$textcolor" -font Verdana-Bold -draw "text 0,0 $text" -quality 95 $name.jpg | |
} | |
gen_texture caulk lightgrey white black | |
gen_texture clip red brown1 black | |
gen_texture hint PaleGreen1 DarkSeaGreen1 black | |
gen_texture ladder MediumSlateBlue MediumPurple1 black | |
gen_texture nodraw fuchsia purple white | |
gen_texture origin DarkOrange1 burlywood2 black | |
gen_texture skip grey25 teal white | |
gen_texture trigger silver PaleGoldenrod black |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment