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'">
|
||||
<Media><xsl:value-of select="ss:Data" /></Media>
|
||||
</xsl:if>
|
||||
<xsl:if test="$tag='IsUnnecessaryRating'">
|
||||
<IsUnnecessaryRating><xsl:value-of select="ss:Data" /></IsUnnecessaryRating>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- NamedCellノードの名前(属性で指定されている)を取得 -->
|
||||
|
||||
@ -33,6 +33,9 @@
|
||||
<xsl:if test="$tag='Media'">
|
||||
<Media><xsl:value-of select="ss:Data" /></Media>
|
||||
</xsl:if>
|
||||
<xsl:if test="$tag='IsUnnecessaryRating'">
|
||||
<IsUnnecessaryRating><xsl:value-of select="ss:Data" /></IsUnnecessaryRating>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- 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;
|
||||
|
||||
// 通常の表示
|
||||
if( !context->bSubmitVersion && !context->bResult && !context->bTadVersion )
|
||||
if( !context->bSubmitVersion && !context->bResult && !context->bTadVersion && !context->bUnnecessaryRating )
|
||||
{
|
||||
Console::WriteLine( "" );
|
||||
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( "File CRC: %04X %04X\n", srlcrc, item->FileCRC );
|
||||
printf( "---------------------------------------\n" );
|
||||
printf( "Rating Display: %s\n", (item->IsUnnecessaryRating)?"Unnecessary":"Necessary" );
|
||||
printf( "---------------------------------------\n" );
|
||||
printf( "SubmitVersion: - %d (%02X)\n", item->SubmitVersion, item->SubmitVersion );
|
||||
printf( "TAD Version: %d (%04X)\n", tadver, tadver );
|
||||
printf( "---------------------------------------\n" );
|
||||
@ -177,6 +179,17 @@ int printResult( SheetCheckerContext ^context, ROM_Header *rh, SheetItem ^item,
|
||||
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 )
|
||||
{
|
||||
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 );
|
||||
}
|
||||
|
||||
text = getXPathText( root, "/Sheet/IsUnnecessaryRating" );
|
||||
if( !System::String::IsNullOrEmpty( text ) && text->Equals( "<EFBFBD>›" ) )
|
||||
{
|
||||
item->IsUnnecessaryRating = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
item->IsUnnecessaryRating = false;
|
||||
}
|
||||
}
|
||||
catch( System::Exception ^ex )
|
||||
{
|
||||
@ -342,6 +365,11 @@ System::Int32 parseOption( array<System::String ^> ^args, SheetCheckerContext ^c
|
||||
context->bTadVersion = true;
|
||||
numopt++;
|
||||
}
|
||||
else if( args[i]->StartsWith( "-u" ) )
|
||||
{
|
||||
context->bUnnecessaryRating = true;
|
||||
numopt++;
|
||||
}
|
||||
else if( !args[i]->StartsWith( "-" ) ) // オプションでない引数のindexを記録
|
||||
{
|
||||
indexList->Add(i);
|
||||
|
||||
@ -28,6 +28,7 @@ private:
|
||||
System::Boolean ^hbSubmitVersion; // オプションフラグ
|
||||
System::Boolean ^hbResult;
|
||||
System::Boolean ^hbTadVersion;
|
||||
System::Boolean ^hbUnnecessaryRating;
|
||||
SheetCheckerError ^hErrorCode; // エラー情報
|
||||
public:
|
||||
SheetCheckerContext()
|
||||
@ -52,6 +53,11 @@ public:
|
||||
void set( System::Boolean flg ){ this->hbTadVersion = gcnew System::Boolean(flg); }
|
||||
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
|
||||
{
|
||||
void set( SheetCheckerError code ){ this->hErrorCode = gcnew SheetCheckerError(code); }
|
||||
@ -67,6 +73,7 @@ private:
|
||||
System::Byte ^hRomVersion;
|
||||
System::UInt16 ^hFileCRC;
|
||||
System::Byte ^hSubmitVersion;
|
||||
System::Boolean ^hIsUnnecessaryRating;
|
||||
public:
|
||||
System::String ^hMedia;
|
||||
public:
|
||||
@ -78,6 +85,7 @@ public:
|
||||
this->hFileCRC = gcnew System::UInt16(0);
|
||||
this->hSubmitVersion = gcnew System::Byte(0);
|
||||
this->hMedia = gcnew System::String("");
|
||||
this->hIsUnnecessaryRating = gcnew System::Boolean(false);
|
||||
}
|
||||
~SheetItem()
|
||||
{
|
||||
@ -114,6 +122,11 @@ public:
|
||||
}
|
||||
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'">
|
||||
<Media><xsl:value-of select="ss:Data" /></Media>
|
||||
</xsl:if>
|
||||
<xsl:if test="$tag='IsUnnecessaryRating'">
|
||||
<IsUnnecessaryRating><xsl:value-of select="ss:Data" /></IsUnnecessaryRating>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- NamedCellノードの名前(属性で指定されている)を取得 -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user