Exemple #1
0
        void SelectedIndexChangedFE7UMagicExtends(object sender, EventArgs e)
        {
            if (MagicSplitUtil.SearchMagicSplit() != MagicSplitUtil.magic_split_enum.FE7UMAGIC)
            {
                if (MagicSplitUtil.SearchMagicSplit() != MagicSplitUtil.magic_split_enum.FE8UMAGIC)
                {
                    return;
                }
            }

            if (this.AddressList.SelectedIndex < 0)
            {
                return;
            }

            uint         cid          = (uint)this.AddressList.SelectedIndex;
            InputFormRef InputFormRef = Init(null);
            uint         addr         = InputFormRef.IDToAddr(cid);

            if (!U.isSafetyOffset(addr))
            {
                return;
            }

            this.MagicExtClassBase.Value          = (sbyte)MagicSplitUtil.GetClassBaseMagicExtends(cid, addr);
            this.MagicExtClassGrow.Value          = MagicSplitUtil.GetClassGrowMagicExtends(cid, addr);
            this.MagicExtClassLimit.Value         = MagicSplitUtil.GetClassLimitMagicExtends(cid, addr);
            this.MagicExtClassPromotionGain.Value = MagicSplitUtil.GetClassPromotionGainMagicExtends(cid, addr);
        }
Exemple #2
0
        void WriteButtonFE7UMagicExtends(object sender, EventArgs e)
        {
            if (MagicSplitUtil.SearchMagicSplit() != MagicSplitUtil.magic_split_enum.FE7UMAGIC)
            {
                if (MagicSplitUtil.SearchMagicSplit() != MagicSplitUtil.magic_split_enum.FE8UMAGIC)
                {
                    return;
                }
            }

            if (this.AddressList.SelectedIndex < 0)
            {
                return;
            }

            uint         cid          = (uint)this.AddressList.SelectedIndex;
            InputFormRef InputFormRef = Init(null);
            uint         addr         = InputFormRef.IDToAddr(cid);

            if (!U.isSafetyOffset(addr))
            {
                return;
            }
            Undo.UndoData undodata = Program.Undo.NewUndoData(this, "MagicExtends");
            MagicSplitUtil.WriteClassBaseMagicExtends(cid, addr, U.ConvertNUDToUint(this.MagicExtClassBase), undodata);
            MagicSplitUtil.WriteClassGrowMagicExtends(cid, addr, (uint)this.MagicExtClassGrow.Value, undodata);
            MagicSplitUtil.WriteClassLimitMagicExtends(cid, addr, (uint)this.MagicExtClassLimit.Value, undodata);
            MagicSplitUtil.WriteClassPromotionGainMagicExtends(cid, addr, (uint)this.MagicExtClassPromotionGain.Value, undodata);
            Program.Undo.Push(undodata);
        }
Exemple #3
0
        void SelectedIndexChangedFE7UMagicExtends(object sender, EventArgs e)
        {
            if (MagicSplitUtil.SearchMagicSplit() != MagicSplitUtil.magic_split_enum.FE7UMAGIC)
            {
                return;
            }

            if (this.AddressList.SelectedIndex < 0)
            {
                return;
            }

            uint         uid          = (uint)this.AddressList.SelectedIndex;
            InputFormRef InputFormRef = Init(null);
            uint         addr         = InputFormRef.IDToAddr(uid);

            if (!U.isSafetyOffset(addr))
            {
                return;
            }

            uid++;
            this.MagicExtUnitBase.Value = MagicSplitUtil.GetUnitBaseMagicExtends(uid, addr);
            this.MagicExtUnitGrow.Value = MagicSplitUtil.GetUnitGrowMagicExtends(uid, addr);
        }
Exemple #4
0
        void WriteButtonFE7UMagicExtends(object sender, EventArgs e)
        {
            if (MagicSplitUtil.SearchMagicSplit() != MagicSplitUtil.magic_split_enum.FE7UMAGIC)
            {
                return;
            }

            if (this.AddressList.SelectedIndex < 0)
            {
                return;
            }

            uint         uid          = (uint)this.AddressList.SelectedIndex;
            InputFormRef InputFormRef = Init(null);
            uint         addr         = InputFormRef.IDToAddr(uid);

            if (!U.isSafetyOffset(addr))
            {
                return;
            }

            uid++;
            Undo.UndoData undodata = Program.Undo.NewUndoData(this, "MagicExtends");
            MagicSplitUtil.WriteUnitBaseMagicExtends(uid, addr, (uint)this.MagicExtUnitBase.Value, undodata);
            MagicSplitUtil.WriteUnitGrowMagicExtends(uid, addr, (uint)this.MagicExtUnitGrow.Value, undodata);
            Program.Undo.Push(undodata);
        }
Exemple #5
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);
                }
            }
        }
        void InitMagic()
        {
            MagicSplitUtil.magic_split_enum magic_split = MagicSplitUtil.SearchMagicSplit();
            if (magic_split == MagicSplitUtil.magic_split_enum.NO)
            {
                this.Width = X_SIM_MAGICEX_Label.Left;
            }
            else
            {
                X_SIM_MAGICEX_Label.Show();
                X_SIM_MAGICEX_Value.Show();
                this.Width = X_SIM_MAGICEX_Label.Left + X_SIM_MAGICEX_Label.Width;

                X_SIM_MAGICEX_Label.Location = new Point(
                    X_SlidePanel.Location.X,
                    X_SIM_MAGICEX_Label.Location.Y
                    );
                X_SIM_MAGICEX_Value.Location = new Point(
                    X_SlidePanel.Location.X,
                    X_SIM_MAGICEX_Value.Location.Y
                    );
                X_SlidePanel.Location = new Point(
                    X_SlidePanel.Location.X + X_SIM_MAGICEX_Label.Width + 1,
                    X_SlidePanel.Location.Y
                    );
            }
        }
 private void ITEMSTATBOOSTERForm_Load(object sender, EventArgs e)
 {
     //英語版の魔法分離パッチ
     MagicSplitUtil.magic_split_enum magic_split = MagicSplitUtil.SearchMagicSplit();
     if (magic_split == MagicSplitUtil.magic_split_enum.FE8UMAGIC ||
         magic_split == MagicSplitUtil.magic_split_enum.FE7UMAGIC)
     {
         J_9.Text = R._("魔力");
     }
 }
Exemple #8
0
        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();
        }
Exemple #9
0
        private void UnitFormFE7_Load(object sender, EventArgs e)
        {
            List <Control> controls = InputFormRef.GetAllControls(this);
            ToolTipEx      tooltip  = InputFormRef.GetToolTip <UnitFE7Form>();

            InputFormRef.LoadCheckboxesResource(U.ConfigDataFilename("unitclass_checkbox_"), controls, tooltip, "", "L_40_BIT_", "L_41_BIT_", "L_42_BIT_", "L_43_BIT_");

            //魔法分離パッチ
            MagicSplitUtil.magic_split_enum magic_split = MagicSplitUtil.SearchMagicSplit();
            if (magic_split == MagicSplitUtil.magic_split_enum.FE7UMAGIC)
            {
                InitFE7UMagicExtends(controls);
            }
        }
Exemple #10
0
        private void ItemForm_Load(object sender, EventArgs e)
        {
            List <Control> controls = InputFormRef.GetAllControls(this);
            ToolTipEx      tooltip  = InputFormRef.GetToolTip <ItemForm>();

            InputFormRef.LoadCheckboxesResource("item_checkbox_", controls, tooltip, "", "L_8_BIT_", "L_9_BIT_", "L_10_BIT_", "L_11_BIT_");

            FE8UItemSkill();

            //英語版の魔法分離パッチ
            MagicSplitUtil.magic_split_enum magic_split = MagicSplitUtil.SearchMagicSplit();
            if (magic_split == MagicSplitUtil.magic_split_enum.FE8UMAGIC ||
                magic_split == MagicSplitUtil.magic_split_enum.FE7UMAGIC)
            {
                MagicExtUnitBaseLabel.Show();
                MagicExtUnitBase.Show();
            }
            VennouWeaponLockArray(controls);

            this.AddressList.Focus();
        }
Exemple #11
0
        private void P12_ValueChanged(object sender, EventArgs e)
        {
            uint[] bonuses = ItemStatBonusesForm.GetValues((uint)P12.Value);
            X_SIM_HP.Value    = (sbyte)bonuses[0]; //HP
            X_SIM_STR.Value   = (sbyte)bonuses[1]; //攻撃
            X_SIM_SKILL.Value = (sbyte)bonuses[2]; //技
            X_SIM_SPD.Value   = (sbyte)bonuses[3]; //速さ
            X_SIM_DEF.Value   = (sbyte)bonuses[4]; //守備
            X_SIM_RES.Value   = (sbyte)bonuses[5]; //魔防
            X_SIM_LUCK.Value  = (sbyte)bonuses[6]; //幸運
            X_SIM_MOVE.Value  = (sbyte)bonuses[7]; //移動
            X_SIM_BODY.Value  = (sbyte)bonuses[8]; //体力


            MagicSplitUtil.magic_split_enum magic_split = MagicSplitUtil.SearchMagicSplit();
            if (magic_split == MagicSplitUtil.magic_split_enum.FE8UMAGIC ||
                magic_split == MagicSplitUtil.magic_split_enum.FE7UMAGIC)
            {
                MagicExtUnitBase.Value = (sbyte)bonuses[9]; //魔力
            }
        }
Exemple #12
0
        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());
        }
Exemple #13
0
        private void FilterComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            PromotionItemExplain.Hide();
            StatBoosterItemExplain.Hide();

            int    selected       = FilterComboBox.SelectedIndex;
            string configFilename = "";

            switch (selected)
            {
            case 0:     //0=アイテムを利用できるか判定する
            default:
                configFilename = (U.ConfigDataFilename("item_usability_array_"));
                break;

            case 1:     //1=アイテムを利用した場合の効果を定義する
                configFilename = (U.ConfigDataFilename("item_effect_array_"));
                break;

            case 2:     //2=CCアイテムを使った場合の処理を定義する
                configFilename = (U.ConfigDataFilename("item_promotion1_array_"));
                PromotionItemExplain.Show();
                break;

            case 3:     //3=CCアイテムかどうかを定義する(FE7のみ)
                configFilename = (U.ConfigDataFilename("item_promotion2_array_"));
                PromotionItemExplain.Show();
                break;

            case 4:     //4=アイテムのターゲット選択の方法を定義する(多分)
                configFilename = (U.ConfigDataFilename("item_staff1_array_"));
                break;

            case 5:     //5=杖の種類を定義する
                configFilename = (U.ConfigDataFilename("item_staff2_array_"));
                break;

            case 6:     //6=ドーピングアイテムを利用した時のメッセージを定義する
                MagicSplitUtil.magic_split_enum magic_split = MagicSplitUtil.SearchMagicSplit();
                if (magic_split == MagicSplitUtil.magic_split_enum.FE8UMAGIC)
                {
                    configFilename = (U.ConfigDataFilename("item_statbooster1_skill_array_"));
                }
                else
                {
                    configFilename = (U.ConfigDataFilename("item_statbooster1_array_"));
                }
                StatBoosterItemExplain.Show();
                break;

            case 7:     //7=ドーピングアイテムとCCアイテムかどうかを定義する
                configFilename = (U.ConfigDataFilename("item_statbooster2_array_"));
                StatBoosterItemExplain.Show();
                break;

            case 8:     //8=エラーメッセージを定義する
                configFilename = (U.ConfigDataFilename("item_errormessage_array_"));
                StatBoosterItemExplain.Show();
                break;

            case 9:     //9=アイテム名の前置詞
                configFilename = (U.ConfigDataFilename("item_name_article_"));
                break;
            }

            this.L_0_COMBO.Items.Clear();
            if (File.Exists(configFilename))
            {
                string[] lines = File.ReadAllLines(configFilename);

                this.L_0_COMBO.BeginUpdate();
                for (int i = 0; i < lines.Length; i++)
                {
                    string line = lines[i];
                    if (U.IsComment(line) || U.OtherLangLine(line))
                    {
                        continue;
                    }
                    line = U.ClipComment(line);
                    line = line.Trim();
                    this.L_0_COMBO.Items.Add(line);
                }
                this.L_0_COMBO.EndUpdate();
            }

            uint addr = ReInit(selected, this.InputFormRef);

            if (addr == U.NOT_FOUND)
            {
                this.AddressList.Items.Clear();
                this.SwitchListExpandsButton.Hide();
                this.WriteButton.Hide();

                if (PatchUtil.ItemUsingExtendsPatch() == PatchUtil.ItemUsingExtends.IER)
                {
                    this.X_NOT_FOUND.Hide();
                    this.X_IER_PATCH.Show();
                    return;
                }

                this.X_NOT_FOUND.Show();
                this.X_IER_PATCH.Hide();
                return;
            }

            this.SwitchListExpandsButton.Show();
            this.WriteButton.Show();
            this.X_NOT_FOUND.Hide();
            this.X_IER_PATCH.Hide();
        }