diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb index 45e5366..75d139b 100644 Binary files a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb and b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb differ diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.suo b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.suo index babe7fd..4f19fab 100644 Binary files a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.suo and b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.suo differ diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm index 9d6b0ea..2251c40 100644 Binary files a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm and b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm differ diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form1.h b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form1.h index 871bd95..790d88f 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form1.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form1.h @@ -4540,13 +4540,13 @@ private: System::Windows::Forms::ToolStripMenuItem^ stripItemRomInfoList; // リージョン設定は複雑なので別に切り出す // --------------------------------------------------------------------- - // フォーム入力をSRLに反映させる + // GUIのコンボボックスからROMヘッダのリージョンコードを決定する void setRegionSrlPropaties(void); - // SRL情報をフォームに反映させる + // ROMヘッダのリージョンコードからGUIのコンボボックスの値を決定する void setRegionForms(void); - // フォーム入力が正しいか書き込み前チェック + // リージョンのフォームに問題がないかをチェックする void checkRegionForms(void); private: @@ -4554,39 +4554,40 @@ private: System::Windows::Forms::ToolStripMenuItem^ stripItemRomInfoList; // レーティング設定は複雑なので別に切り出す // --------------------------------------------------------------------- - // フォーム入力をSRLに反映させる + // ROMヘッダのレーティング情報からGUIのコンボボックスを設定する void setRatingSrlProperties(void); - // SRL情報をフォームに反映させる + // GUIのコンボボックスの選択をROMヘッダに反映させる void setRatingForms(void); - // リージョン情報からペアレンタルコントロールの編集可能団体をマスクする + // GUIで表示するレーティング団体をリージョンによって変える void maskRatingForms(void); - // フォーム入力が正しいか書き込み前チェック + // GUIのレーティング設定に問題がないかチェックする void checkRatingForms( System::Boolean inRegion, System::Windows::Forms::ComboBox ^comb, System::String ^ogn ); - // クリアする + // レーティングのコンボボックスをクリアする void clearRating( System::Windows::Forms::ComboBox ^comb ); - // 編集できるようにする + // レーティングのコンボボックスを編集可能な状態にする void enableRating( System::Windows::Forms::ComboBox ^comb, System::Windows::Forms::Label ^lab1, System::Windows::Forms::Label ^lab2 ); - // 編集できなくする + // レーティングのコンボボックスを編集不可状態にする void disableRating( System::Windows::Forms::ComboBox ^comb, System::Windows::Forms::Label ^lab1, System::Windows::Forms::Label ^lab2 ); - // 全団体を「レーティング表示不要」の設定/解除をする + // 「レーティング表示不要」が選択されたかどうかでコンボボックスの内容を変える + // ROM読み込み時および「レーティング表示不要」チェックボックスに変化があったときに呼び出される void changeUnnecessaryRatingForms( System::Boolean bInitial ); - // 「レーティング表示不要」と表示して編集できなくする + // レーティングのコンボボックスに「レーティング表示不要」と表示し編集不可状態にする void unnecessaryRating( System::Windows::Forms::ComboBox ^comb ); - // 「レーティング表示不要」表示を消して通常の設定に戻す + // レーティングのコンボボックスの「レーティング表示不要」の表示をクリアし編集可能状態にする void necessaryRating( System::Windows::Forms::ComboBox ^comb, System::Boolean bInitial ); // ---------------------------------------------- diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_deliv.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_deliv.cpp index 8c97dbc..bea535a 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_deliv.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_deliv.cpp @@ -225,10 +225,7 @@ void Form1::setDeliverableProperties(void) // WorldWide のときはリストで選択可能な文字列を登録 if( this->combRegion->SelectedIndex < 0 ) { - if( this->isJapanese() == true ) - this->hDeliv->hRegion = gcnew System::String("不明"); - else - this->hDeliv->hRegion = gcnew System::String("Undefined"); + this->hDeliv->hRegion = this->isJapanese()?METWL_STRING_UNDEFINED_REGION_J:METWL_STRING_UNDEFINED_REGION_E; // 起こり得ない } else { @@ -256,32 +253,49 @@ void Form1::setDeliverableProperties(void) System::String^ Form1::setDeliverableRatingOgnProperties( System::Windows::Forms::ComboBox ^box ) { System::String ^str; + + // 中国リージョン特別対応 + if( (this->combRegion->DropDownStyle == System::Windows::Forms::ComboBoxStyle::DropDown) // コンボボックスが中韓リージョン用になっているとき + && this->hSrl->IsRegionChina ) // SRLが読み込まれていることは保証される + { + if( this->cboxIsUnnecessaryRating->Checked ) + { + // レーティング表示不要が選択されているときには団体が中国リージョンに含まれていなくても「レーティング表示不要」となる + str = this->isJapanese()?METWL_STRING_UNNECESSARY_RATING_J:METWL_STRING_UNNECESSARY_RATING_E; + } + else + { + // 中国リージョンに含まれていなくても「全年齢」 + str = this->isJapanese()?METWL_STRING_CHINA_RATING_FREE_J:METWL_STRING_CHINA_RATING_FREE_E; + } + return str; + } + + // リージョンに含まれる団体のみレーティングが設定される それ以外は「不可」となる if( this->cboxIsUnnecessaryRating->Checked ) // レーティング表示不要が選択されているとき { if( box->FlatStyle == System::Windows::Forms::FlatStyle::Standard ) // リージョンに含まれているときの判定 { - str = System::String::Copy( box->Text ); // テキスト入力可になっているので取得できるはず + // リージョンに含まれている団体のみ「レーティング表示不要」とする + str = this->isJapanese()?METWL_STRING_UNNECESSARY_RATING_J:METWL_STRING_UNNECESSARY_RATING_E; } - else // リージョンに含まれていない(コンボボックスが表示されていない)ときには不可とする + else { - if( this->isJapanese() == true ) - str = gcnew System::String("不可"); - else - str = gcnew System::String("Undefined"); + // リージョンに含まれていない(コンボボックスが表示されていない)ときには「不可」とする + str = this->isJapanese()?METWL_STRING_UNDEFINED_RATING_J:METWL_STRING_UNDEFINED_RATING_E; } } else { if( box->SelectedIndex < 0 ) { - if( this->isJapanese() == true ) - str = gcnew System::String("不可"); - else - str = gcnew System::String("Undefined"); + // リージョンに含まれていない(コンボボックスが表示されていない)ときには「不可」とする + str = this->isJapanese()?METWL_STRING_UNDEFINED_RATING_J:METWL_STRING_UNDEFINED_RATING_E; } else { - str = dynamic_cast(box->SelectedItem); // リストで選択されているテキストを代入 + // リージョンに含まれている団体にはリストで選択されているテキストを代入 + str = dynamic_cast(box->SelectedItem); } } return str; diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_pctl.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_pctl.cpp index fa800d1..51e6f6b 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_pctl.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_pctl.cpp @@ -115,14 +115,14 @@ void Form1::setRegionForms(void) { this->combRegion->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDown; // 自由にテキストを入力できる this->combRegion->SelectedIndex = -1; // 設定の順序に注意: テキストの設定よりも前に入れておかないとテキスト入力が反映されないことがある - this->combRegion->Text = this->isJapanese()?"中国のみ":"China only"; + this->combRegion->Text = this->isJapanese()?METWL_STRING_CHINA_REGION_J:METWL_STRING_CHINA_REGION_E; this->combRegion->Enabled = false; // 編集不可 } else if( !isJapan && !isAmerica && !isEurope && !isAustralia && isKorea && !isChina ) // 韓国 { this->combRegion->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDown; this->combRegion->SelectedIndex = -1; - this->combRegion->Text = this->isJapanese()?"韓国のみ":"Korea only"; + this->combRegion->Text = this->isJapanese()?METWL_STRING_KOREA_REGION_J:METWL_STRING_KOREA_REGION_E; this->combRegion->Enabled = false; } else // WorldWide @@ -469,15 +469,7 @@ void Form1::unnecessaryRating( System::Windows::Forms::ComboBox ^comb ) { comb->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDown; // 自由なテキストを表示可能にする comb->SelectedIndex = -1; // 何も選択されていないとみなす - System::String ^msg; - if( this->isJapanese() ) - { - msg = gcnew System::String( "レーティング表示不要(全年齢)" ); - } - else - { - msg = gcnew System::String( "Rating Not Required (All ages)" ); - } + System::String ^msg = this->isJapanese()?METWL_STRING_UNNECESSARY_RATING_J:METWL_STRING_UNNECESSARY_RATING_E; comb->Text = msg; comb->Enabled = false; // 編集不可能にする } diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/common.h b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/common.h index d2435b4..291cfa0 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/common.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/common.h @@ -23,3 +23,17 @@ #define METWL_SEG3_CRC 0x0254 #define METWL_TAD_TMP_FILENAME "tmp.srl" // TAD読み込みの際に split_tad で一時的に作成するファイル名 #define METWL_SDK52_RELEASE ((5 << 24)|(2 << 16)|30000) // SDアクセス権の判定が必要なSDKバージョン (5.2 RELEASE) + +// 特別にGUI表示/提出確認書に記述する文字列 +#define METWL_STRING_UNNECESSARY_RATING_J ("レーティング表示不要(全年齢)") +#define METWL_STRING_UNNECESSARY_RATING_E ("Rating Not Required (All ages)") +#define METWL_STRING_UNDEFINED_RATING_J ("不可") +#define METWL_STRING_UNDEFINED_RATING_E ("Undefined") +#define METWL_STRING_UNDEFINED_REGION_J ("不明") // 起こり得ない +#define METWL_STRING_UNDEFINED_REGION_E ("Undefined") +#define METWL_STRING_CHINA_RATING_FREE_J ("全年齢(中国版対応)") +#define METWL_STRING_CHINA_RATING_FREE_E ("All ages (China version support)") +#define METWL_STRING_CHINA_REGION_J ("中国のみ") +#define METWL_STRING_CHINA_REGION_E ("China only") +#define METWL_STRING_KOREA_REGION_J ("韓国のみ") +#define METWL_STRING_KOREA_REGION_E ("Korea only") diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp index d2c871d..77fc58f 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp @@ -392,7 +392,7 @@ bool RCSrl::setRegionInfo( u32 region ) this->IsRegionChina = ((region & METWL_MASK_REGION_CHINA) != 0)?true:false; // リージョンに含まれる団体がなかったらリージョンは不正 - if( MasterEditorTWL::getOgnListInRegion( region ) == nullptr ) + if( (MasterEditorTWL::getOgnListInRegion( region ) == nullptr) && (region != METWL_MASK_REGION_CHINA) ) // 中国は例外 { this->hParentalErrorList->Add( this->makeMrcError("IllegalRegion") ); return false; @@ -409,12 +409,6 @@ bool RCSrl::setRegionInfo( u32 region ) // ---------------------------------------------------------------------- void RCSrl::setUnnecessaryRatingInfo( u32 region ) { - System::Collections::Generic::List ^ognlist = MasterEditorTWL::getOgnListInRegion( region ); - if( ognlist == nullptr ) // リストがnullptrなら不正 - { - return; - } - // ROMヘッダのフラグを調べる this->IsUnnecessaryRating = (this->pRomHeader->s.unnecessary_rating_display != 0)?true:false; if( !this->IsUnnecessaryRating ) @@ -422,6 +416,13 @@ void RCSrl::setUnnecessaryRatingInfo( u32 region ) return; // 不要でないならこれ以降のチェックは必要ない(レーティング情報の取得に移る) } + // リージョンに含まれるレーティング団体を取得 + System::Collections::Generic::List ^ognlist = MasterEditorTWL::getOgnListInRegion( region ); + if( ognlist == nullptr ) + { + return; + } + // リージョンに含まれる団体のレーティング情報に余計なデータが登録されていないかチェック bool noerror = false; for each( int ogn in ognlist ) @@ -577,6 +578,7 @@ void RCSrl::setRatingRomHeader( u32 region ) this->pRomHeader->s.unnecessary_rating_display = (this->IsUnnecessaryRating == true)?1:0; // 中国リージョンおよびオールリージョンのとき予約領域もすべて「全年齢」(0x80)で埋めておく + // 「レーティング表示不要」かどうかにかかわらず埋める if( this->IsRegionChina ) // オールリージョンのときも中国ビットは立つ { for( j=0; j < PARENTAL_CONTROL_INFO_SIZE; j++ )