예제 #1
0
파일: SAV2Stadium.cs 프로젝트: sutiam/PKHeX
        protected override void SetBoxChecksum(int box)
        {
            var boxOfs = GetBoxOffset(box) - ListHeaderSizeBox;
            var size   = BoxSize - 2;
            var chk    = Checksums.CheckSum16(new ReadOnlySpan <byte>(Data, boxOfs, size));

            BigEndian.GetBytes(chk).CopyTo(Data, boxOfs + size);
        }
예제 #2
0
        protected override void SetBoxChecksum(int i)
        {
            var       boxOfs = GetBoxOffset(i) - ListHeaderSize;
            const int size   = BoxSizeJ - 2;
            var       chk    = Checksums.CheckSum16(Data, boxOfs, size);

            BigEndian.GetBytes(chk).CopyTo(Data, boxOfs + size);
        }
예제 #3
0
        protected override void SetBoxChecksum(int box)
        {
            var       boxOfs = GetBoxOffset(box) - ListHeaderSize;
            const int size   = BoxSizeJ - 2;
            var       chk    = Checksums.CheckSum16(new ReadOnlySpan <byte>(Data, boxOfs, size));

            WriteUInt16BigEndian(Data.AsSpan(boxOfs + size), chk);
        }
예제 #4
0
파일: SAV2Stadium.cs 프로젝트: sutiam/PKHeX
        protected override bool GetIsBoxChecksumValid(int box)
        {
            var boxOfs = GetBoxOffset(box) - ListHeaderSizeBox;
            var size   = BoxSize - 2;
            var chk    = Checksums.CheckSum16(new ReadOnlySpan <byte>(Data, boxOfs, size));
            var actual = BigEndian.ToUInt16(Data, boxOfs + size);

            return(chk == actual);
        }
예제 #5
0
        protected override bool GetIsBoxChecksumValid(int i)
        {
            var       boxOfs = GetBoxOffset(i) - ListHeaderSize;
            const int size   = BoxSizeJ - 2;
            var       chk    = Checksums.CheckSum16(Data, boxOfs, size);
            var       actual = BigEndian.ToUInt16(Data, boxOfs + size);

            return(chk == actual);
        }