mirror of
https://github.com/rvtr/TwlToolsRED.git
synced 2025-10-31 06:41:18 -04:00
レーティングFree埋めツール:クリアモード(-c)追加。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@348 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
parent
d853b5849c
commit
98fe18913c
@ -50,6 +50,9 @@ typedef struct _SContext
|
|||||||
// 入出力ファイル
|
// 入出力ファイル
|
||||||
FILE *ifp;
|
FILE *ifp;
|
||||||
FILE *ofp;
|
FILE *ofp;
|
||||||
|
|
||||||
|
// モード
|
||||||
|
BOOL isClear; // クリアモード
|
||||||
}
|
}
|
||||||
SContext;
|
SContext;
|
||||||
|
|
||||||
@ -86,6 +89,7 @@ void usage()
|
|||||||
printf( " input_file : a ROM data file.\n" );
|
printf( " input_file : a ROM data file.\n" );
|
||||||
printf( " output_file : a destination file.\n" );
|
printf( " output_file : a destination file.\n" );
|
||||||
printf( "\nOption:\n" );
|
printf( "\nOption:\n" );
|
||||||
|
printf( "-c : clear all rating(0x00).\n" );
|
||||||
printf( "-h : print help only.\n" );
|
printf( "-h : print help only.\n" );
|
||||||
printf( "-f : force to overwrite a output_file.\n" );
|
printf( "-f : force to overwrite a output_file.\n" );
|
||||||
printf( "-----------------------------------------------------------------------------\n" );
|
printf( "-----------------------------------------------------------------------------\n" );
|
||||||
@ -110,7 +114,7 @@ int main(int argc, char *argv[])
|
|||||||
memset( &context, 0, sizeof(SContext) );
|
memset( &context, 0, sizeof(SContext) );
|
||||||
|
|
||||||
// オプション
|
// オプション
|
||||||
while( (opt = getopt(argc, argv, "hf")) >= 0 )
|
while( (opt = getopt(argc, argv, "hfc")) >= 0 )
|
||||||
{
|
{
|
||||||
switch( opt )
|
switch( opt )
|
||||||
{
|
{
|
||||||
@ -123,6 +127,10 @@ int main(int argc, char *argv[])
|
|||||||
bForceOverwrite = TRUE;
|
bForceOverwrite = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'c':
|
||||||
|
context.isClear = TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
default: // オプション引数が指定されていないときにも実行される
|
default: // オプション引数が指定されていないときにも実行される
|
||||||
usage();
|
usage();
|
||||||
fprintf( stdout, "\n*** Error: illegal option. ***\n" );
|
fprintf( stdout, "\n*** Error: illegal option. ***\n" );
|
||||||
@ -294,7 +302,7 @@ static BOOL iMain( SContext *pContext )
|
|||||||
printf("--------+------+------+------+------+------+------+------+------+\n");
|
printf("--------+------+------+------+------+------+------+------+------+\n");
|
||||||
for( i=0; i < PARENTAL_CONTROL_INFO_SIZE; i++ )
|
for( i=0; i < PARENTAL_CONTROL_INFO_SIZE; i++ )
|
||||||
{
|
{
|
||||||
rh.s.parental_control_rating_info[i] = 0x80;
|
rh.s.parental_control_rating_info[i] = (pContext->isClear)?0x00:0x80;
|
||||||
if( (i%8) == 7 )
|
if( (i%8) == 7 )
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user