public static void JumpClassSkill(PatchUtil.skill_system_enum skill, uint cid, object sender) { if (!(sender is Control)) { return; } Control c = (Control)sender; if (!(c.Tag is uint)) { return; } uint skillid = (uint)c.Tag; if (skill == PatchUtil.skill_system_enum.SkillSystem) { InputFormRef.JumpForm <SkillAssignmentClassSkillSystemForm>(cid); } else if (skill == PatchUtil.skill_system_enum.FE8N_ver2) { InputFormRef.JumpForm <SkillConfigFE8NVer2SkillForm>(skillid); } else if (skill == PatchUtil.skill_system_enum.FE8N_ver3) { InputFormRef.JumpForm <SkillConfigFE8NVer3SkillForm>(skillid); } }
private void SkillAssignmentClassButton_Click(object sender, EventArgs e) { if (PatchUtil.skill_system_enum.NO == PatchUtil.SearchSkillSystem()) { HowDoYouLikePatchForm.CheckAndShowPopupDialog(HowDoYouLikePatchForm.TYPE.Anti_Huffman_By_Translate); HowDoYouLikePatchForm.CheckAndShowPopupDialog(HowDoYouLikePatchForm.TYPE.Skill); } PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem(); if (skill == PatchUtil.skill_system_enum.SkillSystem) { InputFormRef.JumpForm <SkillAssignmentClassSkillSystemForm>(); } else if (skill == PatchUtil.skill_system_enum.FE8N_ver2) { InputFormRef.JumpForm <SkillConfigFE8NVer2SkillForm>(); } else if (skill == PatchUtil.skill_system_enum.FE8N || skill == PatchUtil.skill_system_enum.yugudora) { //NOP R.ShowStopError(R._("この機能は、FE8NVer2からのみ利用できます。")); } else { R.ShowStopError(R._("スキル拡張がありません。\r\nスキル拡張パッチをインストールしてから利用してください。")); } }
private void SkillConfigButton_Click(object sender, EventArgs e) { if (PatchUtil.skill_system_enum.NO == PatchUtil.SearchSkillSystem()) { HowDoYouLikePatchForm.CheckAndShowPopupDialog(HowDoYouLikePatchForm.TYPE.Skill); } 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>(); } else if (skill == PatchUtil.skill_system_enum.FE8N_ver3) { } else { R.ShowStopError(R._("スキル拡張がありません。\r\nスキル拡張パッチをインストールしてから利用してください。")); } }
public SkillConfigFE8NSkillForm() { InitializeComponent(); this.AddressList.OwnerDraw(DrawSkillAndText, DrawMode.OwnerDrawFixed); PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem(); if (skill == PatchUtil.skill_system_enum.FE8N || skill == PatchUtil.skill_system_enum.yugudora) { this.Pointers = FindSkillFE8NVer1IconPointers(); } else if (skill == PatchUtil.skill_system_enum.FE8N_ver2) { this.Pointers = SkillConfigFE8NVer2SkillForm.FindSkillFE8NVer2IconPointers(); } else { return; } this.InputFormRef = Init(this); this.InputFormRef.MakeGeneralAddressListContextMenu(true); this.InputFormRef.CheckProtectionPaddingALIGN4 = false; this.FilterComboBox.BeginUpdate(); for (int i = 0; i < this.Pointers.Length; i++) { uint p = Program.ROM.p32(this.Pointers[i]); this.FilterComboBox.Items.Add(U.ToHexString(p)); } this.FilterComboBox.EndUpdate(); this.FilterComboBox.SelectedIndex = 0; }
private void UnitForm_Load(object sender, EventArgs e) { List <Control> controls = InputFormRef.GetAllControls(this); X_Tooltip = InputFormRef.GetToolTip <UnitForm>(); InputFormRef.LoadCheckboxesResource(U.ConfigDataFilename("unitclass_checkbox_"), controls, X_Tooltip, "", "L_40_BIT_", "L_41_BIT_", "L_42_BIT_", "L_43_BIT_"); if (Program.ROM.RomInfo.version() == 8) {//FE8の場合 //スキル X_SkillType = PatchUtil.SearchSkillSystem(); if (X_SkillType == PatchUtil.skill_system_enum.SkillSystem || X_SkillType == PatchUtil.skill_system_enum.FE8N_ver2 ) { InputFormRef.markupJumpLabel(this.X_UNITSKILL); this.X_UNITSKILL.Show(); this.X_SkillButtons = new Button[] { X_SKILL_BUTTON1, X_SKILL_BUTTON2, X_SKILL_BUTTON3, X_SKILL_BUTTON4, X_SKILL_BUTTON5, X_SKILL_BUTTON6, X_SKILL_BUTTON7, X_SKILL_BUTTON8, X_SKILL_BUTTON9 }; for (int i = 0; i < this.X_SkillButtons.Length; i++) { this.X_SkillButtons[i].Click += X_UNITSKILL_Button_Click; } } //魔法分離パッチ MagicSplitUtil.magic_split_enum magic_split = MagicSplitUtil.SearchMagicSplit(); if (magic_split == MagicSplitUtil.magic_split_enum.FE8NMAGIC) { InitFE8NMagicExtends(controls); } } }
bool IsFE8NSkillNoSyo() { if (Program.ROM.RomInfo.version() != 8) { return(false); } if (B30.Value != 0x2e) {//メティスの書でなければボツ return(false); } if (B6.Value < 0x25) {//0x25未満ならばボツ return(false); } if (Program.ROM.u32(0x28846) != 0x4B0046C0) {//スキルの書のパッチが当たっていない return(false); } PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem(); if (skill == FEBuilderGBA.PatchUtil.skill_system_enum.FE8N_ver2 || skill == FEBuilderGBA.PatchUtil.skill_system_enum.FE8N_ver3) { return(true); } return(false); }
private void ClassForm_Load(object sender, EventArgs e) { List <Control> controls = InputFormRef.GetAllControls(this); this.X_Tooltip = InputFormRef.GetToolTip <ClassForm>(); InputFormRef.LoadCheckboxesResource("unitclass_checkbox_", controls, this.X_Tooltip, "", "L_40_BIT_", "L_41_BIT_", "L_42_BIT_", "L_43_BIT_"); if (Program.ROM.RomInfo.version == 8) {//FE8の場合、分岐CCへ InputFormRef.markupJumpLabel(this.J_5); //スキル this.X_SkillType = PatchUtil.SearchSkillSystem(); if (this.X_SkillType == PatchUtil.skill_system_enum.SkillSystem || this.X_SkillType == PatchUtil.skill_system_enum.FE8N_ver2 || this.X_SkillType == PatchUtil.skill_system_enum.FE8N_ver3 ) { InputFormRef.markupJumpLabel(this.X_CLASSSKILL); this.X_CLASSSKILL.Show(); this.X_SkillButtons = new Button[] { X_SKILL_BUTTON1, X_SKILL_BUTTON2, X_SKILL_BUTTON3, X_SKILL_BUTTON4, X_SKILL_BUTTON5, X_SKILL_BUTTON6, X_SKILL_BUTTON7, X_SKILL_BUTTON8, X_SKILL_BUTTON9 }; for (int i = 0; i < this.X_SkillButtons.Length; i++) { this.X_SkillButtons[i].Click += X_CLASSSKILL_Button_Click; } } } //魔法分離パッチ MagicSplitUtil.magic_split_enum magic_split = MagicSplitUtil.SearchMagicSplit(); if (magic_split == MagicSplitUtil.magic_split_enum.FE8NMAGIC) { InitFE8NMagicExtends(controls); } else if (magic_split == MagicSplitUtil.magic_split_enum.FE7UMAGIC || magic_split == MagicSplitUtil.magic_split_enum.FE8UMAGIC) { InitFE7UMagicExtends(controls); } //クラス拡張を表示するかどうか if (ClassForm.IsShowClassExetdns(this.AddressList)) { AddressListExpandsButton_255.Show(); } else { this.AddressList.Height += AddressListExpandsButton_255.Height; AddressListExpandsButton_255.Hide(); } //SkillSystemsによる 特効リワーク InitFE8ClassType(controls); this.AddressList.Focus(); }
public static void JumpUnitSkill(PatchUtil.skill_system_enum skill, uint uid) { if (skill == PatchUtil.skill_system_enum.SkillSystem) { InputFormRef.JumpForm <SkillAssignmentUnitSkillSystemForm>(uid); } else if (skill == PatchUtil.skill_system_enum.FE8N_ver2) { InputFormRef.JumpForm <SkillConfigFE8NVer2SkillForm>(); } }
static Bitmap DrawSkillIcon(PatchUtil.skill_system_enum skill, uint icon) { if (skill == PatchUtil.skill_system_enum.FE8N_ver2) { return(ImageItemIconForm.DrawIconWhereID_UsingWeaponPalette_SKILLFE8NVer2(icon)); } else { return(ImageItemIconForm.DrawIconWhereID_UsingWeaponPalette(icon)); } }
public static void MakeCheckError(List <FELint.ErrorSt> errors) { PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem(); if (skill != PatchUtil.skill_system_enum.SkillSystem) { return; } InputFormRef ifr; uint baseiconP = FindIconPointer(); uint basetextP = FindTextPointer(); uint baseanimeP = FindAnimePointer(); if (baseiconP == U.NOT_FOUND) { return; } if (basetextP == U.NOT_FOUND) { return; } if (baseanimeP == U.NOT_FOUND) { return; } ifr = Init(null, basetextP); uint skill_addr = ifr.BaseAddress; for (uint i = 0; i < ifr.DataCount; i++, skill_addr += ifr.BlockSize) { uint name = Program.ROM.u16(skill_addr + 0); if (name == 0 || name == 0xFFFF) { continue; } FELint.CheckText(name, "DETAIL3", errors, FELint.Type.SKILL_CONFIG, skill_addr, i); } uint anime = Program.ROM.p32(baseanimeP); for (uint i = 0; i < ifr.DataCount; i++, anime += 4) { if (!U.isSafetyOffset(anime)) { break; } uint addr = Program.ROM.p32(anime); if (!U.isSafetyOffset(addr)) { continue; } ImageUtilSkillSystemsAnimeCreator.MakeCheckError(errors, addr, i); } }
static uint FindSkillIconAndText(PatchUtil.skill_system_enum skill, uint[] pointers, string searchSkillName, out string outText) { if (skill == PatchUtil.skill_system_enum.FE8N_ver2) { return(SkillConfigFE8NVer2SkillForm.FindSkillIconAndText(pointers, searchSkillName, out outText)); } else if (skill == PatchUtil.skill_system_enum.midori) {//緑パッチ 詳細不明 outText = ""; return(U.NOT_FOUND); } else { return(SkillConfigFE8NSkillForm.FindSkillIconAndText(pointers, searchSkillName, out outText)); } }
public static string GetSkillName(uint skillid) { if (Program.ROM.RomInfo.version() != 8) { return(""); } PatchUtil.skill_system_enum skillsystem = PatchUtil.SearchSkillSystem(); if (skillsystem == PatchUtil.skill_system_enum.SkillSystem) { string name = SkillConfigSkillSystemForm.GetSkillName(skillid); return(name); } else if (skillsystem == PatchUtil.skill_system_enum.FE8N_ver2) { string name = SkillConfigFE8NVer2SkillForm.GetSkillText(skillid); return(name); } return(""); }
public static void MakeClassSkillButtons(PatchUtil.skill_system_enum skill, uint cid, Button[] buttons, ToolTipEx tooltip) { if (buttons == null) { return; } int skillCount = 0; if (skill == PatchUtil.skill_system_enum.SkillSystem) { skillCount = SkillAssignmentClassSkillSystemForm.MakeClassSkillButtons(cid, buttons, tooltip); } else if (skill == PatchUtil.skill_system_enum.FE8N_ver2) { skillCount = SkillConfigFE8NVer2SkillForm.MakeClassSkillButtons(cid, buttons, tooltip); } SkillUtil.ApplyModButton(buttons, skillCount); }
public static Bitmap DrawIcon(uint skillid) { if (Program.ROM.RomInfo.version() != 8) { return(ImageUtil.BlankDummy()); } PatchUtil.skill_system_enum skillsystem = PatchUtil.SearchSkillSystem(); if (skillsystem == PatchUtil.skill_system_enum.SkillSystem) { Bitmap bitmap = SkillConfigSkillSystemForm.DrawSkillIcon(skillid); return(bitmap); } else if (skillsystem == PatchUtil.skill_system_enum.FE8N_ver2) { Bitmap bitmap = SkillConfigFE8NVer2SkillForm.DrawSkillIcon(skillid); return(bitmap); } return(ImageUtil.BlankDummy()); }
//全データの取得 public static void MakeAllDataLength(List <Address> list) { uint[] pointer; PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem(); if (skill == PatchUtil.skill_system_enum.FE8N || skill == PatchUtil.skill_system_enum.yugudora) { pointer = FindSkillFE8NVer1IconPointers(); } else if (skill == PatchUtil.skill_system_enum.FE8N_ver3) {//ver3では利用しません return; } else if (skill == PatchUtil.skill_system_enum.FE8N_ver2) { pointer = SkillConfigFE8NVer2SkillForm.FindSkillFE8NVer2IconPointers(); } else { return; } if (pointer == null) { return; } InputFormRef ifr = Init(null); for (int i = 0; i < pointer.Length; i++) { ifr.ReInitPointer(pointer[i]); if (ifr.DataCount <= 0) { continue; } FEBuilderGBA.Address.AddAddress(list, ifr , "SkillConfigFE8N" + U.ToHexString(i) , new uint[] { }); } }
public static void AppendSkillSystemsSanctuary(List <Address> list) { if (Program.ROM.RomInfo.version() == 8) { PatchUtil.skill_system_enum skillsystem = PatchUtil.SearchSkillSystem(); if (skillsystem == PatchUtil.skill_system_enum.NO) {//SkillSystemsをインストールしていない return; } if (Program.ROM.RomInfo.is_multibyte()) {//F00000 - F90000 list.Add(new Address(0xF00000, 0xF90000 - 0xF00000, U.NOT_FOUND, "SkillSystemsSanctuary", Address.DataTypeEnum.BIN)); } else {//1c1ec0 - C00000 list.Add(new Address(0x1c1ec0, 0xB88560 - 0x1c1ec0, U.NOT_FOUND, "SkillSystemsSanctuary", Address.DataTypeEnum.BIN)); } } }
private void B21_ValueChanged(object sender, EventArgs e) { if (IsFE8NSkillNoSyo()) {//FE8NVer2のスキルの書 uint skillid = (uint)B21.Value; PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem(); if (skill == FEBuilderGBA.PatchUtil.skill_system_enum.FE8N_ver3) { SKILLICON.Image = SkillConfigFE8NVer3SkillForm.DrawSkillIcon(skillid); SKILLNAME.Text = SkillConfigFE8NVer3SkillForm.GetSkillText(skillid); } else { SKILLICON.Image = SkillConfigFE8NVer2SkillForm.DrawSkillIcon(skillid); SKILLNAME.Text = SkillConfigFE8NVer2SkillForm.GetSkillText(skillid); } SKILLICON.Visible = true; SKILLNAME.Visible = true; } }
void FixedButton() { if (!Program.ROM.RomInfo.is_multibyte()) {//クラスの英語表記で別設定があるのは日本語版だけ OPClassAlphaNameButton.Hide(); // FE8SpellMenuExtendsButton.Show(); } else {//日本語版 //FE8Nのスキル割り当てはユニットの??領域を使うので専用画面は不要. SkillAssignmentUnitButton.Hide(); FE8SpellMenuExtendsButton.Hide(); ToolCustomBuildButton.Hide(); PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem(); if (skill == PatchUtil.skill_system_enum.FE8N_ver3) { SkillConfigButton.Hide(); } } }
//テキストの取得 public static void MakeVarsIDArray(List <UseValsID> list) { uint[] pointer; PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem(); if (skill == PatchUtil.skill_system_enum.FE8N || skill == PatchUtil.skill_system_enum.yugudora) { pointer = FindSkillFE8NVer1IconPointers(); } else if (skill == PatchUtil.skill_system_enum.FE8N_ver3) {//ver3では利用しません return; } else if (skill == PatchUtil.skill_system_enum.FE8N_ver2) { pointer = SkillConfigFE8NVer2SkillForm.FindSkillFE8NVer2IconPointers(); } else { return; } if (pointer == null) { return; } InputFormRef ifr = Init(null); for (int i = 0; i < pointer.Length; i++) { ifr.ReInitPointer(pointer[i]); if (ifr.DataCount <= 0) { continue; } UseValsID.AppendTextID(list, FELint.Type.SKILL_CONFIG, ifr, new uint[] { 2 }); } }
//SkillSystems Reserve public static bool IsSkillReserve(ref uint addr) { if (Program.ROM.RomInfo.version() != 8) { return(false); } OptionForm.skillsystems_sanctuary_option_enum skillsystems_sanctuary_option = OptionForm.skillsystems_sanctuary_option(); if (skillsystems_sanctuary_option == OptionForm.skillsystems_sanctuary_option_enum.None) { return(false); } else if (skillsystems_sanctuary_option == OptionForm.skillsystems_sanctuary_option_enum.IfSkillSystemsInstalled) { PatchUtil.skill_system_enum skillsystem = PatchUtil.SearchSkillSystem(); if (skillsystem == PatchUtil.skill_system_enum.NO) {//SkillSystemsをインストールしていない return(false); } } if (Program.ROM.RomInfo.is_multibyte()) {//F00000 - F90000 if (addr >= 0xF00000 && addr < 0xF90000) { addr = 0xF90000; return(true); } } else {//1c1ec0 - C00000 if (addr >= 0x1c1ec0 && addr < 0xB88560) { addr = 0xB88560; return(true); } } return(false); }
private void ToolCustomBuildForm_Load(object sender, EventArgs e) { if (Program.ROM.RomInfo.version != 8) { this.Close(); return; } PatchUtil.skill_system_enum skill_system = PatchUtil.SearchSkillSystem(); if (skill_system != PatchUtil.skill_system_enum.SkillSystem) { R.ShowStopError("SkillSystemsがインストールされていません。"); this.Close(); return; } { String dir = Path.GetDirectoryName(Program.ROM.Filename); string orignal_romfile = MainFormUtil.FindOrignalROM(dir); this.OrignalROMTextArea.Text = orignal_romfile; } this.Explain.Text += "https://dw.ngmansion.xyz/doku.php?id=en:en:guide:febuildergba:skillsystems_custombuild"; ///No Translate }
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()); }
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); } }
public SkillAssignmentUnitFE8NForm() { InitializeComponent(); PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem(); Dictionary <uint, string> SCROLL1; Dictionary <uint, string> SCROLL2; Dictionary <uint, string> MASTERY; uint[] pointers; if (skill == PatchUtil.skill_system_enum.yugudora) {//ユグドラパッチ 初期FE8Nカスタム pointers = SkillConfigFE8NSkillForm.FindSkillFE8NVer1IconPointers(); SCROLL1 = U.LoadDicResource(U.ConfigDataFilename("skill_extends_yugudora_skill1_scroll_")); SCROLL2 = U.LoadDicResource(U.ConfigDataFilename("skill_extends_yugudora_skill2_scroll_")); MASTERY = U.LoadDicResource(U.ConfigDataFilename("skill_extends_FE8N_skill3_mastery_")); } else if (skill == PatchUtil.skill_system_enum.midori) {//緑パッチ pointers = SkillConfigFE8NSkillForm.FindSkillFE8NVer1IconPointers(); SCROLL1 = U.LoadDicResource(U.ConfigDataFilename("skill_extends_midori_skill1_scroll_")); SCROLL2 = U.LoadDicResource(U.ConfigDataFilename("skill_extends_midori_skill2_scroll_")); MASTERY = U.LoadDicResource(U.ConfigDataFilename("skill_extends_midori_skill3_mastery_")); } else if (skill == PatchUtil.skill_system_enum.FE8N_ver2) {//FE8N ver2 pointers = SkillConfigFE8NVer2SkillForm.FindSkillFE8NVer2IconPointers(); SCROLL1 = U.LoadDicResource(U.ConfigDataFilename("skill_extends_FE8N_skill1_scroll_")); SCROLL2 = U.LoadDicResource(U.ConfigDataFilename("skill_extends_FE8N_skill2_scroll_")); MASTERY = U.LoadDicResource(U.ConfigDataFilename("skill_extends_FE8N_skill3_mastery_")); } else {//FE8N pointers = SkillConfigFE8NSkillForm.FindSkillFE8NVer1IconPointers(); SCROLL1 = U.LoadDicResource(U.ConfigDataFilename("skill_extends_FE8N_skill1_scroll_")); SCROLL2 = U.LoadDicResource(U.ConfigDataFilename("skill_extends_FE8N_skill2_scroll_")); MASTERY = U.LoadDicResource(U.ConfigDataFilename("skill_extends_FE8N_skill3_mastery_")); } string find; string text; uint icon; find = U.at(SCROLL1, 0x01); icon = FindSkillIconAndText(skill, pointers, find, out text); L_40_BIT_01.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE0_0.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL1, 0x02); icon = FindSkillIconAndText(skill, pointers, find, out text); L_40_BIT_02.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE0_1.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL1, 0x04); icon = FindSkillIconAndText(skill, pointers, find, out text); L_40_BIT_04.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE0_2.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL1, 0x08); icon = FindSkillIconAndText(skill, pointers, find, out text); L_40_BIT_08.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE0_3.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL1, 0x10); icon = FindSkillIconAndText(skill, pointers, find, out text); L_40_BIT_10.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE0_4.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL1, 0x20); icon = FindSkillIconAndText(skill, pointers, find, out text); L_40_BIT_20.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE0_5.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL1, 0x40); icon = FindSkillIconAndText(skill, pointers, find, out text); L_40_BIT_40.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE0_6.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL1, 0x80); icon = FindSkillIconAndText(skill, pointers, find, out text); L_40_BIT_80.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE0_7.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL2, 0x01); icon = FindSkillIconAndText(skill, pointers, find, out text); L_41_BIT_01.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE1_0.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL2, 0x02); icon = FindSkillIconAndText(skill, pointers, find, out text); L_41_BIT_02.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE1_1.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL2, 0x04); icon = FindSkillIconAndText(skill, pointers, find, out text); L_41_BIT_04.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE1_2.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL2, 0x08); icon = FindSkillIconAndText(skill, pointers, find, out text); L_41_BIT_08.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE1_3.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL2, 0x10); icon = FindSkillIconAndText(skill, pointers, find, out text); L_41_BIT_10.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE1_4.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL2, 0x20); icon = FindSkillIconAndText(skill, pointers, find, out text); L_41_BIT_20.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE1_5.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL2, 0x40); icon = FindSkillIconAndText(skill, pointers, find, out text); L_41_BIT_40.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE1_6.Image = DrawSkillIcon(skill, icon); find = U.at(SCROLL2, 0x80); icon = FindSkillIconAndText(skill, pointers, find, out text); L_41_BIT_80.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE1_7.Image = DrawSkillIcon(skill, icon); icon = FindSkillIconAndText(skill, pointers, find, out text); L_39_RADIO_0.Text = R._("なし"); find = U.at(MASTERY, 0x01); icon = FindSkillIconAndText(skill, pointers, find, out text); L_39_RADIO_1.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE2_1.Image = DrawSkillIcon(skill, icon); find = U.at(MASTERY, 0x02); icon = FindSkillIconAndText(skill, pointers, find, out text); L_39_RADIO_2.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE2_2.Image = DrawSkillIcon(skill, icon); find = U.at(MASTERY, 0x03); icon = FindSkillIconAndText(skill, pointers, find, out text); L_39_RADIO_3.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE2_3.Image = DrawSkillIcon(skill, icon); find = U.at(MASTERY, 0x04); icon = FindSkillIconAndText(skill, pointers, find, out text); L_39_RADIO_4.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE2_4.Image = DrawSkillIcon(skill, icon); find = U.at(MASTERY, 0x05); icon = FindSkillIconAndText(skill, pointers, find, out text); L_39_RADIO_5.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE2_5.Image = DrawSkillIcon(skill, icon); find = U.at(MASTERY, 0x06); icon = FindSkillIconAndText(skill, pointers, find, out text); L_39_RADIO_6.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE2_6.Image = DrawSkillIcon(skill, icon); find = U.at(MASTERY, 0x07); icon = FindSkillIconAndText(skill, pointers, find, out text); L_39_RADIO_7.Text = U.nl2none(icon == U.NOT_FOUND ? find : text); IMAGE2_7.Image = DrawSkillIcon(skill, icon); InputFormRef.TabControlHideTabOption(SkillTab); List <Control> controls = InputFormRef.GetAllControls(this); InputFormRef.MakeLinkEvent("", controls); }
public static string MakeEAAutoDef(string target_filename, uint freearea, uint org_sp, uint org_data, bool isColorzCore) { StringBuilder sb = new StringBuilder(); string target_text = File.ReadAllText(target_filename); if (IsInjectHackInstallation(target_text)) { sb.AppendLine("#include \"Extensions/Hack Installation.txt\""); } if (freearea == U.NOT_FOUND && org_sp == U.NOT_FOUND) { sb.AppendLine(String.Format("#include \"{0}\"\r\n" , Path.GetFileName(target_filename))); return(sb.ToString()); } EAUtil ea = new EAUtil(target_filename); for (int i = 0; i < ea.IfNDefList.Count; i++) { string ifndef_keyword = ea.IfNDefList[i]; switch (ifndef_keyword) { case "FreeSpace": if (freearea != 0) { sb.AppendLine("#define FreeSpace " + U.To0xHexString(freearea)); } break; } } sb.AppendLine("#define ItemImage " + U.To0xHexString(Program.ROM.p32(Program.ROM.RomInfo.icon_pointer))); sb.AppendLine("#define ItemPalette " + U.To0xHexString(Program.ROM.p32(Program.ROM.RomInfo.icon_palette_pointer))); sb.AppendLine("#define ItemTable " + U.To0xHexString(Program.ROM.p32(Program.ROM.RomInfo.item_pointer))); sb.AppendLine("#define TextTable " + U.To0xHexString(Program.ROM.p32(Program.ROM.RomInfo.text_pointer))); sb.AppendLine("#define PortraitTable " + U.To0xHexString(Program.ROM.p32(Program.ROM.RomInfo.portrait_pointer))); if (Program.ROM.RomInfo.version == 8) { sb.AppendLine("#define SummonUnitTable " + U.To0xHexString(Program.ROM.p32(Program.ROM.RomInfo.summon_unit_pointer))); if (PatchUtil.SearchSkillSystem() == PatchUtil.skill_system_enum.SkillSystem) { SkillConfigSkillSystemForm.Export(sb, isColorzCore); } } sb.AppendLine("#define AI1Table " + U.To0xHexString(Program.ROM.p32(Program.ROM.RomInfo.ai1_pointer))); sb.AppendLine("#define AI2Table " + U.To0xHexString(Program.ROM.p32(Program.ROM.RomInfo.ai2_pointer))); UnitActionPointerForm.SupportActionRework(sb); if (org_sp != U.NOT_FOUND) { sb.AppendLine("#define FEBUILDER_EXTRA_ORG " + U.To0xHexString(org_sp)); } if (org_data != U.NOT_FOUND) { sb.AppendLine("#define FEBUILDER_DATA_ORG " + U.To0xHexString(org_data)); } Program.ExportFunction.ExportEA(sb, isColorzCore); PatchUtil.skill_system_enum skillsystem = PatchUtil.SearchSkillSystem(); if (skillsystem == PatchUtil.skill_system_enum.SkillSystem) { if (sb.ToString().IndexOf("SkillTester") >= 0) { sb.AppendLine("#define SKILLSYSTEM_SKILL_TESTER SkillTester"); } } //魔法分離パッチ MagicSplitUtil.magic_split_enum magic_split = MagicSplitUtil.SearchMagicSplit(); if (magic_split == MagicSplitUtil.magic_split_enum.FE8NMAGIC) { sb.AppendLine("#define MAGIC_PATCH"); } else if (magic_split == MagicSplitUtil.magic_split_enum.FE8UMAGIC) { sb.AppendLine("#define USE_STRMAG_SPLIT"); } else if (magic_split == MagicSplitUtil.magic_split_enum.FE7UMAGIC) { sb.AppendLine("#define USE_STRMAG_SPLIT"); } if (freearea == 0 || freearea == U.NOT_FOUND) { sb.AppendLine(String.Format("#include \"{0}\"\r\n" , Path.GetFileName(target_filename))); } else { sb.AppendLine(String.Format("ORG {0}\r\n#include \"{1}\"\r\n" , U.To0xHexString(freearea), target_filename)); } return(sb.ToString()); }