Ejemplo n.º 1
0
        public static Tuple <byte, float> ReadTupleByteSingle(this AssetReader reader)
        {
            byte  value1 = reader.ReadByte();
            float value2 = reader.ReadSingle();

            return(new Tuple <byte, float>(value1, value2));
        }
Ejemplo n.º 2
0
        public static Tuple <int, float> ReadTupleInt32Single(this AssetReader reader)
        {
            int   value1 = reader.ReadInt32();
            float value2 = reader.ReadSingle();

            return(new Tuple <int, float>(value1, value2));
        }
Ejemplo n.º 3
0
        public static Tuple <char, float> ReadTupleCharSingle(this AssetReader reader)
        {
            char  value1 = Convert.ToChar(reader.ReadByte());
            float value2 = reader.ReadSingle();

            return(new Tuple <char, float>(value1, value2));
        }
Ejemplo n.º 4
0
        public static void Read(this IDictionary <Tuple <ushort, ushort>, float> _this, AssetReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                Tuple <ushort, ushort> key = reader.ReadTupleUInt16UInt16();
                float value = reader.ReadSingle();
                _this.Add(key, value);
            }
        }
Ejemplo n.º 5
0
        public static void Read(this IDictionary <Tuple <char, char>, float> _this, AssetReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                Tuple <char, char> key = reader.ReadTupleCharChar();
                float value            = reader.ReadSingle();
                _this.Add(key, value);
            }
        }
Ejemplo n.º 6
0
        public static void Read(this IDictionary <string, float> _this, AssetReader reader)
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                string key   = reader.ReadStringAligned();
                float  value = reader.ReadSingle();
                _this.Add(key, value);
            }
        }
Ejemplo n.º 7
0
        public static void Read <T>(this IDictionary <T, float> _this, AssetReader reader, Func <T> instantiator)
            where T : IAssetReadable
        {
            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                T key = instantiator();
                key.Read(reader);
                float value = reader.ReadSingle();
                _this.Add(key, value);
            }
        }