mirror of
https://github.com/rvtr/TwlToolsRED.git
synced 2025-10-31 06:41:18 -04:00
提出確認書チェッカ:-uオプション追加。レーティング表示が不要かどうかをコマンドラインから取得できるようにする。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@74 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
parent
2fa006cfee
commit
6d3a024e6e
@ -33,6 +33,9 @@
|
|||||||
<xsl:if test="$tag='Media'">
|
<xsl:if test="$tag='Media'">
|
||||||
<Media><xsl:value-of select="ss:Data" /></Media>
|
<Media><xsl:value-of select="ss:Data" /></Media>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
<xsl:if test="$tag='IsUnnecessaryRating'">
|
||||||
|
<IsUnnecessaryRating><xsl:value-of select="ss:Data" /></IsUnnecessaryRating>
|
||||||
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- NamedCellノードの名前(属性で指定されている)を取得 -->
|
<!-- NamedCellノードの名前(属性で指定されている)を取得 -->
|
||||||
|
|||||||
@ -33,6 +33,9 @@
|
|||||||
<xsl:if test="$tag='Media'">
|
<xsl:if test="$tag='Media'">
|
||||||
<Media><xsl:value-of select="ss:Data" /></Media>
|
<Media><xsl:value-of select="ss:Data" /></Media>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
<xsl:if test="$tag='IsUnnecessaryRating'">
|
||||||
|
<IsUnnecessaryRating><xsl:value-of select="ss:Data" /></IsUnnecessaryRating>
|
||||||
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- NamedCellノードの名前(属性で指定されている)を取得 -->
|
<!-- NamedCellノードの名前(属性で指定されている)を取得 -->
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -125,7 +125,7 @@ int printResult( SheetCheckerContext ^context, ROM_Header *rh, SheetItem ^item,
|
|||||||
tadver = (tadver << 8) | item->SubmitVersion;
|
tadver = (tadver << 8) | item->SubmitVersion;
|
||||||
|
|
||||||
// 通常の表示
|
// 通常の表示
|
||||||
if( !context->bSubmitVersion && !context->bResult && !context->bTadVersion )
|
if( !context->bSubmitVersion && !context->bResult && !context->bTadVersion && !context->bUnnecessaryRating )
|
||||||
{
|
{
|
||||||
Console::WriteLine( "" );
|
Console::WriteLine( "" );
|
||||||
Console::WriteLine( "SRL: " + srlfile );
|
Console::WriteLine( "SRL: " + srlfile );
|
||||||
@ -140,6 +140,8 @@ int printResult( SheetCheckerContext ^context, ROM_Header *rh, SheetItem ^item,
|
|||||||
printf( "RemasterVersion: %02X %02X\n", rh->s.rom_version, item->RomVersion );
|
printf( "RemasterVersion: %02X %02X\n", rh->s.rom_version, item->RomVersion );
|
||||||
printf( "File CRC: %04X %04X\n", srlcrc, item->FileCRC );
|
printf( "File CRC: %04X %04X\n", srlcrc, item->FileCRC );
|
||||||
printf( "---------------------------------------\n" );
|
printf( "---------------------------------------\n" );
|
||||||
|
printf( "Rating Display: %s\n", (item->IsUnnecessaryRating)?"Unnecessary":"Necessary" );
|
||||||
|
printf( "---------------------------------------\n" );
|
||||||
printf( "SubmitVersion: - %d (%02X)\n", item->SubmitVersion, item->SubmitVersion );
|
printf( "SubmitVersion: - %d (%02X)\n", item->SubmitVersion, item->SubmitVersion );
|
||||||
printf( "TAD Version: %d (%04X)\n", tadver, tadver );
|
printf( "TAD Version: %d (%04X)\n", tadver, tadver );
|
||||||
printf( "---------------------------------------\n" );
|
printf( "---------------------------------------\n" );
|
||||||
@ -177,6 +179,17 @@ int printResult( SheetCheckerContext ^context, ROM_Header *rh, SheetItem ^item,
|
|||||||
printf( "%d", context->ErrorCode );
|
printf( "%d", context->ErrorCode );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( context->bUnnecessaryRating )
|
||||||
|
{
|
||||||
|
if( context->ErrorCode == SheetCheckerError::NOERROR )
|
||||||
|
{
|
||||||
|
printf( "%d", (item->IsUnnecessaryRating)?1:0 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf( "%d", context->ErrorCode );
|
||||||
|
}
|
||||||
|
}
|
||||||
if( context->bResult )
|
if( context->bResult )
|
||||||
{
|
{
|
||||||
printf( "%d", context->ErrorCode );
|
printf( "%d", context->ErrorCode );
|
||||||
@ -298,6 +311,16 @@ System::Boolean readSheet( System::String ^sheetfile, SheetItem ^item )
|
|||||||
{
|
{
|
||||||
item->SubmitVersion = System::Byte::Parse( text, System::Globalization::NumberStyles::AllowHexSpecifier );
|
item->SubmitVersion = System::Byte::Parse( text, System::Globalization::NumberStyles::AllowHexSpecifier );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
text = getXPathText( root, "/Sheet/IsUnnecessaryRating" );
|
||||||
|
if( !System::String::IsNullOrEmpty( text ) && text->Equals( "<EFBFBD>›" ) )
|
||||||
|
{
|
||||||
|
item->IsUnnecessaryRating = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item->IsUnnecessaryRating = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch( System::Exception ^ex )
|
catch( System::Exception ^ex )
|
||||||
{
|
{
|
||||||
@ -342,6 +365,11 @@ System::Int32 parseOption( array<System::String ^> ^args, SheetCheckerContext ^c
|
|||||||
context->bTadVersion = true;
|
context->bTadVersion = true;
|
||||||
numopt++;
|
numopt++;
|
||||||
}
|
}
|
||||||
|
else if( args[i]->StartsWith( "-u" ) )
|
||||||
|
{
|
||||||
|
context->bUnnecessaryRating = true;
|
||||||
|
numopt++;
|
||||||
|
}
|
||||||
else if( !args[i]->StartsWith( "-" ) ) // オプションでない引数のindexを記録
|
else if( !args[i]->StartsWith( "-" ) ) // オプションでない引数のindexを記録
|
||||||
{
|
{
|
||||||
indexList->Add(i);
|
indexList->Add(i);
|
||||||
|
|||||||
@ -28,6 +28,7 @@ private:
|
|||||||
System::Boolean ^hbSubmitVersion; // オプションフラグ
|
System::Boolean ^hbSubmitVersion; // オプションフラグ
|
||||||
System::Boolean ^hbResult;
|
System::Boolean ^hbResult;
|
||||||
System::Boolean ^hbTadVersion;
|
System::Boolean ^hbTadVersion;
|
||||||
|
System::Boolean ^hbUnnecessaryRating;
|
||||||
SheetCheckerError ^hErrorCode; // エラー情報
|
SheetCheckerError ^hErrorCode; // エラー情報
|
||||||
public:
|
public:
|
||||||
SheetCheckerContext()
|
SheetCheckerContext()
|
||||||
@ -52,6 +53,11 @@ public:
|
|||||||
void set( System::Boolean flg ){ this->hbTadVersion = gcnew System::Boolean(flg); }
|
void set( System::Boolean flg ){ this->hbTadVersion = gcnew System::Boolean(flg); }
|
||||||
System::Boolean get(){ return *this->hbTadVersion; }
|
System::Boolean get(){ return *this->hbTadVersion; }
|
||||||
};
|
};
|
||||||
|
property System::Boolean bUnnecessaryRating
|
||||||
|
{
|
||||||
|
void set( System::Boolean flg ){ this->hbUnnecessaryRating = gcnew System::Boolean(flg); }
|
||||||
|
System::Boolean get(){ return *this->hbUnnecessaryRating; }
|
||||||
|
};
|
||||||
property SheetCheckerError ErrorCode
|
property SheetCheckerError ErrorCode
|
||||||
{
|
{
|
||||||
void set( SheetCheckerError code ){ this->hErrorCode = gcnew SheetCheckerError(code); }
|
void set( SheetCheckerError code ){ this->hErrorCode = gcnew SheetCheckerError(code); }
|
||||||
@ -67,6 +73,7 @@ private:
|
|||||||
System::Byte ^hRomVersion;
|
System::Byte ^hRomVersion;
|
||||||
System::UInt16 ^hFileCRC;
|
System::UInt16 ^hFileCRC;
|
||||||
System::Byte ^hSubmitVersion;
|
System::Byte ^hSubmitVersion;
|
||||||
|
System::Boolean ^hIsUnnecessaryRating;
|
||||||
public:
|
public:
|
||||||
System::String ^hMedia;
|
System::String ^hMedia;
|
||||||
public:
|
public:
|
||||||
@ -78,6 +85,7 @@ public:
|
|||||||
this->hFileCRC = gcnew System::UInt16(0);
|
this->hFileCRC = gcnew System::UInt16(0);
|
||||||
this->hSubmitVersion = gcnew System::Byte(0);
|
this->hSubmitVersion = gcnew System::Byte(0);
|
||||||
this->hMedia = gcnew System::String("");
|
this->hMedia = gcnew System::String("");
|
||||||
|
this->hIsUnnecessaryRating = gcnew System::Boolean(false);
|
||||||
}
|
}
|
||||||
~SheetItem()
|
~SheetItem()
|
||||||
{
|
{
|
||||||
@ -114,6 +122,11 @@ public:
|
|||||||
}
|
}
|
||||||
System::String^ get(){ return System::String::Copy( this->hMedia ); }
|
System::String^ get(){ return System::String::Copy( this->hMedia ); }
|
||||||
}
|
}
|
||||||
|
property System::Boolean IsUnnecessaryRating
|
||||||
|
{
|
||||||
|
void set( System::Boolean b ){ *this->hIsUnnecessaryRating = b; }
|
||||||
|
System::Boolean get(){ return *this->hIsUnnecessaryRating; }
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,9 @@
|
|||||||
<xsl:if test="$tag='Media'">
|
<xsl:if test="$tag='Media'">
|
||||||
<Media><xsl:value-of select="ss:Data" /></Media>
|
<Media><xsl:value-of select="ss:Data" /></Media>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
<xsl:if test="$tag='IsUnnecessaryRating'">
|
||||||
|
<IsUnnecessaryRating><xsl:value-of select="ss:Data" /></IsUnnecessaryRating>
|
||||||
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- NamedCellノードの名前(属性で指定されている)を取得 -->
|
<!-- NamedCellノードの名前(属性で指定されている)を取得 -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user