From e34c4235be0d9bc0f690dcc37a9c9455e4dbdd76 Mon Sep 17 00:00:00 2001 From: AdAstra-LD <76622070+AdAstra-LD@users.noreply.github.com> Date: Sun, 5 May 2024 15:25:30 +0200 Subject: [PATCH] Renamed ROM ToolBox to Patch Toolbox --- DS_Map/DSPRE.csproj | 10 +-- DS_Map/DSUtils.cs | 2 +- DS_Map/HeaderSearch.cs | 2 +- DS_Map/Main Window.Designer.cs | 6 +- DS_Map/Main Window.cs | 78 +++++++++---------- ...gner.cs => PatchToolboxDialog.Designer.cs} | 12 +-- ...ToolboxDialog.cs => PatchToolboxDialog.cs} | 54 ++++++------- ...boxDialog.resx => PatchToolboxDialog.resx} | 18 ++--- DS_Map/RomInfo.cs | 2 +- DS_Map/SpawnEditor.cs | 2 +- DS_Map/WildEditorDPPt.cs | 2 +- DS_Map/WildEditorHGSS.cs | 2 +- 12 files changed, 95 insertions(+), 95 deletions(-) rename DS_Map/{ROMToolboxDialog.Designer.cs => PatchToolboxDialog.Designer.cs} (99%) rename DS_Map/{ROMToolboxDialog.cs => PatchToolboxDialog.cs} (96%) rename DS_Map/{ROMToolboxDialog.resx => PatchToolboxDialog.resx} (95%) diff --git a/DS_Map/DSPRE.csproj b/DS_Map/DSPRE.csproj index 0ad65fd..bb62eca 100644 --- a/DS_Map/DSPRE.csproj +++ b/DS_Map/DSPRE.csproj @@ -179,11 +179,11 @@ - + Form - - ROMToolboxDialog.cs + + PatchToolboxDialog.cs Form @@ -315,8 +315,8 @@ CommandsDatabase.cs Designer - - ROMToolboxDialog.cs + + PatchToolboxDialog.cs BuildingEditor.cs diff --git a/DS_Map/DSUtils.cs b/DS_Map/DSUtils.cs index 6bf2848..1a580f4 100644 --- a/DS_Map/DSUtils.cs +++ b/DS_Map/DSUtils.cs @@ -604,7 +604,7 @@ namespace DSPRE { } else if ((int)(RomInfo.monIconPalTableAddress - RomInfo.synthOverlayLoadAddress) >= 0) { // if there is a synthetic overlay, read it from there iconPalTableOffsetFromFileStart = (int)(RomInfo.monIconPalTableAddress - RomInfo.synthOverlayLoadAddress); - iconTablePath = gameDirs[DirNames.synthOverlay].unpackedDir + "\\" + ROMToolboxDialog.expandedARMfileID.ToString("D4"); + iconTablePath = gameDirs[DirNames.synthOverlay].unpackedDir + "\\" + PatchToolboxDialog.expandedARMfileID.ToString("D4"); } else { // default handling iconPalTableOffsetFromFileStart = (int)(RomInfo.monIconPalTableAddress - DSUtils.ARM9.address); diff --git a/DS_Map/HeaderSearch.cs b/DS_Map/HeaderSearch.cs index ae4d32a..e913965 100644 --- a/DS_Map/HeaderSearch.cs +++ b/DS_Map/HeaderSearch.cs @@ -180,7 +180,7 @@ namespace DSPRE { for (ushort i = startID; i < finalID; i++) { MapHeader h; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { h = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + i.ToString("D4"), i, 0); } else { h = MapHeader.LoadFromARM9(i); diff --git a/DS_Map/Main Window.Designer.cs b/DS_Map/Main Window.Designer.cs index 4ec2aea..4e3c7c5 100644 --- a/DS_Map/Main Window.Designer.cs +++ b/DS_Map/Main Window.Designer.cs @@ -10979,7 +10979,7 @@ this.romToolboxToolStripMenuItem.Enabled = false; this.romToolboxToolStripMenuItem.Name = "romToolboxToolStripMenuItem"; this.romToolboxToolStripMenuItem.Size = new System.Drawing.Size(220, 22); - this.romToolboxToolStripMenuItem.Text = "ROM Toolbox"; + this.romToolboxToolStripMenuItem.Text = "Patch Toolbox"; this.romToolboxToolStripMenuItem.Click += new System.EventHandler(this.romToolBoxToolStripMenuItem_Click); // // headerSearchToolStripMenuItem @@ -11552,8 +11552,8 @@ this.romToolboxToolStripButton.Margin = new System.Windows.Forms.Padding(4, 6, 0, 2); this.romToolboxToolStripButton.Name = "romToolboxToolStripButton"; this.romToolboxToolStripButton.Size = new System.Drawing.Size(36, 36); - this.romToolboxToolStripButton.Text = "ROM Toolbox"; - this.romToolboxToolStripButton.ToolTipText = "ROM Toolbox"; + this.romToolboxToolStripButton.Text = "Patch Toolbox"; + this.romToolboxToolStripButton.ToolTipText = "Patch Toolbox"; this.romToolboxToolStripButton.Click += new System.EventHandler(this.romToolBoxToolStripMenuItem_Click); // // headerSearchToolStripButton diff --git a/DS_Map/Main Window.cs b/DS_Map/Main Window.cs index 381770e..d7b12af 100644 --- a/DS_Map/Main Window.cs +++ b/DS_Map/Main Window.cs @@ -320,13 +320,13 @@ namespace DSPRE { } private void romToolBoxToolStripMenuItem_Click(object sender, EventArgs e) { - using (ROMToolboxDialog window = new ROMToolboxDialog()) { + using (PatchToolboxDialog window = new PatchToolboxDialog()) { window.ShowDialog(); - if (ROMToolboxDialog.flag_standardizedItems && eventEditorIsReady) { + if (PatchToolboxDialog.flag_standardizedItems && eventEditorIsReady) { selectEventComboBox_SelectedIndexChanged(null, null); UpdateItemComboBox(RomInfo.GetItemNames()); } - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied) { addHeaderBTN.Enabled = true; removeLastHeaderBTN.Enabled = true; } @@ -731,7 +731,7 @@ namespace DSPRE { statusLabelMessage("Repacking ROM..."); if (DSUtils.CheckOverlayHasCompressionFlag(1)) { - if (ROMToolboxDialog.overlay1MustBeRestoredFromBackup) { + if (PatchToolboxDialog.overlay1MustBeRestoredFromBackup) { DSUtils.RestoreOverlayFromCompressedBackup(1, eventEditorIsReady); } else { if (!DSUtils.OverlayIsCompressed(1)) { @@ -950,7 +950,7 @@ namespace DSPRE { internalNames = new List(); headerListBoxNames = new List(); int headerCount; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { addHeaderBTN.Enabled = true; removeLastHeaderBTN.Enabled = true; headerCount = Directory.GetFiles(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir).Length; @@ -978,7 +978,7 @@ namespace DSPRE { } // Creating a dictionary linking events to headers to fetch header data for Event Editor - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { for (ushort i = 0; i < internalNames.Count; i++) { MapHeader h = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + i.ToString("D4"), i, 0); eventToHeader[h.eventFileID] = i; @@ -1217,7 +1217,7 @@ namespace DSPRE { } /* Check if dynamic headers patch has been applied, and load header from arm9 or a/0/5/0 accordingly */ - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { currentHeader = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + headerNumber.ToString("D4"), headerNumber, 0); } else { currentHeader = MapHeader.LoadFromARM9(headerNumber); @@ -1674,7 +1674,7 @@ namespace DSPRE { } private void saveHeaderButton_Click(object sender, EventArgs e) { /* Check if dynamic headers patch has been applied, and save header to arm9 or a/0/5/0 accordingly */ - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { DSUtils.WriteToFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + currentHeader.ID.ToString("D4"), currentHeader.ToByteArray(), 0, 0, fmode: FileMode.Create); } else { uint headerOffset = (uint)(RomInfo.headerTableOffset + MapHeader.length * currentHeader.ID); @@ -1743,7 +1743,7 @@ namespace DSPRE { /* Check if dynamic headers patch has been applied, and load header from arm9 or a/0/5/0 accordingly */ for (ushort i = 0; i < internalNames.Count; i++) { MapHeader h; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { h = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + i.ToString("D4"), i, 0); } else { h = MapHeader.LoadFromARM9(i); @@ -1913,7 +1913,7 @@ namespace DSPRE { currentHeader = h; /* Check if dynamic headers patch has been applied, and save header to arm9 or a/0/5/0 accordingly */ - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { DSUtils.WriteToFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + currentHeader.ID.ToString("D4"), currentHeader.ToByteArray(), 0, 0, fmode: FileMode.Create); } else { uint headerOffset = (uint)(RomInfo.headerTableOffset + MapHeader.length * currentHeader.ID); @@ -2627,7 +2627,7 @@ namespace DSPRE { } else if (gameFamily.Equals(gFamEnum.Plat)) { foreach (ushort r in result) { HeaderPt hpt; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { hpt = (HeaderPt)MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + r.ToString("D4"), r, 0); } else { hpt = (HeaderPt)MapHeader.LoadFromARM9(r); @@ -2641,7 +2641,7 @@ namespace DSPRE { } else { foreach (ushort r in result) { HeaderHGSS hgss; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { hgss = (HeaderHGSS)MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + r.ToString("D4"), r, 0); } else { hgss = (HeaderHGSS)MapHeader.LoadFromARM9(r); @@ -2672,7 +2672,7 @@ namespace DSPRE { /* get texture file numbers from area data */ MapHeader h; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { h = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + headerID.ToString("D4"), headerID, 0); } else { h = MapHeader.LoadFromARM9(headerID); @@ -4805,7 +4805,7 @@ namespace DSPRE { #region Subroutines private void itemsSelectorHelpBtn_Click(object sender, EventArgs e) { MessageBox.Show("This selector allows you to pick a preset Ground Item script from the game data.\n" + - "Unlike in previous DSPRE versions, you can now change the Ground Item to be obtained even if you decided not to apply the Standardize Items patch from the Rom ToolBox.\n\n" + + "Unlike in previous DSPRE versions, you can now change the Ground Item to be obtained even if you decided not to apply the Standardize Items patch from the Patch Toolbox.\n\n" + "However, some items are unavailable by default. The aforementioned patch can neutralize this limitation.\n\n", "About Ground Items", MessageBoxButtons.OK, MessageBoxIcon.Information); } @@ -4864,7 +4864,7 @@ namespace DSPRE { foreach (ushort headerID in result) { HeaderPt hpt; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { hpt = (HeaderPt)MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + headerID.ToString("D4"), headerID, 0); } else { hpt = (HeaderPt)MapHeader.LoadFromARM9(headerID); @@ -5058,7 +5058,7 @@ namespace DSPRE { if (eventMatrix.hasHeadersSection && readGraphicsFromHeader) { ushort headerID = (ushort)eventMatrix.headers[(short)eventMatrixYUpDown.Value, (short)eventMatrixXUpDown.Value]; MapHeader h; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { h = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + headerID.ToString("D4"), headerID, 0); } else { h = MapHeader.LoadFromARM9(headerID); @@ -5364,7 +5364,7 @@ namespace DSPRE { /* Add item list to ow item box */ string[] itemNames = RomInfo.GetItemNames(); - if (ROMToolboxDialog.CheckScriptsStandardizedItemNumbers()) { + if (PatchToolboxDialog.CheckScriptsStandardizedItemNumbers()) { UpdateItemComboBox(itemNames); } else { ScriptFile itemScript = new ScriptFile(RomInfo.itemScriptFileNumber); @@ -5627,7 +5627,7 @@ namespace DSPRE { if (eventToHeader.TryGetValue((ushort)selectEventComboBox.SelectedIndex, out ushort mapHeader)) { MapHeader h; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { h = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + mapHeader.ToString("D4"), mapHeader, 0); } else { h = MapHeader.LoadFromARM9(mapHeader); @@ -6373,7 +6373,7 @@ namespace DSPRE { ushort destHeaderID = (ushort)eventEditorWarpHeaderListBox.SelectedIndex; MapHeader destHeader; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { destHeader = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + destHeaderID.ToString("D4"), destHeaderID, 0); } else { destHeader = MapHeader.LoadFromARM9(destHeaderID); @@ -6517,7 +6517,7 @@ namespace DSPRE { ushort destHeaderID = (ushort)eventEditorWarpHeaderListBox.SelectedIndex; MapHeader destHeader; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { destHeader = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + destHeaderID.ToString("D4"), destHeaderID, 0); } else { destHeader = MapHeader.LoadFromARM9(destHeaderID); @@ -8505,12 +8505,12 @@ namespace DSPRE { "More details in the following dialog.\n\n" + "Do you want to know more?", "Confirm to proceed", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); - bool userConfirmed = (d1 == DialogResult.Yes && ROMToolboxDialog.ConfigureOverlay1Uncompressed()); + bool userConfirmed = (d1 == DialogResult.Yes && PatchToolboxDialog.ConfigureOverlay1Uncompressed()); if (!userConfirmed) { MessageBox.Show("You chose not to apply the patch. Use this editor responsibly.\n\n" + - "If you change your mind, you can apply it later by accessing the ROM Toolbox.", + "If you change your mind, you can apply it later by accessing the Patch Toolbox.", "Caution", MessageBoxButtons.OK, MessageBoxIcon.Information); if (DSUtils.OverlayIsCompressed(RomInfo.cameraTblOverlayNumber)) { @@ -9207,7 +9207,7 @@ namespace DSPRE { //Expose a smaller limit to the user if (RomInfo.trainerNameLenOffset >= 0) { MessageBox.Show($"Trainer File saved successfully. However:\nYou attempted to save a Trainer whose name exceeds {RomInfo.trainerNameMaxLen-1} characters.\nThis may lead to issues in game." + - (ROMToolboxDialog.flag_TrainerNamesExpanded ? "\n\nIt's recommended that you use a shorter name." : "\n\nRefer to the ROM Toolbox to extend Trainer names."), + (PatchToolboxDialog.flag_TrainerNamesExpanded ? "\n\nIt's recommended that you use a shorter name." : "\n\nRefer to the Patch Toolbox to extend Trainer names."), "Saved successfully, but...", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { MessageBox.Show($"Trainer File saved successfully. However:\nThe Trainer name length could not be safely determined for this ROM.\n" + @@ -9683,8 +9683,8 @@ namespace DSPRE { effectsComboTable = new List<(ushort vsGraph, ushort battleSSEQ)>(); effectsComboMainTableStartAddress = BitConverter.ToUInt32(DSUtils.ARM9.ReadBytes(RomInfo.effectsComboTableOffsetToRAMAddress, 4), 0); - ROMToolboxDialog.flag_MainComboTableRepointed = (effectsComboMainTableStartAddress >= RomInfo.synthOverlayLoadAddress); - effectsComboMainTableStartAddress -= ROMToolboxDialog.flag_MainComboTableRepointed ? RomInfo.synthOverlayLoadAddress : DSUtils.ARM9.address; + PatchToolboxDialog.flag_MainComboTableRepointed = (effectsComboMainTableStartAddress >= RomInfo.synthOverlayLoadAddress); + effectsComboMainTableStartAddress -= PatchToolboxDialog.flag_MainComboTableRepointed ? RomInfo.synthOverlayLoadAddress : DSUtils.ARM9.address; byte comboTableEntriesCount; @@ -9695,12 +9695,12 @@ namespace DSPRE { vsTrainerEffectsList = new List<(int trainerClass, int comboID)>(); vsPokemonTableStartAddress = BitConverter.ToUInt32(DSUtils.ARM9.ReadBytes(RomInfo.vsPokemonEntryTableOffsetToRAMAddress, 4), 0); - ROMToolboxDialog.flag_PokemonBattleTableRepointed = (vsPokemonTableStartAddress >= RomInfo.synthOverlayLoadAddress); - vsPokemonTableStartAddress -= ROMToolboxDialog.flag_PokemonBattleTableRepointed ? RomInfo.synthOverlayLoadAddress : DSUtils.ARM9.address; + PatchToolboxDialog.flag_PokemonBattleTableRepointed = (vsPokemonTableStartAddress >= RomInfo.synthOverlayLoadAddress); + vsPokemonTableStartAddress -= PatchToolboxDialog.flag_PokemonBattleTableRepointed ? RomInfo.synthOverlayLoadAddress : DSUtils.ARM9.address; vsTrainerTableStartAddress = BitConverter.ToUInt32(DSUtils.ARM9.ReadBytes(RomInfo.vsTrainerEntryTableOffsetToRAMAddress, 4), 0); - ROMToolboxDialog.flag_TrainerClassBattleTableRepointed = (vsTrainerTableStartAddress >= RomInfo.synthOverlayLoadAddress); - vsTrainerTableStartAddress -= ROMToolboxDialog.flag_TrainerClassBattleTableRepointed ? RomInfo.synthOverlayLoadAddress : DSUtils.ARM9.address; + PatchToolboxDialog.flag_TrainerClassBattleTableRepointed = (vsTrainerTableStartAddress >= RomInfo.synthOverlayLoadAddress); + vsTrainerTableStartAddress -= PatchToolboxDialog.flag_TrainerClassBattleTableRepointed ? RomInfo.synthOverlayLoadAddress : DSUtils.ARM9.address; pbEffectsPokemonCombobox.Items.Clear(); @@ -9719,10 +9719,10 @@ namespace DSPRE { pbEffectsCombosListbox.Items.Clear(); - String expArmPath = RomInfo.gameDirs[DirNames.synthOverlay].unpackedDir + '\\' + ROMToolboxDialog.expandedARMfileID.ToString("D4"); + String expArmPath = RomInfo.gameDirs[DirNames.synthOverlay].unpackedDir + '\\' + PatchToolboxDialog.expandedARMfileID.ToString("D4"); if (RomInfo.gameFamily == gFamEnum.HGSS) { - using (DSUtils.EasyReader ar = new DSUtils.EasyReader(ROMToolboxDialog.flag_TrainerClassBattleTableRepointed ? expArmPath : RomInfo.arm9Path, vsTrainerTableStartAddress)) { + using (DSUtils.EasyReader ar = new DSUtils.EasyReader(PatchToolboxDialog.flag_TrainerClassBattleTableRepointed ? expArmPath : RomInfo.arm9Path, vsTrainerTableStartAddress)) { byte trainerTableEntriesCount = DSUtils.ARM9.ReadByte(RomInfo.vsTrainerEntryTableOffsetToSizeLimiter); for (int i = 0; i < trainerTableEntriesCount; i++) { @@ -9734,7 +9734,7 @@ namespace DSPRE { } } - using (DSUtils.EasyReader ar = new DSUtils.EasyReader(ROMToolboxDialog.flag_PokemonBattleTableRepointed ? expArmPath : RomInfo.arm9Path, vsPokemonTableStartAddress)) { + using (DSUtils.EasyReader ar = new DSUtils.EasyReader(PatchToolboxDialog.flag_PokemonBattleTableRepointed ? expArmPath : RomInfo.arm9Path, vsPokemonTableStartAddress)) { byte pokemonTableEntriesCount = DSUtils.ARM9.ReadByte(RomInfo.vsPokemonEntryTableOffsetToSizeLimiter); for (int i = 0; i < pokemonTableEntriesCount; i++) { @@ -9754,7 +9754,7 @@ namespace DSPRE { } } - using (DSUtils.EasyReader ar = new DSUtils.EasyReader(ROMToolboxDialog.flag_MainComboTableRepointed ? expArmPath : RomInfo.arm9Path, effectsComboMainTableStartAddress)) { + using (DSUtils.EasyReader ar = new DSUtils.EasyReader(PatchToolboxDialog.flag_MainComboTableRepointed ? expArmPath : RomInfo.arm9Path, effectsComboMainTableStartAddress)) { for (int i = 0; i < comboTableEntriesCount; i++) { ushort battleIntroEffect = ar.ReadUInt16(); ushort battleMusic = ar.ReadUInt16(); @@ -9869,8 +9869,8 @@ namespace DSPRE { effectsComboTable[index] = (battleIntroEffect, battleMusic); - String expArmPath = RomInfo.gameDirs[DirNames.synthOverlay].unpackedDir + '\\' + ROMToolboxDialog.expandedARMfileID.ToString("D4"); - using (DSUtils.EasyWriter wr = new DSUtils.EasyWriter(ROMToolboxDialog.flag_MainComboTableRepointed ? expArmPath : RomInfo.arm9Path, effectsComboMainTableStartAddress + 4 * index)) { + String expArmPath = RomInfo.gameDirs[DirNames.synthOverlay].unpackedDir + '\\' + PatchToolboxDialog.expandedARMfileID.ToString("D4"); + using (DSUtils.EasyWriter wr = new DSUtils.EasyWriter(PatchToolboxDialog.flag_MainComboTableRepointed ? expArmPath : RomInfo.arm9Path, effectsComboMainTableStartAddress + 4 * index)) { wr.Write(battleIntroEffect); wr.Write(battleMusic); }; @@ -9893,8 +9893,8 @@ namespace DSPRE { vsPokemonEffectsList[index] = (pokemonID, comboID); - String expArmPath = RomInfo.gameDirs[DirNames.synthOverlay].unpackedDir + '\\' + ROMToolboxDialog.expandedARMfileID.ToString("D4"); - using (DSUtils.EasyWriter wr = new DSUtils.EasyWriter(ROMToolboxDialog.flag_PokemonBattleTableRepointed ? expArmPath : RomInfo.arm9Path, vsPokemonTableStartAddress + 2 * index)) { + String expArmPath = RomInfo.gameDirs[DirNames.synthOverlay].unpackedDir + '\\' + PatchToolboxDialog.expandedARMfileID.ToString("D4"); + using (DSUtils.EasyWriter wr = new DSUtils.EasyWriter(PatchToolboxDialog.flag_PokemonBattleTableRepointed ? expArmPath : RomInfo.arm9Path, vsPokemonTableStartAddress + 2 * index)) { wr.Write((ushort)((pokemonID & 1023) + (comboID << 10))); //PokemonID }; @@ -9909,8 +9909,8 @@ namespace DSPRE { ushort comboID = (ushort)pbEffectsTrainerChooseMainCombobox.SelectedIndex; vsTrainerEffectsList[index] = (trainerClass, comboID); - String expArmPath = RomInfo.gameDirs[DirNames.synthOverlay].unpackedDir + '\\' + ROMToolboxDialog.expandedARMfileID.ToString("D4"); - using (DSUtils.EasyWriter wr = new DSUtils.EasyWriter(ROMToolboxDialog.flag_TrainerClassBattleTableRepointed ? expArmPath : RomInfo.arm9Path, vsTrainerTableStartAddress + 2 * index)) { + String expArmPath = RomInfo.gameDirs[DirNames.synthOverlay].unpackedDir + '\\' + PatchToolboxDialog.expandedARMfileID.ToString("D4"); + using (DSUtils.EasyWriter wr = new DSUtils.EasyWriter(PatchToolboxDialog.flag_TrainerClassBattleTableRepointed ? expArmPath : RomInfo.arm9Path, vsTrainerTableStartAddress + 2 * index)) { wr.Write((ushort)((trainerClass & 1023) + (comboID << 10))); }; diff --git a/DS_Map/ROMToolboxDialog.Designer.cs b/DS_Map/PatchToolboxDialog.Designer.cs similarity index 99% rename from DS_Map/ROMToolboxDialog.Designer.cs rename to DS_Map/PatchToolboxDialog.Designer.cs index 3d5abf9..252c312 100644 --- a/DS_Map/ROMToolboxDialog.Designer.cs +++ b/DS_Map/PatchToolboxDialog.Designer.cs @@ -1,6 +1,6 @@ namespace DSPRE { - partial class ROMToolboxDialog + partial class PatchToolboxDialog { /// /// Required designer variable. @@ -27,7 +27,7 @@ /// the contents of this method with the code editor. /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ROMToolboxDialog)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PatchToolboxDialog)); this.applyItemStandardizeButton = new System.Windows.Forms.Button(); this.arm9expansionTextLBL = new System.Windows.Forms.Label(); this.arm9expansionLBL = new System.Windows.Forms.Label(); @@ -463,7 +463,7 @@ // this.disableTextureAnimationsTextLBL.Location = new System.Drawing.Point(481, 241); this.disableTextureAnimationsTextLBL.Name = "disableTextureAnimationsTextLBL"; - this.disableTextureAnimationsTextLBL.Size = new System.Drawing.Size(288, 58); + this.disableTextureAnimationsTextLBL.Size = new System.Drawing.Size(288, 31); this.disableTextureAnimationsTextLBL.TabIndex = 38; this.disableTextureAnimationsTextLBL.Text = "Sets the Dynamic Textures (Texture Animation) field to 65535 [0xFFFF] for all Are" + "aData files."; @@ -529,7 +529,7 @@ this.expandTrainerNamesButton.UseVisualStyleBackColor = true; this.expandTrainerNamesButton.Click += new System.EventHandler(this.expandTrainerNamesButton_Click); // - // ROMToolboxDialog + // PatchToolboxDialog // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -581,9 +581,9 @@ this.Controls.Add(this.applyItemStandardizeButton); this.MaximizeBox = false; this.MinimizeBox = false; - this.Name = "ROMToolboxDialog"; + this.Name = "PatchToolboxDialog"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "ROM Toolbox"; + this.Text = "Patch Toolbox"; ((System.ComponentModel.ISupportInitialize)(this.arm9patchCB)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.overlay1CB)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.BDHCamCB)).EndInit(); diff --git a/DS_Map/ROMToolboxDialog.cs b/DS_Map/PatchToolboxDialog.cs similarity index 96% rename from DS_Map/ROMToolboxDialog.cs rename to DS_Map/PatchToolboxDialog.cs index 882130e..2d88366 100644 --- a/DS_Map/ROMToolboxDialog.cs +++ b/DS_Map/PatchToolboxDialog.cs @@ -14,7 +14,7 @@ using static DSPRE.Resources.ROMToolboxDB.ToolboxDB; using static NSMBe4.ROM; namespace DSPRE { - public partial class ROMToolboxDialog : Form { + public partial class PatchToolboxDialog : Form { public static uint expandedARMfileID = ToolboxDB.syntheticOverlayFileNumbersDB[RomInfo.gameFamily]; public static bool flag_standardizedItems { get; private set; } = false; @@ -33,7 +33,7 @@ namespace DSPRE { public static readonly int expandedTrainerNameLength = 12; #region Constructor - public ROMToolboxDialog() { + public PatchToolboxDialog() { InitializeComponent(); CheckStandardizedItems(); @@ -188,7 +188,7 @@ namespace DSPRE { if (overlayCode2.Length != overlayCode2Read.Length || !overlayCode2.SequenceEqual(overlayCode2Read)) return false; //0 means BDHCAM patch has not been applied - String fullFilePath = RomInfo.gameDirs[DirNames.synthOverlay].unpackedDir + '\\' + ROMToolboxDialog.expandedARMfileID.ToString("D4"); + String fullFilePath = RomInfo.gameDirs[DirNames.synthOverlay].unpackedDir + '\\' + PatchToolboxDialog.expandedARMfileID.ToString("D4"); byte[] subroutineRead = DSUtils.ReadFromFile(fullFilePath, BDHCAMPatchData.BDHCamSubroutineOffset, data.subroutine.Length); //Write new overlayCode1 if (data.subroutine.Length != subroutineRead.Length || !data.subroutine.SequenceEqual(subroutineRead)) return false; //0 means BDHCAM patch has not been applied @@ -227,39 +227,39 @@ namespace DSPRE { public bool CheckStandardizedItems() { DSUtils.TryUnpackNarcs(new List { RomInfo.DirNames.scripts }); - if (!ROMToolboxDialog.flag_standardizedItems) { - if (!ROMToolboxDialog.CheckScriptsStandardizedItemNumbers()) { + if (!PatchToolboxDialog.flag_standardizedItems) { + if (!PatchToolboxDialog.CheckScriptsStandardizedItemNumbers()) { return false; } } itemNumbersCB.Visible = true; - ROMToolboxDialog.flag_standardizedItems = true; + PatchToolboxDialog.flag_standardizedItems = true; DisableStandardizeItemsPatch("Already applied"); return true; } public bool CheckMatrixExpansionApplied() { - if (!ROMToolboxDialog.flag_MatrixExpansionApplied) { - if (!ROMToolboxDialog.CheckFilesMatrixExpansionApplied()) { + if (!PatchToolboxDialog.flag_MatrixExpansionApplied) { + if (!PatchToolboxDialog.CheckFilesMatrixExpansionApplied()) { return false; } } DisableMatrixExpansionPatch("Already applied"); - ROMToolboxDialog.flag_MatrixExpansionApplied = true; + PatchToolboxDialog.flag_MatrixExpansionApplied = true; expandedMatrixCB.Visible = true; return true; } public string backupSuffix = ".backup"; private bool CheckARM9ExpansionApplied() { - if (!ROMToolboxDialog.flag_arm9Expanded) { - if (!ROMToolboxDialog.CheckFilesArm9ExpansionApplied()) { + if (!PatchToolboxDialog.flag_arm9Expanded) { + if (!PatchToolboxDialog.CheckFilesArm9ExpansionApplied()) { return false; } } - ROMToolboxDialog.flag_arm9Expanded = true; + PatchToolboxDialog.flag_arm9Expanded = true; arm9patchCB.Visible = true; DisableARM9patch("Already applied"); @@ -277,12 +277,12 @@ namespace DSPRE { } public bool CheckDynamicHeadersPatchApplied() { if (!flag_DynamicHeadersPatchApplied) { - if (!ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (!PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { return false; } } - ROMToolboxDialog.flag_DynamicHeadersPatchApplied = true; + PatchToolboxDialog.flag_DynamicHeadersPatchApplied = true; dynamicHeadersPatchCB.Visible = true; DisableDynamicHeadersPatch("Already applied"); @@ -302,12 +302,12 @@ namespace DSPRE { return false; } - if (!ROMToolboxDialog.flag_BDHCamPatchApplied) { - if (!ROMToolboxDialog.CheckFilesBDHCamPatchApplied()) { + if (!PatchToolboxDialog.flag_BDHCamPatchApplied) { + if (!PatchToolboxDialog.CheckFilesBDHCamPatchApplied()) { return false; } } - ROMToolboxDialog.flag_BDHCamPatchApplied = true; + PatchToolboxDialog.flag_BDHCamPatchApplied = true; BDHCamCB.Visible = true; DisableBDHCamPatch("Already applied"); @@ -328,7 +328,7 @@ namespace DSPRE { if (v > TrainerFile.defaultNameLen+1) { DisableTrainerNameExpansionPatch("Already\nApplied"); - ROMToolboxDialog.flag_TrainerNamesExpanded = true; + PatchToolboxDialog.flag_TrainerNamesExpanded = true; } } } @@ -415,7 +415,7 @@ namespace DSPRE { overlay1MustBeRestoredFromBackup = false; DisableBDHCamPatch("Already applied"); - ROMToolboxDialog.flag_BDHCamPatchApplied = true; + PatchToolboxDialog.flag_BDHCamPatchApplied = true; BDHCamCB.Visible = true; MessageBox.Show("The BDHCAM patch has been applied.", "Operation successful.", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -470,7 +470,7 @@ namespace DSPRE { DSUtils.TryUnpackNarcs(new List { RomInfo.DirNames.scripts }); DSUtils.TryUnpackNarcs(new List { RomInfo.DirNames.eventFiles }); - if (ROMToolboxDialog.flag_standardizedItems) { + if (PatchToolboxDialog.flag_standardizedItems) { AlreadyApplied(); } else { @@ -554,7 +554,7 @@ namespace DSPRE { DisableStandardizeItemsPatch("Already applied"); itemNumbersCB.Visible = true; - ROMToolboxDialog.flag_standardizedItems = true; + PatchToolboxDialog.flag_standardizedItems = true; } } else { MessageBox.Show("No changes have been made.", "Operation canceled", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -587,7 +587,7 @@ namespace DSPRE { DisableARM9patch("Already applied"); arm9patchCB.Visible = true; - ROMToolboxDialog.flag_arm9Expanded = true; + PatchToolboxDialog.flag_arm9Expanded = true; switch (RomInfo.gameFamily) { case gFamEnum.Plat: @@ -650,7 +650,7 @@ namespace DSPRE { } DisableMatrixExpansionPatch("Already applied"); expandedMatrixCB.Visible = true; - ROMToolboxDialog.flag_MatrixExpansionApplied = true; + PatchToolboxDialog.flag_MatrixExpansionApplied = true; MessageBox.Show("Matrix 0 can now be freely expanded up to twice its size.", "Operation successful.", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("No changes have been made.", "Operation canceled", MessageBoxButtons.OK, MessageBoxIcon.Information); @@ -774,7 +774,7 @@ namespace DSPRE { DisableDynamicHeadersPatch("Already applied"); dynamicHeadersPatchCB.Visible = true; - ROMToolboxDialog.flag_DynamicHeadersPatchApplied = true; + PatchToolboxDialog.flag_DynamicHeadersPatchApplied = true; MessageBox.Show("The headers are now dynamically allocated in memory.", "Operation successful.", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch { @@ -822,17 +822,17 @@ namespace DSPRE { // SoulSilver USA ARM9 at 0x7342E // SoulSilver Spain ARM9 at 0x7342E // TODO: Verify - DialogResult d = MessageBox.Show($"Applying this patch will set the Trainer Name max length to {ROMToolboxDialog.expandedTrainerNameLength-1} usable characters.\n" + + DialogResult d = MessageBox.Show($"Applying this patch will set the Trainer Name max length to {PatchToolboxDialog.expandedTrainerNameLength-1} usable characters.\n" + "Are you sure you want to proceed?", "Confirm to proceed", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (d == DialogResult.Yes) { try { using (DSUtils.ARM9.Writer wr = new DSUtils.ARM9.Writer(RomInfo.trainerNameLenOffset)) { - wr.Write((byte)ROMToolboxDialog.expandedTrainerNameLength); + wr.Write((byte)PatchToolboxDialog.expandedTrainerNameLength); } - ROMToolboxDialog.flag_TrainerNamesExpanded = true; + PatchToolboxDialog.flag_TrainerNamesExpanded = true; DisableTrainerNameExpansionPatch("Already applied"); expandTrainerNamesCB.Visible = true; RomInfo.SetTrainerNameMaxLen(); diff --git a/DS_Map/ROMToolboxDialog.resx b/DS_Map/PatchToolboxDialog.resx similarity index 95% rename from DS_Map/ROMToolboxDialog.resx rename to DS_Map/PatchToolboxDialog.resx index 216bdbf..f2f9529 100644 --- a/DS_Map/ROMToolboxDialog.resx +++ b/DS_Map/PatchToolboxDialog.resx @@ -127,7 +127,7 @@ This patch is necessary to accomplish most ASM edits. iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wAAADsABataJCQAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT + vgAADr4B6kKxwAAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT bPLz+IQY464yh1s0Ne9LXK3rERAGkPt/hLDwPAt0WiTg7MtLYhgL3xaQZzUVsC1AD0Y7baK6AKzBaD8z Ya0APVi4NR/xFCZ481LLhbWHF4ToxecZ2UAmD/Y4kQ+Ag3hrB7VdSjZ6dEJpvENrBrAEguIBIb4J0FIw upmAncykgSX9hgfNYHyTqg2kaiXFN87xo5nSrQ+kXic1kuVygUkD6d58CYZ1nPWgzlMB3EvmcL1i+AEb @@ -137,7 +137,7 @@ This patch is necessary to accomplish most ASM edits. iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wAAADsABataJCQAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT + vgAADr4B6kKxwAAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT bPLz+IQY464yh1s0Ne9LXK3rERAGkPt/hLDwPAt0WiTg7MtLYhgL3xaQZzUVsC1AD0Y7baK6AKzBaD8z Ya0APVi4NR/xFCZ481LLhbWHF4ToxecZ2UAmD/Y4kQ+Ag3hrB7VdSjZ6dEJpvENrBrAEguIBIb4J0FIw upmAncykgSX9hgfNYHyTqg2kaiXFN87xo5nSrQ+kXic1kuVygUkD6d58CYZ1nPWgzlMB3EvmcL1i+AEb @@ -147,7 +147,7 @@ This patch is necessary to accomplish most ASM edits. iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wAAADsABataJCQAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT + vgAADr4B6kKxwAAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT bPLz+IQY464yh1s0Ne9LXK3rERAGkPt/hLDwPAt0WiTg7MtLYhgL3xaQZzUVsC1AD0Y7baK6AKzBaD8z Ya0APVi4NR/xFCZ481LLhbWHF4ToxecZ2UAmD/Y4kQ+Ag3hrB7VdSjZ6dEJpvENrBrAEguIBIb4J0FIw upmAncykgSX9hgfNYHyTqg2kaiXFN87xo5nSrQ+kXic1kuVygUkD6d58CYZ1nPWgzlMB3EvmcL1i+AEb @@ -157,7 +157,7 @@ This patch is necessary to accomplish most ASM edits. iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wAAADsABataJCQAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT + vgAADr4B6kKxwAAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT bPLz+IQY464yh1s0Ne9LXK3rERAGkPt/hLDwPAt0WiTg7MtLYhgL3xaQZzUVsC1AD0Y7baK6AKzBaD8z Ya0APVi4NR/xFCZ481LLhbWHF4ToxecZ2UAmD/Y4kQ+Ag3hrB7VdSjZ6dEJpvENrBrAEguIBIb4J0FIw upmAncykgSX9hgfNYHyTqg2kaiXFN87xo5nSrQ+kXic1kuVygUkD6d58CYZ1nPWgzlMB3EvmcL1i+AEb @@ -167,7 +167,7 @@ This patch is necessary to accomplish most ASM edits. iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wAAADsABataJCQAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT + vgAADr4B6kKxwAAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT bPLz+IQY464yh1s0Ne9LXK3rERAGkPt/hLDwPAt0WiTg7MtLYhgL3xaQZzUVsC1AD0Y7baK6AKzBaD8z Ya0APVi4NR/xFCZ481LLhbWHF4ToxecZ2UAmD/Y4kQ+Ag3hrB7VdSjZ6dEJpvENrBrAEguIBIb4J0FIw upmAncykgSX9hgfNYHyTqg2kaiXFN87xo5nSrQ+kXic1kuVygUkD6d58CYZ1nPWgzlMB3EvmcL1i+AEb @@ -177,7 +177,7 @@ This patch is necessary to accomplish most ASM edits. iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wAAADsABataJCQAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT + vgAADr4B6kKxwAAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT bPLz+IQY464yh1s0Ne9LXK3rERAGkPt/hLDwPAt0WiTg7MtLYhgL3xaQZzUVsC1AD0Y7baK6AKzBaD8z Ya0APVi4NR/xFCZ481LLhbWHF4ToxecZ2UAmD/Y4kQ+Ag3hrB7VdSjZ6dEJpvENrBrAEguIBIb4J0FIw upmAncykgSX9hgfNYHyTqg2kaiXFN87xo5nSrQ+kXic1kuVygUkD6d58CYZ1nPWgzlMB3EvmcL1i+AEb @@ -187,7 +187,7 @@ This patch is necessary to accomplish most ASM edits. iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wAAADsABataJCQAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT + vgAADr4B6kKxwAAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT bPLz+IQY464yh1s0Ne9LXK3rERAGkPt/hLDwPAt0WiTg7MtLYhgL3xaQZzUVsC1AD0Y7baK6AKzBaD8z Ya0APVi4NR/xFCZ481LLhbWHF4ToxecZ2UAmD/Y4kQ+Ag3hrB7VdSjZ6dEJpvENrBrAEguIBIb4J0FIw upmAncykgSX9hgfNYHyTqg2kaiXFN87xo5nSrQ+kXic1kuVygUkD6d58CYZ1nPWgzlMB3EvmcL1i+AEb @@ -197,7 +197,7 @@ This patch is necessary to accomplish most ASM edits. iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wAAADsABataJCQAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT + vgAADr4B6kKxwAAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT bPLz+IQY464yh1s0Ne9LXK3rERAGkPt/hLDwPAt0WiTg7MtLYhgL3xaQZzUVsC1AD0Y7baK6AKzBaD8z Ya0APVi4NR/xFCZ481LLhbWHF4ToxecZ2UAmD/Y4kQ+Ag3hrB7VdSjZ6dEJpvENrBrAEguIBIb4J0FIw upmAncykgSX9hgfNYHyTqg2kaiXFN87xo5nSrQ+kXic1kuVygUkD6d58CYZ1nPWgzlMB3EvmcL1i+AEb @@ -207,7 +207,7 @@ This patch is necessary to accomplish most ASM edits. iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vwAADr8BOAVTJAAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT + vQAADr0BR/uQrQAAAOFJREFUOE+tj8ERgkAMRddx0Js90ItFeJS7B3vxTDO04FiCdaxJ2ISwmywjcPiT bPLz+IQY464yh1s0Ne9LXK3rERAGkPt/hLDwPAt0WiTg7MtLYhgL3xaQZzUVsC1AD0Y7baK6AKzBaD8z Ya0APVi4NR/xFCZ481LLhbWHF4ToxecZ2UAmD/Y4kQ+Ag3hrB7VdSjZ6dEJpvENrBrAEguIBIb4J0FIw upmAncykgSX9hgfNYHyTqg2kaiXFN87xo5nSrQ+kXic1kuVygUkD6d58CYZ1nPWgzlMB3EvmcL1i+AEb diff --git a/DS_Map/RomInfo.cs b/DS_Map/RomInfo.cs index 8420125..f2e0648 100644 --- a/DS_Map/RomInfo.cs +++ b/DS_Map/RomInfo.cs @@ -550,7 +550,7 @@ namespace DSPRE { } else if (ramAddressOfTable >= RomInfo.synthOverlayLoadAddress) { // if the pointer shows the table was moved to the synthetic overlay OWTableOffset = ramAddressOfTable - RomInfo.synthOverlayLoadAddress; - OWtablePath = gameDirs[DirNames.synthOverlay].unpackedDir + "\\" + ROMToolboxDialog.expandedARMfileID.ToString("D4"); + OWtablePath = gameDirs[DirNames.synthOverlay].unpackedDir + "\\" + PatchToolboxDialog.expandedARMfileID.ToString("D4"); } else { OWTableOffset = ramAddressOfTable - ov1Address; OWtablePath = ov1Path; diff --git a/DS_Map/SpawnEditor.cs b/DS_Map/SpawnEditor.cs index 12f8e60..74a267a 100644 --- a/DS_Map/SpawnEditor.cs +++ b/DS_Map/SpawnEditor.cs @@ -109,7 +109,7 @@ namespace DSPRE { ushort headerNumber = ushort.Parse(spawnHeaderComboBox.SelectedItem.ToString().Split()[0]); MapHeader currentHeader; - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { currentHeader = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + headerNumber.ToString("D4"), headerNumber, 0); } else { currentHeader = MapHeader.LoadFromARM9(headerNumber); diff --git a/DS_Map/WildEditorDPPt.cs b/DS_Map/WildEditorDPPt.cs index 7f42124..aae54e5 100644 --- a/DS_Map/WildEditorDPPt.cs +++ b/DS_Map/WildEditorDPPt.cs @@ -22,7 +22,7 @@ namespace DSPRE { Dictionary EncounterFileLocationName = new Dictionary(); for (ushort i = 0; i < totalNumHeaderFiles; i++) { - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { tempMapHeader = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + i.ToString("D4"), i, 0); } else { tempMapHeader = MapHeader.LoadFromARM9(i); diff --git a/DS_Map/WildEditorHGSS.cs b/DS_Map/WildEditorHGSS.cs index f3a0ce9..f841a53 100644 --- a/DS_Map/WildEditorHGSS.cs +++ b/DS_Map/WildEditorHGSS.cs @@ -23,7 +23,7 @@ namespace DSPRE { for (ushort i = 0; i < totalNumHeaderFiles; i++) { - if (ROMToolboxDialog.flag_DynamicHeadersPatchApplied || ROMToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) + if (PatchToolboxDialog.flag_DynamicHeadersPatchApplied || PatchToolboxDialog.CheckFilesDynamicHeadersPatchApplied()) { tempMapHeader = MapHeader.LoadFromFile(RomInfo.gameDirs[DirNames.dynamicHeaders].unpackedDir + "\\" + i.ToString("D4"), i, 0); }