Exemple #1
0
        public void SaveStateBinary(BinaryWriter writer)
        {
            LibmGBA.BizGetState(core, savebuff);
            writer.Write(savebuff.Length);
            writer.Write(savebuff);

            // other variables
            writer.Write(IsLagFrame);
            writer.Write(LagCount);
            writer.Write(Frame);
        }
Exemple #2
0
        public void SaveStateBinary(BinaryWriter writer)
        {
            int size = LibmGBA.BizGetState(core, savebuff, savebuff.Length);

            if (size < 0)
            {
                throw new InvalidOperationException("Core failed to save!");
            }
            writer.Write(size);
            writer.Write(savebuff, 0, size);

            // other variables
            writer.Write(IsLagFrame);
            writer.Write(LagCount);
            writer.Write(Frame);
        }