add usum tutor data

one large list at static.rodata:005E6860, formatted to look like AO
table with deletions & insertions at the bottom.
bitflags are used in one large set (not 4 chunks of 4 like prior).
This commit is contained in:
Kurt
2017-11-08 01:25:10 -08:00
parent ece66e1a02
commit ae773f189b
3 changed files with 10 additions and 14 deletions

View File

@@ -2202,10 +2202,10 @@ internal static IEnumerable<int> GetTutorMoves(PKM pkm, int species, int form, b
}
return moves.Distinct();
IEnumerable<int> GetTutors(PersonalTable t, IReadOnlyList<int[]> tutors)
IEnumerable<int> GetTutors(PersonalTable t, params int[][] tutors)
{
var pi = t.GetFormeEntry(species, form);
for (int i = 0; i < tutors.Count; i++)
for (int i = 0; i < tutors.Length; i++)
for (int b = 0; b < tutors[i].Length; b++)
if (pi.SpecialTutors[i][b])
yield return tutors[i][b];

View File

@@ -51,12 +51,14 @@ public static partial class Legal
#endregion
internal static readonly int[][] Tutors_USUM =
internal static readonly int[] Tutors_USUM =
{
new int[0], // todo
new int[0], // todo
new int[0], // todo
new int[0], // todo
450, 343, 162, 530, 324, 442, 402, 529, 340, 067, 441, 253, 009, 007, 008,
277, 335, 414, 492, 356, 393, 334, 387, 276, 527, 196, 401, 428, 406, 304, 231,
020, 173, 282, 235, 257, 272, 215, 366, 143, 220, 202, 409, 264, 351, 352,
380, 388, 180, 495, 270, 271, 478, 472, 283, 200, 278, 289, 446, 285,
477, 502, 432, 710, 707, 675, 673
};
internal static readonly ushort[] Pouch_Regular_SM = // 00
{

View File

@@ -20,10 +20,7 @@ public PersonalInfoSM(byte[] data)
SpecialTutors = new[]
{
GetBits(Data.Skip(0x3C).Take(0x04).ToArray()),
GetBits(Data.Skip(0x40).Take(0x04).ToArray()),
GetBits(Data.Skip(0x44).Take(0x04).ToArray()),
GetBits(Data.Skip(0x48).Take(0x04).ToArray()),
GetBits(Data.Skip(0x3C).Take(0x0A).ToArray()),
};
}
public override byte[] Write()
@@ -31,9 +28,6 @@ public override byte[] Write()
SetBits(TMHM).CopyTo(Data, 0x28);
SetBits(TypeTutors).CopyTo(Data, 0x38);
SetBits(SpecialTutors[0]).CopyTo(Data, 0x3C);
SetBits(SpecialTutors[1]).CopyTo(Data, 0x40);
SetBits(SpecialTutors[2]).CopyTo(Data, 0x44);
SetBits(SpecialTutors[3]).CopyTo(Data, 0x48);
return Data;
}