Ejemplo n.º 1
0
 private void ItemCriticalButton_Click(object sender, EventArgs e)
 {
     if (PatchUtil.SearchClassType() == PatchUtil.class_type_enum.SkillSystems_Rework)
     {//SkillSystemsによる 特効リワーク
         InputFormRef.JumpForm <ItemEffectivenessSkillSystemsReworkForm>();
     }
     else
     {
         InputFormRef.JumpForm <ItemEffectivenessForm>();
     }
 }
Ejemplo n.º 2
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
                    )
                {
                    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 SoundRoomFE6Form()
        {
            InitializeComponent();
            if (PatchUtil.SearchSoundRoomUnlock() == PatchUtil.soundroom_unlock_enum.Enable)
            {
                J_0_SONG.AccessibleDescription = "";
            }

            this.InputFormRef = Init(this);
            this.InputFormRef.MakeGeneralAddressListContextMenu(true);
        }
        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);
            }
        }
Ejemplo n.º 5
0
 void InitFE8ClassType(List <Control> controls)
 {
     //SkillSystemsによる 特効リワーク
     if (PatchUtil.SearchClassType() == PatchUtil.class_type_enum.SkillSystems_Rework)
     {
         J_80.Text = R._("ClassType");
         InputFormRef.makeJumpEventHandler(D80, J_80, "CLASSTYPE", new string[] { });
         InputFormRef.makeLinkEventHandler("", controls, D80, X_CLASSTYPE, 80, "CLASSTYPE", new string[] { });
         X_CLASSTYPE.Show();
     }
 }
Ejemplo n.º 6
0
        public static void PreLoadResource_item_staff_use_effect(string fullfilename)
        {
            g_item_staff_use_effect_List = U.LoadDicResource(fullfilename);

            PatchUtil.ItemUsingExtends itemUsingExtends = PatchUtil.ItemUsingExtendsPatch();
            if (itemUsingExtends == PatchUtil.ItemUsingExtends.IER)
            {
                g_item_staff_use_effect_List[0x37] = R._("ラトナ");
                g_item_staff_use_effect_List[0x38] = R._("スキルの書");
            }
        }
Ejemplo n.º 7
0
        private void AddressList_SelectedIndexChanged(object sender, EventArgs e)
        {
            uint addr = InputFormRef.SelectToAddr(this.AddressList);

            PatchUtil.PRIORITY_CODE priorityCode = PatchUtil.SearchPriorityCode();

            //アイテム
            ItemFontPictureBox.Image = FontForm.DrawFont(Program.ROM.u16(addr), true, priorityCode);

            //セリフ
            SerifFontPictureBox.Image = FontForm.DrawFont(Program.ROM.u16(addr), false, priorityCode);
        }
Ejemplo n.º 8
0
        public static void MakeCheckError(List <FELint.ErrorSt> errors)
        {
            InputFormRef InputFormRef = Init(null);

            if (InputFormRef.DataCount < 10)
            {
                errors.Add(new FELint.ErrorSt(FELint.Type.UNIT, U.NOT_FOUND
                                              , R._("ユニットデータが極端に少ないです。破損している可能性があります。")));
            }

            uint base_pointer = Program.ROM.u32(Program.ROM.RomInfo.support_unit_pointer());

            if (!U.isSafetyPointer(base_pointer))
            {
                errors.Add(new FELint.ErrorSt(FELint.Type.UNIT, U.NOT_FOUND
                                              , R._("ユニット0x01の支援ポインタが無効です。この値は支援の起点となる値です。バニラの値から変更しないでください。")));
                return;
            }

            //武器魔法混在パッチを適応しているか
            bool is_melee_range_fix = PatchUtil.SearchMeleeAndMagicFixPatch();

            uint unit_addr = InputFormRef.BaseAddress;

            for (uint i = 0; i < InputFormRef.DataCount; i++, unit_addr += InputFormRef.BlockSize)
            {
                uint name = Program.ROM.u16(unit_addr + 0);
                FELint.CheckText(name, "NAME1", errors, FELint.Type.UNIT, unit_addr, i);

                uint info = Program.ROM.u16(unit_addr + 2);
                FELint.CheckText(info, "DETAIL3", errors, FELint.Type.UNIT, unit_addr, i);

                uint id = Program.ROM.u8(unit_addr + 4);
                if (name == 0 && id == 0)
                {//ただの使っていないデータ
                }
                else
                {
                    FELint.CheckID(id, i + 1, errors, FELint.Type.UNIT, unit_addr, i);
                }

                if (is_melee_range_fix == false)
                {//武器魔法混在パッチがないので、混在のチェックをします
                    if (isMeleeMagicMixAddr(unit_addr))
                    {
                        errors.Add(new FELint.ErrorSt(FELint.Type.UNIT, unit_addr
                                                      , R._("武器レベルで、近接と魔法を混在させています。\r\n混在を可能にするパッチを当てていない状態で、近接と魔法を混在すると、戦闘アニメが正しく動作しません。"), i));
                    }
                }
                uint support_pointer = Program.ROM.u32(unit_addr + 44);
                SupportUnitForm.MakeCheckErrorAddr(errors, support_pointer, FELint.Type.UNIT, unit_addr, i);
            }
        }
Ejemplo n.º 9
0
 //FE8U Item Skill
 bool IsFE8UItemSkill()
 {
     if (PatchUtil.SearchSkillSystem() != PatchUtil.skill_system_enum.SkillSystem)
     {
         return(false);
     }
     if (PatchUtil.SearchFE8UItemSkill() == PatchUtil.FE8UItemSkill_enum.NO)
     {
         return(false);
     }
     return(true);
 }
        void PickupInstrument()
        {
            List <U.AddrResult> iset = PatchUtil.SearchInstrumentSet(this.OrignalInstrumentAddr);

            U.ConvertComboBox(iset, ref InstrumentSelectComboBox);

            if (iset.Count >= 1)
            {
                //NIMAPが利用できるならディフォルト指定
                U.SelectedIndexSafety(InstrumentSelectComboBox, 1);
            }
        }
        static Dictionary <uint, string> MakeCache_Cache_TerrainSetDicLow()
        {
            string filename = U.ConfigDataFilename("battleterrain_set_");
            Dictionary <uint, string> data = U.LoadDicResource(filename);

            if (PatchUtil.SearchExtendsBattleBG() != PatchUtil.ExtendsBattleBG_extends.Extends)
            {
                return(data);
            }
            uint pointer = GetExtendsPointer();

            if (pointer == 0)
            {
                return(data);
            }
            uint addr = Program.ROM.p32(pointer);

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

            int         baseSize = data.Count;
            List <uint> pointers = new List <uint>(0x4f);

            for (int i = 0; i < 0xff; i++, addr += 8)
            {
                uint p = Program.ROM.u32(addr);
                if (p == 0xffffffff)
                {
                    break;
                }

                string name = Program.CommentCache.At(addr);
                if (i < baseSize)
                {
                    if (name != "")
                    {
                        data[(uint)i] = name;
                    }
                    continue;
                }

                if (name == "")
                {
                    name = "Extends" + U.ToHexString2(i);
                }
                data[(uint)i] = name;
            }

            return(data);
        }
Ejemplo n.º 12
0
        private void WriteButton_Click(object sender, EventArgs e)
        {
            if (this.SelectFontBitmapByte == null || this.SelectFontBitmapByte.Length != 64)
            {
                return;
            }


            string undo_name = "FONT " + this.SearchChar.Text;

            PatchUtil.PRIORITY_CODE priorityCode = PatchUtil.SearchPriorityCode();
            uint search_char = U.ConvertMojiCharToUnitFast(this.SearchChar.Text, priorityCode);

            uint fontlist_pointer = GetFontPointer(this.FontType.SelectedIndex == 0);

            uint prevaddr;
            uint fontaddr = FindFontData(fontlist_pointer, search_char, out prevaddr, priorityCode);

            if (fontaddr == U.NOT_FOUND)
            {     //末尾に追加.
                if (prevaddr == U.NOT_FOUND)
                { //このフォントはルールにより登録できない.日本語フォントで 0x100以下とか.
                    return;
                }
                byte[] newFontData = MakeNewFontData(search_char
                                                     , (uint)this.FontWidth.Value
                                                     , this.SelectFontBitmapByte
                                                     , Program.ROM
                                                     , priorityCode
                                                     );

                Undo.UndoData undodata = Program.Undo.NewUndoData(undo_name);

                uint newaddr = InputFormRef.AppendBinaryData(newFontData, undodata);
                if (newaddr == U.NOT_FOUND)
                {//エラー
                    return;
                }

                //ひとつ前のフォントリストのポインタを、現在追加した最後尾にすげかえる.
                Program.ROM.write_u32(prevaddr + 0, U.toPointer(newaddr), undodata);
                fontaddr = newaddr;
            }
            else
            {//更新
                Program.Undo.Push(undo_name, fontaddr, 8 + 64);
                Program.ROM.write_u8(fontaddr + 5, (uint)this.FontWidth.Value);
                Program.ROM.write_range(fontaddr + 8, this.SelectFontBitmapByte); //64バイト書き込み
            }
            this.Address.Value = U.toPointer(fontaddr);
            InputFormRef.ShowWriteNotifyAnimation(this, fontaddr);
        }
Ejemplo n.º 13
0
        public ItemForm()
        {
            InitializeComponent();

            this.AddressList.OwnerDraw(ListBoxEx.DrawItemAndText, DrawMode.OwnerDrawFixed);

            if (PatchUtil.SearchClassType() == PatchUtil.class_type_enum.SkillSystems_Rework)
            {//SkillSystemsによる 特効リワーク
                this.CLASS_LISTBOX.OwnerDraw(ListBoxEx.DrawClassTypeAndText, DrawMode.OwnerDrawFixed);
            }
            else
            {
                this.CLASS_LISTBOX.OwnerDraw(ListBoxEx.DrawClassAndText, DrawMode.OwnerDrawFixed);
                this.CLASS_LISTBOX.ItemListToJumpForm("CLASS");
            }

            PatchUtil.ItemUsingExtends itemUsingExtends = PatchUtil.ItemUsingExtendsPatch();
            if (itemUsingExtends == PatchUtil.ItemUsingExtends.IER)
            {
                J_34.Text = "IER Byte";
                J_34.AccessibleDescription = R._("IERによって参照される値です。\r\nアイテムに応じて役割が変わります。");
                X_34_Info.Show();
            }
            else
            {
                //growth mod
                PatchUtil.growth_mod_enum growthmod = PatchUtil.SearchGrowsMod();
                if (growthmod == PatchUtil.growth_mod_enum.SkillSystems ||
                    growthmod == PatchUtil.growth_mod_enum.Vennou)
                {
                    J_34.Text = "Growth_Mod";
                    J_34.AccessibleDescription = "この拡張は、通常のstatboosterよりも大きいデータを必要とします。\r\nこの拡張フラグを1に設定した後で、statbooster領域を確保してください。\r\n既に確保している場合は、statboosterアドレスを0に設定して再確保してください。";
                }
            }

            if (PatchUtil.SearchSkillSystem() == PatchUtil.skill_system_enum.SkillSystem)
            {
                J_33.Text = "Debuff";
                J_34.AccessibleDescription = "SkillSystemsのDebuffsの値を設定します。\r\n0の場合はDebuffsはありません。\r\n1以降の場合、利用したいDebuffsTableの値を設定します。\r\nDebuffsTableの値はPatchから設定可能です。";
                InputFormRef.markupJumpLabel(J_33);
            }

            this.InputFormRef = Init(this);
            this.InputFormRef.UseWriteProtectionID00 = true; //ID:0x00を書き込み禁止
            this.InputFormRef.MakeGeneralAddressListContextMenu(true);

            InputFormRef.LoadComboResource(L_30_COMBO, g_item_staff_use_effect_List);
            InputFormRef.LoadComboResource(L_31_COMBO, g_item_weapon_effect_List);

            InputFormRef.markupJumpLabel(JumpToITEMEFFECT);
            InputFormRef.markupJumpLabel(HardCodingWarningLabel);
        }
Ejemplo n.º 14
0
        private void ImageGenericEnemyPortraitForm_Load(object sender, EventArgs e)
        {
            uint extends_pointer = U.NOT_FOUND;

            if (PatchUtil.SearchGenericEnemyPortraitExtendsPatch(out extends_pointer))
            {
                this.ExtendsBanner.Text = R._("拡張パッチがインストールされているため、この設定は利用できません。パッチの方から修正してください。");
            }
            else
            {
                this.ExtendsBanner.Text = R._("もっとたくさん一般兵の顔画像を利用したい場合は、パッチを利用してください。");
            }
        }
Ejemplo n.º 15
0
        public OPClassDemoFE7UForm()
        {
            InitializeComponent();

            this.AddressList.OwnerDraw(ListBoxEx.DrawClassAndText, DrawMode.OwnerDrawFixed);

            this.InputFormRef = Init(this);
            this.InputFormRef.MakeGeneralAddressListContextMenu(true);
            this.N2_InputFormRef = N2_Init(this);

            PatchUtil.OPClassReelSortExtends opClassReelSort = PatchUtil.OPClassReelSortPatch();
            this.AddressListExpandsButton.Visible = (opClassReelSort != PatchUtil.OPClassReelSortExtends.NO);
        }
Ejemplo n.º 16
0
 private void P16_ValueChanged(object sender, EventArgs e)
 {
     if (PatchUtil.SearchClassType() == PatchUtil.class_type_enum.SkillSystems_Rework)
     {//SkillSystemsによる 特効リワーク
         List <U.AddrResult> arlist = ItemEffectivenessSkillSystemsReworkForm.MakeCriticalClassList((uint)P16.Value);
         U.ConvertListBox(arlist, ref CLASS_LISTBOX);
     }
     else
     {
         List <U.AddrResult> arlist = ItemEffectivenessForm.MakeCriticalClassList((uint)P16.Value);
         U.ConvertListBox(arlist, ref CLASS_LISTBOX);
     }
 }
Ejemplo n.º 17
0
        private void AddressList_SelectedIndexChanged(object sender, EventArgs e)
        {
            U.ForceUpdate(X_SIM, GrowSimulator.ClassMaxLevel((uint)this.AddressList.SelectedIndex));

            X_SIM_ValueChanged(null, null);
            SkillUtil.MakeClassSkillButtons(X_SkillType, (uint)this.AddressList.SelectedIndex, this.X_SkillButtons, this.X_Tooltip);

            //SkillSystemsによる 特効リワーク
            if (PatchUtil.SearchClassType() == PatchUtil.class_type_enum.SkillSystems_Rework)
            {
                X_CLASSTYPE.Text = ClassForm.GetClassType((uint)this.D80.Value);
            }
        }
Ejemplo n.º 18
0
 public FETextDecode(ROM rom, SystemTextEncoder encoder)
 {
     this.ROM = rom;
     this.SystemTextEncoder = encoder;
     if (rom == Program.ROM)
     {
         this.PriorityCode = PatchUtil.SearchPriorityCode();
     }
     else
     {
         this.PriorityCode = PatchUtil.SearchPriorityCode(rom);
     }
 }
Ejemplo n.º 19
0
        static bool IsWarpChapterFE8(uint chapterID)
        {
            PatchUtil.mnc2_fix_enum use_mnc2 = PatchUtil.SearchSkipWorldMapPatch();
            if (use_mnc2 == PatchUtil.mnc2_fix_enum.NO)
            {
                if (MapLoadFunctionForm.IsEnterChapterAlways(chapterID))
                {
                    return(true);
                }
            }

            return(true);
        }
Ejemplo n.º 20
0
        public UnitActionPointerForm()
        {
            InitializeComponent();
            this.InputFormRef = Init(this);
            this.InputFormRef.CheckProtectionAddrHigh = false; //書き換える対象がswitchなので低い位地に書き換えるデータがあります。
            this.InputFormRef.ReInitPointer(SearchActionPointer());
            this.InputFormRef.MakeGeneralAddressListContextMenu(true);

            if (PatchUtil.SearchUnitActionReworkPatch())
            {
                ApplyedUnitActionPatch.Show();
            }
        }
Ejemplo n.º 21
0
        //全データの取得
        public static void MakeAllDataLength(List <Address> list, bool isPointerOnly)
        {
            InputFormRef InputFormRef;

            if (PatchUtil.SearchSkillSystem() != PatchUtil.skill_system_enum.SkillSystem)
            {
                return;
            }

            {
                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;
                }
                InputFormRef = Init(null, basetextP);
                FEBuilderGBA.Address.AddAddress(list, InputFormRef, "SkillConfigSkillSystem", new uint[] { });

                uint anime = Program.ROM.p32(baseanimeP);
                for (uint i = 0; i < InputFormRef.DataCount; i++, anime += 4)
                {
                    if (!U.isSafetyOffset(anime))
                    {
                        break;
                    }
                    uint addr = Program.ROM.p32(anime);
                    if (!U.isSafetyOffset(addr))
                    {
                        continue;
                    }
                    string name = "SkillAnime:" + U.To0xHexString(i) + " ";
                    FEBuilderGBA.Address.AddAddress(list, addr, 0, anime, name, FEBuilderGBA.Address.DataTypeEnum.POINTER);

                    ImageUtilSkillSystemsAnimeCreator.RecycleOldAnime(ref list
                                                                      , name
                                                                      , isPointerOnly
                                                                      , addr);
                }
            }
        }
        private void IndependenceButton_Click(object sender, EventArgs e)
        {
            if (this.N2_AddressList.SelectedIndex < 0)
            {
                return;
            }
            string name = this.N2_AddressList.Text;

            uint pointer = InputFormRef.SelectToAddr(N2_AddressList);

            if (pointer == U.NOT_FOUND)
            {
                return;
            }
            if (pointer == 0)
            {
                return;
            }
            uint currentP = Program.ROM.p32(U.toOffset(pointer));

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

            if (InputFormRef.BaseAddress != currentP)
            {
                return;
            }

            if (InputFormRef.DataCount == 0)
            {
                DialogResult dr = R.ShowNoYes("リストが0件です。\r\n空のリストを分離させても意味がないのですが、それでも分離独立させますか?");
                if (dr != DialogResult.Yes)
                {
                    return;
                }
            }

            Undo.UndoData undodata = Program.Undo.NewUndoData(this, this.Name + " Independence");

            uint dataSize = (InputFormRef.DataCount + 1) * InputFormRef.BlockSize;

            PatchUtil.WriteIndependence(currentP, dataSize, pointer, name, undodata);
            Program.Undo.Push(undodata);

            InputFormRef.ShowWriteNotifyAnimation(this, currentP);

            this.ReloadListButton.PerformClick();
            U.ReSelectList(N2_AddressList);
        }
        public static void MakeVarsIDArray(List <UseValsID> list)
        {
            InputFormRef InputFormRef = Init(null);

            UseValsID.AppendTextID(list, FELint.Type.MAPSETTING, InputFormRef, new uint[] { 112, 114, 136, 138 });
            if (PatchUtil.IsPreparationBGMByChapter())
            {
                UseValsID.AppendSongID(list, FELint.Type.MAPSETTING, InputFormRef, new uint[] { 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42 });
            }
            else
            {
                UseValsID.AppendSongID(list, FELint.Type.MAPSETTING, InputFormRef, new uint[] { 22, 24, 26, 28, 30, 32, 34, 36, 40, 42 });
            }
        }
Ejemplo n.º 24
0
        //手斧だけのリストを作る.
        public static List <U.AddrResult> MakeItemListByHandAxs()
        {
            bool useWeaponLockArray = PatchUtil.SearchVennouWeaponLockArray();

            InputFormRef        InputFormRef = Init(null);
            List <U.AddrResult> src          = InputFormRef.MakeList();
            List <U.AddrResult> dest         = new List <U.AddrResult>();

            for (int i = 0; i < src.Count; i++)
            {
                uint b7 = Program.ROM.u8(src[i].addr + 7);
                if (b7 != 2)
                {//斧ではない
                    continue;
                }
                uint b25 = Program.ROM.u8(src[i].addr + 25);
                if (b25 <= 0x11)
                {//射程1
                    continue;
                }
                uint b28 = Program.ROM.u8(src[i].addr + 28);
                if (b28 <= 0x00)
                {//武器レベル 0だった場合専用武器の可能性が高い
                    continue;
                }
                uint b9 = Program.ROM.u8(src[i].addr + 9);
                if ((b9 & 0x1C) > 0)
                {             //専用武器 &0x04 or &0x8 or 0x10
                    continue; //専用武器のため判定不能
                }
                uint b10 = Program.ROM.u8(src[i].addr + 10);
                if ((b10 & 0x3C) > 0)
                {             //専用武器 &0x04 or &0x8 or 0x10 or 0x20
                    continue; //専用武器のため判定不能
                }
                if (useWeaponLockArray)
                {
                    uint b11 = Program.ROM.u8(src[i].addr + 11);
                    if (b11 > 0)
                    {//vennou's WeaponLockArray
                        continue;
                    }
                }

                //手斧
                src[i].tag = (uint)i; //IDを入れる 参照しやすいように.
                dest.Add(src[i]);
            }
            return(dest);
        }
Ejemplo n.º 25
0
        public EventHaikuForm()
        {
            InitializeComponent();


            this.AddressList.OwnerDraw(ListBoxEx.DrawUnitAndText, DrawMode.OwnerDrawFixed);
            this.InputFormRef = Init(this);
            this.InputFormRef.MakeGeneralAddressListContextMenu(true);

            if (PatchUtil.DeathQuoteAddKillerID() == PatchUtil.DeathQuoteAddKillerIDExtends.Enable)
            {
                ShowKillerExtends();
            }
        }
Ejemplo n.º 26
0
 private void SongTrackImportWaveForm_Load(object sender, EventArgs e)
 {
     PatchUtil.Cache_m4a_hq_mixer m4a_hq_mixer = PatchUtil.Search_m4a_hq_mixer();
     if (m4a_hq_mixer == PatchUtil.Cache_m4a_hq_mixer.NO)
     {
         this.NO_DPCM_PATCH.Show();
         UseDPCMCompress.Hide();
     }
     else
     {
         this.NO_DPCM_PATCH.Hide();
         UseDPCMCompress.Show();
     }
 }
Ejemplo n.º 27
0
        static public void MakeUPS(string orignalROMFilename, string upsFilename)
        {
            byte[] s = File.ReadAllBytes(orignalROMFilename);
            byte[] d = Program.ROM.Data;

            bool r = PatchUtil.IsWriteBuildVersion();

            if (r)
            {
                d = WriteBuildVersion(d);
            }

            MakeUPS(s, d, upsFilename);
        }
Ejemplo n.º 28
0
        static InputFormRef Init(Form self)
        {
            bool isRework = PatchUtil.SearchUnitActionReworkPatch();

            InputFormRef ifr = null;

            ifr = new InputFormRef(self
                                   , ""
                                   , 0
                                   , 4
                                   , (int i, uint addr) =>
            {
                uint a = Program.ROM.u32(addr);
                if (isRework == false)
                {    //リワークされていない
                    if (U.isSafetyPointer(a))
                    {
                        return(true);
                    }
                }
                else
                {    //リワークされている
                    if (a == U.NOT_FOUND)
                    {
                        return(false);
                    }
                    if (a == 0)
                    {
                        return(true);
                    }
                    if (U.isSafetyPointer(a & 0x0FFFFFFF))
                    {
                        return(true);
                    }
                }
                return(false);
            }
                                   , (int i, uint addr) =>
            {
                int id = i;
                if (isRework == false)
                {            //リワークされていない
                    id += 1; //0は範囲外
                }
                return(U.ToHexString(id) + " " + U.at(UnitActionEffectList, id));
            }
                                   );
            return(ifr);
        }
Ejemplo n.º 29
0
        //全データの取得
        public static void MakeAllDataLength(List <Address> list)
        {
            InputFormRef InputFormRef;

            if (PatchUtil.SearchSkillSystem() != PatchUtil.skill_system_enum.SkillSystem)
            {
                return;
            }

            {
                uint assignUnitP = SkillConfigSkillSystemForm.FindAssignPersonalSkillPointer();

                if (assignUnitP == U.NOT_FOUND)
                {
                    return;
                }


                InputFormRef = Init(null, assignUnitP);
                FEBuilderGBA.Address.AddAddress(list, InputFormRef, "SkillAssignmentUnitSkillSystem", new uint[] { });

                uint assignLevelUpP = SkillConfigSkillSystemForm.FindAssignUnitLevelUpSkillPointer();
                if (assignLevelUpP == U.NOT_FOUND)
                {
                    return;
                }

                Dictionary <uint, string> skillNames = new Dictionary <uint, string>();
                InputFormRef N1_InputFormRef         = N1_Init(null, skillNames);

                uint assignLevelUpAddr = Program.ROM.p32(assignLevelUpP);
                for (uint i = 0; i < InputFormRef.DataCount; i++, assignLevelUpAddr += 4)
                {
                    if (!U.isSafetyOffset(assignLevelUpAddr))
                    {
                        break;
                    }

                    uint levelupList = Program.ROM.p32(assignLevelUpAddr);
                    if (!U.isSafetyOffset(levelupList))
                    {
                        continue;
                    }

                    N1_InputFormRef.ReInitPointer(assignLevelUpAddr);
                    FEBuilderGBA.Address.AddAddress(list, N1_InputFormRef, "SkillAssignmentUnitSkillSystem.Levelup" + i, new uint[] { });
                }
            }
        }
Ejemplo n.º 30
0
 public static uint GetLevelMaxCaps()
 {
     if (g_LevelMaxCaps == NO_CACHE)
     {
         if (PatchUtil.SearchSkillSystem() == PatchUtil.skill_system_enum.SkillSystem)
         {//不明なので31とする
             g_LevelMaxCaps = 31;
         }
         else
         {
             g_LevelMaxCaps = Program.ROM.u8(Program.ROM.RomInfo.max_level_address());
         }
     }
     return(g_LevelMaxCaps);
 }