From 4bb8ed2cf28721ea91ee00e88e13cbb3acccc018 Mon Sep 17 00:00:00 2001 From: Mixone-FinallyHere Date: Fri, 10 Oct 2025 21:02:03 +0200 Subject: [PATCH] Fixes a small bug for forms sprite editing (still disabled) --- DS_Map/Editors/PokemonSpriteEditor.cs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/DS_Map/Editors/PokemonSpriteEditor.cs b/DS_Map/Editors/PokemonSpriteEditor.cs index 09aff7b..3fd20aa 100644 --- a/DS_Map/Editors/PokemonSpriteEditor.cs +++ b/DS_Map/Editors/PokemonSpriteEditor.cs @@ -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; }