mirror of
https://github.com/AdAstra-LD/DS-Pokemon-Rom-Editor.git
synced 2026-10-01 22:38:13 -05:00
More fixes [overworld sprite finder]
This commit is contained in:
@@ -4503,10 +4503,11 @@ namespace DSPRE {
|
||||
if (index > -1) {
|
||||
try {
|
||||
selectedEvent = currentEvFile.overworlds[index];
|
||||
Overworld selectedOw = (Overworld)selectedEvent;
|
||||
|
||||
/* Sprite index and image controls */
|
||||
owSpriteComboBox.SelectedIndex = ((Overworld)selectedEvent).overlayTableEntry;
|
||||
owSpritePictureBox.BackgroundImage = GetOverworldImage(currentEvFile.overworlds[index].overlayTableEntry, currentEvFile.overworlds[index].orientation);
|
||||
owSpriteComboBox.SelectedIndex = Array.IndexOf(RomInfo.overworldTableKeys, selectedOw.overlayTableEntry);
|
||||
owSpritePictureBox.BackgroundImage = GetOverworldImage(selectedOw.overlayTableEntry, selectedOw.orientation);
|
||||
} catch (ArgumentOutOfRangeException) {
|
||||
String errorMsg = "This Overworld's sprite ID couldn't be read correctly.";
|
||||
MessageBox.Show(errorMsg, "Something went wrong", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace DSPRE {
|
||||
public static Dictionary<ushort, string> ScriptCommandNamesDict { get; private set; }
|
||||
public static Dictionary<ushort, byte[]> CommandParametersDict { get; private set; }
|
||||
public static SortedDictionary<uint, (uint spriteID, ushort properties)> OverworldTable { get; private set; }
|
||||
public static uint[] overworldTableKeys { get; private set; }
|
||||
|
||||
#region Constructors (1)
|
||||
public RomInfo(string id, string workDir) {
|
||||
@@ -588,6 +589,7 @@ namespace DSPRE {
|
||||
}
|
||||
break;
|
||||
}
|
||||
overworldTableKeys = OverworldTable.Keys.ToArray();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user