mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
マスタエディタ:エラーを折り返して表示。提出所のみを作成するメニュー追加。EULAのバージョンチェックをなくす。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2522 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
f45176d343
commit
b03d234797
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -532,14 +532,14 @@ private: System::Windows::Forms::Label^ labMultiForeign2;
|
|||||||
private: System::Windows::Forms::DataGridView^ gridLibrary;
|
private: System::Windows::Forms::DataGridView^ gridLibrary;
|
||||||
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colLibPublisher;
|
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colLibPublisher;
|
||||||
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colLibName;
|
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colLibName;
|
||||||
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnName;
|
|
||||||
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnBegin;
|
|
||||||
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnEnd;
|
|
||||||
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
|
||||||
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colErrorName;
|
|
||||||
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colErrorBegin;
|
|
||||||
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colErrorEnd;
|
|
||||||
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colErrorCause;
|
|
||||||
private: System::Windows::Forms::Label^ labAssemblyVersion;
|
private: System::Windows::Forms::Label^ labAssemblyVersion;
|
||||||
private: System::Windows::Forms::Label^ labArbit4;
|
private: System::Windows::Forms::Label^ labArbit4;
|
||||||
private: System::Windows::Forms::Label^ labArbit3;
|
private: System::Windows::Forms::Label^ labArbit3;
|
||||||
@ -560,6 +560,26 @@ private: System::Windows::Forms::RadioButton^ rIsWiFiIcon;
|
|||||||
|
|
||||||
private: System::Windows::Forms::RadioButton^ rIsWirelessIcon;
|
private: System::Windows::Forms::RadioButton^ rIsWirelessIcon;
|
||||||
private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
||||||
|
private: System::Windows::Forms::ToolStripMenuItem^ stripItemSheetOnly;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnName;
|
||||||
|
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnBegin;
|
||||||
|
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnEnd;
|
||||||
|
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colWarnCause;
|
||||||
|
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colErrorName;
|
||||||
|
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colErrorBegin;
|
||||||
|
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colErrorEnd;
|
||||||
|
private: System::Windows::Forms::DataGridViewTextBoxColumn^ colErrorCause;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -715,7 +735,9 @@ private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void InitializeComponent(void)
|
void InitializeComponent(void)
|
||||||
{
|
{
|
||||||
|
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle1 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
|
||||||
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle2 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
|
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle2 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
|
||||||
|
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle3 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
|
||||||
this->tboxFile = (gcnew System::Windows::Forms::TextBox());
|
this->tboxFile = (gcnew System::Windows::Forms::TextBox());
|
||||||
this->gboxSrl = (gcnew System::Windows::Forms::GroupBox());
|
this->gboxSrl = (gcnew System::Windows::Forms::GroupBox());
|
||||||
this->tboxRemasterVer = (gcnew System::Windows::Forms::TextBox());
|
this->tboxRemasterVer = (gcnew System::Windows::Forms::TextBox());
|
||||||
@ -901,6 +923,7 @@ private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
|||||||
this->stripMaster = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->stripMaster = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
||||||
this->stripItemSheet = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->stripItemSheet = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
||||||
this->stripItemMasterRom = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->stripItemMasterRom = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
||||||
|
this->stripItemSheetOnly = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
||||||
this->stripLang = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->stripLang = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
||||||
this->stripItemEnglish = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->stripItemEnglish = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
||||||
this->stripItemJapanese = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
this->stripItemJapanese = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
||||||
@ -2761,8 +2784,8 @@ private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
|||||||
//
|
//
|
||||||
// stripMaster
|
// stripMaster
|
||||||
//
|
//
|
||||||
this->stripMaster->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->stripItemSheet,
|
this->stripMaster->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(3) {this->stripItemSheet,
|
||||||
this->stripItemMasterRom});
|
this->stripItemMasterRom, this->stripItemSheetOnly});
|
||||||
this->stripMaster->Name = L"stripMaster";
|
this->stripMaster->Name = L"stripMaster";
|
||||||
this->stripMaster->Size = System::Drawing::Size(53, 20);
|
this->stripMaster->Size = System::Drawing::Size(53, 20);
|
||||||
this->stripMaster->Text = L"マスター";
|
this->stripMaster->Text = L"マスター";
|
||||||
@ -2781,6 +2804,13 @@ private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
|||||||
this->stripItemMasterRom->Text = L"マスターROMのみを作成";
|
this->stripItemMasterRom->Text = L"マスターROMのみを作成";
|
||||||
this->stripItemMasterRom->Click += gcnew System::EventHandler(this, &Form1::stripItemMasterRom_Click);
|
this->stripItemMasterRom->Click += gcnew System::EventHandler(this, &Form1::stripItemMasterRom_Click);
|
||||||
//
|
//
|
||||||
|
// stripItemSheetOnly
|
||||||
|
//
|
||||||
|
this->stripItemSheetOnly->Name = L"stripItemSheetOnly";
|
||||||
|
this->stripItemSheetOnly->Size = System::Drawing::Size(232, 22);
|
||||||
|
this->stripItemSheetOnly->Text = L"提出確認書のみを作成";
|
||||||
|
this->stripItemSheetOnly->Click += gcnew System::EventHandler(this, &Form1::stripItemSheetOnly_Click);
|
||||||
|
//
|
||||||
// stripLang
|
// stripLang
|
||||||
//
|
//
|
||||||
this->stripLang->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->stripItemEnglish,
|
this->stripLang->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->stripItemEnglish,
|
||||||
@ -3223,10 +3253,20 @@ private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
|||||||
//
|
//
|
||||||
// gridWarn
|
// gridWarn
|
||||||
//
|
//
|
||||||
|
this->gridWarn->AutoSizeRowsMode = System::Windows::Forms::DataGridViewAutoSizeRowsMode::AllCellsExceptHeaders;
|
||||||
this->gridWarn->BackgroundColor = System::Drawing::SystemColors::Control;
|
this->gridWarn->BackgroundColor = System::Drawing::SystemColors::Control;
|
||||||
this->gridWarn->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
|
this->gridWarn->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
|
||||||
this->gridWarn->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(4) {this->colWarnName,
|
this->gridWarn->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(4) {this->colWarnName,
|
||||||
this->colWarnBegin, this->colWarnEnd, this->colWarnCause});
|
this->colWarnBegin, this->colWarnEnd, this->colWarnCause});
|
||||||
|
dataGridViewCellStyle1->Alignment = System::Windows::Forms::DataGridViewContentAlignment::MiddleLeft;
|
||||||
|
dataGridViewCellStyle1->BackColor = System::Drawing::SystemColors::Window;
|
||||||
|
dataGridViewCellStyle1->Font = (gcnew System::Drawing::Font(L"MS UI Gothic", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
|
||||||
|
static_cast<System::Byte>(128)));
|
||||||
|
dataGridViewCellStyle1->ForeColor = System::Drawing::SystemColors::ControlText;
|
||||||
|
dataGridViewCellStyle1->SelectionBackColor = System::Drawing::SystemColors::Highlight;
|
||||||
|
dataGridViewCellStyle1->SelectionForeColor = System::Drawing::SystemColors::HighlightText;
|
||||||
|
dataGridViewCellStyle1->WrapMode = System::Windows::Forms::DataGridViewTriState::True;
|
||||||
|
this->gridWarn->DefaultCellStyle = dataGridViewCellStyle1;
|
||||||
this->gridWarn->GridColor = System::Drawing::SystemColors::Control;
|
this->gridWarn->GridColor = System::Drawing::SystemColors::Control;
|
||||||
this->gridWarn->Location = System::Drawing::Point(24, 228);
|
this->gridWarn->Location = System::Drawing::Point(24, 228);
|
||||||
this->gridWarn->Name = L"gridWarn";
|
this->gridWarn->Name = L"gridWarn";
|
||||||
@ -3268,10 +3308,20 @@ private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
|||||||
//
|
//
|
||||||
dataGridViewCellStyle2->BackColor = System::Drawing::Color::White;
|
dataGridViewCellStyle2->BackColor = System::Drawing::Color::White;
|
||||||
this->gridError->AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2;
|
this->gridError->AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2;
|
||||||
|
this->gridError->AutoSizeRowsMode = System::Windows::Forms::DataGridViewAutoSizeRowsMode::AllCellsExceptHeaders;
|
||||||
this->gridError->BackgroundColor = System::Drawing::SystemColors::Control;
|
this->gridError->BackgroundColor = System::Drawing::SystemColors::Control;
|
||||||
this->gridError->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
|
this->gridError->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
|
||||||
this->gridError->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(4) {this->colErrorName,
|
this->gridError->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(4) {this->colErrorName,
|
||||||
this->colErrorBegin, this->colErrorEnd, this->colErrorCause});
|
this->colErrorBegin, this->colErrorEnd, this->colErrorCause});
|
||||||
|
dataGridViewCellStyle3->Alignment = System::Windows::Forms::DataGridViewContentAlignment::MiddleLeft;
|
||||||
|
dataGridViewCellStyle3->BackColor = System::Drawing::SystemColors::Window;
|
||||||
|
dataGridViewCellStyle3->Font = (gcnew System::Drawing::Font(L"MS UI Gothic", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
|
||||||
|
static_cast<System::Byte>(128)));
|
||||||
|
dataGridViewCellStyle3->ForeColor = System::Drawing::SystemColors::ControlText;
|
||||||
|
dataGridViewCellStyle3->SelectionBackColor = System::Drawing::SystemColors::Highlight;
|
||||||
|
dataGridViewCellStyle3->SelectionForeColor = System::Drawing::SystemColors::HighlightText;
|
||||||
|
dataGridViewCellStyle3->WrapMode = System::Windows::Forms::DataGridViewTriState::True;
|
||||||
|
this->gridError->DefaultCellStyle = dataGridViewCellStyle3;
|
||||||
this->gridError->GridColor = System::Drawing::SystemColors::Control;
|
this->gridError->GridColor = System::Drawing::SystemColors::Control;
|
||||||
this->gridError->Location = System::Drawing::Point(24, 99);
|
this->gridError->Location = System::Drawing::Point(24, 99);
|
||||||
this->gridError->Name = L"gridError";
|
this->gridError->Name = L"gridError";
|
||||||
@ -3414,9 +3464,12 @@ private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
|||||||
// SRLのオープン
|
// SRLのオープン
|
||||||
System::Void loadSrl( System::String ^filename );
|
System::Void loadSrl( System::String ^filename );
|
||||||
|
|
||||||
// SRLの保存
|
// SRLの保存と再読み出し
|
||||||
System::Void saveSrl( System::String ^filename );
|
System::Void saveSrl( System::String ^filename );
|
||||||
|
|
||||||
|
// SRLの保存のみ @ret 成否
|
||||||
|
System::Boolean saveSrlCore( System::String ^filename );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// ----------------------------------------------
|
// ----------------------------------------------
|
||||||
// 一時ファイルの取り扱い
|
// 一時ファイルの取り扱い
|
||||||
@ -3476,6 +3529,82 @@ private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
|||||||
// フォームの入力をチェックする
|
// フォームの入力をチェックする
|
||||||
System::Boolean checkSrlForms(void);
|
System::Boolean checkSrlForms(void);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
// リージョン設定は複雑なので別に切り出す
|
||||||
|
// ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
// フォーム入力をSRLに反映させる
|
||||||
|
void setRegionSrlPropaties(void)
|
||||||
|
{
|
||||||
|
this->hSrl->hIsRegionJapan = gcnew System::Boolean(false);
|
||||||
|
this->hSrl->hIsRegionAmerica = gcnew System::Boolean(false);
|
||||||
|
this->hSrl->hIsRegionEurope = gcnew System::Boolean(false);
|
||||||
|
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(false);
|
||||||
|
switch( this->combRegion->SelectedIndex )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
this->hSrl->hIsRegionJapan = gcnew System::Boolean(true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
this->hSrl->hIsRegionAmerica = gcnew System::Boolean(true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
this->hSrl->hIsRegionEurope = gcnew System::Boolean(true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
this->hSrl->hIsRegionEurope = gcnew System::Boolean(true);
|
||||||
|
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||||
|
case 5:
|
||||||
|
this->hSrl->hIsRegionJapan = gcnew System::Boolean(true);
|
||||||
|
this->hSrl->hIsRegionAmerica = gcnew System::Boolean(true);
|
||||||
|
this->hSrl->hIsRegionEurope = gcnew System::Boolean(true);
|
||||||
|
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(true);
|
||||||
|
break;
|
||||||
|
#endif //defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SRL情報をフォームに反映させる
|
||||||
|
void setRegionForms(void)
|
||||||
|
{
|
||||||
|
System::Boolean isJapan = *(this->hSrl->hIsRegionJapan); // リージョン
|
||||||
|
System::Boolean isAmerica = *(this->hSrl->hIsRegionAmerica);
|
||||||
|
System::Boolean isEurope = *(this->hSrl->hIsRegionEurope);
|
||||||
|
System::Boolean isAustralia = *(this->hSrl->hIsRegionAustralia);
|
||||||
|
System::Int32 index;
|
||||||
|
if( isJapan && !isAmerica && !isEurope && !isAustralia )
|
||||||
|
index = 0;
|
||||||
|
else if( !isJapan && isAmerica && !isEurope && !isAustralia )
|
||||||
|
index = 1;
|
||||||
|
else if( !isJapan && !isAmerica && isEurope && !isAustralia )
|
||||||
|
index = 2;
|
||||||
|
else if( !isJapan && !isAmerica && !isEurope && isAustralia )
|
||||||
|
index = 3;
|
||||||
|
else if( !isJapan && !isAmerica && isEurope && isAustralia )
|
||||||
|
index = 4;
|
||||||
|
else
|
||||||
|
index = -1; // 不正
|
||||||
|
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||||
|
if( isJapan && isAmerica && isEurope && isAustralia )
|
||||||
|
index = 5;
|
||||||
|
#endif
|
||||||
|
this->combRegion->SelectedIndex = index;
|
||||||
|
this->maskParentalForms(); // ペアレンタルコントロール用フォームの表示/非表示切り替え
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
// ペアレンタルコントロール設定は複雑なので別に切り出す
|
// ペアレンタルコントロール設定は複雑なので別に切り出す
|
||||||
@ -3709,6 +3838,124 @@ private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
|||||||
this->saveSrl( filename );
|
this->saveSrl( filename );
|
||||||
} //stripItemMasterRom_Click()
|
} //stripItemMasterRom_Click()
|
||||||
|
|
||||||
|
private:
|
||||||
|
System::Void stripItemSheetOnly_Click(System::Object^ sender, System::EventArgs^ e)
|
||||||
|
{
|
||||||
|
// SRLが読み込まれていないときにはリードさせない
|
||||||
|
if( System::String::IsNullOrEmpty( this->tboxFile->Text ) )
|
||||||
|
{
|
||||||
|
this->errMsg( "ROMデータファイルがオープンされていません。", "ROM file has not opened yet." );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
System::String ^srlfullpath = this->tboxFile->Text;
|
||||||
|
|
||||||
|
// SRLと書類の両方のフォーム入力をチェックする
|
||||||
|
this->hErrorList->Clear();
|
||||||
|
this->hWarnList->Clear();
|
||||||
|
if( this->checkSrlForms() == false )
|
||||||
|
{
|
||||||
|
this->errMsg( "ROMデータに不正な設定があるため提出確認書の作成ができません。",
|
||||||
|
"A ROM data and a submission sheet can't be saved, since it has illegal info." );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if( this->checkDeliverableForms() == false )
|
||||||
|
{
|
||||||
|
this->errMsg( "入力情報に不足があるため提出確認書を作成できません。",
|
||||||
|
"Making a submission sheet can't be done, since your input is not enough." );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// マスタ提出確認書に必要な情報をフォームから取得して更新
|
||||||
|
this->setSrlProperties(); // 先にSrlを更新しておく(この時点ではROMヘッダには反映されない)
|
||||||
|
this->setDeliverableProperties();
|
||||||
|
|
||||||
|
// CRCを算出したいので一時的なファイルにSRLを保存する
|
||||||
|
System::String ^tmpfile = "./tmp.srl";
|
||||||
|
this->saveSrlCore( tmpfile );
|
||||||
|
u16 crc; // SRL全体のCRCを計算する(書類に記述するため)
|
||||||
|
if( !getWholeCRCInFile( tmpfile, &crc ) )
|
||||||
|
{
|
||||||
|
this->errMsg( "CRCの計算に失敗しました。提出確認書の作成はキャンセルされます。",
|
||||||
|
"Calc CRC is failed. Therefore, Making a submission sheet is canceled." );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
System::UInt16 ^hcrc = gcnew System::UInt16( crc );
|
||||||
|
System::IO::File::Delete( tmpfile );
|
||||||
|
|
||||||
|
// 書類に記載するSRL名を提出手順書に従わせる
|
||||||
|
System::String ^srlfile;
|
||||||
|
{
|
||||||
|
srlfile = gcnew System::String("");
|
||||||
|
|
||||||
|
if( this->cboxRemasterVerE->Checked == true )
|
||||||
|
{
|
||||||
|
srlfile = "T" + this->hSrl->hGameCode + "E" + this->numSubmitVersion->Value.ToString() + ".SRL";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
srlfile = "T" + this->hSrl->hGameCode + this->hSrl->hRomVersion->ToString() + this->numSubmitVersion->Value.ToString() + ".SRL";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 注意書き
|
||||||
|
{
|
||||||
|
this->sucMsg(
|
||||||
|
"マスターROMデータは作成されませんが、書類に記載されるCRCは現在の入力を反映して再計算されます。"
|
||||||
|
+ "\nまた、提出確認書に記載されるROMデータファイル名は、提出手順書にしたがい、 \"" + srlfile + "\"となります。",
|
||||||
|
"Re-calculation of CRC code descibed in a submission sheet is based on current input forms, and, "
|
||||||
|
+ "\na ROM data file name discribed in the sheet is \"" + srlfile + "\"."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ダイアログで書類のファイルパスを決定
|
||||||
|
System::String ^delivfile;
|
||||||
|
{
|
||||||
|
System::Windows::Forms::SaveFileDialog ^dlg = gcnew (SaveFileDialog);
|
||||||
|
|
||||||
|
dlg->InitialDirectory = "c:\\";
|
||||||
|
dlg->Filter = "xml形式 (*.xml)|*.xml";
|
||||||
|
dlg->FilterIndex = 1;
|
||||||
|
dlg->RestoreDirectory = true;
|
||||||
|
|
||||||
|
if( dlg->ShowDialog() != System::Windows::Forms::DialogResult::OK )
|
||||||
|
{
|
||||||
|
this->errMsg( "提出確認書の作成がキャンセルされました。", "Making a submission sheet is canceled." );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
delivfile = dlg->FileName;
|
||||||
|
if( !(dlg->FileName->EndsWith( ".xml" )) )
|
||||||
|
{
|
||||||
|
delivfile += ".xml";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 書類作成
|
||||||
|
//result = this->hDeliv->write( delivfile, this->hSrl, hcrc, srlfile, !(this->stripItemJapanese->Checked) );
|
||||||
|
ECDeliverableResult result = this->hDeliv->writeSpreadsheet( delivfile, this->hSrl, hcrc, srlfile, !(this->stripItemJapanese->Checked) );
|
||||||
|
if( result != ECDeliverableResult::NOERROR )
|
||||||
|
{
|
||||||
|
switch( result )
|
||||||
|
{
|
||||||
|
case ECDeliverableResult::ERROR_FILE_OPEN:
|
||||||
|
this->errMsg( "提出確認書のテンプレートが開けなかったため、提出確認書の作成に失敗しました。",
|
||||||
|
"Since a templete of the submission sheet can't be opened, making the sheet is failed." );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
this->errMsg( "提出確認書の作成に失敗しました。", "Making the submission sheet is failed." );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// SRLクラスのプロパティを元に戻すため再リード
|
||||||
|
ECSrlResult r = this->hSrl->readFromFile( srlfullpath ); // フォームには反映しない
|
||||||
|
if( r != ECSrlResult::NOERROR )
|
||||||
|
{
|
||||||
|
this->errMsg( "ROMデータファイルの読み込みに失敗しました。\n再度「ROMデータを開く」を選択してROMデータを読み出してください。",
|
||||||
|
"Reading the ROM data file failed. \nPlease read a ROM data file again, with \"Open a ROM data file\"" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} //stripItemSheetOnly_Click()
|
||||||
|
|
||||||
private:
|
private:
|
||||||
System::Void stripItemSheet_Click(System::Object^ sender, System::EventArgs^ e)
|
System::Void stripItemSheet_Click(System::Object^ sender, System::EventArgs^ e)
|
||||||
{
|
{
|
||||||
@ -4061,7 +4308,8 @@ private: System::Windows::Forms::RadioButton^ rIsNoIcon;
|
|||||||
{
|
{
|
||||||
this->rIsWirelessIcon->Checked = true;
|
this->rIsWirelessIcon->Checked = true;
|
||||||
}
|
}
|
||||||
this->setParentalForms(); // ペアレンタルコントロール関連
|
this->setRegionForms();
|
||||||
|
this->setParentalForms();
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // enf of ref class Form1
|
}; // enf of ref class Form1
|
||||||
|
|||||||
@ -126,24 +126,6 @@
|
|||||||
<metadata name="colLibName.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colLibName.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="colLibPublisher.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="colLibName.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="colWarnName.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="colWarnBegin.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="colWarnEnd.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="colWarnCause.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<value>True</value>
|
|
||||||
</metadata>
|
|
||||||
<metadata name="colWarnName.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="colWarnName.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
@ -76,20 +76,6 @@ void Form1::loadInit(void)
|
|||||||
this->hSrl->hMrcSpecialList->hSDKVer = gcnew System::UInt32( 0 );
|
this->hSrl->hMrcSpecialList->hSDKVer = gcnew System::UInt32( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// EULA
|
|
||||||
try
|
|
||||||
{
|
|
||||||
u8 eula = System::Byte::Parse( MasterEditorTWL::getXPathText( root, "/init/eula" ) );
|
|
||||||
this->hSrl->hMrcSpecialList->hEULAVer = gcnew System::Byte( eula );
|
|
||||||
}
|
|
||||||
catch ( System::Exception ^ex )
|
|
||||||
{
|
|
||||||
(void)ex;
|
|
||||||
this->errMsg( "設定ファイル中のEULAバージョンが読み込めませんでした。バージョンは0とみなされます。",
|
|
||||||
"EULA ver. can't be read from setting file. Therefore it is set by 0." );
|
|
||||||
this->hSrl->hMrcSpecialList->hEULAVer = gcnew System::Byte( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Shared2File
|
// Shared2File
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -196,19 +182,8 @@ System::Void Form1::loadSrl( System::String ^filename )
|
|||||||
// SRLの保存
|
// SRLの保存
|
||||||
System::Void Form1::saveSrl( System::String ^filename )
|
System::Void Form1::saveSrl( System::String ^filename )
|
||||||
{
|
{
|
||||||
// ROM情報をフォームから取得してSRLバイナリに反映させる
|
|
||||||
this->setSrlProperties();
|
|
||||||
// マスタ書類情報をフォームから取得して書類に反映させる -> 必要なし
|
|
||||||
//this->setDeliverableProperties();
|
|
||||||
|
|
||||||
// ファイルをコピー
|
|
||||||
if( !(filename->Equals( this->tboxFile->Text )) )
|
|
||||||
{
|
|
||||||
System::IO::File::Copy( this->tboxFile->Text, filename, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
// コピーしたファイルにROMヘッダを上書き
|
// コピーしたファイルにROMヘッダを上書き
|
||||||
if( this->hSrl->writeToFile( filename ) != ECSrlResult::NOERROR )
|
if( !this->saveSrlCore( filename ) )
|
||||||
{
|
{
|
||||||
this->errMsg( "ROMデータの保存に失敗しました。", "Saving the ROM data file failed." );
|
this->errMsg( "ROMデータの保存に失敗しました。", "Saving the ROM data file failed." );
|
||||||
return;
|
return;
|
||||||
@ -219,3 +194,23 @@ System::Void Form1::saveSrl( System::String ^filename )
|
|||||||
// 再リード
|
// 再リード
|
||||||
this->loadSrl( filename );
|
this->loadSrl( filename );
|
||||||
} // saveSrl()
|
} // saveSrl()
|
||||||
|
|
||||||
|
// SRLの一時保存
|
||||||
|
System::Boolean Form1::saveSrlCore( System::String ^filename )
|
||||||
|
{
|
||||||
|
// ROM情報をフォームから取得してSRLバイナリに反映させる
|
||||||
|
this->setSrlProperties();
|
||||||
|
|
||||||
|
// ファイルをコピー
|
||||||
|
if( !(filename->Equals( this->tboxFile->Text )) )
|
||||||
|
{
|
||||||
|
System::IO::File::Copy( this->tboxFile->Text, filename, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
// コピーしたファイルにROMヘッダを上書き
|
||||||
|
if( this->hSrl->writeToFile( filename ) != ECSrlResult::NOERROR )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@ -48,6 +48,7 @@ void Form1::changeJapanese(void)
|
|||||||
this->stripMaster->Text = gcnew System::String( "マスター" );
|
this->stripMaster->Text = gcnew System::String( "マスター" );
|
||||||
this->stripItemSheet->Text = gcnew System::String( "提出確認書とマスターROMを作成する" );
|
this->stripItemSheet->Text = gcnew System::String( "提出確認書とマスターROMを作成する" );
|
||||||
this->stripItemMasterRom->Text = gcnew System::String( "マスターROMのみを作成する" );
|
this->stripItemMasterRom->Text = gcnew System::String( "マスターROMのみを作成する" );
|
||||||
|
this->stripItemSheetOnly->Text = gcnew System::String( "提出確認書のみを作成する" );
|
||||||
|
|
||||||
// 入力ファイル
|
// 入力ファイル
|
||||||
this->labFile->Text = gcnew System::String( "ROMデータファイル" );
|
this->labFile->Text = gcnew System::String( "ROMデータファイル" );
|
||||||
@ -270,6 +271,7 @@ void Form1::changeEnglish(void)
|
|||||||
this->stripMaster->Text = gcnew System::String( "Master" );
|
this->stripMaster->Text = gcnew System::String( "Master" );
|
||||||
this->stripItemSheet->Text = gcnew System::String( "Make a submission sheet and a master ROM data file" );
|
this->stripItemSheet->Text = gcnew System::String( "Make a submission sheet and a master ROM data file" );
|
||||||
this->stripItemMasterRom->Text = gcnew System::String( "Make a master ROM data file only" );
|
this->stripItemMasterRom->Text = gcnew System::String( "Make a master ROM data file only" );
|
||||||
|
this->stripItemSheetOnly->Text = gcnew System::String( "Make a submission sheet only" );
|
||||||
|
|
||||||
// 入力ファイル
|
// 入力ファイル
|
||||||
this->labFile->Text = gcnew System::String( "ROM Data File" );
|
this->labFile->Text = gcnew System::String( "ROM Data File" );
|
||||||
|
|||||||
@ -33,44 +33,7 @@ void Form1::setSrlProperties(void)
|
|||||||
this->hSrl->hIsWirelessIcon = this->rIsWirelessIcon->Checked;
|
this->hSrl->hIsWirelessIcon = this->rIsWirelessIcon->Checked;
|
||||||
|
|
||||||
// リージョン
|
// リージョン
|
||||||
this->hSrl->hIsRegionJapan = gcnew System::Boolean(false);
|
this->setRegionSrlPropaties();
|
||||||
this->hSrl->hIsRegionAmerica = gcnew System::Boolean(false);
|
|
||||||
this->hSrl->hIsRegionEurope = gcnew System::Boolean(false);
|
|
||||||
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(false);
|
|
||||||
switch( this->combRegion->SelectedIndex )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
this->hSrl->hIsRegionJapan = gcnew System::Boolean(true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
this->hSrl->hIsRegionAmerica = gcnew System::Boolean(true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
this->hSrl->hIsRegionEurope = gcnew System::Boolean(true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 4:
|
|
||||||
this->hSrl->hIsRegionEurope = gcnew System::Boolean(true);
|
|
||||||
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
|
||||||
case 5:
|
|
||||||
this->hSrl->hIsRegionJapan = gcnew System::Boolean(true);
|
|
||||||
this->hSrl->hIsRegionAmerica = gcnew System::Boolean(true);
|
|
||||||
this->hSrl->hIsRegionEurope = gcnew System::Boolean(true);
|
|
||||||
this->hSrl->hIsRegionAustralia = gcnew System::Boolean(true);
|
|
||||||
break;
|
|
||||||
#endif //defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ペアレンタルコントロール
|
// ペアレンタルコントロール
|
||||||
this->setParentalSrlProperties();
|
this->setParentalSrlProperties();
|
||||||
@ -258,29 +221,7 @@ void Form1::setSrlForms(void)
|
|||||||
{
|
{
|
||||||
this->rIsWirelessIcon->Checked = true;
|
this->rIsWirelessIcon->Checked = true;
|
||||||
}
|
}
|
||||||
System::Boolean isJapan = *(this->hSrl->hIsRegionJapan); // ƒŠ<C692>[ƒWƒ‡ƒ“
|
this->setRegionForms();
|
||||||
System::Boolean isAmerica = *(this->hSrl->hIsRegionAmerica);
|
|
||||||
System::Boolean isEurope = *(this->hSrl->hIsRegionEurope);
|
|
||||||
System::Boolean isAustralia = *(this->hSrl->hIsRegionAustralia);
|
|
||||||
System::Int32 index;
|
|
||||||
if( isJapan && !isAmerica && !isEurope && !isAustralia )
|
|
||||||
index = 0;
|
|
||||||
else if( !isJapan && isAmerica && !isEurope && !isAustralia )
|
|
||||||
index = 1;
|
|
||||||
else if( !isJapan && !isAmerica && isEurope && !isAustralia )
|
|
||||||
index = 2;
|
|
||||||
else if( !isJapan && !isAmerica && !isEurope && isAustralia )
|
|
||||||
index = 3;
|
|
||||||
else if( !isJapan && !isAmerica && isEurope && isAustralia )
|
|
||||||
index = 4;
|
|
||||||
else
|
|
||||||
index = -1; // •s<E280A2>³
|
|
||||||
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
|
||||||
if( isJapan && isAmerica && isEurope && isAustralia )
|
|
||||||
index = 5;
|
|
||||||
#endif
|
|
||||||
this->combRegion->SelectedIndex = index;
|
|
||||||
this->maskParentalForms();
|
|
||||||
this->setParentalForms(); // ペアレンタルコントロール関連
|
this->setParentalForms(); // ペアレンタルコントロール関連
|
||||||
} // setSrlForms()
|
} // setSrlForms()
|
||||||
|
|
||||||
|
|||||||
@ -1220,7 +1220,7 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp )
|
|||||||
if( this->pRomHeader->s.disable_debug == 0 )
|
if( this->pRomHeader->s.disable_debug == 0 )
|
||||||
{
|
{
|
||||||
this->hWarnList->Add( gcnew RCMrcError(
|
this->hWarnList->Add( gcnew RCMrcError(
|
||||||
"デバッグ動作禁止フラグ", 0x1f, 0x1f,
|
"デバッガ動作禁止フラグ", 0x1f, 0x1f,
|
||||||
"デバッガ上で動作可能な設定になっています。デバッガ向けソフトとしてROMをリリースする場合にはセキュリティ上の問題がないかご確認ください。",
|
"デバッガ上で動作可能な設定になっています。デバッガ向けソフトとしてROMをリリースする場合にはセキュリティ上の問題がないかご確認ください。",
|
||||||
"Disable Launch on Debugger Flag",
|
"Disable Launch on Debugger Flag",
|
||||||
"This ROM is launched on the debugger. If the ROM is released for the debugger, please check the security settings.",
|
"This ROM is launched on the debugger. If the ROM is released for the debugger, please check the security settings.",
|
||||||
|
|||||||
@ -221,7 +221,6 @@ namespace MasterEditorTWL
|
|||||||
{
|
{
|
||||||
this->hIsCheck = gcnew System::Boolean( false );
|
this->hIsCheck = gcnew System::Boolean( false );
|
||||||
this->hSDKVer = gcnew System::UInt32( 0 );
|
this->hSDKVer = gcnew System::UInt32( 0 );
|
||||||
this->hEULAVer = gcnew System::Byte( 0 );
|
|
||||||
this->hShared2SizeArray = gcnew cli::array<System::UInt32^>(METWL_NUMOF_SHARED2FILES); // ファイルサイズの数に合わせる
|
this->hShared2SizeArray = gcnew cli::array<System::UInt32^>(METWL_NUMOF_SHARED2FILES); // ファイルサイズの数に合わせる
|
||||||
System::Int32 i;
|
System::Int32 i;
|
||||||
for( i=0; i < METWL_NUMOF_SHARED2FILES; i++ )
|
for( i=0; i < METWL_NUMOF_SHARED2FILES; i++ )
|
||||||
|
|||||||
@ -114,232 +114,6 @@ System::String^ MasterEditorTWL::transSizeToString( System::UInt32 ^size )
|
|||||||
return (val.ToString() + " GB");
|
return (val.ToString() + " GB");
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// ペアレンタルコントロールのレーティング値から文字列を取得
|
|
||||||
//
|
|
||||||
// @arg [in] 団体
|
|
||||||
// @arg [in] 有効フラグ(0歳以上か未審査かを判定するために使用する)
|
|
||||||
// @arg [in] レーティング値
|
|
||||||
// @arg [in] 英語フラグ
|
|
||||||
//
|
|
||||||
// @ret レーティングの文字列(団体がおかしいときnullptr)
|
|
||||||
//
|
|
||||||
System::String^ MasterEditorTWL::transRatingToString( System::Byte ogn, System::Boolean enable, System::Byte rating, System::Boolean english )
|
|
||||||
{
|
|
||||||
cli::array< System::String^ > ^list;
|
|
||||||
System::Int32 index;
|
|
||||||
System::String ^str;
|
|
||||||
|
|
||||||
if( ogn == OS_TWL_PCTL_OGN_CERO )
|
|
||||||
{
|
|
||||||
if( english )
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{ L"A (All ages)", L"B (aged 12 or older)", L"C (aged 15 or older)",
|
|
||||||
L"D (aged 17 or older)", L"Z (aged 18 or older)", L"Unexamined"};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"A (全年齢)", L"B (12歳以上)", L"C (15歳以上)", L"D (17歳以上)", L"Z (18歳以上)", L"未審査"};
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( rating )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
if( enable ) // 全年齢か未審査か判定
|
|
||||||
index = 0;
|
|
||||||
else
|
|
||||||
index = 5;
|
|
||||||
break;
|
|
||||||
case 12: index = 1; break;
|
|
||||||
case 15: index = 2; break;
|
|
||||||
case 17: index = 3; break;
|
|
||||||
case 18: index = 4; break;
|
|
||||||
default:
|
|
||||||
index = 5;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
str = list[ index ];
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( ogn == OS_TWL_PCTL_OGN_ESRB )
|
|
||||||
{
|
|
||||||
if( english )
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"EC (aged 3 or older)", L"E (aged 6 or older)", L"E10+ (aged 10 or older)",
|
|
||||||
L"T (aged 13 or older)", L"M (aged 17 or older)", L"Unexamined"};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"EC (3歳以上)", L"E (6歳以上)", L"E10+ (10歳以上)", L"T (13歳以上)", L"M (17歳以上)", L"未審査"};
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( rating )
|
|
||||||
{
|
|
||||||
case 3: index = 0; break;
|
|
||||||
case 6: index = 1; break;
|
|
||||||
case 10: index = 2; break;
|
|
||||||
case 13: index = 3; break;
|
|
||||||
case 17: index = 4; break;
|
|
||||||
case 0: index = 5; break; // 0はデフォルト値なのでエラーメッセージを出さない(自動的に未審査扱い)
|
|
||||||
default:
|
|
||||||
index = 5;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
str = list[ index ];
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( ogn == OS_TWL_PCTL_OGN_USK )
|
|
||||||
{
|
|
||||||
if( english )
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"All ages", L"aged 6 or older", L"aged 12 or older", L"aged 16 or older",
|
|
||||||
L"Inadequent for young", L"Unexamined"};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"年齢制限なし", L"6歳以上", L"12歳以上", L"16歳以上", L"青少年には不適切", L"未審査"};
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( rating )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
if( enable )
|
|
||||||
index = 0;
|
|
||||||
else
|
|
||||||
index = 5;
|
|
||||||
break;
|
|
||||||
case 6: index = 1; break;
|
|
||||||
case 12: index = 2; break;
|
|
||||||
case 16: index = 3; break;
|
|
||||||
case 18: index = 4; break;
|
|
||||||
default:
|
|
||||||
index = 5;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
str = list[ index ];
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( ogn == OS_TWL_PCTL_OGN_PEGI_GEN )
|
|
||||||
{
|
|
||||||
if( english )
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"aged 3 or older", L"aged 7 or older", L"aged 12 or older", L"aged 16 or older",
|
|
||||||
L"aged 18 or older", L"Unexamined"};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"3歳以上", L"7歳以上", L"12歳以上", L"16歳以上", L"18歳以上", L"未審査"};
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( rating )
|
|
||||||
{
|
|
||||||
case 3: index = 0; break;
|
|
||||||
case 7: index = 1; break;
|
|
||||||
case 12: index = 2; break;
|
|
||||||
case 16: index = 3; break;
|
|
||||||
case 18: index = 4; break;
|
|
||||||
case 0: index = 5; break;
|
|
||||||
default:
|
|
||||||
index = 5;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
str = list[ index ];
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( ogn == OS_TWL_PCTL_OGN_PEGI_PRT )
|
|
||||||
{
|
|
||||||
if( english )
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"aged 4 or older", L"aged 6 or older", L"aged 12 or older", L"aged 16 or older",
|
|
||||||
L"aged 18 or older", L"Unexamined"};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"4歳以上", L"6歳以上", L"12歳以上", L"16歳以上", L"18歳以上", L"未審査"};
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( rating )
|
|
||||||
{
|
|
||||||
case 4: index = 0; break;
|
|
||||||
case 6: index = 1; break;
|
|
||||||
case 12: index = 2; break;
|
|
||||||
case 16: index = 3; break;
|
|
||||||
case 18: index = 4; break;
|
|
||||||
case 0: index = 5; break;
|
|
||||||
default:
|
|
||||||
index = 5;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
str = list[ index ];
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( ogn == OS_TWL_PCTL_OGN_PEGI_BBFC )
|
|
||||||
{
|
|
||||||
if( english )
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"aged 3 or older", L"aged 4 or older recommended", L"aged 7 or older", L"aged 8 or older recommended",
|
|
||||||
L"aged 12 or older", L"aged 15 or older", L"aged 16 or older", L"aged 18 or older", L"Unexamined"};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"3歳以上", L"4歳以上推奨", L"7歳以上", L"8歳以上推奨",
|
|
||||||
L"12歳以上", L"15歳以上", L"16歳以上", L"18歳以上", L"未審査"};
|
|
||||||
}
|
|
||||||
switch( rating )
|
|
||||||
{
|
|
||||||
case 3: index = 0; break;
|
|
||||||
case 4: index = 1; break;
|
|
||||||
case 7: index = 2; break;
|
|
||||||
case 8: index = 3; break;
|
|
||||||
case 12: index = 4; break;
|
|
||||||
case 15: index = 5; break;
|
|
||||||
case 16: index = 6; break;
|
|
||||||
case 18: index = 7; break;
|
|
||||||
case 0: index = 8; break;
|
|
||||||
default:
|
|
||||||
index = 8;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
str = list[ index ];
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( ogn == OS_TWL_PCTL_OGN_OFLC )
|
|
||||||
{
|
|
||||||
if( english )
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"G", L"PG", L"M", L"MA15+", L"Unexamined"};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list = gcnew cli::array< System::String^ >{L"G", L"PG", L"M", L"MA15+", L"未審査"};
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( rating )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
if( enable )
|
|
||||||
index = 0;
|
|
||||||
else
|
|
||||||
index = 4;
|
|
||||||
break;
|
|
||||||
case 7: index = 1; break;
|
|
||||||
case 14: index = 2; break;
|
|
||||||
case 15: index = 3; break;
|
|
||||||
default:
|
|
||||||
index = 4; break;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
str = list[ index ];
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
str = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return str;
|
|
||||||
} // MasterEditorTWL::transRatingToString
|
|
||||||
|
|
||||||
// 設定可能なインデックスのリストを取得する
|
// 設定可能なインデックスのリストを取得する
|
||||||
cli::array<System::Byte>^ MasterEditorTWL::getOgnRatingAges( int ogn )
|
cli::array<System::Byte>^ MasterEditorTWL::getOgnRatingAges( int ogn )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -41,18 +41,6 @@ namespace MasterEditorTWL
|
|||||||
//
|
//
|
||||||
System::String^ transSizeToString( System::UInt32 ^size );
|
System::String^ transSizeToString( System::UInt32 ^size );
|
||||||
|
|
||||||
//
|
|
||||||
// ペアレンタルコントロールのレーティング値から文字列を取得
|
|
||||||
//
|
|
||||||
// @arg [in] 団体
|
|
||||||
// @arg [in] 有効フラグ(0歳以上か未審査かを判定するために使用する)
|
|
||||||
// @arg [in] レーティング値
|
|
||||||
// @arg [in] 英語フラグ
|
|
||||||
//
|
|
||||||
// @ret レーティングの文字列(団体がおかしいときnullptr)
|
|
||||||
//
|
|
||||||
System::String^ transRatingToString( System::Byte ogn, System::Boolean enable, System::Byte rating, System::Boolean english );
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// ペアレンタルコントロールの各団体の設定可能年齢を取得する
|
// ペアレンタルコントロールの各団体の設定可能年齢を取得する
|
||||||
//
|
//
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
<minor>0</minor>
|
<minor>0</minor>
|
||||||
<relstep>20200</relstep>
|
<relstep>20200</relstep>
|
||||||
</sdk>
|
</sdk>
|
||||||
<eula>0</eula>
|
|
||||||
<shared2>
|
<shared2>
|
||||||
<size0>0</size0>
|
<size0>0</size0>
|
||||||
<size1>0</size1>
|
<size1>0</size1>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user