public void Serialize(GMDataWriter writer) { writer.WritePointerString(Name); if (BytecodeEntry != null) { Length = BytecodeEntry.GetLength() * 4; } writer.Write(Length); if (writer.VersionInfo.FormatID <= 14) { BytecodeEntry.Serialize(writer); } else { writer.Write(LocalsCount); writer.Write((short)((int)ArgumentsCount | ((int)Flags << 13))); writer.Write(writer.PointerOffsets[BytecodeEntry] - writer.Offset); writer.Write(BytecodeOffset); } }