예제 #1
0
        public static void Send(Lidgren.Network.NetOutgoingMessage message, Canvas canvas, Palette pal)
        {
            using (var stream = new MemoryStream()) {
                Pablo.Save(stream, canvas, pal);
                stream.Flush();
                stream.Seek(0, SeekOrigin.Begin);

                message.WriteVariableInt32(canvas.Width);
                message.WriteVariableInt32(canvas.Height);
                message.WritePadBits();
                message.WriteStream((Stream)stream);
            }
        }
예제 #2
0
        public override bool Send(SendCommandArgs args)
        {
            base.Send(args);
            args.Message.Write(ICEColours);
            args.Message.Write(Use9x);
            args.Message.Write(DosAspect);
            var page = Pages[0];

            args.Message.Write(page.Canvas.Size);
            args.Message.WritePadBits();
            using (var stream = new MemoryStream())
            {
                var type = new Types.Pablo(Info);
                type.Save(stream, this);
                stream.Flush();
                stream.Seek(0, SeekOrigin.Begin);

                args.Message.WriteStream(stream);
            }
            return(true);
        }