public void WriteFlaggedVariables(CVAR flags, string setCmd, VFile f) { foreach (var cvar in cvars.Values) { if ((cvar.Flags & flags) != 0) { f.Printf($"{setCmd} {cvar.Name} \"{cvar.String}\"\n"); } } }
public static int WriteTMany <T>(this VFile source, T[] value) where T : struct => throw new NotImplementedException();
public static int Write(this VFile source, bool value) => source.Write((byte *)&value, sizeof(bool));
public static int Write <E>(this VFile source, E value) where E : Enum => throw new NotImplementedException();
public static int Write(this VFile source, float value) => source.Write((byte *)&value, sizeof(float));
public static int Write(this VFile source, ushort value) => source.Write((byte *)&value, sizeof(ushort));
public static int WriteASCII(this VFile source, string value, int length) => source.Write(Encoding.ASCII.GetBytes(value), value.Length);
public static int Write(this VFile source, ulong value) => source.Write((byte *)&value, sizeof(ulong));
public static int ReadT <T>(this VFile source, out T value) where T : struct => throw new NotImplementedException();
public static int ReadTMany <T>(this VFile source, out T[] value, int count) where T : struct => throw new NotImplementedException();
public static int Read(this VFile source, out bool value) { bool val; var r = source.Read((byte *)&val, sizeof(bool)); value = val; return(r); }
public static int Read(this VFile source, out ushort value) { ushort val; var r = source.Read((byte *)&val, sizeof(ushort)); value = val; return(r); }
public static int Read(this VFile source, out float value) { float val; var r = source.Read((byte *)&val, sizeof(float)); value = val; return(r); }
public static int Read(this VFile source, out long value) { long val; var r = source.Read((byte *)&val, sizeof(long)); value = val; return(r); }
public static int ReadASCII(this VFile source, out string value, int length) => throw new NotImplementedException();