public static Tuple <int, float> ReadTupleInt32Single(this AssetStream stream) { int value1 = stream.ReadInt32(); float value2 = stream.ReadSingle(); return(new Tuple <int, float>(value1, value2)); }
public static Tuple <byte, float> ReadTupleByteSingle(this AssetStream stream) { byte value1 = stream.ReadByte(); float value2 = stream.ReadSingle(); return(new Tuple <byte, float>(value1, value2)); }
public static Tuple <char, float> ReadTupleCharSingle(this AssetStream stream) { char value1 = Convert.ToChar(stream.ReadByte()); float value2 = stream.ReadSingle(); return(new Tuple <char, float>(value1, value2)); }
public static void Read(this IDictionary <Tuple <ushort, ushort>, float> _this, AssetStream stream) { int count = stream.ReadInt32(); for (int i = 0; i < count; i++) { Tuple <ushort, ushort> key = stream.ReadTupleUInt16UInt16(); float value = stream.ReadSingle(); _this.Add(key, value); } }
public static void Read(this IDictionary <Tuple <char, char>, float> _this, AssetStream stream) { int count = stream.ReadInt32(); for (int i = 0; i < count; i++) { Tuple <char, char> key = stream.ReadTupleCharChar(); float value = stream.ReadSingle(); _this.Add(key, value); } }
public static void Read(this IDictionary <string, float> _this, AssetStream stream) { int count = stream.ReadInt32(); for (int i = 0; i < count; i++) { string key = stream.ReadStringAligned(); float value = stream.ReadSingle(); _this.Add(key, value); } }
public static void Read <T>(this IDictionary <T, float> _this, AssetStream stream, Func <T> instantiator) where T : IAssetReadable { int count = stream.ReadInt32(); for (int i = 0; i < count; i++) { T key = instantiator(); key.Read(stream); float value = stream.ReadSingle(); _this.Add(key, value); } }