diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb index 399f19d..dc771d8 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 9aad6b6..5151cb9 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 beebc37..ddc1c81 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 5d460c7..f5583fa 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form1.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form1.h @@ -5038,6 +5038,9 @@ private: System::Windows::Forms::TextBox^ tboxPurposeInError; RCMrcError^ makeErrorMsg( System::Boolean isAffectRom, System::String ^labeltag, System::String ^msgtag, ... cli::array ^args ); + // 用途のラジオボタンの状態によって表示するかどうかを振り分ける + bool isDisplayOneGridErrorForPurpose( RCMrcError ^err ); + // 読み込み時エラーの登録 void setGridError( void ); void setGridWarn( void ); diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_lang.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_lang.cpp index d02ae4e..572c5b6 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_lang.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_lang.cpp @@ -46,6 +46,11 @@ void Form1::changeFormInput( System::String ^langname ) this->tboxNTSC1->Enabled = true; this->tboxFurigana2->Enabled = true; this->tboxNTSC2->Enabled = true; + this->tboxFurigana1->Visible = true; + this->tboxNTSC1->Visible = true; + this->tboxFurigana2->Visible = true; + this->tboxNTSC2->Visible = true; + this->labFurigana1->Visible = true; this->labNTSC1Pre->Visible = true; this->labNTSC1Sur->Visible = true; @@ -70,6 +75,15 @@ void Form1::changeFormInput( System::String ^langname ) this->tboxNTSC1->Enabled = false; this->tboxFurigana2->Enabled = false; this->tboxNTSC2->Enabled = false; + this->tboxFurigana1->Visible = false; + this->tboxNTSC1->Visible = false; + this->tboxFurigana2->Visible = false; + this->tboxNTSC2->Visible = false; + this->tboxFurigana1->Clear(); + this->tboxNTSC1->Clear(); + this->tboxFurigana2->Clear(); + this->tboxNTSC2->Clear(); + this->labFurigana1->Visible = false; this->labNTSC1Pre->Visible = false; this->labNTSC1Sur->Visible = false; diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_util.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_util.cpp index 485251a..2b31819 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_util.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form_util.cpp @@ -31,7 +31,7 @@ System::Boolean Form1::checkTextForm( System::String ^formtext, System::String ^ System::String ^labelE = this->hMsg->getMessage(tag,"E"); System::String ^msgJ = this->hMsg->getMessage("TextBoxInput", "J"); System::String ^msgE = this->hMsg->getMessage("TextBoxInput", "E"); - this->hErrorList->Add( gcnew RCMrcError( labelJ, 0, 0, msgJ, labelE, msgE, true, false ) ); + this->hErrorList->Add( gcnew RCMrcError( labelJ, 0, 0, msgJ, labelE, msgE, true, false, RCMrcError::PurposeType::Common ) ); return false; } return true; @@ -45,7 +45,7 @@ System::Boolean Form1::checkNumRange( System::Int32 val, System::Int32 min, Syst System::String ^labelE = this->hMsg->getMessage(tag,"E"); System::String ^msgJ = this->hMsg->getMessage("NumRangeInput", "J"); System::String ^msgE = this->hMsg->getMessage("NumRangeInput", "E"); - this->hErrorList->Add( gcnew RCMrcError( labelJ, 0, 0, msgJ, labelE, msgE, true, false ) ); + this->hErrorList->Add( gcnew RCMrcError( labelJ, 0, 0, msgJ, labelE, msgE, true, false, RCMrcError::PurposeType::Common ) ); return false; } return true; @@ -73,7 +73,7 @@ System::Boolean Form1::checkComboBoxIndex( System::Windows::Forms::ComboBox ^box System::String ^msgJ = this->hMsg->getMessage("ComboBoxInput", "J"); System::String ^msgE = this->hMsg->getMessage("ComboBoxInput", "E"); this->hErrorList->Add( gcnew RCMrcError( - labelJ, 0, 0, msgJ, labelE, msgE, true, isAffectRom ) ); + labelJ, 0, 0, msgJ, labelE, msgE, true, isAffectRom, RCMrcError::PurposeType::Common ) ); } return true; } @@ -95,9 +95,42 @@ RCMrcError^ Form1::makeErrorMsg( System::Boolean isAffectRom, System::String ^la System::String ^fmtE = this->hMsg->getMessage( msgtag, "E" ); System::String ^msgE = System::String::Format( fmtE, args ); - return (gcnew RCMrcError( nameJ, 0, 0, msgJ, nameE, msgE, true, isAffectRom )); + return (gcnew RCMrcError( nameJ, 0, 0, msgJ, nameE, msgE, true, isAffectRom, RCMrcError::PurposeType::Common )); // 修正可能なエラーとして作成 } +// 用途のラジオボタンの状態によって表示するかどうかを振り分ける +bool Form1::isDisplayOneGridErrorForPurpose( RCMrcError ^err ) +{ + bool is_display = false; + + if( ((err->Purpose & RCMrcError::PurposeType::Production) != (RCMrcError::PurposeType)0) && + (this->rPurposeCardProduction->Checked || this->rPurposeDSiWare->Checked || this->rPurposeOther->Checked) ) + { + is_display = true; + } + if( ((err->Purpose & RCMrcError::PurposeType::CardDistribution) != (RCMrcError::PurposeType)0) && + this->rPurposeCardDistribution->Checked ) + { + is_display = true; + } + if( ((err->Purpose & RCMrcError::PurposeType::CardKiosk) != (RCMrcError::PurposeType)0) && + this->rPurposeCardKiosk->Checked ) + { + is_display = true; + } + if( ((err->Purpose & RCMrcError::PurposeType::DSStation) != (RCMrcError::PurposeType)0) && + this->rPurposeDSStation->Checked ) + { + is_display = true; + } + if( ((err->Purpose & RCMrcError::PurposeType::Zone) != (RCMrcError::PurposeType)0) && + this->rPurposeZone->Checked ) + { + is_display = true; + } + return is_display; +} //isDisplayOneGridErrorForPurpose() + // 読み込み時エラーの登録 void Form1::setGridError( void ) { @@ -106,8 +139,11 @@ void Form1::setGridError( void ) { for each( RCMrcError ^err in this->hSrl->hErrorList ) { - this->gridError->Rows->Add( err->getAll(this->isJapanese()) ); - this->colorGridError( err ); + if( this->isDisplayOneGridErrorForPurpose( err ) ) + { + this->gridError->Rows->Add( err->getAll(this->isJapanese()) ); + this->colorGridError( err ); + } } } } @@ -119,8 +155,11 @@ void Form1::setGridWarn( void ) { for each( RCMrcError ^err in this->hSrl->hWarnList ) { - this->gridWarn->Rows->Add( err->getAll(this->isJapanese()) ); - this->colorGridWarn( err ); + if( this->isDisplayOneGridErrorForPurpose( err ) ) + { + this->gridWarn->Rows->Add( err->getAll(this->isJapanese()) ); + this->colorGridWarn( err ); + } } } } @@ -135,8 +174,11 @@ void Form1::overloadGridError( void ) { if( !err->IsEnableModify ) // 修正可能な情報は表示しない { - this->gridError->Rows->Add( err->getAll(this->isJapanese()) ); - this->colorGridError( err ); + if( this->isDisplayOneGridErrorForPurpose( err ) ) + { + this->gridError->Rows->Add( err->getAll(this->isJapanese()) ); + this->colorGridError( err ); + } } } } @@ -144,8 +186,11 @@ void Form1::overloadGridError( void ) { for each( RCMrcError ^err in this->hErrorList ) { - this->gridError->Rows->Add( err->getAll(this->isJapanese()) ); - this->colorGridError( err ); + if( this->isDisplayOneGridErrorForPurpose( err ) ) + { + this->gridError->Rows->Add( err->getAll(this->isJapanese()) ); + this->colorGridError( err ); + } } } } @@ -158,8 +203,11 @@ void Form1::overloadGridWarn( void ) { if( !err->IsEnableModify ) { - this->gridWarn->Rows->Add( err->getAll(this->isJapanese()) ); - this->colorGridWarn( err ); + if( this->isDisplayOneGridErrorForPurpose( err ) ) + { + this->gridWarn->Rows->Add( err->getAll(this->isJapanese()) ); + this->colorGridWarn( err ); + } } } } @@ -167,8 +215,11 @@ void Form1::overloadGridWarn( void ) { for each( RCMrcError ^err in this->hWarnList ) { - this->gridWarn->Rows->Add( err->getAll(this->isJapanese()) ); - this->colorGridWarn( err ); + if( this->isDisplayOneGridErrorForPurpose( err ) ) + { + this->gridWarn->Rows->Add( err->getAll(this->isJapanese()) ); + this->colorGridWarn( err ); + } } } } diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp index bab5031..de55dc8 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp @@ -1033,15 +1033,16 @@ void RCSrl::calcNandUsedSize(FILE *fp) // ------------------------------------------------------------------- RCMrcError^ RCSrl::makeMrcError( System::String ^tag, ... cli::array ^args ) { - // パラメータも取得(日本語版から) + // パラメータも取得(パラメータは英語版にも日本語版にも登録されておりどちらでもよいが日本語版のものにしておく) System::UInt32 beg = System::UInt32::Parse( this->hMrcMsg->getMessage( tag+"/begin", "J" ), System::Globalization::NumberStyles::HexNumber ); System::UInt32 end = System::UInt32::Parse( this->hMrcMsg->getMessage( tag+"/end", "J" ), System::Globalization::NumberStyles::HexNumber ); System::Boolean isEnableModify = System::Boolean::Parse( this->hMrcMsg->getMessage( tag+"/modify", "J" ) ); System::Boolean isAffectRom = System::Boolean::Parse( this->hMrcMsg->getMessage( tag+"/affect", "J" ) ); - return (this->makeMrcError( beg, end, isEnableModify, isAffectRom, tag, args )); + return (this->makeMrcError( beg, end, isEnableModify, isAffectRom, RCMrcError::PurposeType::Common, tag, args )); // 共通エラー } RCMrcError^ RCSrl::makeMrcError( System::UInt32 beg, System::UInt32 end, System::Boolean isEnableModify, System::Boolean isAffectRom, + RCMrcError::PurposeType purpose, System::String ^tag, ... cli::array ^args ) { // 外部ファイルから項目名を取得 @@ -1053,5 +1054,5 @@ RCMrcError^ RCSrl::makeMrcError( System::UInt32 beg, System::UInt32 end, System: System::String ^fmtE = this->hMrcMsg->getMessage( tag+"/sentence", "E" ); System::String ^msgE = System::String::Format( fmtE, args ); - return (gcnew RCMrcError( nameJ, beg, end, msgJ, nameE, msgE, isEnableModify, isAffectRom )); + return (gcnew RCMrcError( nameJ, beg, end, msgJ, nameE, msgE, isEnableModify, isAffectRom, purpose )); } diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h index 2787cc2..60f2690 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.h @@ -191,6 +191,7 @@ namespace MasterEditorTWL // MRCメッセージを追加 RCMrcError^ makeMrcError( System::String ^tag, ... cli::array ^args ); RCMrcError^ makeMrcError( System::UInt32 beg, System::UInt32 end, System::Boolean isEnableModify, System::Boolean isAffectRom, + RCMrcError::PurposeType purpose, System::String ^tag, ... cli::array ^args ); }; // end of ref class RCSrl diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_element.h b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_element.h index c6c2f8c..8f3e494 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_element.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_element.h @@ -266,6 +266,17 @@ namespace MasterEditorTWL // ------------------------------------------------------------------- public ref class RCMrcError { + public: + enum class PurposeType : System::UInt32 // 型指定 + { + Production = 1 << 0, // 一般販売用(カード/NAND) + CardDistribution = 1 << 1, // データ配信用カード + CardKiosk = 1 << 2, // 店頭試遊台(単独型) + DSStation = 1 << 3, // DS Station + Zone = 1 << 4, // Nintendo Zone + + Common = 0xFFFFFFFF, // すべての用途で共通のエラー + }; private: System::String ^hName; // 項目名 System::UInt32 begin; // 開始アドレス @@ -275,12 +286,13 @@ namespace MasterEditorTWL System::String ^hMsgE; System::Boolean isEnableModify; // マスタエディタで修正可能かどうか System::Boolean isAffectRom; // 変更するとSRL(ROMバイナリ)が変更されるか + PurposeType purpose; private: RCMrcError(){} // 封じる public: RCMrcError( // この形式でしかインスタンスを作成できない System::String ^name, System::UInt32 beg, System::UInt32 end, System::String ^msg, - System::String ^nameE, System::String ^msgE, System::Boolean isEnableModify, System::Boolean isAffectRom ) + System::String ^nameE, System::String ^msgE, System::Boolean isEnableModify, System::Boolean isAffectRom, PurposeType purpose ) { if( name == nullptr ) this->hName = gcnew System::String(""); @@ -307,6 +319,8 @@ namespace MasterEditorTWL this->isEnableModify = isEnableModify; this->isAffectRom = isAffectRom; + + this->purpose = purpose; } public: property System::Boolean IsEnableModify @@ -341,6 +355,10 @@ namespace MasterEditorTWL { System::UInt32 get(){ return this->end; } } + property PurposeType Purpose + { + PurposeType get(){ return this->purpose; } + } public: // gridViewの表示形式にあわせる cli::array^ getAll( System::Boolean isJapanese ) diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp index bb7ab04..f33d12a 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl_mrc.cpp @@ -905,7 +905,7 @@ void RCSrl::mrcReservedArea(FILE *fp) } if( !bReserved ) { - this->hErrorList->Add( this->makeMrcError(begin, end, false, true, "ReservedArea") ); + this->hErrorList->Add( this->makeMrcError(begin, end, false, true, RCMrcError::PurposeType::Common, "ReservedArea") ); } } //for each }