mirror of
https://github.com/rvtr/TwlToolsRED.git
synced 2025-10-31 06:41:18 -04:00
マスタエディタ:中国版のときにレーティング表示不要の設定を読み込めなかった問題点を修正。中国版のときの提出確認書のレーティング記述を変更。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlToolsRED@318 7061adef-622a-194b-ae81-725974e89856
This commit is contained in:
parent
43ceeed3ff
commit
9e2bca9c35
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -4540,13 +4540,13 @@ private: System::Windows::Forms::ToolStripMenuItem^ stripItemRomInfoList;
|
||||
// リージョン設定は複雑なので別に切り出す
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
// フォーム入力をSRLに反映させる
|
||||
// GUIのコンボボックスからROMヘッダのリージョンコードを決定する
|
||||
void setRegionSrlPropaties(void);
|
||||
|
||||
// SRL情報をフォームに反映させる
|
||||
// ROMヘッダのリージョンコードからGUIのコンボボックスの値を決定する
|
||||
void setRegionForms(void);
|
||||
|
||||
// フォーム入力が正しいか書き込み前チェック
|
||||
// リージョンのフォームに問題がないかをチェックする
|
||||
void checkRegionForms(void);
|
||||
|
||||
private:
|
||||
@ -4554,39 +4554,40 @@ private: System::Windows::Forms::ToolStripMenuItem^ stripItemRomInfoList;
|
||||
// レーティング設定は複雑なので別に切り出す
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
// フォーム入力をSRLに反映させる
|
||||
// ROMヘッダのレーティング情報からGUIのコンボボックスを設定する
|
||||
void setRatingSrlProperties(void);
|
||||
|
||||
// SRL情報をフォームに反映させる
|
||||
// GUIのコンボボックスの選択をROMヘッダに反映させる
|
||||
void setRatingForms(void);
|
||||
|
||||
// リージョン情報からペアレンタルコントロールの編集可能団体をマスクする
|
||||
// GUIで表示するレーティング団体をリージョンによって変える
|
||||
void maskRatingForms(void);
|
||||
|
||||
// フォーム入力が正しいか書き込み前チェック
|
||||
// GUIのレーティング設定に問題がないかチェックする
|
||||
void checkRatingForms( System::Boolean inRegion,
|
||||
System::Windows::Forms::ComboBox ^comb, System::String ^ogn );
|
||||
|
||||
// クリアする
|
||||
// レーティングのコンボボックスをクリアする
|
||||
void clearRating( System::Windows::Forms::ComboBox ^comb );
|
||||
|
||||
// 編集できるようにする
|
||||
// レーティングのコンボボックスを編集可能な状態にする
|
||||
void enableRating( System::Windows::Forms::ComboBox ^comb,
|
||||
System::Windows::Forms::Label ^lab1,
|
||||
System::Windows::Forms::Label ^lab2 );
|
||||
|
||||
// 編集できなくする
|
||||
// レーティングのコンボボックスを編集不可状態にする
|
||||
void disableRating( System::Windows::Forms::ComboBox ^comb,
|
||||
System::Windows::Forms::Label ^lab1,
|
||||
System::Windows::Forms::Label ^lab2 );
|
||||
|
||||
// 全団体を「レーティング表示不要」の設定/解除をする
|
||||
// 「レーティング表示不要」が選択されたかどうかでコンボボックスの内容を変える
|
||||
// ROM読み込み時および「レーティング表示不要」チェックボックスに変化があったときに呼び出される
|
||||
void changeUnnecessaryRatingForms( System::Boolean bInitial );
|
||||
|
||||
// 「レーティング表示不要」と表示して編集できなくする
|
||||
// レーティングのコンボボックスに「レーティング表示不要」と表示し編集不可状態にする
|
||||
void unnecessaryRating( System::Windows::Forms::ComboBox ^comb );
|
||||
|
||||
// 「レーティング表示不要」表示を消して通常の設定に戻す
|
||||
// レーティングのコンボボックスの「レーティング表示不要」の表示をクリアし編集可能状態にする
|
||||
void necessaryRating( System::Windows::Forms::ComboBox ^comb, System::Boolean bInitial );
|
||||
|
||||
// ----------------------------------------------
|
||||
|
||||
@ -225,10 +225,7 @@ void Form1::setDeliverableProperties(void)
|
||||
// WorldWide のときはリストで選択可能な文字列を登録
|
||||
if( this->combRegion->SelectedIndex < 0 )
|
||||
{
|
||||
if( this->isJapanese() == true )
|
||||
this->hDeliv->hRegion = gcnew System::String("不明");
|
||||
else
|
||||
this->hDeliv->hRegion = gcnew System::String("Undefined");
|
||||
this->hDeliv->hRegion = this->isJapanese()?METWL_STRING_UNDEFINED_REGION_J:METWL_STRING_UNDEFINED_REGION_E; // 起こり得ない
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -256,32 +253,49 @@ void Form1::setDeliverableProperties(void)
|
||||
System::String^ Form1::setDeliverableRatingOgnProperties( System::Windows::Forms::ComboBox ^box )
|
||||
{
|
||||
System::String ^str;
|
||||
|
||||
// 中国リージョン特別対応
|
||||
if( (this->combRegion->DropDownStyle == System::Windows::Forms::ComboBoxStyle::DropDown) // コンボボックスが中韓リージョン用になっているとき
|
||||
&& this->hSrl->IsRegionChina ) // SRLが読み込まれていることは保証される
|
||||
{
|
||||
if( this->cboxIsUnnecessaryRating->Checked )
|
||||
{
|
||||
// レーティング表示不要が選択されているときには団体が中国リージョンに含まれていなくても「レーティング表示不要」となる
|
||||
str = this->isJapanese()?METWL_STRING_UNNECESSARY_RATING_J:METWL_STRING_UNNECESSARY_RATING_E;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 中国リージョンに含まれていなくても「全年齢」
|
||||
str = this->isJapanese()?METWL_STRING_CHINA_RATING_FREE_J:METWL_STRING_CHINA_RATING_FREE_E;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
// リージョンに含まれる団体のみレーティングが設定される それ以外は「不可」となる
|
||||
if( this->cboxIsUnnecessaryRating->Checked ) // レーティング表示不要が選択されているとき
|
||||
{
|
||||
if( box->FlatStyle == System::Windows::Forms::FlatStyle::Standard ) // リージョンに含まれているときの判定
|
||||
{
|
||||
str = System::String::Copy( box->Text ); // テキスト入力可になっているので取得できるはず
|
||||
// リージョンに含まれている団体のみ「レーティング表示不要」とする
|
||||
str = this->isJapanese()?METWL_STRING_UNNECESSARY_RATING_J:METWL_STRING_UNNECESSARY_RATING_E;
|
||||
}
|
||||
else // リージョンに含まれていない(コンボボックスが表示されていない)ときには不可とする
|
||||
else
|
||||
{
|
||||
if( this->isJapanese() == true )
|
||||
str = gcnew System::String("不可");
|
||||
else
|
||||
str = gcnew System::String("Undefined");
|
||||
// リージョンに含まれていない(コンボボックスが表示されていない)ときには「不可」とする
|
||||
str = this->isJapanese()?METWL_STRING_UNDEFINED_RATING_J:METWL_STRING_UNDEFINED_RATING_E;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( box->SelectedIndex < 0 )
|
||||
{
|
||||
if( this->isJapanese() == true )
|
||||
str = gcnew System::String("不可");
|
||||
else
|
||||
str = gcnew System::String("Undefined");
|
||||
// リージョンに含まれていない(コンボボックスが表示されていない)ときには「不可」とする
|
||||
str = this->isJapanese()?METWL_STRING_UNDEFINED_RATING_J:METWL_STRING_UNDEFINED_RATING_E;
|
||||
}
|
||||
else
|
||||
{
|
||||
str = dynamic_cast<System::String^>(box->SelectedItem); // リストで選択されているテキストを代入
|
||||
// リージョンに含まれている団体にはリストで選択されているテキストを代入
|
||||
str = dynamic_cast<System::String^>(box->SelectedItem);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
|
||||
@ -115,14 +115,14 @@ void Form1::setRegionForms(void)
|
||||
{
|
||||
this->combRegion->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDown; // 自由にテキストを入力できる
|
||||
this->combRegion->SelectedIndex = -1; // 設定の順序に注意: テキストの設定よりも前に入れておかないとテキスト入力が反映されないことがある
|
||||
this->combRegion->Text = this->isJapanese()?"中国のみ":"China only";
|
||||
this->combRegion->Text = this->isJapanese()?METWL_STRING_CHINA_REGION_J:METWL_STRING_CHINA_REGION_E;
|
||||
this->combRegion->Enabled = false; // 編集不可
|
||||
}
|
||||
else if( !isJapan && !isAmerica && !isEurope && !isAustralia && isKorea && !isChina ) // 韓国
|
||||
{
|
||||
this->combRegion->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDown;
|
||||
this->combRegion->SelectedIndex = -1;
|
||||
this->combRegion->Text = this->isJapanese()?"韓国のみ":"Korea only";
|
||||
this->combRegion->Text = this->isJapanese()?METWL_STRING_KOREA_REGION_J:METWL_STRING_KOREA_REGION_E;
|
||||
this->combRegion->Enabled = false;
|
||||
}
|
||||
else // WorldWide
|
||||
@ -469,15 +469,7 @@ void Form1::unnecessaryRating( System::Windows::Forms::ComboBox ^comb )
|
||||
{
|
||||
comb->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDown; // 自由なテキストを表示可能にする
|
||||
comb->SelectedIndex = -1; // 何も選択されていないとみなす
|
||||
System::String ^msg;
|
||||
if( this->isJapanese() )
|
||||
{
|
||||
msg = gcnew System::String( "レーティング表示不要(全年齢)" );
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = gcnew System::String( "Rating Not Required (All ages)" );
|
||||
}
|
||||
System::String ^msg = this->isJapanese()?METWL_STRING_UNNECESSARY_RATING_J:METWL_STRING_UNNECESSARY_RATING_E;
|
||||
comb->Text = msg;
|
||||
comb->Enabled = false; // 編集不可能にする
|
||||
}
|
||||
|
||||
@ -23,3 +23,17 @@
|
||||
#define METWL_SEG3_CRC 0x0254
|
||||
#define METWL_TAD_TMP_FILENAME "tmp.srl" // TAD読み込みの際に split_tad で一時的に作成するファイル名
|
||||
#define METWL_SDK52_RELEASE ((5 << 24)|(2 << 16)|30000) // SDアクセス権の判定が必要なSDKバージョン (5.2 RELEASE)
|
||||
|
||||
// 特別にGUI表示/提出確認書に記述する文字列
|
||||
#define METWL_STRING_UNNECESSARY_RATING_J ("レーティング表示不要(全年齢)")
|
||||
#define METWL_STRING_UNNECESSARY_RATING_E ("Rating Not Required (All ages)")
|
||||
#define METWL_STRING_UNDEFINED_RATING_J ("不可")
|
||||
#define METWL_STRING_UNDEFINED_RATING_E ("Undefined")
|
||||
#define METWL_STRING_UNDEFINED_REGION_J ("不明") // 起こり得ない
|
||||
#define METWL_STRING_UNDEFINED_REGION_E ("Undefined")
|
||||
#define METWL_STRING_CHINA_RATING_FREE_J ("全年齢(中国版対応)")
|
||||
#define METWL_STRING_CHINA_RATING_FREE_E ("All ages (China version support)")
|
||||
#define METWL_STRING_CHINA_REGION_J ("中国のみ")
|
||||
#define METWL_STRING_CHINA_REGION_E ("China only")
|
||||
#define METWL_STRING_KOREA_REGION_J ("韓国のみ")
|
||||
#define METWL_STRING_KOREA_REGION_E ("Korea only")
|
||||
|
||||
@ -392,7 +392,7 @@ bool RCSrl::setRegionInfo( u32 region )
|
||||
this->IsRegionChina = ((region & METWL_MASK_REGION_CHINA) != 0)?true:false;
|
||||
|
||||
// リージョンに含まれる団体がなかったらリージョンは不正
|
||||
if( MasterEditorTWL::getOgnListInRegion( region ) == nullptr )
|
||||
if( (MasterEditorTWL::getOgnListInRegion( region ) == nullptr) && (region != METWL_MASK_REGION_CHINA) ) // 中国は例外
|
||||
{
|
||||
this->hParentalErrorList->Add( this->makeMrcError("IllegalRegion") );
|
||||
return false;
|
||||
@ -409,12 +409,6 @@ bool RCSrl::setRegionInfo( u32 region )
|
||||
// ----------------------------------------------------------------------
|
||||
void RCSrl::setUnnecessaryRatingInfo( u32 region )
|
||||
{
|
||||
System::Collections::Generic::List<int> ^ognlist = MasterEditorTWL::getOgnListInRegion( region );
|
||||
if( ognlist == nullptr ) // リストがnullptrなら不正
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// ROMヘッダのフラグを調べる
|
||||
this->IsUnnecessaryRating = (this->pRomHeader->s.unnecessary_rating_display != 0)?true:false;
|
||||
if( !this->IsUnnecessaryRating )
|
||||
@ -422,6 +416,13 @@ void RCSrl::setUnnecessaryRatingInfo( u32 region )
|
||||
return; // 不要でないならこれ以降のチェックは必要ない(レーティング情報の取得に移る)
|
||||
}
|
||||
|
||||
// リージョンに含まれるレーティング団体を取得
|
||||
System::Collections::Generic::List<int> ^ognlist = MasterEditorTWL::getOgnListInRegion( region );
|
||||
if( ognlist == nullptr )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// リージョンに含まれる団体のレーティング情報に余計なデータが登録されていないかチェック
|
||||
bool noerror = false;
|
||||
for each( int ogn in ognlist )
|
||||
@ -577,6 +578,7 @@ void RCSrl::setRatingRomHeader( u32 region )
|
||||
this->pRomHeader->s.unnecessary_rating_display = (this->IsUnnecessaryRating == true)?1:0;
|
||||
|
||||
// 中国リージョンおよびオールリージョンのとき予約領域もすべて「全年齢」(0x80)で埋めておく
|
||||
// 「レーティング表示不要」かどうかにかかわらず埋める
|
||||
if( this->IsRegionChina ) // オールリージョンのときも中国ビットは立つ
|
||||
{
|
||||
for( j=0; j < PARENTAL_CONTROL_INFO_SIZE; j++ )
|
||||
|
||||
Loading…
Reference in New Issue
Block a user