| 1 |
:: ########################################################################### |
| 2 |
:: # fheroes2: https://github.com/ihhub/fheroes2 # |
| 3 |
:: # Copyright (C) 2023 # |
| 4 |
:: # # |
| 5 |
:: # This program is free software; you can redistribute it and/or modify # |
| 6 |
:: # it under the terms of the GNU General Public License as published by # |
| 7 |
:: # the Free Software Foundation; either version 2 of the License, or # |
| 8 |
:: # (at your option) any later version. # |
| 9 |
:: # # |
| 10 |
:: # This program is distributed in the hope that it will be useful, # |
| 11 |
:: # but WITHOUT ANY WARRANTY; without even the implied warranty of # |
| 12 |
:: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
| 13 |
:: # GNU General Public License for more details. # |
| 14 |
:: # # |
| 15 |
:: # You should have received a copy of the GNU General Public License # |
| 16 |
:: # along with this program; if not, write to the # |
| 17 |
:: # Free Software Foundation, Inc., # |
| 18 |
:: # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # |
| 19 |
:: ########################################################################### |
| 20 |
|
| 21 |
@echo off |
| 22 |
|
| 23 |
set PATH=%~dp0;%PATH% |
| 24 |
|
| 25 |
set EXIT_CODE=0 |
| 26 |
|
| 27 |
call :extract_icn || ^ |
| 28 |
set EXIT_CODE=1 |
| 29 |
|
| 30 |
if not "%CI%" == "true" ( |
| 31 |
pause |
| 32 |
) |
| 33 |
|
| 34 |
exit /B %EXIT_CODE% |
| 35 |
|
| 36 |
:extract_icn |
| 37 |
|
| 38 |
extractor agg *.AGG *.agg || exit /B 1 |
| 39 |
pal2img agg\HEROES2\kb.pal palette.png || exit /B 1 |
| 40 |
|
| 41 |
82m2wav wav\HEROES2 agg\HEROES2\*.82m || exit /B 1 |
| 42 |
82m2wav wav\HEROES2X agg\HEROES2X\*.82m || exit /B 1 |
| 43 |
|
| 44 |
bin2txt txt\HEROES2 agg\HEROES2\*.bin || exit /B 1 |
| 45 |
bin2txt txt\HEROES2X agg\HEROES2X\*.bin || exit /B 1 |
| 46 |
|
| 47 |
icn2img icn\HEROES2 agg\HEROES2\kb.pal agg\HEROES2\*.icn || exit /B 1 |
| 48 |
icn2img icn\HEROES2X agg\HEROES2\kb.pal agg\HEROES2X\*.icn || exit /B 1 |
| 49 |
|
| 50 |
til2img til\HEROES2 agg\HEROES2\kb.pal agg\HEROES2\*.til || exit /B 1 |
| 51 |
til2img til\HEROES2X agg\HEROES2\kb.pal agg\HEROES2X\*.til || exit /B 1 |
| 52 |
|
| 53 |
xmi2midi midi\HEROES2 agg\HEROES2\*.xmi || exit /B 1 |
| 54 |
xmi2midi midi\HEROES2X agg\HEROES2X\*.xmi || exit /B 1 |
| 55 |
|
| 56 |
echo: |
| 57 |
echo Asset extraction completed successfully. |
| 58 |
|
| 59 |
exit /B |