Fixes a small bug for forms sprite editing (still disabled)

This commit is contained in:
Mixone-FinallyHere 2025-10-10 21:02:03 +02:00
parent 22c4891537
commit 4bb8ed2cf2

View File

@ -853,14 +853,15 @@ namespace DSPRE.Editors
private void LoadSprites()
{
nr = new NarcReader(RomInfo.gameDirs[DirNames.pokemonBattleSprites].packedDir);
used = new bool[nr.fe.Length];
for (int i = 0; i < nr.fe.Length; i++)
{
used[i] = (nr.fe[i].Size > 0);
}
if (!loadingOther)
{
nr = new NarcReader(RomInfo.gameDirs[DirNames.pokemonBattleSprites].packedDir);
used = new bool[nr.fe.Length];
for (int i = 0; i < nr.fe.Length; i++)
{
used[i] = (nr.fe[i].Size > 0);
}
IndexBox.Items.Clear();
for (int i = 0; i < pokenames.Length; i++)
{
@ -870,10 +871,16 @@ namespace DSPRE.Editors
}
else
{
used = new bool[nr.fe.Length];
for (int i = 0; i < nr.fe.Length; i++)
{
used[i] = (nr.fe[i].Size > 0);
}
nr = new NarcReader(RomInfo.gameDirs[DirNames.otherPokemonBattleSprites].packedDir);
IndexBox.Items.Clear();
for (int i = 0; i < otherPokenames.Length; i++)
{
IndexBox.Items.Add(otherPokenames[i]);
IndexBox.Items.Add(i.ToString("D3") + " " + otherPokenames[i]);
}
IndexBox.SelectedIndex = 0;
}