メニュースキップフラグ立てツール:return FALSEが抜けていた箇所を修正。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@300 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
nishikawa_takeshi 2009-06-22 08:38:52 +00:00
parent f53042a24f
commit ea6dbf342b
3 changed files with 39 additions and 2 deletions

View File

@ -0,0 +1,14 @@
#!/bin/sh
flag_tool="./MenuSkipFlagTool.exe"
output_dir="output/"
for file in $*
do
echo "== diff $file ${output_dir}${file%.srl}_0_flag.srl"
diff $file ${output_dir}${file%.srl}_0_flag.srl
echo "== diff $file ${output_dir}${file%.srl}_1_disable.srl"
diff $file ${output_dir}${file%.srl}_1_disable.srl
echo "== diff ${output_dir}${file%.srl}_1_flag.srl ${output_dir}${file%.srl}_0_disable.srl"
diff ${output_dir}${file%.srl}_1_flag.srl ${output_dir}${file%.srl}_0_disable.srl
done

View File

@ -85,13 +85,13 @@ void usage()
{
printf( "-----------------------------------------------------------------------------\n" );
printf( "Usage: MenuSkipFlagTool.exe input_file output_file enable-flag\n" );
printf( " input_file : a ROM data file (generated by makerom.TWL).\n" );
printf( " input_file : a ROM data file.\n" );
printf( " output_file : a destination file.\n" );
printf( " enable-flag : 1 or 0. If 1, menu-skip flag will be enabled.\n" );
printf( "\nOption:\n" );
printf( "-h : print help only.\n" );
printf( "-f : force to overwrite a output_file.\n" );
printf( "-d : disable the mesu-skip flag, when enable-flag is 1.\n" );
printf( "-d : disable the menu-skip flag, when enable-flag is 1.\n" );
printf( "-----------------------------------------------------------------------------\n" );
}
@ -283,6 +283,7 @@ static BOOL iEnableFlag( SContext *pContext )
(rh.s.platform_code != PLATFORM_CODE_TWL_LIMITED) )
{
printf("\n*** Error: Illegal platform (%d). ***\n", rh.s.platform_code);
return FALSE;
}
printf("InitialCode : %c%c%c%c\n", rh.s.game_code[0], rh.s.game_code[1], rh.s.game_code[2], rh.s.game_code[3]);
@ -352,6 +353,7 @@ static BOOL iEnableFlag( SContext *pContext )
if( !DecryptSignRomHeader( &rh ) )
{
printf( "Decrypt the sign : Failed\n" );
printf("\n*** Error: Invalid sigunature. ***\n");
return FALSE;
}
printf( "Decrypt the sign : Succeeded\n" );
@ -393,6 +395,7 @@ static BOOL iEnableFlag( SContext *pContext )
if( !SignRomHeader( &rh ) )
{
printf( "Encrypt the sign : Failed\n" );
printf("\n*** Error: Failed to encrypt the sigunature. ***\n");
return FALSE;
}
printf( "Encrypt the sign : Succeeded\n" );

View File

@ -0,0 +1,20 @@
#!/bin/sh
flag_tool="./MenuSkipFlagTool.exe"
output_dir="output/"
if [ -d ${output_dir} ];
then
echo "skip make directory"
else
echo "make directory"
mkdir ${output_dir}
fi
for file in $*
do
$flag_tool $file ${output_dir}${file%.srl}_1_flag.srl 1
$flag_tool $file ${output_dir}${file%.srl}_0_flag.srl 0
$flag_tool ${output_dir}${file%.srl}_1_flag.srl ${output_dir}${file%.srl}_1_disable.srl 1 -d
$flag_tool ${output_dir}${file%.srl}_1_flag.srl ${output_dir}${file%.srl}_0_disable.srl 0 -d
done