diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb index 841cf47..eb509d3 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 ad6ea14..fff0604 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 e4269c3..1d83c51 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 61b3a0d..b133bf5 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form1.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/Form1.h @@ -2960,7 +2960,7 @@ private: System::Windows::Forms::CheckBox^ cboxIsUnnecessaryRating; { System::Reflection::Assembly ^ass = System::Reflection::Assembly::GetEntryAssembly(); System::Version ^ver = ass->GetName()->Version; - return ( ver->Major.ToString() + "." + ver->Minor.ToString() ); + return ( ver->Major.ToString() + "." + ver->Minor.ToString() + "a" ); } // SRLに登録されないROM仕様のフォーム入力を diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp index f3ddaa3..0d32f6e 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/srl.cpp @@ -1592,19 +1592,35 @@ ECSrlResult RCSrl::mrcTWL( FILE *fp ) if( this->hMrcSpecialList->IsCheck ) { // SDKバージョン - System::Boolean match = true; + System::Boolean isOld = false; + System::Boolean isPR = false; + System::Boolean isRC = false; for each( RCSDKVersion ^sdk in this->hSDKList ) { - if( sdk->IsStatic && (sdk->Code != this->hMrcSpecialList->SDKVer) ) + if( sdk->IsStatic ) { - match = false; + isPR = MasterEditorTWL::IsSDKVersionPR( sdk->Code ); + isRC = MasterEditorTWL::IsSDKVersionRC( sdk->Code ); + isOld = MasterEditorTWL::IsOldSDKVersion( sdk->Code, this->hMrcSpecialList->SDKVer ); } } - if( !match ) + if( isOld ) { this->hWarnList->Add( gcnew RCMrcError( - "SDKバージョン", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, "本プログラムに登録されているバージョン情報と一致しません。", - "SDK Version", "The data doesn't match one registered in this program.", false, true ) ); + "SDKバージョン", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, "設定ファイルに登録されているバージョンよりも古いバージョンです。", + "SDK Version", "Older version (comparing with a setting file)", false, true ) ); + } + if( isPR ) + { + this->hWarnList->Add( gcnew RCMrcError( + "SDKバージョン", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, "ご使用のSDKバージョンはPR版です。", + "SDK Version", "Used version is PR.", false, true ) ); + } + if( isRC ) + { + this->hWarnList->Add( gcnew RCMrcError( + "SDKバージョン", METWL_ERRLIST_NORANGE, METWL_ERRLIST_NORANGE, "ご使用のSDKバージョンはRC版です。", + "SDK Version", "Used version is RC.", false, true ) ); } // Shared2ファイルサイズ diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.cpp index 86778d2..2b4ca97 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.cpp @@ -492,3 +492,78 @@ u32 MasterEditorTWL::countBits( const u32 val ) n = (n>>16) + (n & 0x0000ffff); return n; } + +// +// SDKバージョンの大小判定をする +// +// @arg [in] 判定対象のSDKバージョン(SRLに含まれるもの) +// @arg [in] 判定基準のSDKバージョン(設定ファイルに記述されるもの) +// +// @ret 判定対象が基準よりも旧バージョンのとき(認められないとき) true +// +System::Boolean MasterEditorTWL::IsOldSDKVersion( u32 target, u32 criterion ) +{ + // SDKバージョンからメジャーバージョン/マイナーバージョン/relstepを抽出 + System::Byte majorTar = (System::Byte)(0xff & (target >> 24)); + System::Byte minorTar = (System::Byte)(0xff & (target >> 16)); + System::UInt16 relstepTar = (System::UInt16)(0xffff & target); + + System::Byte majorCri = (System::Byte)(0xff & (criterion >> 24)); + System::Byte minorCri = (System::Byte)(0xff & (criterion >> 16)); + System::UInt16 relstepCri = (System::UInt16)(0xffff & criterion); + + if( majorTar < majorCri ) + { + return true; + } + + // メジャーが一致するときマイナーを判定 + if( (majorTar == majorCri) && (minorTar < minorCri) ) + { + return true; + } + + // メジャーもマイナーも一致するときrelstepを判定 + if( (majorTar == majorCri) && (minorTar == minorCri) && (relstepTar < relstepCri) ) + { + if( !MasterEditorTWL::IsSDKVersionPR(relstepTar) && !MasterEditorTWL::IsSDKVersionRC(relstepTar) ) + { + return true; // Release版のときのみ + } + } + return false; +} + +// +// SDKバージョンがPR版かどうか調べる +// +// @arg [in] 判定対象のSDKバージョン(SRLに含まれるもの) +// +// @ret PR版のとき true +// +System::Boolean MasterEditorTWL::IsSDKVersionPR( u32 target ) +{ + System::UInt16 relstep = (System::UInt16)(0xffff & target); + if( (10000 <= relstep) && (relstep < 20000) ) + { + return true; + } + return false; +} + +// +// SDKバージョンがRC版かどうか調べる +// +// @arg [in] 判定対象のSDKバージョン(SRLに含まれるもの) +// +// @ret PR版のとき true +// +System::Boolean MasterEditorTWL::IsSDKVersionRC( u32 target ) +{ + System::UInt16 relstep = (System::UInt16)(0xffff & target); + if( (20000 <= relstep) && (relstep < 30000) ) + { + return true; + } + return false; +} diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.h b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.h index 1fb36e6..e0dd408 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.h @@ -165,4 +165,32 @@ namespace MasterEditorTWL // u32 countBits( const u32 val ); + // + // SDKバージョンの大小判定をする + // + // @arg [in] 判定対象のSDKバージョン(SRLに含まれるもの) + // @arg [in] 判定基準のSDKバージョン(設定ファイルに記述されるもの) + // + // @ret 判定対象が基準よりも旧バージョンのとき(認められないとき) true + // + System::Boolean IsOldSDKVersion( u32 target, u32 criterion ); + + // + // SDKバージョンがPR版かどうか調べる + // + // @arg [in] 判定対象のSDKバージョン(SRLに含まれるもの) + // + // @ret PR版のとき true + // + System::Boolean IsSDKVersionPR( u32 target ); + + // + // SDKバージョンがRC版かどうか調べる + // + // @arg [in] 判定対象のSDKバージョン(SRLに含まれるもの) + // + // @ret PR版のとき true + // + System::Boolean IsSDKVersionRC( u32 target ); + } // end of namespace MasterEditorTWL