Пример #1
0
        protected override void WriteExt(ByteBuilder bb)
        {
            bb.AddBytes(mapping);
            bb.AddIntBE(ts);

            foreach (var c in Colors)
            {
                bb.AddByte(c.Used);
                bb.AddByte(c.R);
                bb.AddByte(c.G);
                bb.AddByte(c.B);
            }
        }
Пример #2
0
        private void SaveV3(List <MessageRecord> messages, ByteBuilder bb)
        {
            bb.AddIntBE(header);
            int endOffset = bb.Position;

            bb.AddShortBE(0);
            bb.AddShortBE((ushort)messages.Count);

            object[] extra = new object[messages.Count];

            for (int i = 0; i < messages.Count; i++)
            {
                extra[i] = messages[i].WriteHeader(bb);
            }

            for (int i = 0; i < messages.Count; i++)
            {
                messages[i].WriteText(bb, extra[i], GameEncoding);
            }

            bb.SetShortBE(endOffset, (ushort)(bb.Position - endOffset));
        }