diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL.ncb b/build/tools/MasterEditorTWL/MasterEditorTWL.ncb index cb770214..28258204 100644 Binary files a/build/tools/MasterEditorTWL/MasterEditorTWL.ncb and b/build/tools/MasterEditorTWL/MasterEditorTWL.ncb differ diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL.suo b/build/tools/MasterEditorTWL/MasterEditorTWL.suo index eb63a160..91abf251 100644 Binary files a/build/tools/MasterEditorTWL/MasterEditorTWL.suo and b/build/tools/MasterEditorTWL/MasterEditorTWL.suo differ diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm b/build/tools/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm index 6005df44..5de6d85d 100644 Binary files a/build/tools/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm and b/build/tools/MasterEditorTWL/MasterEditorTWL/Debug/BuildLog.htm differ diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/Form1.h b/build/tools/MasterEditorTWL/MasterEditorTWL/Form1.h index b003654d..ec8c2b64 100644 --- a/build/tools/MasterEditorTWL/MasterEditorTWL/Form1.h +++ b/build/tools/MasterEditorTWL/MasterEditorTWL/Form1.h @@ -1483,6 +1483,7 @@ private: System::Windows::Forms::Label^ labCautionCheck; this->combRegion->Name = L"combRegion"; this->combRegion->Size = System::Drawing::Size(216, 20); this->combRegion->TabIndex = 36; + this->combRegion->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::combRegion_SelectedIndexChanged); // // cboxIsWiFiIcon // @@ -4695,6 +4696,101 @@ private: System::Windows::Forms::Label^ labCautionCheck; this->tboxBackupOther->Clear(); } } + private: + // ペアレンタルコントロール情報をクリアする + void clearParental( System::Windows::Forms::ComboBox ^comb, + System::Windows::Forms::CheckBox ^enable, + System::Windows::Forms::CheckBox ^rp ) + { + comb->SelectedIndex = comb->Items->Count - 1; // 「未審査」にする + enable->Checked = false; + rp->Checked = false; + } + private: + // ペアレンタルコントロール情報を編集できるようにする + void enableParental( System::Windows::Forms::ComboBox ^comb, + System::Windows::Forms::CheckBox ^enable, + System::Windows::Forms::CheckBox ^rp ) + { + comb->Enabled = true; + enable->Enabled = true; + rp->Enabled = true; + } + // ペアレンタルコントロール情報を編集できなくする + void disableParental( System::Windows::Forms::ComboBox ^comb, + System::Windows::Forms::CheckBox ^enable, + System::Windows::Forms::CheckBox ^rp ) + { + this->clearParental( comb, enable, rp ); + comb->Enabled = false; + enable->Enabled = false; + rp->Enabled = false; + } + private: + System::Void combRegion_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) + { + switch( this->combRegion->SelectedIndex ) + { + case 0: + // 日本 + this->enableParental( this->combCERO, this->cboxCERO, this->cboxAlwaysCERO ); + + this->disableParental( this->combESRB, this->cboxESRB, this->cboxAlwaysESRB ); + this->disableParental( this->combUSK, this->cboxUSK, this->cboxAlwaysUSK ); + this->disableParental( this->combPEGI, this->cboxPEGI, this->cboxAlwaysPEGI ); + this->disableParental( this->combPEGIPRT, this->cboxPEGIPRT, this->cboxAlwaysPEGIPRT ); + this->disableParental( this->combPEGIBBFC, this->cboxPEGIBBFC, this->cboxAlwaysPEGIBBFC ); + this->disableParental( this->combOFLC, this->cboxOFLC, this->cboxAlwaysOFLC ); + break; + + case 1: + // 米国 + this->disableParental( this->combCERO, this->cboxCERO, this->cboxAlwaysCERO ); + this->enableParental( this->combESRB, this->cboxESRB, this->cboxAlwaysESRB ); + this->disableParental( this->combUSK, this->cboxUSK, this->cboxAlwaysUSK ); + this->disableParental( this->combPEGI, this->cboxPEGI, this->cboxAlwaysPEGI ); + this->disableParental( this->combPEGIPRT, this->cboxPEGIPRT, this->cboxAlwaysPEGIPRT ); + this->disableParental( this->combPEGIBBFC, this->cboxPEGIBBFC, this->cboxAlwaysPEGIBBFC ); + this->disableParental( this->combOFLC, this->cboxOFLC, this->cboxAlwaysOFLC ); + break; + + case 2: + // 欧州 + this->disableParental( this->combCERO, this->cboxCERO, this->cboxAlwaysCERO ); + this->disableParental( this->combESRB, this->cboxESRB, this->cboxAlwaysESRB ); + this->enableParental( this->combUSK, this->cboxUSK, this->cboxAlwaysUSK ); + this->enableParental( this->combPEGI, this->cboxPEGI, this->cboxAlwaysPEGI ); + this->enableParental( this->combPEGIPRT, this->cboxPEGIPRT, this->cboxAlwaysPEGIPRT ); + this->enableParental( this->combPEGIBBFC, this->cboxPEGIBBFC, this->cboxAlwaysPEGIBBFC ); + this->disableParental( this->combOFLC, this->cboxOFLC, this->cboxAlwaysOFLC ); + break; + + case 3: + // 豪州 + this->disableParental( this->combCERO, this->cboxCERO, this->cboxAlwaysCERO ); + this->disableParental( this->combESRB, this->cboxESRB, this->cboxAlwaysESRB ); + this->disableParental( this->combUSK, this->cboxUSK, this->cboxAlwaysUSK ); + this->disableParental( this->combPEGI, this->cboxPEGI, this->cboxAlwaysPEGI ); + this->disableParental( this->combPEGIPRT, this->cboxPEGIPRT, this->cboxAlwaysPEGIPRT ); + this->disableParental( this->combPEGIBBFC, this->cboxPEGIBBFC, this->cboxAlwaysPEGIBBFC ); + this->enableParental( this->combOFLC, this->cboxOFLC, this->cboxAlwaysOFLC ); + break; + + case 4: + // 欧州と豪州 + this->disableParental( this->combCERO, this->cboxCERO, this->cboxAlwaysCERO ); + this->disableParental( this->combESRB, this->cboxESRB, this->cboxAlwaysESRB ); + this->enableParental( this->combUSK, this->cboxUSK, this->cboxAlwaysUSK ); + this->enableParental( this->combPEGI, this->cboxPEGI, this->cboxAlwaysPEGI ); + this->enableParental( this->combPEGIPRT, this->cboxPEGIPRT, this->cboxAlwaysPEGIPRT ); + this->enableParental( this->combPEGIBBFC, this->cboxPEGIBBFC, this->cboxAlwaysPEGIBBFC ); + this->enableParental( this->combOFLC, this->cboxOFLC, this->cboxAlwaysOFLC ); + break; + + default: + break; + } + } private: // 日本語版への切り替え @@ -4728,8 +4824,6 @@ private: System::Windows::Forms::Label^ labCautionCheck; } } - - }; // enf of ref class Form1 } // end of namespace MasterEditorTWL diff --git a/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp b/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp index 82ee9e99..50992a4f 100644 --- a/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp +++ b/build/tools/MasterEditorTWL/MasterEditorTWL/srl.cpp @@ -306,6 +306,22 @@ ECSrlResult RCSrl::setRomHeader(void) this->pRomHeader->s.exFlags.WiFiConnectionIcon = (*(this->hIsWiFiIcon) == true)?1:0; this->pRomHeader->s.exFlags.DSWirelessIcon = (*(this->hIsWirelessIcon) == true)?1:0; + // レーティング + const u32 maskJapan = 0x00000001; + const u32 maskAmerica = 0x00000002; + const u32 maskEurope = 0x00000004; + const u32 maskAustralia = 0x00000008; + //const u32 maskChina = 0x00000010; + //const u32 maskKorea = 0x00000020; + u32 map = 0; + if( *(this->hIsRegionJapan) == true ) { map |= maskJapan; } + if( *(this->hIsRegionAmerica) == true ) { map |= maskAmerica; } + if( *(this->hIsRegionEurope) == true ) { map |= maskEurope; } + if( *(this->hIsRegionAustralia) == true ){ map |= maskAustralia; } + //if( *(this->hIsRegionChina) == true ) { map |= maskChina; } + //if( *(this->hIsRegionKorea) == true ) { map |= maskKorea; } + this->pRomHeader->s.card_region_bitmap = map; + // ペアレンタルコントロール for( i=0; i < PARENTAL_CONTROL_INFO_SIZE; i++ ) {