示例#1
0
        public TXVSingle(Stream stream, TXMSingle txm)
        {
            uint bytecount = txm.GetByteCount();

            TXM  = txm;
            Data = new MemoryStream((int)bytecount);

            stream.Position = txm.TxvLocation;
            Util.CopyStream(stream, Data, bytecount);
            Data.Position = 0;
        }
示例#2
0
        public TXVSingle(Stream stream, TXMSingle txm, bool vesperiaPcTextureFormat)
        {
            uint bytecount = vesperiaPcTextureFormat ? stream.ReadUInt32().FromEndian(EndianUtils.Endianness.BigEndian) : txm.GetByteCount();

            TXM        = txm;
            Data       = new MemoryStream((int)bytecount);
            VesperiaPC = vesperiaPcTextureFormat;

            if (!vesperiaPcTextureFormat)
            {
                stream.Position = txm.TxvLocation;
            }
            StreamUtils.CopyStream(stream, Data, bytecount);
            Data.Position = 0;
        }