示例#1
0
 void MakeHardCodeWarning()
 {
     Array.Clear(HardCodeUnit, 0, HardCodeUnit.Length);
     Array.Clear(HardCodeClass, 0, HardCodeClass.Length);
     Array.Clear(HardCodeItem, 0, HardCodeItem.Length);
     PatchForm.MakeHardCodeWarning(ref HardCodeUnit, ref HardCodeClass, ref HardCodeItem);
 }
示例#2
0
        private void PatchResult_Click(object sender, EventArgs e)
        {
            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.JumpTo(this.Filter.Text, 0);
            this.PatchMainFilter.CleanChache();
        }
示例#3
0
        private void UninstallButton_Click(object sender, EventArgs e)
        {
            string title  = R._("アンインストールするeventファイルを選択してください");
            string filter = R._("event file|*.event;*.txt|event|*.event|text|*.txt|All files|*");

            OpenFileDialog open = new OpenFileDialog();

            open.Title  = title;
            open.Filter = filter;
            Program.LastSelectedFilename.Load(this, "", open);
            DialogResult dr = open.ShowDialog();

            if (dr != DialogResult.OK)
            {
                return;
            }
            if (!U.CanReadFileRetry(open))
            {
                return;
            }
            Program.LastSelectedFilename.Save(this, "", open);
            string EAFilename = open.FileNames[0];

            PatchForm f = (PatchForm)InputFormRef.JumpFormLow <PatchForm>();

            f.Show();
            PatchForm.PatchSt patchSt = PatchForm.MakeInstantEAToPatch(EAFilename);
            f.UnInstallPatch(patchSt, true);
        }
示例#4
0
        private void TSAEditorButton_Click(object sender, EventArgs e)
        {
            string patch = MakePatch();

            if (patch == "")
            {
                R.ShowStopError("パッチの生成に失敗しました");
                return;
            }

            Panel dummy = new Panel();

            this.Controls.Add(dummy);

            //パッチを生成してTSAEditorのボタンをクリックする.
            bool r = PatchForm.TSAEditorImageOneTime(patch, dummy, this);

            this.Controls.Remove(dummy);
            if (r == false)
            {
                R.ShowStopError("TSAEditorImageOneTimeが失敗しました");
                return;
            }

            Draw();
            this.FoundImages = FindImage();
        }
示例#5
0
 private void J_33_Click(object sender, EventArgs e)
 {
     if (PatchUtil.SearchSkillSystem() == PatchUtil.skill_system_enum.SkillSystem)
     {
         PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();
         f.JumpTo("defWeaponDebuffsTable", 0, PatchForm.SortEnum.SortName);
     }
 }
示例#6
0
        //マージデータの作成を行う

        //既存のルーチンの設定の保存

        //既存のルーチンをUnInstall
        bool UnInstall()
        {
            PatchForm patchF     = (PatchForm)InputFormRef.JumpForm <PatchForm>();
            string    PatchName  = "Skill20200223";
            string    PatchName2 = "Skill20200223";
            bool      r          = patchF.UnInstallPatch(PatchName, PatchName2, isAutoClose: true, isForceUninstall: true);

            return(r);
        }
示例#7
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (CheckTBLAndAntiHuffman() == false)
            {
                return;
            }

            this.Close();

            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.ApplyPatch("Anti-Huffman");
        }
        void Run()
        {
            string target_filename = this.TargetFilenameTextBox.Text;

            if (!File.Exists(target_filename))
            {
                R.ShowStopError("ターゲット({0})が見つかりませんでした。", target_filename);
                return;
            }
            string orignal = this.OrignalROMTextArea.Text;

            if (!File.Exists(orignal))
            {
                R.ShowStopError("無改造ROM({0})が見つかりませんでした", orignal);
                return;
            }

            string parentPatchFilename = Path.Combine(Program.BaseDirectory, "config", "patch2", "FE8U"
                                                      , "skill20220703", "PATCH_Skill20220703.txt");

            this.ParentPatch = PatchForm.LoadPatch(parentPatchFilename, isScanOnly: false);
            if (this.ParentPatch == null)
            {
                R.ShowStopError("ベースとなるシステム({0})が見つかりませんでした", parentPatchFilename);
                return;
            }

            bool r;

            if (U.GetFilenameExt(target_filename) == ".CMD")
            {
                r = BuildCMD();
            }
            else
            {
                r = BuildEA();
            }
            if (!r)
            {
                return;
            }

            //マージデータの作成を行う
            r = MargeAndUpdate();
            if (!r)
            {
                return;
            }

            R.ShowOK("完成");
        }
示例#9
0
        void OnButtonClick(Object Sender, EventArgs e)
        {
            if (!(Sender is Control))
            {
                return;
            }
            Control c         = (Control)Sender;
            string  numString = U.substr(c.Name, -1);
            int     index     = (int)U.atoi(numString);

            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.JumpTo(this.LastSearchWord, index);
        }
示例#10
0
        public void ApplyFilter(string search, bool isJP, ToolTipEx tooltip)
        {
            this.LastSearchWord = search;
            if (search == "" || this.PatchButton.Visible)
            {
                this.PatchLabelName.Hide();
                for (int i = 0; i < Buttons.Length; i++)
                {
                    this.Buttons[i].Hide();
                }
                return;
            }
            if (Patchs == null)
            {
                Patchs = PatchForm.ScanPatch();
            }

            int foundCount = 0;

            for (int i = 0; i < this.Patchs.Length; i++)
            {
                PatchForm.PatchSt patch = this.Patchs[i];
                if (!U.StrStrEx(patch.SearchData, search, isJP))
                {//フィルターで消す.
                    continue;
                }
                Button b = Buttons[foundCount];
                b.Text = patch.Name;
                string info = U.at(patch.Param, "INFO");
                tooltip.SetToolTipOverraide(b, U.nl2br(info));
                b.Show();

                foundCount++;
                if (foundCount == 1)
                {//ボタンがあるならラベルも出す.
                    this.PatchLabelName.Show();
                }

                if (foundCount >= Buttons.Length)
                {
                    return;
                }
            }

            for (int n = foundCount; n < Buttons.Length; n++)
            {
                Button b = Buttons[n];
                b.Hide();
            }
        }
        //マージデータの作成を行う
        bool MargeAndUpdate()
        {
            string orignal = this.OrignalROMTextArea.Text;

            if (!File.Exists(orignal))
            {
                return(false);
            }
            byte[] orignalBIN = File.ReadAllBytes(orignal);
            byte[] buildBIN   = File.ReadAllBytes(this.EABuildROM_Filename);

            string skill_CustomBuildDirectory = Path.Combine(Program.BaseDirectory, "config", "patch2", "FE8U"
                                                             , "skill_CustomBuild");

            U.mkdir(skill_CustomBuildDirectory);

            U.CopyDirectory(Path.GetDirectoryName(ParentPatch.PatchFileName), skill_CustomBuildDirectory);
            U.DeleteFile(skill_CustomBuildDirectory, "0*.bin");
            U.DeleteFile(skill_CustomBuildDirectory, "PATCH_*.txt");

            //シンボル情報のコピー
            CopySYM(skill_CustomBuildDirectory);
            //他のバイナリファイルのコピー
            CopySomeDumpFiles(skill_CustomBuildDirectory);

            //ビルドしたROMとバニラを比較して、差分を作る
            string custombuild = Path.Combine(skill_CustomBuildDirectory, "PATCH_SkillSystem_CustomBuild.txt");

            ToolDiffForm.MakeDiff(custombuild, orignalBIN, buildBIN, 10, true);

            //パッチテキストをマージする
            MargePatch(custombuild, ParentPatch.PatchFileName, U.atoh(TakeoverSkillAssignmentComboBox.Text));

            //作成したパッチを読込み
            PatchForm.PatchSt newPatchSt = PatchForm.LoadPatch(custombuild, isScanOnly: false);

            //パッチアップデート
            PatchForm patchF = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            patchF.UpdatePatch(newPatchSt);

            return(true);
        }
示例#12
0
        List <Address> SearchAllLZ77Data(InputFormRef.AutoPleaseWait wait)
        {
            //念のためパッチのCheckIFをスキャンをやり直す.
            PatchForm.ClearCheckIF();

            wait.DoEvents("GrepAllStructPointers");
            List <DisassemblerTrumb.LDRPointer> ldrmap = DisassemblerTrumb.MakeLDRMap(Program.ROM.Data, 0x100, Program.ROM.RomInfo.compress_image_borderline_address, true);
            List <Address> structList = U.MakeAllStructPointersList(false);

            U.AppendAllASMStructPointersList(structList
                                             , ldrmap
                                             , isPatchInstallOnly: true
                                             , isPatchPointerOnly: false
                                             , isPatchStructOnly: false
                                             , isUseOtherGraphics: false
                                             , isUseOAMSP: false
                                             );
            AsmMapFile.InvalidateUNUNSED(structList);

            Dictionary <uint, bool> dupCheck = new Dictionary <uint, bool>();

            List <Address> ret = new List <Address>();

            foreach (Address a in structList)
            {
                if (!Address.IsLZ77(a.DataType))
                {
                    continue;
                }
                if (dupCheck.ContainsKey(a.Addr))
                {
                    continue;
                }
                ret.Add(a);
                dupCheck[a.Addr] = true;
            }
            ret.Sort((aa, bb) => { return((int)(aa.Addr - bb.Addr)); });

            return(ret);
        }
示例#13
0
        private void ImportButton_Click(object sender, EventArgs e)
        {
            string patch = MakePatch();

            if (patch == "")
            {
                R.ShowStopError("パッチの生成に失敗しました");
                return;
            }

            uint img  = (uint)this.Image.Value;
            uint img2 = (uint)this.Image2.Value;
            uint tsa  = (uint)this.TSA.Value;
            uint pal  = (uint)this.PALETTE.Value;

            //パッチを生成してimportしてみよう.
            Panel dummy = new Panel();

            this.Controls.Add(dummy);
            bool r = PatchForm.ImportImageOneTime(patch, dummy, this, ref img, ref img2, ref tsa, ref pal);

            this.Controls.Remove(dummy);
            if (r == false)
            {
                R.ShowStopError("ImportImageOneTimeが失敗しました");
                return;
            }

            U.ForceUpdate(this.Image, img);
            U.ForceUpdate(this.Image2, img2);

            U.ForceUpdate(this.TSA, tsa);
            U.ForceUpdate(this.PALETTE, pal);

            Draw();
            this.FoundImages = FindImage();
        }
示例#14
0
        private void HardCodingWarningLabel_Click(object sender, EventArgs e)
        {
            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.JumpTo("HARDCODING_CLASS=" + U.ToHexString2(this.AddressList.SelectedIndex), 0);
        }
示例#15
0
        private void ERROR_IER_PATCH_Click(object sender, EventArgs e)
        {
            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.JumpTo("ItemEffectRevamp", 0, PatchForm.SortEnum.SortName);
        }
示例#16
0
        private void X_SystemMenuPaletteLink_Click(object sender, EventArgs e)
        {
            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.JumpTo("SystemMenuPalette", 1);
        }
示例#17
0
        private void X_Jump_Patch_Click(object sender, EventArgs e)
        {
            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.JumpTo("#IMAGE", 0, PatchForm.SortEnum.SortName);
        }
示例#18
0
        AsmMapFile MakeFullLow()
        {
            AsmMapFile map = new AsmMapFile(this.BaseSymbol);

            if (IsStopFlag)
            {
                return(map);
            }

            //LDRマップのクリア
            this.LDRMapCache = new List <DisassemblerTrumb.LDRPointer>(0x1000);
            this.FELintCache = new Dictionary <uint, List <FELint.ErrorSt> >();

            List <DisassemblerTrumb.LDRPointer> ldrmap;

            try
            {
                ldrmap           = DisassemblerTrumb.MakeLDRMap(Program.ROM.Data, 0x100);
                this.LDRMapCache = ldrmap;
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
                return(map);
            }

            try
            {
                MakeHardCodeWarning(); //ハードコーディングされているデータの警告
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                ScanFELintByThread(ldrmap);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
                return(map);
            }

            Dictionary <uint, bool> knownDic = new Dictionary <uint, bool>();
            List <Address>          structlist;

            try
            {
                structlist = U.MakeAllStructPointersList(false); //既存の構造体
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
                return(map);
            }

            try
            {
                PatchForm.MakePatchStructDataList(structlist, true, true, false); //パッチが知っている領域.
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                //参照の逆追跡
                this.VarsIDArray = U.MakeVarsIDArray(map);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                GraphicsToolForm.MakeLZ77DataList(structlist); //lz77で圧縮されたもの(主に画像)
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                ProcsScriptForm.MakeAllDataLength(structlist, ldrmap);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                OAMSPForm.MakeAllDataLength(structlist, structlist, ldrmap);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                knownDic = AsmMapFile.MakeKnownListToDic(structlist);
                AsmMapFile.MakeFreeDataList(structlist, knownDic, 0x100, 0x00, 16); //フリー領域
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                AsmMapFile.MakeFreeDataList(structlist, knownDic, 0x100, 0xFF, 16); //フリー領域
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                map.AppendMAP(structlist);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            Dictionary <uint, uint> ldrtable = new Dictionary <uint, uint>();  //LDR参照データがある位置を記録します. コードの末尾などにあります. 数が多くなるのでマップする.

            try
            {
                AsmMapFile.MakeSwitchDataList(ldrtable, 0x100, 0);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            try
            {
                map.AppendMAP(ldrtable);
                if (IsStopFlag)
                {
                    return(map);
                }
            }
            catch (Exception e)
            {
                Log.Error(e.ToString());
                Debug.Assert(false);
            }

            //近場リスト生成.
            map.MakeNearSearchSortedList();

            return(map);
        }
示例#19
0
        private void X_StatusBackgroundLink_Click(object sender, EventArgs e)
        {
            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.JumpTo("StatusBackground", 1);
        }
示例#20
0
        AsmMapFile MakeFullLow()
        {
            AsmMapFile map = MakeInstant();

            if (IsStopFlag)
            {
                return(map);
            }

            //LDRマップのクリア
            this.LDRMapCache = new List <DisassemblerTrumb.LDRPointer>();
            this.FELintCache = new Dictionary <uint, List <FELint.ErrorSt> >();

            List <DisassemblerTrumb.LDRPointer> ldrmap;

#if !DEBUG
            try
            {
#endif
            ldrmap           = DisassemblerTrumb.MakeLDRMap(Program.ROM.Data, 0x100);
            this.LDRMapCache = ldrmap;
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }

        catch (Exception e)
        {
            Log.Error(e.ToString());
            return(map);
        }
#endif
#if !DEBUG
            try
            {
#endif
            MakeHardCodeWarning(); //ハードコーディングされているデータの警告
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            ScanFELintByThread(ldrmap);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
            return(map);
        }
#endif
            List <Address> structlist;
#if !DEBUG
            try
            {
#endif
            structlist = U.MakeAllStructPointersList(false); //既存の構造体
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
            return(map);
        }
#endif

#if !DEBUG
            try
            {
#endif
            PatchForm.MakePatchStructDataList(structlist, true, true, false); //パッチが知っている領域.
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            map.MakeTextIDArray(); //全テキストIDの検出
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            GraphicsToolForm.MakeLZ77DataList(structlist); //lz77で圧縮されたもの(主に画像)
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            ProcsScriptForm.MakeAllDataLength(structlist, ldrmap);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif


#if !DEBUG
            try
            {
#endif
            OAMSPForm.MakeAllDataLength(structlist, structlist, ldrmap);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            AsmMapFile.MakeFreeDataList(structlist, 0x100, 0x00, 16); //フリー領域
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            AsmMapFile.MakeFreeDataList(structlist, 0x100, 0xFF, 16); //フリー領域
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif
            map.AppendMAP(structlist);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
            Dictionary <uint, uint> ldrtable = new Dictionary <uint, uint>();  //LDR参照データがある位置を記録します. コードの末尾などにあります. 数が多くなるのでマップする.
#if !DEBUG
            try
            {
#endif

            AsmMapFile.MakeSwitchDataList(ldrtable, 0x100, 0);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif
#if !DEBUG
            try
            {
#endif

            map.AppendMAP(ldrtable);
            if (IsStopFlag)
            {
                return(map);
            }
#if !DEBUG
        }
        catch (Exception e)
        {
            Log.Error(e.ToString());
        }
#endif

            //近場リスト生成.
            map.MakeNearSearchSortedList();

            return(map);
        }
        private void X_JUMP_TO_COMBAT_ART_Click(object sender, EventArgs e)
        {
            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.JumpToSelectStruct("FE8N SKILL COMBAT ART", 0, this.AddressList.SelectedIndex);
        }
        public static bool CheckAndShowPopupDialog(TYPE type)
        {
            Func <bool> checkFunc = null;
            string      title     = "";
            string      reason    = "";

            string patchName1    = "";
            string patchName2    = "";
            string patchShowName = null;

            string patchName3     = "";
            string patchName4     = "";
            string patchShowName3 = null;

            if (type == TYPE.MagicPatch_By_Menu)
            {
                checkFunc = () => {
                    return(ImageUtilMagic.SearchMagicSystem() != ImageUtilMagic.magic_system_enum.NO);
                };
                title = R._("魔法を追加するには、魔法システムパッチが必要です。");
                string version = Program.ROM.RomInfo.VersionToFilename();
                if (version == "FE6")
                {                                            //FE6
                    //patchName1 = "FEditorMagicCSASystem_FE6";///No Translate
                    patchName3 = "CSA_Creator_For_FE6_ver2"; ///No Translate
                }
                else if (version == "FE7J")
                {                                                 //FE7J
                    patchName1 = "Custom Spell Animation Engine"; ///No Translate
                    //patchName3 = "CSA_Creator_For_FE7U";///No Translate

//                    string no_patch = R._("残念ながら、FE7J用の魔法システムパッチは存在しません。\r\n");
//                    R.ShowStopError(title + "\r\n" + no_patch);
//                    return false;
                }
                else if (version == "FE7U")
                {                                             //FE7U
                    //patchName1 = "FEditorMagicCSASystem_FE7U";///No Translate
                    patchName3 = "CSA_Creator_For_FE7U_ver2"; ///No Translate
                }
                else if (version == "FE8J")
                {                                                       //FE8J
                    patchName1 = "magic patch (FeditorAdvMagicSystem)"; ///No Translate
                    patchName3 = "CSA_Creator_For_FE8J_ver2";           ///No Translate
                }
                else if (version == "FE8U")
                {                                              //FE8U
                    patchName1 = "FEditorMagicCSASystem_FE8U"; ///No Translate
                    patchName3 = "CSA_Creator_For_FE8U_ver2";  ///No Translate
                }

                if (patchName1 != "" && patchName3 != "")
                {
                    reason  = R._("魔法システムパッチは2つあるので、どちらかを選んでください。\r\n");
                    reason += R._("FEditorMagicCSASystemは、長い動作実績のある魔法システムです。\r\n");
                    reason += R._("CSA_Creatorは、より解像度をサポートする、新進気鋭の魔法システムです。\r\n");
                }
                else
                {
                    reason = R._("魔法システムパッチを適用してください。");
                }
            }
            else if (type == TYPE.DrawFont_By_Translate)
            {
                checkFunc = () => { return(PatchUtil.draw_font_enum.NO != PatchUtil.SearchDrawFontPatch()); };
                title     = R._("他の言語を表示するにはDrawFontパッチが必要です。");
                if (Program.ROM.RomInfo.is_multibyte())
                {
                    patchName3 = "DrawSingleByte";///No Translate
                }
                else
                {
                    patchName1 = "DrawMultiByte"; ///No Translate
                    patchName3 = "DrawUTF8";      ///No Translate

                    reason += R._("日本語へ翻訳する場合は、DrawMultiByte を選択してください。\r\n");
                    reason += R._("日本語以外へ翻訳する場合は、DrawUTF8 を選択してください\r\n");
                }
            }

            Debug.Assert(checkFunc != null);
            Debug.Assert(title != "");
            if (checkFunc())
            {//すでに適応されている.
                return(true);
            }
            if (patchShowName == null)
            {
                patchShowName = patchName1;
            }
            if (patchShowName3 == null)
            {
                patchShowName3 = patchName3;
            }

            HowDoYouLikePatch2Form f = (HowDoYouLikePatch2Form)InputFormRef.JumpFormLow <HowDoYouLikePatch2Form>();

            f.Text             = title;
            f.ReasonLabel.Text = R._("{0}\r\n\r\n{1}", title, reason);

            if (patchName1 == "")
            {
                f.EnableButton.Hide();
            }
            else
            {
                f.EnableButton.Text   = R._("{0}パッチを有効にする", patchShowName);
                f.EnableButton.Click += (sender, e) =>
                {
                    f.Close();

                    PatchForm patchF = (PatchForm)InputFormRef.JumpForm <PatchForm>();
                    patchF.ApplyPatch(patchName1, patchName2); ///No Translate
                };
            }

            if (patchName3 == "")
            {
                f.EnableButton3.Hide();
            }
            else
            {
                f.EnableButton3.Text   = R._("{0}パッチを有効にする", patchShowName3);
                f.EnableButton3.Click += (sender, e) =>
                {
                    f.Close();

                    PatchForm patchF = (PatchForm)InputFormRef.JumpForm <PatchForm>();
                    patchF.ApplyPatch(patchName3, patchName4); ///No Translate
                };
            }

            if (Program.IsCommandLine)
            {//コマンドラインモードだったら自動適応するしかないね。
                f.CommandLineClick(patchName1, patchName3);
                return(checkFunc());
            }

            f.ShowDialog();

            return(checkFunc());
        }
示例#23
0
        //ROM読みこみに伴うシステムの初期化.
        static void InitSystem(string fullfilename)
        {
            Log.Notify("InitSystem:", Path.GetFileName(ROM.Filename), "ver:", ROM.RomInfo.VersionToFilename(), "length:", ROM.Data.Length.ToString("X"), "FEBuilderGBA:", U.getVersion());

            //Undoバッファの準備
            Undo = new Undo();


            //数を求める部分はあまりにたくさん呼び出すのでキャッシュすることにしました.
            InputFormRef.ClearCacheDataCount();
            //パッチのインストールの是非の判定 FE8には策パッチがあるのでキャッシュする.
            PatchForm.ClearCheckIF();

            if (fullfilename != "")
            {
                //変更監視
                UpdateWatcher.RegistMain(fullfilename);
            }


            //tbl適応判定
            OptionForm.AutoUpdateTBLOption();

            //システム側のテキストエンコード どうやってUnicodeにするかどうか.
            ReBuildSystemTextEncoder();

            //FEテキストエンコード用のハフマンツリーマップの構成
            ReBuildFETextEncoder();

            //イベントの読込
            ReLoadEventScript();

            //イベント条件の解釈リスト
            EventCondForm.PreLoadResource(U.ConfigDataFilename("eventcond_"));

            //AI1 と 2, 3
            EventUnitForm.PreLoadResourceAI1(U.ConfigDataFilename("ai1_"));
            EventUnitForm.PreLoadResourceAI2(U.ConfigDataFilename("ai2_"));
            EventUnitForm.PreLoadResourceAI3(U.ConfigDataFilename("ai3_"));

            //SondEffectリスト
            SongTableForm.PreLoadResource(U.ConfigDataFilename("sound_"));
            //UnitActionリスト
            UnitActionPointerForm.PreLoadResource(U.ConfigDataFilename("unitaction_"));

            //ROM内アニメ
            ImageRomAnimeForm.PreLoadResource();
            ImageTSAAnimeForm.PreLoadResource();
            if (Program.ROM.RomInfo.version() == 8)
            {
                ImageTSAAnime2Form.PreLoadResource();
            }

            //MODの読込.
            ReLoadMod();

            //新規に追加ユニットリストキャッシュの削除
            EventUnitForm.ClearNewData();

            //システムアイコンキャッシュのクリア
            ImageSystemIconForm.ClearCache();

            //EVENTとASMのキャッシュをクリア
            AsmMapFileAsmCache = new FEBuilderGBA.AsmMapFileAsmCache();
            //asm mapキャッシュの更新.
            AsmMapFileAsmCache.ClearCache();

            //RAM
            ReBuildRAM();

            if (fullfilename != "" &&
                fullfilename != Program.Config.at("Last_Rom_Filename"))
            {//最後に開いたファイル名を保存する.
                Program.Config["Last_Rom_Filename"] = fullfilename;
                Program.Config.Save();
            }
            //Log.Notify("InitSystem:Complate");
        }
        private void ERROR_Not_Allocated_Click(object sender, EventArgs e)
        {
            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.JumpTo("extendsBattleBG", 0);
        }
        public static bool CheckAndShowPopupDialog(TYPE type)
        {
            Func <bool> checkFunc     = null;
            string      reason        = "";
            string      patchName1    = "";
            string      patchName2    = "";
            string      patchShowName = null;
            string      patchCombo    = "";

            if (type == TYPE.Anti_Huffman_By_Translate)
            {
                checkFunc  = PatchUtil.SearchAntiHuffmanPatch;
                reason     = R._("翻訳された文章がハフマン符号化テーブルを超えている可能性があります。\r\nAntiHuffmanPatchを適応しておくことをお勧めします。");
                patchName1 = "Anti-Huffman";///No Translate
            }
            if (type == TYPE.Anti_Huffman_By_English)
            {
                checkFunc  = PatchUtil.SearchAntiHuffmanPatch;
                reason     = R._("英語版で、テキストを変更するためには、Anti-Huffman Patchが必要です。");
                patchName1 = "Anti-Huffman";///No Translate
            }
            else if (type == TYPE.C01Hack_By_ImageBattleAnimation)
            {
                checkFunc  = PatchUtil.SearchC01HackPatch;
                reason     = R._("このアニメーションには、C01 命令が使われています。\r\n現在、C01ハックパッチは、まだインストールされていません。\r\nアニメーションを再生するためには、\r\nC01ハックを有効にした方がいいと思われますが、どうしますか?\r\n");
                patchName1 = "01command_hack"; ///No Translate
                patchName2 = "01コマンドハック";      ///No Translate
            }
            else if (type == TYPE.C48Hack_By_ImageBattleAnimation)
            {
                checkFunc  = PatchUtil.SearchC48HackPatch;
                reason     = R._("このアニメーションには、C48 命令(or Sxx命令)が使われています。\r\n現在、C48ハックパッチは、まだインストールされていません。\r\nアニメーションを再生するためには、\r\nC48ハックを有効にした方がいいと思われますが、どうしますか?\r\n");
                patchName1 = "48command_hack"; ///No Translate
                patchName2 = "48コマンドハック";      ///No Translate
            }
            else if (type == TYPE.NIMAP_By_SongTrack)
            {
                checkFunc = PatchUtil.SearchNIMAP;
                reason    = R._("Midi楽器はFE楽器と並び順が違うので、\r\nNIMAPを利用することをお勧めします。");
                if (Program.ROM.RomInfo.version() == 8)
                {                                                       //FE8用には更新されたバージョンを利用する.
                    patchName1 = "SOUND_NIMAP2(Native Instrument Map)"; ///No Translate
                    patchName2 = "SOUND_NIMAP2";                        ///No Translate
                }
                else
                {
                    patchName1 = "SOUND_NIMAP(Native Instrument Map)"; ///No Translate
                    patchName2 = "SOUND_NIMAP";                        ///No Translate
                }
            }
            else if (type == TYPE.Track12_Over_By_SongTrack)
            {
                checkFunc  = PatchUtil.Search16tracks12soundsPatch;
                reason     = R._("この楽曲の楽譜は、12以上のトラックが存在しています。\r\nこの曲をゲームで再生するには、16_tracks_12_soundsが必要です。\r\nこのパッチを適応しますか?");
                patchName1 = "16_tracks_12_sounds";///No Translate
            }
            else if (type == TYPE.MeleeAndMagicFix_By_Unit)
            {
                checkFunc  = PatchUtil.SearchMeleeAndMagicFixPatch;
                reason     = R._("武器と魔法を同時に利用するにはMeleeAndMagicPatchが必要です。\r\n有効にしますか?");
                patchName1 = "MeleeAndMagicFix";///No Translate
            }
            else if (type == TYPE.ItemIconExpands)
            {
                checkFunc  = PatchUtil.SearchIconExpandsPatch;
                reason     = R._("アイコンを拡張するには、テーブルを拡張する前にパッチを適応する必要があります。\r\n有効にしますか?");
                patchName1 = "Extended to item icon 0xFE";   ///No Translate
                patchName2 = "Extend Item Icon List Length"; ///No Translate
                patchCombo = "fix";
            }
            else if (type == TYPE.MagicPatch_By_Menu)
            {
                return(HowDoYouLikePatch2Form.CheckAndShowPopupDialog(HowDoYouLikePatch2Form.TYPE.MagicPatch_By_Menu));
            }
            else if (type == TYPE.Skill)
            {
                if (Program.ROM.RomInfo.version() != 8)
                {
                    return(false);
                }
                if (Program.ROM.RomInfo.is_multibyte())
                {
                    checkFunc = () =>
                    {
                        PatchUtil.skill_system_enum a = PatchUtil.SearchSkillSystem();
                        return(a == PatchUtil.skill_system_enum.FE8N ||
                               a == PatchUtil.skill_system_enum.FE8N_ver2 ||
                               a == PatchUtil.skill_system_enum.yugudora
                               );
                    };
                    reason     = R._("スキル拡張 FE8N が必要です。\r\n有効にしますか?");
                    patchName1 = "Skill Extension FE8N 2019_02_19"; ///No Translate
                    patchName2 = "skill_2019_02_19";                ///No Translate
                }
                else
                {
                    checkFunc = () =>
                    {
                        return(PatchUtil.SearchSkillSystem() == PatchUtil.skill_system_enum.SkillSystem);
                    };
                    reason     = R._("スキル拡張 SkillSystems が必要です。\r\n有効にしますか?");
                    patchName1 = "Skill20200223"; ///No Translate
                    patchName2 = "Skill20200223"; ///No Translate
                }
            }
            else if (type == TYPE.SkipWorldmapFix)
            {
                if (Program.ROM.RomInfo.version() != 8)
                {
                    return(false);
                }

                checkFunc = () =>
                {
                    return(PatchUtil.SearchSkipWorldMapPatch() != PatchUtil.mnc2_fix_enum.NO);
                };
                reason        = R._("FE8のマップをワールドマップを経由しないで移動させるには、パッチが必要です。\r\n有効にしますか?");
                patchName1    = "MNC2Fix"; ///No Translate
                patchName2    = "MNC2Fix"; ///No Translate
                patchShowName = "Skip Worldmap";
                patchCombo    = "fix";
            }
            else if (type == TYPE.CAMERA_Event_OutOfBand_Fix)
            {
                if (Program.ROM.RomInfo.version() != 8)
                {
                    return(false);
                }

                checkFunc = () =>
                {
                    return(PatchUtil.SearchCAMERA_Event_OutOfBand_FixPatch());
                };
                reason        = R._("カメラを移動する命令で、画面外に飛び出してしまうバグを修正するパッチをインストールしますか?");
                patchName1    = "Fix CAM1_CAMERA2 going out of bounds"; ///No Translate
                patchName2    = "Fix CAM1_CAMERA2 going out of bounds"; ///No Translate
                patchShowName = "Fix CAM1_CAMERA2 going out of bounds";
                patchCombo    = "Fix";
            }
            else if (type == TYPE.CAMERA_Event_NotExistsUnit_Fix)
            {
                if (Program.ROM.RomInfo.version() != 8)
                {
                    return(false);
                }

                checkFunc = () =>
                {
                    return(PatchUtil.SearchCAMERA_Event_NotExistsUnit_FixPatch());
                };
                reason        = R._("存在しないユニットを指定した時にフリーズするバグを修正するパッチをインストールしますか?");
                patchName1    = "Event26_CameraControlMaybe_Fix not to freeze even nonexistent units"; ///No Translate
                patchName2    = "Event26_CameraControlMaybe_Fix not to freeze even nonexistent units"; ///No Translate
                patchShowName = "Event26_CameraControlMaybe_Fix not to freeze even nonexistent units";
                patchCombo    = "Fix";
            }
            else if (type == TYPE.UnitStateEvent_0x34_Fix)
            {
                if (Program.ROM.RomInfo.version() != 8)
                {
                    return(false);
                }

                checkFunc = () =>
                {
                    return(PatchUtil.SearchUnitStateEvent_0x34_FixPatch());
                };
                reason        = R._("存在しないユニットを指定した時にフリーズするバグを修正するパッチをインストールしますか?");
                patchName1    = "Event34_MessWithUnitState_Fix not to freeze even nonexistent units"; ///No Translate
                patchName2    = "Event34_MessWithUnitState_Fix not to freeze even nonexistent units"; ///No Translate
                patchShowName = "Event34_MessWithUnitState_Fix not to freeze even nonexistent units";
                patchCombo    = "Fix";
            }
            else if (type == TYPE.WakuEvent_0x3B_Fix)
            {
                if (Program.ROM.RomInfo.version() != 8)
                {
                    return(false);
                }

                checkFunc = () =>
                {
                    return(PatchUtil.SearchWakuEvent_0x3B_FixPatch());
                };
                reason        = R._("存在しないユニットを指定した時にフリーズするバグを修正するパッチをインストールしますか?");
                patchName1    = "Event3B_frame_Fix not to freeze even nonexistent units"; ///No Translate
                patchName2    = "Event3B_frame_Fix not to freeze even nonexistent units"; ///No Translate
                patchShowName = "Event3B_frame_Fix not to freeze even nonexistent units";
                patchCombo    = "Fix";
            }

            Debug.Assert(checkFunc != null);
            Debug.Assert(patchName1 != "");
            Debug.Assert(reason != "");
            if (checkFunc())
            {//すでに適応されている.
                return(true);
            }
            if (patchShowName == null)
            {
                patchShowName = patchName1;
            }

            HowDoYouLikePatchForm f = (HowDoYouLikePatchForm)InputFormRef.JumpFormLow <HowDoYouLikePatchForm>();
            string tile             = R._("{0}パッチを有効にしますか?", patchShowName);

            f.Text                = tile;
            f.ReasonLabel.Text    = R._("{0}\r\n\r\n{1}", tile, reason);
            f.EnableButton.Text   = R._("{0}パッチを有効にする", patchShowName);
            f.EnableButton.Click += (sender, e) => {
                f.Close();
                PatchForm patchF = (PatchForm)InputFormRef.JumpForm <PatchForm>();
                bool      r      = patchF.ApplyPatch(patchName1, patchName2, patchCombo); ///No Translate
                if (!r)
                {
                    R.ShowStopError("パッチの自動適応に失敗しました。\r\nパッチ画面にエラーが表示されていないか確認してください。\r\n必須パッチの適応に失敗したということは、FEBuilderGBAの解凍に失敗している可能性があります。\r\nFEBuilderGBAを再インストールしてください。\r\nそれでも問題が解決しない場合は、バグとして報告してください。\r\n");
                }
                f.Close();
            };

            if (Program.IsCommandLine)
            {//コマンドラインモードだったら自動適応するしかないね。
                U.FireOnClick(f.EnableButton);
                return(checkFunc());
            }

            f.ShowDialog();

            return(checkFunc());
        }
示例#26
0
        private void ExtendsBanner_Click(object sender, EventArgs e)
        {
            PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();

            f.JumpTo("Allow 254 generic minimugs", 0);
        }
示例#27
0
        static void ScanSystem(List <FELint.ErrorSt> errors, List <DisassemblerTrumb.LDRPointer> ldrmap)
        {
            ROMCheck(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ImageBattleAnimeForm"))
            {
                return;
            }
            ImageBattleAnimeForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ImageBGForm"))
            {
                return;
            }
            ImageBGForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem UnitForm"))
            {
                return;
            }
            UnitForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ClassForm"))
            {
                return;
            }
            ClassForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ItemForm"))
            {
                return;
            }
            ItemForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem MoveCostForm"))
            {
                return;
            }
            MoveCostForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem PatchForm"))
            {
                return;
            }
            PatchForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ImageUnitMoveIconFrom"))
            {
                return;
            }
            ImageUnitMoveIconFrom.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ImageUnitWaitIconFrom"))
            {
                return;
            }
            ImageUnitWaitIconFrom.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ItemEffectPointerForm"))
            {
                return;
            }
            ItemEffectPointerForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ImageUnitPaletteForm"))
            {
                return;
            }
            ImageUnitPaletteForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ImageBattleScreen"))
            {
                return;
            }
            ImageBattleScreenForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ImageMagic"))
            {
                return;
            }
            ImageMagicFEditorForm.MakeCheckError(errors);
            ImageMagicCSACreatorForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem Procs"))
            {
                return;
            }
            ProcsScriptForm.MakeCheckError(errors, ldrmap);

            if (InputFormRef.DoEvents(null, "ScanSystem MenuDefinition"))
            {
                return;
            }
            MenuDefinitionForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem EventUnit"))
            {
                return;
            }
            EventUnitForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem AIScript"))
            {
                return;
            }
            AIScriptForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem SongTable"))
            {
                return;
            }
            SongTableForm.MakeCheckError(errors);

            if (InputFormRef.DoEvents(null, "ScanSystem ItemWeaponEffect"))
            {
                return;
            }
            ItemWeaponEffectForm.MakeCheckError(errors);

            if (Program.ROM.RomInfo.version() == 8)
            {
                if (InputFormRef.DoEvents(null, "ScanSystem SoundFootStepsForm"))
                {
                    return;
                }
                SoundFootStepsForm.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem ImagePortraitForm"))
                {
                    return;
                }
                ImagePortraitForm.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem EventHaikuForm"))
                {
                    return;
                }
                EventHaikuForm.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem EventBattleTalkForm"))
                {
                    return;
                }
                EventBattleTalkForm.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem SupportTalkForm"))
                {
                    return;
                }
                SupportTalkForm.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem SupportUnitForm"))
                {
                    return;
                }
                SupportUnitForm.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem SoundRoomForm"))
                {
                    return;
                }
                SoundRoomForm.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem EDForm"))
                {
                    return;
                }
                EDForm.MakeCheckError(errors);
            }
            else if (Program.ROM.RomInfo.version() == 7)
            {
                if (InputFormRef.DoEvents(null, "ScanSystem ImagePortraitForm"))
                {
                    return;
                }
                ImagePortraitForm.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem EventHaikuFE7Form"))
                {
                    return;
                }
                EventHaikuFE7Form.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem EventBattleTalkFE7Form"))
                {
                    return;
                }
                EventBattleTalkFE7Form.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem SupportTalkFE7Form"))
                {
                    return;
                }
                SupportTalkFE7Form.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem SupportUnitForm"))
                {
                    return;
                }
                SupportUnitForm.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem SoundRoomForm"))
                {
                    return;
                }
                SoundRoomForm.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem EDForm"))
                {
                    return;
                }
                EDFE7Form.MakeCheckError(errors);
            }
            else
            {
                if (InputFormRef.DoEvents(null, "ScanSystem ImagePortraitFE6Form"))
                {
                    return;
                }
                ImagePortraitFE6Form.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem EventHaikuFE6Form"))
                {
                    return;
                }
                EventHaikuFE6Form.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem EventBattleTalkFE6Form"))
                {
                    return;
                }
                EventBattleTalkFE6Form.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem SupportTalkFE6Form"))
                {
                    return;
                }
                SupportTalkFE6Form.MakeCheckError(errors);

                if (InputFormRef.DoEvents(null, "ScanSystem EDForm"))
                {
                    return;
                }
                EDFE6Form.MakeCheckError(errors);
            }
        }
        public static void GotoEvent(FELint.Type dataType, uint addr, uint tag, uint mapid)
        {
            if (dataType == FELint.Type.EVENTSCRIPT ||
                dataType == FELint.Type.WORLDMAP_EVENT)
            {//イベント内で発生したエラー
                EventScriptForm f = (EventScriptForm)InputFormRef.JumpForm <EventScriptForm>(U.NOT_FOUND);
                f.JumpTo(addr, tag);
                return;
            }
            else if (dataType == FELint.Type.PROCS)
            {
                ProcsScriptForm f = (ProcsScriptForm)InputFormRef.JumpForm <ProcsScriptForm>(U.NOT_FOUND);
                f.JumpTo(addr, tag);
                return;
            }
            else if (dataType == FELint.Type.AISCRIPT)
            {
                AIScriptForm f = (AIScriptForm)InputFormRef.JumpForm <AIScriptForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.MAPSETTING_PLIST_OBJECT ||
                     dataType == FELint.Type.MAPSETTING_PLIST_CONFIG ||
                     dataType == FELint.Type.MAPSETTING_PLIST_MAP ||
                     dataType == FELint.Type.MAPSETTING_PLIST_PALETTE ||
                     dataType == FELint.Type.MAPSETTING_PLIST_MAPCHANGE ||
                     dataType == FELint.Type.MAPSETTING_PLIST_ANIMETION1 ||
                     dataType == FELint.Type.MAPSETTING_PLIST_ANIMETION2 ||
                     dataType == FELint.Type.MAPSETTING_WORLDMAP ||
                     dataType == FELint.Type.MAPSETTING
                     )
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <MapSettingFE6Form>(mapid);
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    if (!Program.ROM.RomInfo.is_multibyte())
                    {
                        InputFormRef.JumpForm <MapSettingFE7UForm>(mapid);
                    }
                    else
                    {
                        InputFormRef.JumpForm <MapSettingFE7Form>(mapid);
                    }
                }
                else
                {
                    InputFormRef.JumpForm <MapSettingForm>(mapid);
                }
                return;
            }
            else if (dataType == FELint.Type.BATTLE_ANIME)
            {
                ImageBattleAnimeForm f = (ImageBattleAnimeForm)InputFormRef.JumpForm <ImageBattleAnimeForm>(U.NOT_FOUND);
                f.JumpToAnimeID(tag);
                return;
            }
            else if (dataType == FELint.Type.BATTLE_ANIME_CLASS)
            {
                ImageBattleAnimeForm f = (ImageBattleAnimeForm)InputFormRef.JumpForm <ImageBattleAnimeForm>(U.NOT_FOUND);
                f.JumpToClassID(tag);
                return;
            }
            else if (dataType == FELint.Type.BG)
            {
                InputFormRef.JumpForm <ImageBGForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.PORTRAIT)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <ImagePortraitFE6Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <ImagePortraitForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.HAIKU)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <EventHaikuForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <EventHaikuFE7Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <EventHaikuFE6Form>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.BATTTLE_TALK)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <EventBattleTalkForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <EventBattleTalkFE7Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <EventBattleTalkFE6Form>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.SUPPORT_TALK)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <SupportTalkForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <SupportTalkFE7Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <SupportTalkFE6Form>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.SUPPORT_UNIT)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    SupportUnitFE6Form f = (SupportUnitFE6Form)InputFormRef.JumpForm <SupportUnitFE6Form>();
                    f.JumpToAddr(addr);
                }
                else
                {
                    SupportUnitForm f = (SupportUnitForm)InputFormRef.JumpForm <SupportUnitForm>();
                    f.JumpToAddr(addr);
                }
                return;
            }
            else if (dataType == FELint.Type.CLASS)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <ClassFE6Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <ClassForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.ITEM)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <ItemFE6Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <ItemForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.ITEM_WEAPON_EFFECT)
            {
                ItemWeaponEffectForm f = (ItemWeaponEffectForm)InputFormRef.JumpForm <ItemWeaponEffectForm>(U.NOT_FOUND);
                f.JumpTo(tag);
                return;
            }
            else if (dataType == FELint.Type.UNIT)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <UnitForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <UnitFE7Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <UnitFE6Form>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.MAPCHANGE)
            {
                MapChangeForm f = (MapChangeForm)InputFormRef.JumpForm <MapChangeForm>(tag);
                f.JumpToMAPIDAndAddr(mapid, tag);
                return;
            }
            else if (dataType == FELint.Type.SOUND_FOOT_STEPS)
            {
                SoundFootStepsForm f = (SoundFootStepsForm)InputFormRef.JumpForm <SoundFootStepsForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_NORMAL)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 0 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 0 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_RAIN)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 1 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 1 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_SHOW)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 2 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 2 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_AVOID)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 3 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 3 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_DEF)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 4 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 4 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_RES)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 5 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 5 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.OP_CLASS_DEMO)
            {
                if (Program.ROM.RomInfo.version() == 7 && Program.ROM.RomInfo.is_multibyte())
                {
                    InputFormRef.JumpForm <OPClassDemoFE7Form>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 7 && !Program.ROM.RomInfo.is_multibyte())
                {
                    InputFormRef.JumpForm <OPClassDemoFE7UForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 8 && Program.ROM.RomInfo.is_multibyte())
                {
                    InputFormRef.JumpForm <OPClassDemoForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 8 && !Program.ROM.RomInfo.is_multibyte())
                {
                    InputFormRef.JumpForm <OPClassDemoFE8UForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.WMAP_BASE_POINT)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <WorldMapPointForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.SOUNDROOM)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <SoundRoomFE6Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <SoundRoomForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.SENSEKI)
            {
                if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <EDSensekiCommentForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.DIC)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <TextDicForm>(U.NOT_FOUND);
                }
                return;
            }
            else if (dataType == FELint.Type.MENU)
            {
                MenuCommandForm f = (MenuCommandForm)InputFormRef.JumpForm <MenuCommandForm>();
                f.JumpToAddr(addr);
                return;
            }
            else if (dataType == FELint.Type.STATUS)
            {
                InputFormRef.JumpForm <StatusParamForm>();
                return;
            }
            else if (dataType == FELint.Type.ED)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <EDFE6Form>();
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <EDFE7Form>();
                }
                else
                {
                    InputFormRef.JumpForm <EDForm>();
                }
                return;
            }
            else if (dataType == FELint.Type.TERRAIN)
            {
                if (Program.ROM.RomInfo.is_multibyte())
                {
                    InputFormRef.JumpForm <MapTerrainNameForm>();
                }
                else
                {
                    InputFormRef.JumpForm <MapTerrainNameEngForm>();
                }
                return;
            }
            else if (dataType == FELint.Type.SKILL_CONFIG)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem();
                    if (skill == PatchUtil.skill_system_enum.SkillSystem)
                    {
                        InputFormRef.JumpForm <SkillConfigSkillSystemForm>();
                    }
                    else if (skill == PatchUtil.skill_system_enum.FE8N ||
                             skill == PatchUtil.skill_system_enum.yugudora ||
                             skill == PatchUtil.skill_system_enum.FE8N_ver2
                             )
                    {
                        InputFormRef.JumpForm <SkillConfigFE8NSkillForm>();
                    }
                }
                return;
            }
            else if (dataType == FELint.Type.RMENU)
            {
                InputFormRef.JumpForm <StatusRMenuForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.ITEM_USAGE_POINTER)
            {
                InputFormRef.JumpForm <ItemUsagePointerForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.PATCH)
            {
                PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();
                f.SelectPatchByTag(tag);
                return;
            }
            else if (dataType == FELint.Type.MAPEXIT)
            {
                InputFormRef.JumpForm <MapExitPointForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.IMAGE_UNIT_WAIT_ICON)
            {
                InputFormRef.JumpForm <ImageUnitWaitIconFrom>(tag);
                return;
            }
            else if (dataType == FELint.Type.IMAGE_UNIT_MOVE_ICON)
            {
                InputFormRef.JumpForm <ImageUnitMoveIconFrom>(tag);
                return;
            }
            else if (dataType == FELint.Type.ITEM_EEFECT_POINTER)
            {
                InputFormRef.JumpForm <ItemEffectPointerForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.IMAGE_UNIT_PALETTE)
            {
                InputFormRef.JumpForm <ImageUnitPaletteForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.IMAGE_BATTLE_SCREEN)
            {
                InputFormRef.JumpForm <ImageBattleScreenForm>();
                return;
            }
            else if (dataType == FELint.Type.ASM)
            {
                DisASMForm f = (DisASMForm)InputFormRef.JumpForm <DisASMForm>(U.NOT_FOUND);
                f.JumpTo(DisassemblerTrumb.ProgramAddrToPlain(tag));
                return;
            }
            else if (dataType == FELint.Type.ASMDATA)
            {
                HexEditorForm f = (HexEditorForm)InputFormRef.JumpForm <HexEditorForm>();
                f.JumpTo(tag);
                return;
            }
            else if (dataType == FELint.Type.STATUS_UNITS_MENU)
            {
                InputFormRef.JumpForm <StatusUnitsMenuForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.TEXTID_FOR_SYSTEM)
            {
                return;
            }
            else if (dataType == FELint.Type.TEXTID_FOR_USER)
            {
                return;
            }
            else if (dataType == FELint.Type.POINTER_TALKGROUP)
            {
                EventTalkGroupFE7Form f = (EventTalkGroupFE7Form)InputFormRef.JumpForm <EventTalkGroupFE7Form>();
                f.JumpToAddr(addr);
                return;
            }
            else if (dataType == FELint.Type.POINTER_MENUEXTENDS)
            {
                MenuExtendSplitMenuForm f = (MenuExtendSplitMenuForm)InputFormRef.JumpForm <MenuExtendSplitMenuForm>();
                f.JumpToAddr(addr);
                return;
            }
            else if (dataType == FELint.Type.POINTER_UNITSSHORTTEXT)
            {
                UnitsShortTextForm f = (UnitsShortTextForm)InputFormRef.JumpForm <UnitsShortTextForm>();
                f.JumpTo(addr);
                return;
            }
            else if (dataType == FELint.Type.MAGIC_ANIME_EXTENDS)
            {
                if (tag >= Program.ROM.RomInfo.magic_effect_original_data_count())
                {
                    tag -= Program.ROM.RomInfo.magic_effect_original_data_count();
                }
                ImageUtilMagic.magic_system_enum magic = ImageUtilMagic.SearchMagicSystem();
                if (magic == ImageUtilMagic.magic_system_enum.FEDITOR_ADV)
                {
                    InputFormRef.JumpForm <ImageMagicFEditorForm>(tag);
                }
                else if (magic == ImageUtilMagic.magic_system_enum.CSA_CREATOR)
                {
                    InputFormRef.JumpForm <ImageMagicCSACreatorForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.FELINT_SYSTEM_ERROR)
            {
                InputFormRef.JumpForm <ToolProblemReportForm>();
                return;
            }
            else if (dataType == FELint.Type.STATUS_GAME_OPTION)
            {
                InputFormRef.JumpForm <StatusOptionForm>(tag);
                return;
            }

            //イベント
            {
                EventCondForm f = (EventCondForm)InputFormRef.JumpForm <EventCondForm>(U.NOT_FOUND);
                f.JumpToMAPIDAndAddr(mapid, FELint.TypeToEventCond(dataType), (uint)addr);
            }
        }