diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL.ncb index 302b561..6cbc770 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 850a87a..d36a376 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 b4e24fb..8a3f2ed 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/utility.cpp b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.cpp index 5ff8380..f4ccdfa 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.cpp +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.cpp @@ -223,6 +223,63 @@ System::Collections::Generic::List^ MasterEditorTWL::patternMatch( return list; } // MasterEditorTWL::patternMatch +//// +//// バイト列に特定のパターンが含まれるかどうかマッチングする (Boyer-Moore法) +//// +//// @arg [in] テキスト +//// [in] テキストの長さ +//// [in] パターン +//// [in] パターンの長さ +//// [in] skipマップ(あらかじめ生成しておく) +//// +//// @ret マッチしたテキストのインデックスをリストで返す。 +//// +//System::Collections::Generic::List^ MasterEditorTWL::patternMatchBM( +// const u8 *text, const int textLen, const u8 *pattern, const int patternLen, const int skip[] ) +//{ +// System::Collections::Generic::List ^list = gcnew System::Collections::Generic::List(); +// list->Clear(); +// +// if( textLen < patternLen ) +// { +// return list; +// } +// +// int pos = patternLen-1; +// while( pos < textLen ) // イメージとしてはパターンを固定してテキストの方をずらしていく感じ +// { +// int first = pos - (patternLen-1); +// if( memcmp( text+first, pattern, patternLen ) == 0 ) // 本来は末尾から探索するがめんどうなので先頭からmemcmp +// { +// list->Add( first ); +// } +// pos = pos + skip[ (int)text[pos] ]; // パターンの末尾と照合するテキスト位置をずらす +// } +// return list; +//} +// +//// +//// Boyer-Moore法のskipマップの生成 +//// +//// @arg [in] パターン +//// [in] パターンの長さ +//// [out] skipマップの格納先 +//// +//// @ret なし +//// +//void MasterEditorTWL::makeSkipBM( const u8 *pattern, const int patternLen, int skip[] ) +//{ +// int i; +// for( i=0; i < 256; i++ ) // すべての文字(出現しうるデータ)についてマップを初期化 +// { +// skip[i] = patternLen; // パターンにない文字なのでパターンを丸ごとスキップできる +// } +// for( i=0; i < (patternLen-1); i++ ) // 末尾を除くすべてのパターン出現文字について(最後の)出現位置を登録 +// { +// skip[ (int)pattern[i] ] = patternLen - 1 - i; +// } +//} + // // ファイルにバイト列のパターンが含まれるかどうかマッチングする // diff --git a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.h b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.h index 1af73bf..99c4628 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.h +++ b/build/tools/MasterEditor/MasterEditorTWL/MasterEditorTWL/utility.h @@ -81,6 +81,31 @@ namespace MasterEditorTWL // System::Collections::Generic::List^ patternMatch( FILE *fp, const u8 *pattern, const u32 patternLen ); + //// + //// バイト列に特定のパターンが含まれるかどうかマッチングする (Boyer-Moore法) + //// + //// @arg [in] テキスト + //// [in] テキストの長さ + //// [in] パターン + //// [in] パターンの長さ + //// [in] skipマップ(あらかじめ生成しておく) + //// + //// @ret マッチしたテキストのインデックスをリストで返す。 + //// + //System::Collections::Generic::List^ patternMatchBM( + // const u8 *text, const int textLen, const u8 *pattern, const int patternLen, const int skip[] ); + + //// + //// Boyer-Moore法のskipマップの生成 + //// + //// @arg [in] パターン + //// [in] パターンの長さ + //// [out] skipマップの格納先 + //// + //// @ret なし + //// + //void makeSkipBM( const u8 *pattern, const int patternLen, int skip[] ); + // // XMLのルートノードから指定した名前のタグを検索して返す // diff --git a/build/tools/MasterEditor/MasterEditorTWL/resource/append_ini.xml b/build/tools/MasterEditor/MasterEditorTWL/resource/append_ini.xml index 535b053..9641e05 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/resource/append_ini.xml +++ b/build/tools/MasterEditor/MasterEditorTWL/resource/append_ini.xml @@ -1,12 +1,16 @@ + ON + ON + 5 0 20200 + 0 0 diff --git a/build/tools/MasterEditor/MasterEditorTWL/resource/sheet_templete.xml b/build/tools/MasterEditor/MasterEditorTWL/resource/sheet_templete.xml index 916697a..039557d 100644 --- a/build/tools/MasterEditor/MasterEditorTWL/resource/sheet_templete.xml +++ b/build/tools/MasterEditor/MasterEditorTWL/resource/sheet_templete.xml @@ -1728,7 +1728,18 @@ - + + + + - + + + + - - - - - - - - - - - @@ -2261,7 +2273,7 @@ - + @@ -2364,7 +2376,7 @@ - @@ -3780,9 +3792,9 @@ - 繝ゥ繧、繝悶Λ繝ェ - TagLibrary @@ -3791,6 +3803,11 @@ + + + + + @@ -8586,8 +8603,8 @@ - - + + @@ -11776,6 +11793,14 @@ 100 + + + 3 + 43 + 12 + R44C13:R46C100 + + False False @@ -11903,12 +11928,12 @@ - 繝ェ繝ァ繧ヲ繧、繧ュTWL繝弱シ繝槭Ν鬆伜沺ROM繧ェ繝輔そ繝繝 - TagNormalRomOffsetTagNormalRomOffset - 繧ュ繝ァ繧ォ繝弱シ繝槭Ν繧ク繝」繝ウ繝苓ィア蜿ッ TagIsNormalJump - 繧キ繝ィ繧ヲShared2繝輔ぃ繧、繝ォ菴ソ逕ィ - TagIsShared2TagIsShared2 - NAND繧「繝励Μ縺九i縺ョ繧イ繝シ繝繧ォ繝シ繝峨い繧ッ繧サ繧ケ - TagIsGameCardOnNAND繧「繝励Μ縺九i縺ョ繧イ繝シ繝繧ォ繝シ繝峨い繧ッ繧サ繧ケ + TagIsGameCardOn @@ -12139,23 +12164,23 @@ - File0 - TagShared2Size0File0 + TagShared2Size0 - File1 - TagShared2Size1File1 + TagShared2Size1 - File2 - TagShared2Size2File2 + TagShared2Size2 - File3 - TagShared2Size3File3 + TagShared2Size3 - File4 - TagShared2Size4File4 + TagShared2Size4 - File5 - TagShared2Size5File5 + TagShared2Size5