出力ROMチェッカ:リージョンがコードだけだとみづらいので文字列もあわせて表記。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@245 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
nishikawa_takeshi 2009-03-13 07:24:03 +00:00
parent 5fed6562bf
commit e54ef87988
6 changed files with 35 additions and 1 deletions

View File

@ -28,6 +28,39 @@ void DebugPrint( System::String ^fmt, ... cli::array<System::Object^> ^args )
// ------------------------------------------------------------------
// ROMヘッダ中の値の解釈
// ------------------------------------------------------------------
System::String^ getRegionString(System::UInt32 region)
{
if( region == METWL_MASK_REGION_ALL )
{
return (gcnew System::String("ALL"));
}
System::String ^str = "";
if( region & METWL_MASK_REGION_JAPAN )
{
str += "Japan ";
}
if( region & METWL_MASK_REGION_AMERICA )
{
str += "America ";
}
if( region & METWL_MASK_REGION_EUROPE )
{
str += "Europe ";
}
if( region & METWL_MASK_REGION_AUSTRALIA )
{
str += "Australia ";
}
if( region & METWL_MASK_REGION_KOREA )
{
str += "Korea ";
}
str = str->TrimEnd( ' ' );
str = str->Replace( ' ', ',' );
return str;
}
System::String^ getOgnString(int ogn)
{
System::String ^str = nullptr;

View File

@ -24,6 +24,7 @@ System::Void checkRom( System::String ^orgSrl, System::String ^targetSrl );
System::Void checkSheet( SheetItem ^sItem );
// ROMヘッダの値を解釈
System::String^ getRegionString(System::UInt32 region);
System::String^ getOgnString(int ogn);
System::String^ getRatingString( u8 rating );

View File

@ -52,7 +52,7 @@ System::Void checkRom( System::String ^orgSrl, System::String ^targetSrl )
Console::WriteLine( "--" );
// リージョンの表示
Console::WriteLine( "{0,-15} {1,-20:X04}", "Region", rh.s.card_region_bitmap );
Console::WriteLine( "{0,-15} {1,-10:X04} {2}", "Region", rh.s.card_region_bitmap, getRegionString(rh.s.card_region_bitmap) );
Console::WriteLine( "--" );
// レーティングの表示