SAV1/2: Force zeroed slots to be FF

Deleting a slot shouldn't leave a level 0 nameless speciesless mon
This commit is contained in:
Kurt 2024-05-13 19:47:23 -05:00
parent ca85fba061
commit a4a0337162
2 changed files with 4 additions and 0 deletions

View file

@ -227,6 +227,8 @@ public static class PokeList1
{
var single = input.Slice(i * size, size);
var marker = single[1]; // assume correct, don't look in body data.
if (marker is 0) // Ensure deleted (zeroed) slots act as an Empty (FF) slot.
marker = SlotEmpty;
var index = IsPresent(marker) ? ctr++ : emptyIndex++;
output[1 + index] = marker;

View file

@ -230,6 +230,8 @@ public static class PokeList2
{
var single = input.Slice(i * size, size);
var marker = single[1]; // assume correct, don't look in body data.
if (marker is 0) // Ensure deleted (zeroed) slots act as an Empty (FF) slot.
marker = SlotEmpty;
var index = IsPresent(marker) ? ctr++ : emptyIndex++;
output[1 + index] = marker;