mirror of
https://github.com/rvtr/TwlToolsRED.git
synced 2025-10-31 06:41:18 -04:00
マスタエディタ:以下の中韓版対応を追加。
・入力ROMがWorldWide版のとき中韓リージョンを選択不可にした。 ・入力ROMが中韓リージョンのときリージョンを変更不可にした。 ・中国リージョンのとき全団体のレーティング値を0x80で埋める処理を追加。 ・オールリージョンのとき予約領域のレーティング値を0x80で埋める処理を追加。 git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@317 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
parent
b3866f28bc
commit
43ceeed3ff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -298,12 +298,6 @@
|
||||
<data name="combRegion.Items6" xml:space="preserve">
|
||||
<value>USA, Europe, and Australia</value>
|
||||
</data>
|
||||
<data name="combRegion.Items7" xml:space="preserve">
|
||||
<value>Korea only</value>
|
||||
</data>
|
||||
<data name="combRegion.Items8" xml:space="preserve">
|
||||
<value>China only</value>
|
||||
</data>
|
||||
<data name="cboxIsInputPerson2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>157, 16</value>
|
||||
</data>
|
||||
|
||||
@ -1631,10 +1631,9 @@ private: System::Windows::Forms::ToolStripMenuItem^ stripItemRomInfoList;
|
||||
this->combRegion->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
|
||||
this->combRegion->Font = nullptr;
|
||||
this->combRegion->FormattingEnabled = true;
|
||||
this->combRegion->Items->AddRange(gcnew cli::array< System::Object^ >(9) {resources->GetString(L"combRegion.Items"), resources->GetString(L"combRegion.Items1"),
|
||||
this->combRegion->Items->AddRange(gcnew cli::array< System::Object^ >(7) {resources->GetString(L"combRegion.Items"), resources->GetString(L"combRegion.Items1"),
|
||||
resources->GetString(L"combRegion.Items2"), resources->GetString(L"combRegion.Items3"), resources->GetString(L"combRegion.Items4"),
|
||||
resources->GetString(L"combRegion.Items5"), resources->GetString(L"combRegion.Items6"), resources->GetString(L"combRegion.Items7"),
|
||||
resources->GetString(L"combRegion.Items8")});
|
||||
resources->GetString(L"combRegion.Items5"), resources->GetString(L"combRegion.Items6")});
|
||||
this->combRegion->Name = L"combRegion";
|
||||
this->combRegion->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::combRegion_SelectedIndexChanged);
|
||||
//
|
||||
@ -4547,6 +4546,9 @@ private: System::Windows::Forms::ToolStripMenuItem^ stripItemRomInfoList;
|
||||
// SRL情報をフォームに反映させる
|
||||
void setRegionForms(void);
|
||||
|
||||
// フォーム入力が正しいか書き込み前チェック
|
||||
void checkRegionForms(void);
|
||||
|
||||
private:
|
||||
// ---------------------------------------------------------------------
|
||||
// レーティング設定は複雑なので別に切り出す
|
||||
|
||||
@ -376,12 +376,6 @@
|
||||
<data name="combRegion.Items6" xml:space="preserve">
|
||||
<value>北米,欧州および豪州</value>
|
||||
</data>
|
||||
<data name="combRegion.Items7" xml:space="preserve">
|
||||
<value>韓国のみ</value>
|
||||
</data>
|
||||
<data name="combRegion.Items8" xml:space="preserve">
|
||||
<value>中国のみ</value>
|
||||
</data>
|
||||
<data name="cboxIsInputPerson2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>150, 16</value>
|
||||
</data>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -213,16 +213,28 @@ void Form1::setDeliverableProperties(void)
|
||||
//}
|
||||
|
||||
// SRL情報を文字列で登録
|
||||
if( this->combRegion->SelectedIndex < 0 )
|
||||
|
||||
// リージョン
|
||||
if( this->combRegion->DropDownStyle == System::Windows::Forms::ComboBoxStyle::DropDown )
|
||||
{
|
||||
if( this->isJapanese() == true )
|
||||
this->hDeliv->hRegion = gcnew System::String("•s–¾");
|
||||
else
|
||||
this->hDeliv->hRegion = gcnew System::String("Undefined");
|
||||
// 中韓のときはリストで選択不可のテキストがコンボボックスに書かれているのでそれを登録
|
||||
this->hDeliv->hRegion = this->combRegion->Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->hDeliv->hRegion = dynamic_cast<System::String^>(this->combRegion->SelectedItem);
|
||||
// WorldWide のときはリストで選択可能な文字列を登録
|
||||
if( this->combRegion->SelectedIndex < 0 )
|
||||
{
|
||||
if( this->isJapanese() == true )
|
||||
this->hDeliv->hRegion = gcnew System::String("不明");
|
||||
else
|
||||
this->hDeliv->hRegion = gcnew System::String("Undefined");
|
||||
}
|
||||
else
|
||||
{
|
||||
// リストで選択されているテキストを登録
|
||||
this->hDeliv->hRegion = dynamic_cast<System::String^>(this->combRegion->SelectedItem);
|
||||
}
|
||||
}
|
||||
this->hDeliv->hCERO = this->setDeliverableRatingOgnProperties( this->combCERO );
|
||||
this->hDeliv->hESRB = this->setDeliverableRatingOgnProperties( this->combESRB );
|
||||
@ -246,7 +258,7 @@ System::String^ Form1::setDeliverableRatingOgnProperties( System::Windows::Forms
|
||||
System::String ^str;
|
||||
if( this->cboxIsUnnecessaryRating->Checked ) // レーティング表示不要が選択されているとき
|
||||
{
|
||||
if( box->FlatStyle == System::Windows::Forms::FlatStyle::Standard )
|
||||
if( box->FlatStyle == System::Windows::Forms::FlatStyle::Standard ) // リージョンに含まれているときの判定
|
||||
{
|
||||
str = System::String::Copy( box->Text ); // テキスト入力可になっているので取得できるはず
|
||||
}
|
||||
@ -269,7 +281,7 @@ System::String^ Form1::setDeliverableRatingOgnProperties( System::Windows::Forms
|
||||
}
|
||||
else
|
||||
{
|
||||
str = dynamic_cast<System::String^>(box->SelectedItem);
|
||||
str = dynamic_cast<System::String^>(box->SelectedItem); // リストで選択されているテキストを代入
|
||||
}
|
||||
}
|
||||
return str;
|
||||
|
||||
@ -215,10 +215,9 @@ void MasterEditorTWL::Form1::changeLanguage( System::String ^langname )
|
||||
resources->ApplyResources(this->combRegion, L"combRegion");
|
||||
int indexRegion = this->combRegion->SelectedIndex;
|
||||
this->combRegion->Items->Clear();
|
||||
this->combRegion->Items->AddRange(gcnew cli::array< System::Object^ >(9) {resources->GetString(L"combRegion.Items"), resources->GetString(L"combRegion.Items1"),
|
||||
this->combRegion->Items->AddRange(gcnew cli::array< System::Object^ >(7) {resources->GetString(L"combRegion.Items"), resources->GetString(L"combRegion.Items1"),
|
||||
resources->GetString(L"combRegion.Items2"), resources->GetString(L"combRegion.Items3"), resources->GetString(L"combRegion.Items4"),
|
||||
resources->GetString(L"combRegion.Items5"), resources->GetString(L"combRegion.Items6"), resources->GetString(L"combRegion.Items7"),
|
||||
resources->GetString(L"combRegion.Items8")});
|
||||
resources->GetString(L"combRegion.Items5"), resources->GetString(L"combRegion.Items6")});
|
||||
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||
if( langname->Equals( "ja" ) )
|
||||
{
|
||||
@ -230,6 +229,18 @@ void MasterEditorTWL::Form1::changeLanguage( System::String ^langname )
|
||||
}
|
||||
#endif
|
||||
this->combRegion->SelectedIndex = indexRegion;
|
||||
// 中韓のときの特別対応
|
||||
if( this->combRegion->DropDownStyle == System::Windows::Forms::ComboBoxStyle::DropDown )
|
||||
{
|
||||
if( this->hSrl->IsRegionChina ) // このパスになるとき必ずSRLは読み込まれている
|
||||
{
|
||||
this->combRegion->Text = (langname == "ja")?"中国のみ":"China only";
|
||||
}
|
||||
else
|
||||
{
|
||||
this->combRegion->Text = (langname == "ja")?"韓国のみ":"Korea only";
|
||||
}
|
||||
}
|
||||
|
||||
// Region が変わったときのイベントが勝手に呼ばれて index が -1 にされるので Region 変更後に index を設定
|
||||
this->combCERO->SelectedIndex = indexCERO;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// ---------------------------------------------------------------------
|
||||
// リージョンとペアレンタルコントロール設定
|
||||
// リージョンとレーティング設定
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
#include "stdafx.h"
|
||||
@ -21,19 +21,31 @@ using namespace System::Data;
|
||||
using namespace System::Drawing;
|
||||
using namespace MasterEditorTWL;
|
||||
|
||||
// =====================================================================
|
||||
// リージョン
|
||||
// =====================================================================
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// リージョン設定は複雑なので別に切り出す
|
||||
// GUIのコンボボックスからROMヘッダのリージョンコードを決定する
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
// フォーム入力をSRLに反映させる
|
||||
void Form1::setRegionSrlPropaties(void)
|
||||
{
|
||||
this->hSrl->IsRegionJapan = false;
|
||||
this->hSrl->IsRegionAmerica = false;
|
||||
this->hSrl->IsRegionEurope = false;
|
||||
this->hSrl->IsRegionAustralia = false;
|
||||
this->hSrl->IsRegionKorea = false;
|
||||
this->hSrl->IsRegionChina = false;
|
||||
|
||||
// 中国版と韓国版はリージョン変更させない
|
||||
if( this->combRegion->DropDownStyle == System::Windows::Forms::ComboBoxStyle::DropDown ) // コンボボックスが中韓設定用になっているとき
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// ALLリージョンのとき中韓ビットも立っているので中韓ビットを落としておく必要がある
|
||||
this->hSrl->IsRegionChina = false;
|
||||
this->hSrl->IsRegionKorea = false;
|
||||
|
||||
switch( this->combRegion->SelectedIndex )
|
||||
{
|
||||
case 0:
|
||||
@ -68,16 +80,10 @@ void Form1::setRegionSrlPropaties(void)
|
||||
this->hSrl->IsRegionAustralia = true;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
this->hSrl->IsRegionKorea = true;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
this->hSrl->IsRegionChina = true;
|
||||
break;
|
||||
// 中韓は設定不可
|
||||
|
||||
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||
case 9:
|
||||
case 7:
|
||||
this->hSrl->IsRegionJapan = true;
|
||||
this->hSrl->IsRegionAmerica = true;
|
||||
this->hSrl->IsRegionEurope = true;
|
||||
@ -91,7 +97,10 @@ void Form1::setRegionSrlPropaties(void)
|
||||
}
|
||||
}
|
||||
|
||||
// SRL情報をフォームに反映させる
|
||||
// ---------------------------------------------------------------------
|
||||
// ROMヘッダのリージョンコードからGUIのコンボボックスの値を決定する
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void Form1::setRegionForms(void)
|
||||
{
|
||||
System::Boolean isJapan = this->hSrl->IsRegionJapan; // リージョン
|
||||
@ -100,40 +109,75 @@ void Form1::setRegionForms(void)
|
||||
System::Boolean isAustralia = this->hSrl->IsRegionAustralia;
|
||||
System::Boolean isKorea = this->hSrl->IsRegionKorea;
|
||||
System::Boolean isChina = this->hSrl->IsRegionChina;
|
||||
System::Int32 index;
|
||||
if( isJapan && !isAmerica && !isEurope && !isAustralia && !isKorea && !isChina )
|
||||
index = 0;
|
||||
else if( !isJapan && isAmerica && !isEurope && !isAustralia && !isKorea && !isChina )
|
||||
index = 1;
|
||||
else if( !isJapan && !isAmerica && isEurope && !isAustralia && !isKorea && !isChina )
|
||||
index = 2;
|
||||
else if( !isJapan && !isAmerica && !isEurope && isAustralia && !isKorea && !isChina )
|
||||
index = 3;
|
||||
else if( !isJapan && !isAmerica && isEurope && isAustralia && !isKorea && !isChina )
|
||||
index = 4;
|
||||
else if( !isJapan && isAmerica && !isEurope && isAustralia && !isKorea && !isChina )
|
||||
index = 5;
|
||||
else if( !isJapan && isAmerica && isEurope && isAustralia && !isKorea && !isChina )
|
||||
index = 6;
|
||||
else if( !isJapan && !isAmerica && !isEurope && !isAustralia && isKorea && !isChina )
|
||||
index = 7;
|
||||
else if( !isJapan && !isAmerica && !isEurope && !isAustralia && !isKorea && isChina )
|
||||
index = 8;
|
||||
else
|
||||
index = -1; // 不正
|
||||
|
||||
// 中韓のときコンボボックスを編集不可にする
|
||||
if( !isJapan && !isAmerica && !isEurope && !isAustralia && !isKorea && isChina ) // 中国
|
||||
{
|
||||
this->combRegion->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDown; // 自由にテキストを入力できる
|
||||
this->combRegion->SelectedIndex = -1; // 設定の順序に注意: テキストの設定よりも前に入れておかないとテキスト入力が反映されないことがある
|
||||
this->combRegion->Text = this->isJapanese()?"中国のみ":"China only";
|
||||
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->Enabled = false;
|
||||
}
|
||||
else // WorldWide
|
||||
{
|
||||
// 選択可能にする
|
||||
this->combRegion->Enabled = true;
|
||||
this->combRegion->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList; // リストの中から選択しかできない
|
||||
|
||||
// コンボボックスのデフォルトの選択値を決定
|
||||
System::Int32 index = -1;
|
||||
if( isJapan && !isAmerica && !isEurope && !isAustralia && !isKorea && !isChina )
|
||||
index = 0;
|
||||
else if( !isJapan && isAmerica && !isEurope && !isAustralia && !isKorea && !isChina )
|
||||
index = 1;
|
||||
else if( !isJapan && !isAmerica && isEurope && !isAustralia && !isKorea && !isChina )
|
||||
index = 2;
|
||||
else if( !isJapan && !isAmerica && !isEurope && isAustralia && !isKorea && !isChina )
|
||||
index = 3;
|
||||
else if( !isJapan && !isAmerica && isEurope && isAustralia && !isKorea && !isChina )
|
||||
index = 4;
|
||||
else if( !isJapan && isAmerica && !isEurope && isAustralia && !isKorea && !isChina )
|
||||
index = 5;
|
||||
else if( !isJapan && isAmerica && isEurope && isAustralia && !isKorea && !isChina )
|
||||
index = 6;
|
||||
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||
if( isJapan && isAmerica && isEurope && isAustralia && isKorea && isChina )
|
||||
index = 9;
|
||||
if( isJapan && isAmerica && isEurope && isAustralia && isKorea && isChina )
|
||||
index = 7;
|
||||
#endif
|
||||
this->combRegion->SelectedIndex = index;
|
||||
this->combRegion->SelectedIndex = index;
|
||||
}
|
||||
this->maskRatingForms(); // ペアレンタルコントロール用フォームの表示/非表示切り替え
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// ペアレンタルコントロール設定は複雑なので別に切り出す
|
||||
// リージョンのフォームに問題がないかをチェックする
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void Form1::checkRegionForms(void)
|
||||
{
|
||||
// 中韓のときにはリージョン選択できないのでコンボボックスが選択されているかのチェックは必要なし
|
||||
if( this->combRegion->DropDownStyle == System::Windows::Forms::ComboBoxStyle::DropDownList )
|
||||
{
|
||||
this->checkComboBoxIndex( this->combRegion, "LabelRegion", true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// =====================================================================
|
||||
// レーティング
|
||||
// =====================================================================
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// ROMヘッダのレーティング情報からGUIのコンボボックスを設定する
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
// フォーム入力をSRLに反映させる
|
||||
void Form1::setRatingSrlProperties(void)
|
||||
{
|
||||
// 各団体のフォーム入力を反映
|
||||
@ -150,7 +194,10 @@ void Form1::setRatingSrlProperties(void)
|
||||
this->hSrl->IsUnnecessaryRating = this->cboxIsUnnecessaryRating->Checked;
|
||||
} //setRatingSrlProperties()
|
||||
|
||||
// SRL内のペアレンタルコントロール情報を抜き出してフォームに反映させる
|
||||
// ---------------------------------------------------------------------
|
||||
// GUIのコンボボックスの選択をROMヘッダに反映させる
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void Form1::setRatingForms(void)
|
||||
{
|
||||
// レーティング表示不要かどうかを判断
|
||||
@ -168,7 +215,10 @@ void Form1::setRatingForms(void)
|
||||
this->combGRB->SelectedIndex = this->hSrl->hArrayParentalIndex[ OS_TWL_PCTL_OGN_GRB ];
|
||||
} //setRatingForms()
|
||||
|
||||
// リージョン情報からペアレンタルコントロールの編集可能団体をマスクする
|
||||
// ---------------------------------------------------------------------
|
||||
// GUIで表示するレーティング団体をリージョンによって変える
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void Form1::maskRatingForms(void)
|
||||
{
|
||||
this->enableRating( this->combCERO, this->labCERO, nullptr );
|
||||
@ -179,128 +229,162 @@ void Form1::maskRatingForms(void)
|
||||
this->enableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->enableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->enableRating( this->combGRB, this->labGRB, nullptr );
|
||||
switch( this->combRegion->SelectedIndex )
|
||||
|
||||
// 中韓リージョンは設定不可なので特別処理
|
||||
if( (this->combRegion->DropDownStyle == System::Windows::Forms::ComboBoxStyle::DropDown) // コンボボックスが中韓リージョン用になっているとき
|
||||
&& this->hSrl->IsRegionChina ) // SRLが読み込まれていることは保証される
|
||||
{
|
||||
case 0:
|
||||
// 日本
|
||||
this->enableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->disableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
// 中国にレーティング団体なし
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->disableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
}
|
||||
else if( (this->combRegion->DropDownStyle == System::Windows::Forms::ComboBoxStyle::DropDown)
|
||||
&& this->hSrl->IsRegionKorea )
|
||||
{
|
||||
// 韓国はGRBのみ
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->disableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->enableRating( this->combGRB, this->labGRB, nullptr );
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( this->combRegion->SelectedIndex )
|
||||
{
|
||||
case 0:
|
||||
// 日本
|
||||
this->enableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->disableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
|
||||
case 1:
|
||||
// 北米
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->enableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->disableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
case 1:
|
||||
// 北米
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->enableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->disableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// 欧州
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->enableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->enableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->enableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->enableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->disableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
case 2:
|
||||
// 欧州
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->enableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->enableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->enableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->enableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->disableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// 豪州
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->enableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
case 3:
|
||||
// 豪州
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->enableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// 欧州と豪州
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->enableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->enableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->enableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->enableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->enableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
case 4:
|
||||
// 欧州と豪州
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->enableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->enableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->enableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->enableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->enableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
|
||||
case 5:
|
||||
// 北米と豪州
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->enableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->enableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
case 5:
|
||||
// 北米と豪州
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->enableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->enableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
|
||||
case 6:
|
||||
// 北米と欧州と豪州
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->enableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->enableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->enableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->enableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->enableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->enableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
case 6:
|
||||
// 北米と欧州と豪州
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->enableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->enableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->enableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->enableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->enableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->enableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
|
||||
case 7:
|
||||
// 韓国
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->disableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->enableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
|
||||
case 8:
|
||||
// 中国
|
||||
this->disableRating( this->combCERO, this->labCERO, nullptr );
|
||||
this->disableRating( this->combESRB, this->labESRB, nullptr );
|
||||
this->disableRating( this->combUSK, this->labUSK, nullptr );
|
||||
this->disableRating( this->combPEGI, this->labPEGI, nullptr );
|
||||
this->disableRating( this->combPEGI_PRT, this->labPEGI_PRT, nullptr );
|
||||
this->disableRating( this->combPEGI_BBFC, this->labPEGI_BBFC, nullptr );
|
||||
this->disableRating( this->combOFLC, this->labOFLC, nullptr );
|
||||
this->disableRating( this->combGRB, this->labGRB, nullptr );
|
||||
break;
|
||||
|
||||
// 全リージョンのときは何もdisableにしない
|
||||
default:
|
||||
break;
|
||||
// 全リージョンのときは何もdisableにしない
|
||||
default:
|
||||
break;
|
||||
}// switch
|
||||
}
|
||||
} //maskRatingForms()
|
||||
|
||||
// 全団体を「レーティング表示不要」の設定/解除をする
|
||||
// ---------------------------------------------------------------------
|
||||
// GUIのレーティング設定に問題がないかチェックする
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void Form1::checkRatingForms( System::Boolean inRegion, System::Windows::Forms::ComboBox ^comb, System::String ^ogn )
|
||||
{
|
||||
// リージョンに含まれていないとき: 0クリアが保証されるのでチェック必要なし
|
||||
if( !inRegion )
|
||||
return;
|
||||
|
||||
// 設定されていないときエラー
|
||||
if( (comb->SelectedIndex < 0) || (comb->SelectedIndex >= comb->Items->Count) )
|
||||
{
|
||||
this->hErrorList->Add( this->makeErrorMsg(true, "LabelRating", "RatingInput", ogn) );
|
||||
}
|
||||
|
||||
// 審査中のとき警告
|
||||
if( comb->SelectedIndex == (comb->Items->Count - 1) )
|
||||
{
|
||||
this->hWarnList->Add( this->makeErrorMsg(true, "LabelRating", "RatingPendingSelect", ogn) );
|
||||
}
|
||||
} //checkRatingForms()
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// 「レーティング表示不要」が選択されたかどうかでコンボボックスの内容を変える
|
||||
// ROM読み込み時および「レーティング表示不要」チェックボックスに変化があったときに呼び出される
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void Form1::changeUnnecessaryRatingForms( System::Boolean bInitial )
|
||||
{
|
||||
if( this->cboxIsUnnecessaryRating->Checked )
|
||||
{
|
||||
this->unnecessaryRating( this->combCERO ); // マスクは別のところでするのでここでは全団体を不要にしてもかまわない
|
||||
this->unnecessaryRating( this->combCERO ); // 表示/非表示の選択は別のところでするのでここでは全団体を不要にしてもかまわない
|
||||
this->unnecessaryRating( this->combESRB );
|
||||
this->unnecessaryRating( this->combUSK );
|
||||
this->unnecessaryRating( this->combPEGI );
|
||||
@ -322,34 +406,19 @@ void Form1::changeUnnecessaryRatingForms( System::Boolean bInitial )
|
||||
}
|
||||
}
|
||||
|
||||
// ペアレンタルコントロール関連のフォーム入力が正しいか書き込み前チェック
|
||||
void Form1::checkRatingForms( System::Boolean inRegion, System::Windows::Forms::ComboBox ^comb, System::String ^ogn )
|
||||
{
|
||||
// リージョンに含まれていないとき: 0クリアが保証されるのでチェック必要なし
|
||||
if( !inRegion )
|
||||
return;
|
||||
// ---------------------------------------------------------------------
|
||||
// レーティングのコンボボックスをクリアする
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
// 設定されていないときエラー
|
||||
if( (comb->SelectedIndex < 0) || (comb->SelectedIndex >= comb->Items->Count) )
|
||||
{
|
||||
this->hErrorList->Add( this->makeErrorMsg(true, "LabelRating", "RatingInput", ogn) );
|
||||
}
|
||||
|
||||
// 審査中のとき警告
|
||||
if( comb->SelectedIndex == (comb->Items->Count - 1) )
|
||||
{
|
||||
this->hWarnList->Add( this->makeErrorMsg(true, "LabelRating", "RatingPendingSelect", ogn) );
|
||||
}
|
||||
} //checkRatingForms()
|
||||
|
||||
// ペアレンタルコントロール情報をクリアする
|
||||
void Form1::clearRating( System::Windows::Forms::ComboBox ^comb )
|
||||
{
|
||||
comb->SelectedIndex = -1; // 空白にする
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// レーティングのコンボボックスを編集可能な状態にする
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
// ペアレンタルコントロール情報を編集できるようにする
|
||||
void Form1::enableRating( System::Windows::Forms::ComboBox ^comb,
|
||||
System::Windows::Forms::Label ^lab1,
|
||||
System::Windows::Forms::Label ^lab2 )
|
||||
@ -361,14 +430,20 @@ void Form1::enableRating( System::Windows::Forms::ComboBox ^comb,
|
||||
{
|
||||
lab2->Visible = true;
|
||||
}
|
||||
// 本来は不必要な設定
|
||||
//「レーティング表示不要」でEnableをfalseにするのでリージョンに含まれているのかどうかを知る術がない
|
||||
// (Visibleは親タブが変わると勝手にFalseになってしまう)
|
||||
// 提出確認書にレーティングを記述する際に「団体がリージョンに含まれているかどうか」の情報が必要となる
|
||||
// comb->Enableは編集可能かどうかを表すので
|
||||
// リージョンに含まれているかどうかの情報として使えるように思えるが
|
||||
//「レーティング表示不要」でcomb->Enabledをfalseにしなければならないので
|
||||
// リージョンに含まれているのかをcomb->Enabledを使って判定できない
|
||||
// (comb->Visibleが使えそうだが残念ながら別のタブに移動すると勝手にfalseになってしまう)
|
||||
// そのため無関係な設定を変えることでリージョンに含まれていることを表現する
|
||||
comb->FlatStyle = System::Windows::Forms::FlatStyle::Standard;
|
||||
}
|
||||
|
||||
// ペアレンタルコントロール情報を編集できなくする
|
||||
// ---------------------------------------------------------------------
|
||||
// レーティングのコンボボックスを編集不可状態にする
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void Form1::disableRating( System::Windows::Forms::ComboBox ^comb,
|
||||
System::Windows::Forms::Label ^lab1,
|
||||
System::Windows::Forms::Label ^lab2 )
|
||||
@ -381,13 +456,18 @@ void Form1::disableRating( System::Windows::Forms::ComboBox ^comb,
|
||||
{
|
||||
lab2->Visible = false;
|
||||
}
|
||||
comb->FlatStyle = System::Windows::Forms::FlatStyle::Popup; // Disableを表現
|
||||
// リージョンに含まれないことを表現 (表示が消えるのでこの値が変わっても問題ない)
|
||||
comb->FlatStyle = System::Windows::Forms::FlatStyle::Popup;
|
||||
}
|
||||
|
||||
// 「レーティング表示不要」と表示して編集できなくする
|
||||
// ---------------------------------------------------------------------
|
||||
// レーティングのコンボボックスに「レーティング表示不要」と表示し
|
||||
// 編集不可状態にする
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void Form1::unnecessaryRating( System::Windows::Forms::ComboBox ^comb )
|
||||
{
|
||||
comb->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDown; // 一時的にテキスト入力可能にする
|
||||
comb->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDown; // 自由なテキストを表示可能にする
|
||||
comb->SelectedIndex = -1; // 何も選択されていないとみなす
|
||||
System::String ^msg;
|
||||
if( this->isJapanese() )
|
||||
@ -402,13 +482,18 @@ void Form1::unnecessaryRating( System::Windows::Forms::ComboBox ^comb )
|
||||
comb->Enabled = false; // 編集不可能にする
|
||||
}
|
||||
|
||||
// 「レーティング表示不要」表示を消して通常の設定に戻す
|
||||
// ---------------------------------------------------------------------
|
||||
// レーティングのコンボボックスの「レーティング表示不要」の表示をクリアし
|
||||
// 編集可能状態にする
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
void Form1::necessaryRating( System::Windows::Forms::ComboBox ^comb, System::Boolean bInitial )
|
||||
{
|
||||
comb->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
|
||||
comb->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList; // リストの中からしか選択できないようにする
|
||||
if( !bInitial )
|
||||
{
|
||||
comb->SelectedIndex = -1; // 読み込みの場合にはコンボボックスを初期化しない(せっかく読み込んだ情報を消してしまうため)
|
||||
comb->SelectedIndex = -1; // ROM読み込み時の場合にはコンボボックスを初期化しない(せっかく読み込んだ情報を消してしまうため)
|
||||
// GUI上で変更したときには空白に初期化する(再度設定させる)
|
||||
}
|
||||
comb->Enabled = true; // 編集可能にする
|
||||
}
|
||||
|
||||
@ -349,10 +349,9 @@ void Form1::setSrlFormsTextBox()
|
||||
System::Boolean Form1::checkSrlForms(void)
|
||||
{
|
||||
// ƒŠ<C692>[ƒWƒ‡ƒ“
|
||||
if( this->checkComboBoxIndex( this->combRegion, "LabelRegion", true ) == false )
|
||||
return false;
|
||||
this->checkRegionForms();
|
||||
|
||||
// リージョンを決める
|
||||
// レーティングのチェックをするためにリージョンを決める
|
||||
System::Boolean bJapan = false;
|
||||
System::Boolean bAmerica = false;
|
||||
System::Boolean bEurope = false;
|
||||
@ -385,14 +384,9 @@ System::Boolean Form1::checkSrlForms(void)
|
||||
bEurope = true;
|
||||
bAustralia = true;
|
||||
break;
|
||||
case 7:
|
||||
bKorea = true;
|
||||
break;
|
||||
case 8:
|
||||
break;
|
||||
|
||||
#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||
case 9:
|
||||
case 7:
|
||||
bJapan = true;
|
||||
bAmerica = true;
|
||||
bEurope = true;
|
||||
|
||||
@ -576,6 +576,15 @@ 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++ )
|
||||
{
|
||||
this->pRomHeader->s.parental_control_rating_info[j] = OS_TWL_PCTL_OGNINFO_ENABLE_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
// リージョンに含まれる団体のみを設定
|
||||
System::Collections::Generic::List<int> ^ognlist = MasterEditorTWL::getOgnListInRegion( region );
|
||||
if( !ognlist )
|
||||
@ -612,16 +621,6 @@ void RCSrl::setRatingRomHeader( u32 region )
|
||||
}
|
||||
this->pRomHeader->s.parental_control_rating_info[ ogn ] = rating;
|
||||
}
|
||||
//#if defined(METWL_VER_APPTYPE_SYSTEM) || defined(METWL_VER_APPTYPE_SECURE) || defined(METWL_VER_APPTYPE_LAUNCHER)
|
||||
// int ogn;
|
||||
// for( ogn=0; ogn < OS_TWL_PCTL_OGN_MAX; ogn++ )
|
||||
// {
|
||||
// if( ognlist->IndexOf(ogn) < 0 )
|
||||
// {
|
||||
// this->pRomHeader->s.parental_control_rating_info[ ogn ] = OS_TWL_PCTL_OGNINFO_ENABLE_MASK | 0;
|
||||
// }
|
||||
// }
|
||||
//#endif
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user