private void SwitchListExpandsButton_Click(object sender, EventArgs e) { if (this.L_0_COMBO.Items.Count <= 0) { return; } uint defAddr = U.atoh(this.L_0_COMBO.Items[0].ToString()); uint newCount = ClassForm.DataCount(); Undo.UndoData undodata = Program.Undo.NewUndoData(this, "SoundFootStep SwitchExpands"); PatchUtil.Switch2Expands(Program.ROM.RomInfo.sound_foot_steps_pointer , Program.ROM.RomInfo.sound_foot_steps_switch2_address , newCount , defAddr , undodata); if (Program.ROM.RomInfo.version == 8) { if (Program.ROM.RomInfo.is_multibyte) {//Fix PlaySoundStepByClass(足音) HardCode Program.ROM.write_range(0x7B198, new byte[] { 0x1c, 0xe0 }, undodata); } else {//Fix PlaySoundStepByClass(足音) HardCode Program.ROM.write_range(0x78d84, new byte[] { 0x1c, 0xe0 }, undodata); } } Program.Undo.Push(undodata); ReInit(this.InputFormRef); }
private void SwitchListExpandsButton_Click(object sender, EventArgs e) { if (this.L_0_COMBO.Items.Count <= 0) { return; } uint defAddr = U.atoh(this.L_0_COMBO.Items[0].ToString()); uint newCount = ImagePortraitForm.DataCount(); Undo.UndoData undodata = Program.Undo.NewUndoData(this, "UnitIncreaseHeight SwitchExpands"); PatchUtil.Switch2Expands(Program.ROM.RomInfo.unit_increase_height_pointer , Program.ROM.RomInfo.unit_increase_height_switch2_address , newCount , defAddr , undodata); Program.Undo.Push(undodata); ReInit(this.InputFormRef); }
private void SwitchListExpandsButton_Click(object sender, EventArgs e) { int selected = this.FilterComboBox.SelectedIndex; uint newCount = ItemForm.DataCount(); if (this.L_0_COMBO.Items.Count <= 0) { return; } uint defAddr = U.FindComboSelectHexFromValueWhereName(this.L_0_COMBO, "-"); if (defAddr == U.NOT_FOUND) {//見つからない場合、先頭の要素を利用します defAddr = U.atoh(this.L_0_COMBO.Items[0].ToString()); } Undo.UndoData undodata = Program.Undo.NewUndoData(this, "ItemUsage SwitchExpands" + selected); switch (selected) { case 0: //0=アイテムを利用できるか判定する default: PatchUtil.Switch2Expands(Program.ROM.RomInfo.item_usability_array_pointer() , Program.ROM.RomInfo.item_usability_array_switch2_address() , newCount , defAddr , undodata); break; case 1: //1=アイテムを利用した場合の効果を定義する PatchUtil.Switch2Expands(Program.ROM.RomInfo.item_effect_array_pointer() , Program.ROM.RomInfo.item_effect_array_switch2_address() , newCount , defAddr , undodata); break; case 2: //2=CCアイテムを使った場合の処理を定義する PatchUtil.Switch2Expands(Program.ROM.RomInfo.item_promotion1_array_pointer() , Program.ROM.RomInfo.item_promotion1_array_switch2_address() , newCount , defAddr , undodata); break; case 3: //3=CCアイテムかどうかを定義する(FE7のみ) PatchUtil.Switch2Expands(Program.ROM.RomInfo.item_promotion2_array_pointer() , Program.ROM.RomInfo.item_promotion2_array_switch2_address() , newCount , defAddr , undodata); break; case 4: //4=アイテムのターゲット選択の方法を定義する(多分) PatchUtil.Switch2Expands(Program.ROM.RomInfo.item_staff1_array_pointer() , Program.ROM.RomInfo.item_staff1_array_switch2_address() , newCount , defAddr , undodata); break; case 5: //5=杖の種類を定義する PatchUtil.Switch2Expands(Program.ROM.RomInfo.item_staff2_array_pointer() , Program.ROM.RomInfo.item_staff2_array_switch2_address() , newCount , defAddr , undodata); break; case 6: //6=ドーピングアイテムを利用した時のメッセージを定義する PatchUtil.Switch2Expands(Program.ROM.RomInfo.item_statbooster1_array_pointer() , Program.ROM.RomInfo.item_statbooster1_array_switch2_address() , newCount , defAddr , undodata); break; case 7: //7=ドーピングアイテムとCCアイテムかどうかを定義する PatchUtil.Switch2Expands(Program.ROM.RomInfo.item_statbooster2_array_pointer() , Program.ROM.RomInfo.item_statbooster2_array_switch2_address() , newCount , defAddr , undodata); break; case 8: //8=エラーメッセージを定義する PatchUtil.Switch2Expands(Program.ROM.RomInfo.item_errormessage_array_pointer() , Program.ROM.RomInfo.item_errormessage_array_switch2_address() , newCount , defAddr , undodata); break; case 9: //9=アイテム名の前置詞を定義する PatchUtil.Switch2Expands(Program.ROM.RomInfo.item_name_article_pointer() , Program.ROM.RomInfo.item_name_article_switch2_address() , newCount , defAddr , undodata); break; } Program.Undo.Push(undodata); ReInit(selected, this.InputFormRef); }