public StrategyMemo(byte[] input, int offset, bool xd) { XD = xd; int count = BigEndian.ToInt16(input, offset); if (count > 500) count = 500; _unk = input.Skip(offset + 2).Take(2).ToArray(); for (int i = 0; i < count; i++) { byte[] data = new byte[SIZE_ENTRY]; Array.Copy(input, 4 + offset + SIZE_ENTRY * i, data, 0, SIZE_ENTRY); Entries.Add(new StrategyMemoEntry(XD, data)); } }
public StrategyMemo(byte[] input, int offset, bool xd) { XD = xd; int count = BigEndian.ToInt16(input, offset); if (count > MAX_COUNT) { count = MAX_COUNT; } _unk = input.Slice(offset + 2, 2); for (int i = 0; i < count; i++) { var entry = Read(input, offset, i); Entries.Add(entry); } }
public StrategyMemo(byte[] input, int offset, bool xd) { XD = xd; int count = BigEndian.ToInt16(input, offset); if (count > 500) { count = 500; } _unk = input.Skip(offset + 2).Take(2).ToArray(); for (int i = 0; i < count; i++) { var entry = Read(input, offset, i); Entries.Add(entry); } }