OUT_DIR=/tmp/minigames
JPEG_QUALITY=75
TEXTURE_SIZE=2048
-FORMAT=png
+FORMAT=tga
# Converts images into $FORMAT
# Synopsis: convert_image input.png output
# Create the files for packaging
function generate()
{
- for src_file in $(git ls-files)
+ for src_file in $(git ls-files '*/*')
do
- local out_dir="$OUT_DIR/gfx/hud/default/"
+ local out_dir="$OUT_DIR/gfx/hud/default/minigames/"
local out_file="$out_dir/$src_file"
$MKDIR "$out_dir/$(dirname "$src_file")"
[ "$file_extension" != "$FORMAT" ]
then
out_file="$base_file.$FORMAT"
- echo "$base_file"
if [ "$src_file" -nt "$out_file" ]
then
- echo -e "Compressing \x1b[1m$src_file\x1b[0m"
+ echo -e "Converting \x1b[1m$src_file\x1b[0m"
convert_image "$src_file" "$base_file"
scale_image "$base_file"
continue