@echo off
rem This file is part of the Skin Generator, Copyright (c) 2004 Alexander R. Pruss
rem
rem This program is free software; you can redistribute it and/or
rem modify it under the terms of the GNU General Public License
rem as published by the Free Software Foundation; either version 2
rem of the License, or (at your option) any later version.
rem
rem This program is distributed in the hope that it will be useful,
rem but WITHOUT ANY WARRANTY; without even the implied warranty of
rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rem GNU General Public License for more details.
rem
rem You should have received a copy of the GNU General Public License
rem along with this program; if not, write to the Free Software
rem Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
if not %7!==! goto run
echo Generate full color statusbar skin from 320x160 24-bit .bmp files that
echo provide a full graffiti/statusbar area.
echo Usage:
echo  sb16 image1.bmp image2.bmp image3.bmp image4.bmp image5.bmp image6.bmp outname
echo image1.bmp = all buttons unselected, disabled down arrow, speaker off
echo image2.bmp = all buttons unselected, disabled up arrow, charging
echo image3.bmp = all buttons unselected, active down arrow, empty battery,
echo              speaker on
echo image4.bmp = all buttons unselected, active up arrow, full battery
echo image5.bmp = all buttons selected, active down arrow, speaker on, 
echo              selected battery (TH)
echo image6.bmp = all buttons selected, active up arrow, speaker off
goto done
:run
rem home
convert +compress -crop 24x24+2+134 "%1" temp/image1000-16.bmp
rem home
convert +compress -crop 24x24+2+134 "%6" temp/image1050-16.bmp
rem menu
convert +compress -crop 24x24+26+134 "%1" temp/image1100-16.bmp
rem menu
convert +compress -crop 24x24+26+134 "%6" temp/image1150-16.bmp
rem search
convert +compress -crop 24x24+50+134 "%1" temp/image1200-16.bmp
rem search
convert +compress -crop 24x24+50+134 "%6" temp/image1250-16.bmp
rem main bar
convert +compress -crop 320x30+0+130 "%1" temp/image3000-16.bmp
rem time bar
convert +compress -crop 76x24+210+134 "%1" temp/image3200-16.bmp
rem up arrow, unselected
convert +compress -crop 24x24+294+134 "%4" temp/image1400-16.bmp
rem up arrow, selected
convert +compress -crop 24x24+294+134 "%6" temp/image1450-16.bmp
rem down arrow, unselected
convert +compress -crop 24x24+294+134 "%3" temp/image1500-16.bmp
rem down arrow, selected
convert +compress -crop 24x24+294+134 "%5" temp/image1550-16.bmp
rem disabled down arrow
convert +compress -crop 24x24+294+134 "%1" temp/image1600-16.bmp
rem disabled up arrow
convert +compress -crop 24x24+294+134 "%2" temp/image1650-16.bmp
rem plugin button
convert +compress -crop 24x24+74+134 "%4" temp/image1700-16.bmp
rem selected plugin button
convert +compress -crop 24x24+74+134 "%5" temp/image1750-16.bmp
rem plugin button -- should be disabled
convert +compress -crop 24x24+74+134 "%2" temp/image1850-16.bmp
rem blank square
convert +compress -crop 24x24+128+134 "%2" temp/image1800-16.bmp
rem speaker on, unselected
convert +compress -crop 24x24+180+134 "%3" temp/image2500-16.bmp
rem speaker on, selected
convert +compress -crop 24x24+180+134 "%5" temp/image2550-16.bmp
rem speaker off, unselected
convert +compress -crop 24x24+180+134 "%1" temp/image2600-16.bmp
rem speaker off, selected
convert +compress -crop 24x24+180+134 "%6" temp/image2650-16.bmp
rem battery charging
convert +compress -crop 24x24+102+134 "%2" temp/image6300-16.bmp
rem battery charging
convert +compress -crop 24x24+102+134 "%6" temp/image6400-16.bmp
rem selected battery
convert +compress -crop 24x24+102+134 "%4" temp/image6200-16.bmp
composite arp-icons/abmp2400.png temp/image1800-16.bmp temp/image1300-16.bmp
composite arp-icons/abmp2450.png temp/image1800-16.bmp temp/image1350-16.bmp
for %%1 in (1900 1950 2000 2150 2200 2250 2300 2350 2400 2450 2800 2850 7100 7200 7220 7230 7240 7250 7260 7270 7280 7300 7320 7330 7340 7350 7360 7370 7380) do composite arp-icons/abmp%%1.png temp/image1800-16.bmp temp/image%%1-16.bmp
call dobattery.bat "%4" "%3" 24 temp/image5000-16.bmp
call dobattery.bat "%4" "%3" 22 temp/image5100-16.bmp
call dobattery.bat "%4" "%3" 20 temp/image5200-16.bmp
call dobattery.bat "%4" "%3" 18 temp/image5300-16.bmp
call dobattery.bat "%4" "%3" 16 temp/image5400-16.bmp
call dobattery.bat "%4" "%3" 14 temp/image5500-16.bmp
call dobattery.bat "%4" "%3" 12 temp/image5600-16.bmp
call dobattery.bat "%4" "%3" 10 temp/image5700-16.bmp
call dobattery.bat "%4" "%3" 8 temp/image5800-16.bmp
call dobattery.bat "%4" "%3" 6 temp/image5900-16.bmp
call dobattery.bat "%4" "%3" 4 temp/image6000-16.bmp
call dobattery.bat "%4" "%3" 2 temp/image6100-16.bmp
cd temp
..\bin\pilrc -ro -SonySkin -LE32 -type Ssts -creator SkSb -name "%7" "../rcp/sb16.rcp" "../%7.prc"
del *.bmp
cd ..
:done
