public static uint Write(object argument, IDefinitionWriter writer) { var(unknown0, unknown1, unknown2, unknown3, unknown4, unknown5) = ((ushort, uint, ushort, ushort, byte, ulong))argument; writer.WriteValueU16(unknown0); writer.WriteValueU32(unknown1); writer.WriteValueU16(unknown2); writer.WriteValueU16(unknown3); writer.WriteValueU8(unknown4); writer.WriteValueU64(unknown5); return(19); }
internal static uint Write(object argument, IDefinitionWriter writer) { var(jnextOffset, sourceLine, function) = (FinalFunc_Offset)argument; jnextOffset -= 1 + 2; // make relative to the jump offset; writer.WriteValueS16(jnextOffset); writer.WriteValueU16(sourceLine); writer.WriteReference(function); return(12); }
internal static uint Write(object argument, IDefinitionWriter writer) { var instance = (VirtualFunc)argument; var jumpOffset = instance.JumpOffset; jumpOffset -= 1 + 2; // make relative to the jump offset writer.WriteValueS16(jumpOffset); writer.WriteValueU16(instance.SourceLine); writer.WriteName(instance.Function); return(12); }
internal override void Serialize(IDefinitionWriter writer) { if (writer == null) { throw new ArgumentNullException(nameof(writer)); } writer.WriteValueU8((byte)this.Visibility); writer.WriteValueU16((ushort)this.Flags); writer.WriteReference(this.BaseClass); if ((this.Flags & ClassFlags.HasFunctions) != 0) { writer.WriteReferences(this.Functions); } if ((this.Flags & ClassFlags.Unknown5) != 0) { writer.WriteReferences(this.Unknown20s); } if ((this.Flags & ClassFlags.Unknown8) != 0) { writer.WriteReferences(this.Unknown30s); } }
public static uint Write(object argument, IDefinitionWriter writer) { writer.WriteValueU16((ushort)argument); return(2); }