示例#1
0
        private void UnitIncreaseHeightForm_Load(object sender, EventArgs e)
        {
            bool enable = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.unit_increase_height_switch2_address);

            if (!enable)
            {
                this.ERROR_NOT_FOUND.Show();
                this.WriteButton.Hide();
            }
        }
示例#2
0
        private void SoundFootStepsForm_Load(object sender, EventArgs e)
        {
            bool enable = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.sound_foot_steps_switch2_address);

            if (!enable)
            {
                this.ERROR_NOT_FOUND.Show();
                this.WriteButton.Hide();
            }
        }
示例#3
0
        static uint ReInit(InputFormRef ifr)
        {
            if (ifr == null)
            {
                return(U.NOT_FOUND);
            }
            uint addr   = Program.ROM.p32(Program.ROM.RomInfo.unit_increase_height_pointer);
            uint count  = Program.ROM.u8(Program.ROM.RomInfo.unit_increase_height_switch2_address + 2);
            bool enable = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.unit_increase_height_switch2_address);

            if (enable == false)
            {
                return(U.NOT_FOUND);
            }
            if (!U.isSafetyOffset(addr))
            {
                return(U.NOT_FOUND);
            }

            ifr.ReInit(addr, count + 1);
            return(addr);
        }
        static uint ReInit(int selected, InputFormRef ifr)
        {
            //Log.Debug("-------------------");
            if (ifr == null)
            {
                return(U.NOT_FOUND);
            }
            bool enable  = false;
            uint pointer = 0;
            uint addr    = 0;
            uint count   = 0;

            switch (selected)
            {
            case 0:     //0=アイテムを利用できるか判定する
            default:
                pointer = Program.ROM.RomInfo.item_usability_array_pointer();
                addr    = Program.ROM.p32(pointer);
                count   = Program.ROM.u8(Program.ROM.RomInfo.item_usability_array_switch2_address() + 2);
                enable  = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.item_usability_array_switch2_address());
                break;

            case 1:     //1=アイテムを利用した場合の効果を定義する
                pointer = Program.ROM.RomInfo.item_effect_array_pointer();
                addr    = Program.ROM.p32(pointer);
                count   = Program.ROM.u8(Program.ROM.RomInfo.item_effect_array_switch2_address() + 2);
                enable  = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.item_effect_array_switch2_address());
                break;

            case 2:     //2=CCアイテムを使った場合の処理を定義する
                pointer = Program.ROM.RomInfo.item_promotion1_array_pointer();
                addr    = Program.ROM.p32(pointer);
                count   = Program.ROM.u8(Program.ROM.RomInfo.item_promotion1_array_switch2_address() + 2);
                enable  = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.item_promotion1_array_switch2_address());
                break;

            case 3:     //3=CCアイテムかどうかを定義する(FE7のみ)
                pointer = Program.ROM.RomInfo.item_promotion2_array_pointer();
                addr    = Program.ROM.p32(pointer);
                count   = Program.ROM.u8(Program.ROM.RomInfo.item_promotion2_array_switch2_address() + 2);
                enable  = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.item_promotion2_array_switch2_address());
                break;

            case 4:     //4=アイテムのターゲット選択の方法を定義する(多分)
                pointer = Program.ROM.RomInfo.item_staff1_array_pointer();
                addr    = Program.ROM.p32(pointer);
                count   = Program.ROM.u8(Program.ROM.RomInfo.item_staff1_array_switch2_address() + 2);
                enable  = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.item_staff1_array_switch2_address());
                break;

            case 5:     //5=杖の種類を定義する
                pointer = Program.ROM.RomInfo.item_staff2_array_pointer();
                addr    = Program.ROM.p32(pointer);
                count   = Program.ROM.u8(Program.ROM.RomInfo.item_staff2_array_switch2_address() + 2);
                enable  = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.item_staff2_array_switch2_address());
                break;

            case 6:     //6=ドーピングアイテムを利用した時のメッセージを定義する
                pointer = Program.ROM.RomInfo.item_statbooster1_array_pointer();
                addr    = Program.ROM.p32(pointer);
                count   = Program.ROM.u8(Program.ROM.RomInfo.item_statbooster1_array_switch2_address() + 2);
                enable  = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.item_statbooster1_array_switch2_address());
                break;

            case 7:     //7=ドーピングアイテムとCCアイテムかどうかを定義する
                pointer = Program.ROM.RomInfo.item_statbooster2_array_pointer();
                addr    = Program.ROM.p32(pointer);
                count   = Program.ROM.u8(Program.ROM.RomInfo.item_statbooster2_array_switch2_address() + 2);
                enable  = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.item_statbooster2_array_switch2_address());
                break;

            case 8:     //8=エラーメッセージを定義する
                pointer = Program.ROM.RomInfo.item_errormessage_array_pointer();
                addr    = Program.ROM.p32(pointer);
                count   = Program.ROM.u8(Program.ROM.RomInfo.item_errormessage_array_switch2_address() + 2);
                enable  = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.item_errormessage_array_switch2_address());
                break;

            case 9:     //9=アイテム名の前置詞
                pointer = Program.ROM.RomInfo.item_name_article_pointer();
                addr    = Program.ROM.p32(pointer);
                count   = Program.ROM.u8(Program.ROM.RomInfo.item_name_article_switch2_address() + 2);
                enable  = PatchUtil.IsSwitch2Enable(Program.ROM.RomInfo.item_name_article_switch2_address());
                break;
            }
            if (enable == false)
            {
                return(U.NOT_FOUND);
            }
            if (!U.isSafetyOffset(addr))
            {
                return(U.NOT_FOUND);
            }

            ifr.ReInitPointer(pointer, count + 1);
            return(addr);
        }