Kernel_bin.Slot_array.cs 915 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.IO;
  2. namespace FF8
  3. {
  4. public partial class Kernel_bin
  5. {
  6. /// <summary>
  7. /// Slot Array Data
  8. /// </summary>
  9. /// <see cref="https://github.com/alexfilth/doomtrain/wiki/Slot-array"/>
  10. public class Slot_array
  11. {
  12. public const int count = 60;
  13. public const int id = 26;
  14. public const int size = 1;
  15. public byte SlotID { get; private set; }
  16. public void Read(BinaryReader br, int i) => SlotID = br.ReadByte();
  17. public static Slot_array[] Read(BinaryReader br)
  18. {
  19. var ret = new Slot_array[count];
  20. for (int i = 0; i < count; i++)
  21. {
  22. var tmp = new Slot_array();
  23. tmp.Read(br, i);
  24. ret[i] = tmp;
  25. }
  26. return ret;
  27. }
  28. }
  29. }
  30. }