マスタエディタ:以下の変更。

・読み込み時にレーティングが「レーティング表示不要」もしくは「審査中」である場合に警告を出す。
・一時保存情報にDSiWareの販売カテゴリのコンボボックスの選択を含めるようにした。
・提出確認書にマスタエディタのバージョンを埋め込む。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@130 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
nishikawa_takeshi 2009-01-21 07:57:27 +00:00
parent 77f52bd37a
commit f6e596af92
15 changed files with 88 additions and 11 deletions

View File

@ -4259,7 +4259,14 @@ private: System::Windows::Forms::TextBox^ tboxGuideDLCategory;
// DL販売カテゴリの表示をカードアプリのとき「なし」にする。
void maskDLCategoryForms(void)
{
if( !this->hSrl->IsMediaNand )
// デフォルトだと IsMediaNand は false なのでメディアがNANDなのかROMが読み込まれていないのでfalseなのか判断できないので
// ROMが読み込まれていないときに(TMP情報の読み出しで)呼ばれるとコンボボックスが編集不可になってしまう
// => 読み込まれたときにのみ判定する
System::Boolean bRead = this->hSrl->IsAppUser || this->hSrl->IsAppSystem || // 一度でも読み込まれているとどれかがtrueになっている
this->hSrl->IsAppSecure || this->hSrl->IsAppLauncher;
if( !this->hSrl->IsMediaNand && bRead ) // 読み込まれているときのみ
{
this->combDLCategory->SelectedIndex = this->combDLCategory->Items->Count - 2;
this->combDLCategory->Enabled = false;

View File

@ -28,6 +28,9 @@ using namespace MasterEditorTWL;
// ----------------------------------------------
void Form1::setDeliverableProperties(void)
{
// プログラムのバージョン
this->hDeliv->hMasterEditorVersion = this->getVersion();
// ñ<E28099>o<EFBFBD>î•ñ
this->hDeliv->hProductName = this->tboxProductName->Text;
this->hDeliv->hProductCode1 = this->tboxProductCode1->Text;

View File

@ -245,7 +245,7 @@ void Form1::checkRatingForms( System::Boolean inRegion, System::Windows::Forms::
"ペアレンタルコントロール情報", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
msg + ": レーティングを選択してください。",
"Parental Control",
msg + ": Rating Pending is setting. When rating age is examined, Please submit again.", true, true ) );
msg + ": Please set rating.", true, true ) );
}
// 審査中のとき警告
@ -254,7 +254,9 @@ void Form1::checkRatingForms( System::Boolean inRegion, System::Windows::Forms::
this->hWarnList->Add( gcnew RCMrcError(
"ペアレンタルコントロール情報", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
msg + ": 審査中指定がされています。審査が決まりしだい、再提出してください。",
"Parental Control", msg + ": Save ROM data as Game soft which needs rating examinination.", true, true ) );
"Parental Control",
msg + ": In your selection, no rating yet. Please submit again when rating is dicided.",
true, true ) );
}
} //checkRatingForms()

View File

@ -232,6 +232,7 @@ void Form1::setSrlForms(void)
// ROMヘッダには関係ないが
// NANDアプリのときにバックアップメモリを自動的に「なし」にしておく
this->maskBackupMemoryForms();
// カードアプリのときにDSi Wareの販売カテゴリを自動的に「なし」にしておく
this->maskDLCategoryForms();
} // setSrlForms()
@ -357,7 +358,8 @@ System::Boolean Form1::checkSrlForms(void)
"ペアレンタルコントロール情報", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
"レーティング表示が不要であると指定されています。この指定は、ソフトがゲームでないツール類のときのみ選択可能です。レーティング表示が不要であるかどうかは弊社窓口にご相談ください。",
"Parental Control",
"In your selection, rating is unnecessary. This selection is available for only tool application which is not game. Please contact Nintendo for checking validation of this selection", true, true ) );
"In your selection, rating is unnecessary. This selection is available for only tool application which is not game. Please contact Nintendo for checking validation of this selection",
true, true ) );
}
else
{

View File

@ -69,6 +69,9 @@ System::Void Form1::saveTmp( System::String ^filename )
MasterEditorTWL::appendXmlTag( doc, form, "ReleaseDate", this->dateRelease->Value.ToString() );
MasterEditorTWL::appendXmlTag( doc, form, "SubmitDate", this->dateSubmit->Value.ToString() );
MasterEditorTWL::appendXmlTag( doc, form, "DLCategory", this->combDLCategory->SelectedIndex.ToString() );
MasterEditorTWL::appendXmlTag( doc, form, "DLCategoryOther", this->tboxDLCategoryOther->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Company1", this->tboxCompany1->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Depart1", this->tboxDepart1->Text );
MasterEditorTWL::appendXmlTag( doc, form, "Name1", this->tboxPerson1->Text );
@ -161,7 +164,7 @@ void Form1::loadTmp( System::String ^filename )
this->parseTmp( root, "/MasterEditorTWL/Form/ReleaseDate", this->dateRelease );
this->parseTmp( root, "/MasterEditorTWL/Form/SubmitDate", this->dateSubmit );
this->parseTmp( root, "/MasterEditorTWL/Form/Backup", this->combBackup );
this->combBackup->Enabled = true;
this->combBackup->Enabled = true; // あとでマスクする
this->tboxBackupOther->Enabled = false;
this->tboxBackupOther->Clear();
@ -171,6 +174,18 @@ void Form1::loadTmp( System::String ^filename )
this->tboxBackupOther->Enabled = true;
}
// DSi Ware
this->parseTmp( root, "/MasterEditorTWL/Form/DLCategory", this->combDLCategory );
this->combDLCategory->Enabled = true; // あとでマスクする
this->tboxDLCategoryOther->Enabled = false;
this->tboxDLCategoryOther->Clear();
if( this->combDLCategory->SelectedIndex == (this->combDLCategory->Items->Count - 1) )
{
this->parseTmp( root, "/MasterEditorTWL/Form/DLCategoryOther", this->tboxDLCategoryOther );
this->tboxDLCategoryOther->Enabled = true;
}
cli::array<System::Windows::Forms::RadioButton^> ^rbuts;
cli::array<System::String^> ^strs;

View File

@ -86,7 +86,7 @@ System::Boolean Form1::checkBoxIndex( System::Windows::Forms::ComboBox ^box, Sys
void Form1::setGridError( void )
{
this->gridError->Rows->Clear();
if( this->hSrl->hErrorList != nullptr )
if( this->hSrl->hErrorList != nullptr ) // ROM読み込み時に発見されたエラー
{
for each( RCMrcError ^err in this->hSrl->hErrorList )
{
@ -113,7 +113,7 @@ void Form1::setGridWarn( void )
void Form1::overloadGridError( void )
{
this->gridError->Rows->Clear();
if( this->hSrl->hErrorList != nullptr )
if( this->hSrl->hErrorList != nullptr ) // ROM読み込み時に発見されたエラー
{
for each( RCMrcError ^err in this->hSrl->hErrorList )
{
@ -124,7 +124,7 @@ void Form1::overloadGridError( void )
}
}
}
if( this->hErrorList != nullptr )
if( this->hErrorList != nullptr ) // 現在のフォーム入力から発見されたエラー
{
for each( RCMrcError ^err in this->hErrorList )
{

View File

@ -139,6 +139,11 @@ ECDeliverableResult RCDeliverable::writeSpreadsheet(
System::Xml::XmlNode ^node = list->Item(i);
if( (node->FirstChild != nullptr) && (node->FirstChild->Value != nullptr) )
{
// プログラムのバージョン
if( node->FirstChild->Value->Equals( "TagMasterEditorVersion" ) )
{
node->FirstChild->Value = this->hMasterEditorVersion;
}
// ñ<E28099>o<EFBFBD>î•ñ
if( node->FirstChild->Value->Equals( "TagProductName" ) )
{

View File

@ -104,6 +104,9 @@ namespace MasterEditorTWL
property System::Boolean IsUGC;
property System::Boolean IsPhotoEx;
// プログラムのバージョン
property System::String ^hMasterEditorVersion;
// constructor and destructor
public:

View File

@ -104,9 +104,11 @@ ECSrlResult RCSrl::readFromFile( System::String ^filename )
this->hErrorList = gcnew System::Collections::Generic::List<RCMrcError^>;
this->hWarnList = gcnew System::Collections::Generic::List<RCMrcError^>;
this->hParentalErrorList = gcnew System::Collections::Generic::List<RCMrcError^>;
this->hParentalWarnList = gcnew System::Collections::Generic::List<RCMrcError^>;
this->hErrorList->Clear();
this->hWarnList->Clear();
this->hParentalErrorList->Clear();
this->hParentalWarnList->Clear();
// ROMヘッダの値をROM固有情報フィールドに反映させる
(void)this->setRomInfo();
@ -368,6 +370,12 @@ bool RCSrl::setRegionInfo( u32 region )
"Region", "Illigal Region. Parental Control Information is ignored in reading.", true, true ) );
return false;
}
if( !this->IsAppUser && (region == METWL_MASK_REGION_ALL) )
{
this->hParentalWarnList->Add( gcnew RCMrcError(
"リージョン", 0x1b0, 0x1b3, "読み込み時のROMでは全リージョンが設定されています。仕向地別に設定する必要がないかご確認ください。",
"Region", "All Region is set in reading ROM. Please check necessity for setting each region individually.", true, true ) );
}
return true;
}
@ -407,6 +415,15 @@ void RCSrl::setUnnecessaryRatingInfo( u32 region )
"ペアレンタルコントロール情報", 0x1b0, 0x1b3, "レーティング表示が不要かどうかを判断できません。再設定してください。",
"Parental Control Info.", "Can't judge wheather rating display is unnecessary.", true, true ) );
}
else
{
this->hParentalWarnList->Add( gcnew RCMrcError(
"ペアレンタルコントロール情報", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
"読み込み時のROMにはレーティング表示が不要であると設定されています。この指定は、ソフトがゲームでないツール類のときのみ選択可能です。レーティング表示が不要であるかどうかは弊社窓口にご相談ください。",
"Parental Control",
"In the loaded ROM, rating is unnecessary. This selection is available for only tool application which is not game. Please contact Nintendo for checking validation of this selection",
true, true ) );
}
}
// -------------------------------------------------------------------
@ -458,6 +475,11 @@ void RCSrl::setOneRatingOrgInfo( int ogn )
if( age == 0 ) // 年齢が0のときは審査中とみなす
{
index = ages->Length; // 配列の最後の要素の次が「審査中」
this->hParentalWarnList->Add( gcnew RCMrcError(
"ペアレンタルコントロール情報", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE,
name + ": 読み込み時のROMには審査中であると指定されています。審査が決まりしだい、再提出してください。",
"Parental Control",
name + ": In the loaded ROM, no rating yet. Please submit again when rating is dicided.", true, true ) );
}
else
{
@ -902,9 +924,20 @@ ECSrlResult RCSrl::searchSDKVersion( FILE *fp )
{
case 1: str += ("PR " + patch.ToString() + revstr); break;
case 2: str += ("RC " + patch.ToString() + revstr); break;
case 3: str += ("RELEASE " + patch.ToString() + revstr); break;
//case 3: str += ("RELEASE " + patch.ToString() + revstr); break;
case 3:
if( patch > 0 )
{
str += ("RELEASE " + patch.ToString() + revstr);
}
else
{
str += ("RELEASE" + revstr);
}
break;
default: break;
}
// ARM9 static 内にあるか判定
u32 statbegin = this->pRomHeader->s.main_rom_offset;
u32 statend = this->pRomHeader->s.main_rom_offset + this->pRomHeader->s.main_size - 1;
System::Boolean isstat = ((statbegin <= offset) && (offset <= statend))?true:false;

View File

@ -487,7 +487,8 @@ namespace MasterEditorTWL
// MRC機能でチェックされたエラー情報のリスト
property System::Collections::Generic::List<RCMrcError^> ^hErrorList;
property System::Collections::Generic::List<RCMrcError^> ^hWarnList;
property System::Collections::Generic::List<RCMrcError^> ^hParentalErrorList; // ペアレンタルコントロールのチェックはsetと同時に行なう
property System::Collections::Generic::List<RCMrcError^> ^hParentalErrorList; // 読み込み時に発見されるペアレンタルコントロール情報のエラー
property System::Collections::Generic::List<RCMrcError^> ^hParentalWarnList;
// MRC追加項目
property RCMrcExternalCheckItems ^hMrcExternalCheckItems;

View File

@ -38,7 +38,8 @@ ECSrlResult RCSrl::mrc( FILE *fp )
{
return result;
}
this->hErrorList->AddRange( this->hParentalErrorList ); // ペアレンタルコントロールのリストは別につくっているので追加
this->hErrorList->AddRange( this->hParentalErrorList ); // ペアレンタルコントロールのリストは別につくっているので追加
this->hWarnList->AddRange( this->hParentalWarnList );
#endif
return ECSrlResult::NOERROR;
}

View File

@ -137,6 +137,11 @@ System::String^ MasterEditorTWL::transSizeToStringKB( const System::UInt32 size
// 第2引数で小数点の桁数を指定(それ以下の桁は切り上げ)
System::String^ MasterEditorTWL::transSizeToStringMB( const System::UInt32 size, const System::UInt32 decimals )
{
if( size == 0 )
{
return size.ToString();
}
System::UInt32 MB = 1024*1024;
System::UInt32 pow = 1;
System::UInt32 i;